Abandoned sand mansion environment breakdown

Making Of / 17 March 2022

I just finished working on an environment job on a yet to be released IP and thought that this was an opportunity to work in UE5 and also work on any new workflows before something else comes along. As the developer of Extile suite of non-repetitive tiling materials - that can be found on the Unreal marketplace (https://www.unrealengine.com/marketplace/en-US/product/extile-plus-non-repetitive-tiling-material) - I usually use these environments to test new functions/ materials or ideas that I can add to newer versions of the product line or share any new workflows on my youtube channel. (https://www.youtube.com/c/AlexandrosDemetriades67/videos)

So I started as I usually do with collecting some reference shots. Honestly, I find it difficult to settle on one particular one idea cause I get this urge to somehow want to create them all! In any case after dragging them into pureref and staring at the time for some time something will catch my eye - in this case its the main picture in my selection. I will start by modeling something that I feel could be challenging and then seeing if it's worth continuing - in this case I want to create the upper wall decor in blender - that was my initial goal as I haven't done something similar in Blender. I have been a 3ds max user for quite some time but I have recently made the switch to Blender and have been using it daily for the past 6 months. I have to say I'm hooked! Love working in shortcuts, the addon community is great (Extile by the way is also available for Blender now as well - https://blendermarket.com/products/extile) and the overall experience is much better - imho - than 3ds. 

As I begin to model parts I also try and think more deeply on the scene and in this case I wanted to add an additional challenge to the process and thought that sand would be a great challenge to add so I begun to think on how this mansion/room would look if it was somewhere abandoned in a desert and covered with sand.

So after I create a few props and I'm happy with how things go I start constructing the modular pieces, in this case some very basic shapes. One thing that I found very useful is Blender's archipack addon which comes free with Blender and lets you quickly place walls and windows etc. Here I also do a my initial blocking as I find it easier to correct any issues in the modeling software rather than using Ue4 and going back and forth. Once I have an airtight environment I move on. I also have a habit of saving a new version of anything I'm working on when I begin the day - this way I always have a back up of the previous day. I also use the ue4 mannequin as size refence that I exported from ue4. 


In Unreal I do the same by using a BP script I wrote that lets me quickly fit pieces together (This is part of Exsite that is also for sale on the Unreal marketplace as well). Once happy I can merge the meshes into one and start working from there.



I also modeled the sand inside the building in blender and this time I took advantage of nanite to use it as is. I could have used even more resolution but I was happy with this amount. I also modeled a quick landscape for the surroundings using world creator but unfortunately it doesn't show much as I concentrated on the inside more. Initially I thought I could use the landscape as the inside as well but the detail wasn't there so here is where nanite shines - allowing for detailed meshes that otherwise would not have been possible. However it does come with its limits and in this case nanite doesn't work with material layers (or with vertex painting for that matter) so I had to copy the functions and create a new master for the sand based on the existing ones I had.


Once all the modelling and UV was done I switch to texturing and start the baking process to get the masks I want. For Uving I usually resort to auto unwrapping and test and see if there are any issues - if so then I go and either manually fix them by stitching Uvs or creating new seams. What I most definitely try and do is maintain texel density at about 1k/m. I usually work in 2k textures and it was no exception for this project as I like to keep things light and optimized as much as possible. In ue5 and nanite you can get away with using low polys but baking is still very important to get good texturing - unless its photogrammetry. I've written about my method before and it's not something new but the way I like to work is use substance painter as more of a look dev tool - once I'm happy say with the look I will use the tile sample in substance painter to get the main tiling texture out and then export up to 4 masks that detail various curvature and dirt paths. Alternatively I can use any tiling texture that I like. I do this for large environments usually so I can also get more detail from my textures if I wanted to and also it is a very optimized workflow. This coupled with any of Extile's non-repetitive tiling masters or functions covers all my needs and I never have to worry about repetitions in my textures. 


Once done I import those textures in another package - in my case substance designer - and pack them into 1 texture - RGBA. I used this technique for a lot of the basic environment parts. This type of material is now included in the newest version of Extile Plus (V2.9) as part of the material layered setup.
One thing that I did that I did not use to do is use vertex painting to define my ID masks. I used to use material IDs which usually meant I had a copy of the mesh with the unique materials associated with each part. Vertex painting is much faster, I found and you can use the same mesh for baking all maps including the IDs and in Blender its a very quick process.

For texturing the armchair for example I used a texture that I liked online then used Substance sampler to de-light it and make-it-tile. From there it was matter of constructing it in substance painter to my liking.


Anyway the other notable thing I did was use the vertex mask from Extile Plus to create materials that allow for another texture set to be stacked on top with controls on how much to apply on the xyz axis. In this case this is controlled via the display blend XYZ slider. This helped apply the sand on all meshes very easily and refine with vertex paint where necessary.


For the floor which is essentially a single plane I used another function found in Extile plus which uses distance fields to get a mask from interconnected meshes using the closest to nearest surface node. 

I have a youtube video explaining how to use this without the need to have Extile to make it work here: 


This allowed me to get a mask where the sand mesh intersected with the floor plane. Again I can control the axis placement to localize the mask if I wanted so that's how I created the sand on the floor with just one function!

Another function I use is one that allows me to create a dirt mask on either sides of a wall or floor mesh. So I used this to get some dirt effect on the very top part of the roof and also the bottom part at the same time. very handy way to break wall ceiling/floor connections which otherwise sometimes look too clean. You can of course use decal meshes to achieve similar effect but I find for certain instances this is faster and easier and less costly. In this case adjusting the offset adjusts the height between the top and bottom mask created.


Those are the basic materials I used. In terms of lighting Lumen works out of the box and now with the Preview version there's even less things to switch on prior to starting. The only thing I note is that for some reason I couldn't turn on hardware raytracing in Lumen settings unless I turned on support for hardware raytracing in the rendering tab in the project settings.
I used a very basic lighting setup with a directional, skylight with some tweaking here and there. I did however increase the source angle of the directional light to get softer shadows and get rid of a harsh directionality as I envisioned a somewhat overcast sky. I experimented with an hdri but in the end I used the sky atmosphere to set the scene as it worked better for me. I went for a cinematic look and accentuated the height fog a tad but overall I tried to keep things as minimal as possible. One thing to note is that if you are having difficulty getting the amount of height fog you want you can push the Extinction Scale in the volumetric settings above the default which stops at 10 - so you would need to enter a high number and bypass the slider. You can also play with the color here.
I tried a couple of scenarios and perhaps I'll try some more in the future.

In general I was hitting between 40-60fps on my 4k monitor using an rtx 2080ti without much effort in optimization with full Lumen turned on including on the lansdcape I had outside. I'm also running everything from external disk due to lack of space currently. I could have optimized more and one way is by using custom primitive data to achieve variations in a scene without incurring any additional draw calls. You can watch the video above to see how to implement this in you workflows. So overall very pleased with lumen and nanite. I also like the new UI - much more cleaner and easy to remember and focus on.
Another thing to take note of is that lumen likes thick walls and ceilings to stop the light from coming through so single faced meshes will not give you good results.

A very interesting site I discovered that inspired me in many ways is: https://ipoxstudios.com/mastering-composition-photography-art/. Its not free for everything but there are some free articles or you can join to get more access. I specifically checked this article on the cinematography of Dune https://ipoxstudios.com/dune-2021-composition-techniques-part-two-analyzed-cinema/. It has a lot of resources and analysis on cinematography and compositional setup in general and worth to check out. Of course the internet is filled with free resources!

Other than that I didn't touch any Lumen settings as I really didn't feel there was any need to. Also didn't touch any other parameters in the ppv either.  What can I say? Lumen is amazing and so much of a cinematographer's tool now...it allows you to see in real time the whole picture and now with support for landscapes the possibilities are even bigger and it will definitely be where my next scene will take place in!

Initial Inspiration - a photograph (unfortunately I forgot to take down the name of person who shot it ...but credits to AR written!)

Lighting scenario #1


Lighting scenario #2

P.S  Extile Plus has a discord channel (https://discord.gg/cJF8vKK4j8) for those who already own the product but also for anyone who has any general questions or wants to hang out...pls come and join...Thanks!

Rembrandt - chiaroscuro - lighting the scene

Making Of / 08 April 2020

Lighting setup:

I am a big fan of dynamic lighting and even though I think lightmass is great it can be cumbersome especially if you have to implement changes down the road. Of course for certain projects its the only way to go - especially  for memory budget reasons - but for others like small scenes as this, archviz projects etc I feel baking can slow you down. I do like the new RT features implemented in Unreal since a few iterations ago although it does take some getting used to them and how they can be combined in a way that works for your project. (I have a video on implementing some of those features should you want to learn more on this: https://ad67.artstation.com/projects/L2dAP0?album_id=2170009 . I love RT shadows - they are so accurate and controllable and they come at a relatively low cost so I think that of all the RT features this one makes the most impact relative to the cost incurred - except for the skylight shadows that has a more measurable cost associated with it. In addition to the shadows RT AO also carries a big punch. In this scene I used them both RT shadows and AO.

For the Remrandt scene I used a combination of methods to achieve the chiaroscuro effect that Rembrandt was so famous for. One thing that would have been handy but is not available in Unreal is negative lighting - which basically allows you to suck up light like a black hole. You could do it in BPs but only during run time so it isn't something applicable for this. The one thing that I didn't want in my scene is ambient lighting therefore I did not use any skylight in the scene. I also set up my reflection capture volumes - both a box reflector for the main reflections and a sphere to localize some detailed reflections early on. Its a good idea to place these early in the scene to minimize any surprises you may get if you add them after all the setup is done.

So the first thing I usually do is establish my base light - my key light. So after looking at the image I began to decipher the main source of light which in this case is coming mostly from the window. I used a rectangle light to get nice soft shadows and edge lighting and played around with the attenuation radius and colour parameters to more or less get the basic forms and colours in. Once this was established I added a fill light to get more volume in the scene. I could have boosted the key light to give me the extra volume but I believe that the more control you build at this stage the easier it will be to refine the lighting down the line when you start adding more light points - if there's anything to take form all this is that you should always build your scenes gradually - this stage is the most important. I then began to add more detailed lighting to add more intensity in the areas that I felt needed it using only rectangular lights again adjusting attenuation, colour intensity etc . Finally I I added some very fine point lights with various color temperatures and attenuation radi to try and fake the Gi bounce lighting that would be present in the scene. Depite the advances in technology and the use of RT and SSGI going back to old school basics is still one of the most efficient ways to create GI with little cost. 

Finally for the icing on the cake I used distance field indirect shadows. This helps get the deep shadows and adds another level of AO that isn't possible in any other way - it makes everything more grounded in the scene. The great thing about this method is that you can turn it on, on a per mesh basis and this way you can be selective on which meshes to apply to it too and how much memory you use for each asset that uses it. 

For the PPV I only changed a few parameters like the white balance and tint and I like to turn on the bloom to get some specular highlights depending on the camera angle but I did however add a post process material that I use in most of my scenes. The material sharpens the scene without the need to increase the percentage scene size and is adjustable to different amounts. The material can be downloaded for free on my artstaion store here: https://ad67.artstation.com/store/am8v/post-process-volume-sharpening-material 

What I like the most of using a dynamic setup is the fact that not only do you have real time feedback as you create your scene but you have absolute freedom to make any changes you want to your scene in real time as you go along which means that not only you but say your clients can shift and move things around without breaking up the lighting! This is invaluable especially if working under pressure and not for a portfolio piece where perhaps time is not so much of a restriction.  In addition not relying on built in solutions for say your GI forces you to pay more attention on the lighting and composition - so its a good way to learn the fundamentals.

The combination of techniques above I believe give you both the freedom you would need and the flexibility to light various types of scenarios. To me the use of both lights and shadows in tandem, as outlined above comes as close to painting with light as possible!



The scene with just the Key lights and fill light turned on. 



Game mode shows lighting setup.



Main lighting setup using rectangular lights: 


GI & Fill accomplished via point lights:



Left : distance field indirect shadow on; Right: distance field indirect shadow off










Substance Painter as Look Dev workflow

General / 07 April 2020

Using Substance painter as a look development solution rather than a final output can expand your texture flexibility and at the same time reduce your draw calls in a lot of situations. The main premise of this workflow is to initially create your textures in Substance painter as you normally would but then export the correct maps and reconstructing them in Unreal Engine.

1 Bake your meshes and create your textures.
2 Export the Normal, AO, and curvature maps (you can make specially configured exporter to avoid exporting them one by one)
3 Export any additional masks that you created like dirt, smart masks etc by right clicking end exporting
4 Create a folder that hosts your main texture created and save as a smart material
5 Open the tiling sample file and apply the smart material and export as a tiling texture
6 Import everything in Unreal and rebuild it as shown above


The 2k tiling asset and the 4k specifically textured asset are indistinguishable in this image. The 2ks advantage apart from the lower memory usage is its re usability on other similarly textured assets which is not possible with the 4k.



After baking your mesh use the Substance configurator setup to export Normal and a channel packed AO Curvature maps.



Look development phase - Simply start create your textures as you normally would on your mesh. Use the AO and curvature maps as fill layers to get a feel on how they will look in Unreal.



Right click and save any additional masks you wanted to output including smart masks etc.



Create a top folder and drag all the other folders textures etc in it. Save this folder as a Smart material and close the project.



Open the Tiling Material project from the Sample projects in Substance painter.



Import the smart material you created before. You may need to import individual texture layers sometimes depending on the texture complexity. Note that any specific paint layers will have to be added as individual masks.



Import the tiling textures textures, AO/Curvature and any additional masks and reconstruct the material in Unreal. As you can see the AO curvature texture has a free slot (Blue channel) where we could have easily placed the dirt mask in making our material even more compact. Over the entire level this method will be more cost efficient than individual bakes since you can reuse the tiling texture on other assets and bake asset specific AO, curvature, masks if needed to get more details in your materials.



 As stated above the free blue channel in the AO , curvature mask could be used to house Mask 1 should you wanted to get an even more compact material.



Face weighted normals & edge mesh decals

General / 07 April 2020

This tutorial goes over two techniques that are used in combination to get rid of perfectly straight edges in Unreal Engine and add more realism to your environments - face weighted normal and edge mesh decal techniques. Using Mixer as a base to create our normal texture as opposed to the traditional technique of sculpting and baking our normal map we can create some fast variations to use in our decal material in Unreal. In addition I will introduce you to a UV technique exclusive to 3ds max. (If you are using another software package you can do this manually!)

In order to complete the tutorial you will need the following free plugin: http://www.bytehazard.com/articles/wn



Raytracing and HDRI backdrop implementation in Unreal.

General / 07 April 2020

The options outlined in the video apply to any raytracing hdri workflow.