Florian Wehner showed us how the Ancient Cambodian Temple environment was set up with Unreal Engine 5 using RGB mask shaders, discussed the material creation in Substance 3D Painter, and explained why he created an asset catalog.
Hi, my name is Florian Wehner and I have a huge passion for environment art and CGI in general.
Previously I worked as a Technical Director for volumetric capture on high-budget Hollywood blockbuster movies and series such as “The Flash”, “Black Adam”, “Aquaman”, and “One Piece” at Netflix/Scanline VFX.
While most people can relate to the terms photogrammetry and 3D scanning, not everyone is familiar with volume capture. Volume capture basically adds another dimension so that we capture in 4D. Like a video, but we end up having each and every frame as a 3D scan. I had the privilege of being part of Paul Debevec's groundbreaking R&D team during my time at Netflix, where I was actively involved in pioneering volumetric capture technologies.
My previous school education leaned a little bit more on the technical aspects because it was a Master of Engineering but also enabled me with course modules such as game art and game development to discover more of my artistic side.
My full-time job at Netflix/Scanline VFX leaned, like my school education, more on the technical aspects, therefore I wanted to start the temple project to continue working on my artistic side in the evenings after work.
I'm grateful for the opportunity to be able to present my project here at 80 Level.
The Ancient Cambodian Temple Project
As I was only able to work effectively on the temple environment in the evenings and at weekends due to my full-time job, it was definitely a long-term project. It was also not easy for me to give a clear date when the project really started. However, I still remember well that in the first few months after I started my new position as a TD, there was no thought of any elaborate private projects. The interest in private work only came back very slowly over time and began with an exceptionally long reference collection phase, which started around April 2022 and was still extremely non-committal and without any concrete intention of implementing such a project at that time.
I simply enjoyed studying various images and videos of different temples from all around the world in my free time. Somehow the temples of Angkor Wat in Cambodia fascinated me the most and I entered a rabbit hole where I found myself trying to explore and understand dozens of different temple complexes from over there: Kor Sak, Preah Palilay, Preah Khan, Banteay Kdei, Ta Prohm, and Ta Som, to name a few.
Looking at such a project now, I find it important when collecting reference materials to not just save a bunch of eye-appealing images from unknown places but instead, really try to investigate where all these images were taken and then explore and understand these places from as many different sources as possible. Gathering too many images from random unknown places can lead to contradictory reference impressions.
Although my composition is a combination of various influences, it ultimately contains many elements that are very close to what can be found in the two temples of Ta Prohm (also known from Tomb Raider) and Ta Som.
From April to December 2022 I collected a bunch of references and at some point also started to create assets in ZBrush without a clear goal in mind.
With these benchmark sculpts, the desire to create an entire environment somehow arose. Although I liked the established style I had so far, the efficient realization of an entire environment gave me a headache. I, therefore, turned to Jeremy Estrellado (Lead Environment Artist at Ubisoft Massive) around December 2022 so he could guide and mentor my project. He helped me a lot to break everything down into a logically structured project that one person alone could handle. I am very grateful that I was able to benefit from his experience and learn from a true professional in environmental art.
From then on, clear goals for the project were formulated:
- create a Cambodian temple environment in UE5
- explore the workflow with the new possibilities Nanite offers
- learn about UE5 RGB mask shaders for real-time efficiency
- creating and designing assets for smart reusability
This picture shows my final design of the blockout-building phase. Jeremy was a huge help in constantly encouraging me to redesign the pieces over and over again for more reusability. In hindsight, the time was well spent at that stage, as I could make up for it tenfold in later processes.
Here is a catalog that showcases all the pieces needed to build the entire scene:
The image above showcases the main pipeline I followed. I used Blender for the design and blockout, ZBrush for the high and mid poly assets, and Blender with Zen UV and UVPackmaster for the UVs. Substance 3D Painter was used for baking the high poly details onto the mid poly-Nanite assets and creating the RGB masks, Quixel Megascans and Substance 3D Designer for the textures, and UE5 to bring it all together and doing the rendering of my final scenes.
I recorded and even streamed various sessions working on the temple environment. I put together a timelapse showcasing the entire pipeline of one single example asset exclusively for this presentation on 80 Level.
This time-lapse showcases sections of the pipeline from after the design/blockout phase until the asset is in the engine. As you can see, all pre-planning and the creation of a “catalog” was time well spent. I now simply had to push all the pieces listed in the catalog through that established pipeline. I believe one of the main reasons why people begin to procrastinate or abandon their projects has to do with the fact that they don’t know what to do next and where they left off after they had some break. With this catalog workflow, I always knew what to do next, even if I had some days off working on it.
Here is another video showcasing some detailing time-lapse and the results inside the engine.
Besides the main pipeline described above, the tree assets followed some other route.
The rock foundation is a very simple photogrammetry scan from my personal scan library with SpeedTree to grow the tree on it. By having a strong background in photogrammetry I have gathered quite a library of various assets of all kinds over the years. Not everything is always the highest quality, as I love to do spontaneous scans with my old phone while on a hike for example.
There are many different scanning styles. You can scan hero props and entire environments or simply aim for scanned materials. But there can also be scans that are really quick and dirty purely for reference to define where certain objects sit within a scene for example. Other scans may be captured quickly under unfavorable lighting conditions with the intention of retexturing them anyway. This one is such a scan, for which I never intended to project the actual textures. The big tree itself was established with ZBrush and SpeedTree for its top section.
I downloaded textures from Quixel Megascans to be used within my own master material shader inside of UE5. Most of the renderings shown are my shader fed with the Quixel Megascans textures, as the creation of my own textures was not part of my initial goal for this project. However, at a very late stage, I got interested in exploring Substance 3D Designer and getting into material/texture creation myself.
I may not be the best resource to give advice and tips for beginners as I am a beginner in this software myself. I received some key advice from my friend Rogelio Olguin (Lead Artist at NVIDIA) on how to get started, which I'm happy to share with you. These are not super-secret tricks but rather healthy mindsets that helped me personally to get started:
- Substance 3D Designer is a software that wants to be explored
- Just start by connecting random things and see what it does and over time you will get a good feeling for all the nodes
- Have fun exploring, build a habit/routine, and only compare yourself with yesterday’s you
- You can start with the official tutorials from Wes McDermott or some introductions by Javier Perez
After I followed a bunch of the beginner introductions closely and explored 2-3 smaller graphs on my own, I had the confidence to start the graph for my Cambodian trim sheet. As I am currently learning the software myself, I obviously learned more along the way through applicable resources during the project but definitely was trying to give it my own spin and make it fit my personal project.
Here you can see a sphere rendering of my material as well as an implementation within my environment. The material is not 100% made in Substance 3D Designer as I used my previous work from ZBrush to blend them.
Based on this graph I created some subgraphs to extract the plain materials to be fed into my UE5 master material. The results with my own textures come pretty close to what I already had with the ones from Quixel Megascans.
Back then when searching for suitable textures on Quixel Megascans, I was looking for a texture that is pretty neutral in its normal and height values because I wanted these things to come from my sculpts to have full control over them. Now when comparing my Substance 3D Designer texture with the one from Quixel Megascans, I can say that mine may be a little bit “too neutral” and that subtle normal structure in the one from Quixel adds that little extra touch. In that aspect, I would definitely try to add some more of that into mine to refine it. Other than that, it comes pretty close and in some aspects fits my project much better as I have to tile it way less inside the engine than the one from Quixel.
After all the months I'd been working on the temple, instead of continuing to refine the SD textures and ending up redoing all of the final renderings, I wanted to declare the project as finished at that point. Everything I originally wanted to achieve and much more was accomplished.
It began with a design phase inside of Blender which did not yet have any modularity/reusability in mind at all. Once I established the kind of buildings I wanted to do, I entered the next phase, in which I took my base design and iterated over and over on it. Each time the task was always to build the same buildings with fewer and fewer different pieces until I finally had the previously mentioned “catalog” in place. The buildings were broken down into their base elements to enable as much reusability as possible. Jeremy Estrellado (Lead Environment Artist at Ubisoft Massive) was a huge help in teaching me to break things down and how to think like a professional environment artist.
Personally, I would also make a distinction between the terms reusability and modularity. Although the individual established building pieces qualify for creating many more building variations in a modular style than the ones showcased in my project, the focus was not so much on that but instead on the reusability of the pieces to build exactly the scene I blocked out. In terms of true modularity, a wild ancient pile is also way more forgiving compared to some modern grid-snapping architecture.
My UE5 shader uses an RGB mask setup. I will explain roughly how it works and link some useful resources. But let's talk a little bit about the benefits of the RGB mask workflow first and why to use it over a traditional unique bake workflow in such environments.
In a traditional pipeline, every asset is unique. The downside of this is that it is very time-consuming because each asset has to go through a long pipeline. If any changes are required, there is a chance you have to go back through your entire pipeline and start over. Other important aspects are performance/memory budgets, which very quickly can get exhausted when your entire scene is based on a traditional pipeline with unique assets. But also the uniform texel density across all the assets in the scene is an important topic. While unique assets can definitely manage to share a uniform texel density across the entire scene, it can be really difficult and in some cases, it is not possible when the asset size exceeds the space left on your UV sheet. The last downside is the consistency. If each asset is built uniquely, it is not easy to maintain a consistent look and art style. That's especially the case when several artists would work on a shared scene.
The solution to avoid the previously listed downsides is RGB mask shaders. For this workflow, it is absolutely crucial that all your assets have two UV sets. UV0 will be used for your RGB masks and potentially uniquely baked maps such as normal or AO. Then we have UV1, which is used to control the texel density for your tiling textures.
When it comes to RGB mask shaders inside UE5, there are two different base workflows. You can either do it with Unreal Engine's Layered Material feature or with Material Functions. To my knowledge, they are pretty identical performance-wise. I would describe the layered material version as a bit easier/quicker to set up but a little bit more annoying to actually work with once done compared to the material function route.
My project uses the layered material route. For this setup, you need three UE5 material files:
- Material Layer as your base
- Material Layer Blend
- Traditional master material
The material layer base is used to set up exposable parameter placeholders for the tileable texture maps your shader would use later on. Understand that this is just a material layer, which cannot be applied to a mesh directly. The benefit of this workflow is that you only have to set it up for one tileable PBR texture set, while the other workflow requires you to set it up various times for each R, G, and B channels.
Then we have the Material Layer Blend, in which you set up the exposable parameter placeholders for your RGB mask.
Finally, we have the traditional master material to bring it all together. This is also the place where you can additionally set up a blend for uniquely baked maps and other controllable parameters. Lastly, it's a material instance from that master material that would be applied to actual meshes. These instances then enable you to determine how many layers of PBR texture sets you want and which specific textures would be used for the corresponding RGB channel.
This image shows the three materials I described previously.
There is a cool video by Abraham Leal if you are interested in setting up a similar shader. Although my shader goes with uniquely baked and detail normals as well as a custom ambient occlusion, a little bit beyond what is shown in the video, this should give you a very good jump start.
As already mentioned, the exact time for the project is not so easy to answer. There has been a project with clearly structured goals and a regular workload since December 2022 under the direction of Jeremy. But also the intensive reference phase with the establishment of the art style should not be completely disregarded and played an important role. The answer would then be something between 1 and 1.5 years.
The biggest challenge by far was staying committed to a long-term project like that while working a full-time job. Again, having a mentor like Jeremy was a true blessing and helped tons with staying on track. Another challenge had to do with the fact of doing the entire project all alone. I would have enjoyed the journey much more with some peers in a team instead of working hour after hour alone on it. The mentorship was also helpful in that respect, although it cannot replace a real teammate structure.
Here is my appeal, in case others feel the same way. I am always interested in working with others, be it private projects or ones with commercial interest. If you are interested, just get in touch with me.
Finally, I would like to thank Kirill Tokarev and Arti Burton for giving me the opportunity to present my project on 80 Level. For years I have had huge admiration for all the great artists presenting their work on this platform. So I'm all the more honored to be able to present my project here. Thank you very much, it means a lot to me.
You may find these articles interesting