Long life to Embark studio and its fabulous procedural artists dream team !
3d artist Trey McNair showed how to build a wonderfully lit forest environment in UE4.
Hey! My name is Trey McNair and I’m currently an Environment Artist at Insomniac Games. I’ve always been an avid gamer and media enthusiast. Combine that and my love for building things (both virtual and otherwise), and it’s no wonder I had my career in game development figured out pretty early on. I got started creating maps for Halo and mods for early Elder Scrolls titles. I studied Interactive Media and Game Design at the Savannah College of Art and Design, and landed an Internship with Insomniac Games in 2014 working on Sunset Overdrive. After that, a stint with Visceral Games (EA) working on Battlefield: Hardline Premium and now I’m happily back with Insomniac and working on #SpidermanPS4.
I started the forest shrine scene as a way to study forest assets and gain experience with foliage. The Japanese aesthetic theme works so well in harmony with nature. I wanted to add a small architectural element grounding the scene but not take away from this being mainly about the forest. I always begin scenes with an strong concept, usually ‘photobashed’ from images around the net or from my folder of concepts that I’m constantly dropping images into. Having many supporting images and concepts for the small details helps immensely later on. Here is my ‘photobash’ concept for this scene:
I used SpeedTree Modeler (UE4) for the tree modeling, while providing Speedtree with my own leaves geometry and materials. I gathered leaf and grass materials from Megascans. I went for taller, skinnier trees for most of the forest area and only made a handful of trees that a I re-used to populate the scene. I think getting the right density of trees and leaves in the canopies was the trickiest part. I found that creating a few ‘dead’ trees helped fill the forest composition without filling making the canopy too dense.
One thing I did was exaggerate the bend in a many of the tree trunks. This broke up the straight lines and added a more organic feel. It also helped me create shapes of negative space between trees. Having a few trees leaning against others and fallen to the ground also added variety of shapes.
One important thing to keep in mind when modeling realistic trees is the feeling of weight exerted by gravity on the tree branches. For this I’ve been using the directional force modifier in SpeedTree. You can adjust the weight of gravity exerted over the length of the trunk to create a nicely curved bend from the weight of the leaves.
Finally, getting proper looking shadows from the leaf cards is another balancing act. Too dense or too many overlapping leaf cards and you will end up with solid shadows. Making sure you have a realistic density of leaves as well as adjusting the Opacity Clip Mask value in your leaves materials can help with shadows as well.
The shrine asset was a compositional element to contrast architecture against the foliage. I kept the modeling simple and focused on the roof shapes. I tend to use curves and booleans often when modeling for hard surfaces. I was able to construct the main pieces modularly to save time UVing, though I imported the mesh as two pieces (base and shrine). There was no need for use for modularity in the architecture in this scene.
However I did make use of modular beveled materials, or ‘trim’ materials for this asset. I created a standardized UV layout of trims, each surrounded by a 45° beveled normal map edge. This allows for a smooth ‘high poly’ look on all the corners where the 45° edges line up. It also allows for easy modeling and texturing. Just a single wood trim texture and a single stone trim texture for the majority of this asset. Essentially you are keeping polycount low, re-using strips of the same material, and taking advantage of small 45° beveled edges. I added the windows and cloth elements at the end. For more information on trim sheets and beveled normals, see Morten Olsen’s ‘Ultimate Trim’ GDC presentation.
I think it’s important to have a one or two strong shots in mind while working on a portfolio piece.
I usually place camera actors in my UE4 scene where I know I want strong compositions. You can then save camera adjustments and post settings per-camera. You can also pilot them in a new viewport window on a second or third monitor to keep you composition in mind while manipulating assets from a separate camera view. In a scene like this where there are many large vertical elements, I tried to use those to frame smaller compositions, a common philosophy in film.
I learned a lot about dynamic lighting by looking at the lighting setup in Epic’s kite demo level. Similarly, my scene is lit with one dominant dynamic directional light, and an HDR map from HDRI-SKIES. One benefit of this is being flexible to constantly change the lighting angle and time-of-day, as well as avoiding long light baking times. I added fog liberally to exaggerate the sense of depth and a give the feel of a continuing forest in the background.
I also made use of Unreal’s new Distance Field Ambient Occlusion for this scene. The transition to DFAO was smooth and gave me great results with foliage. After adjusting options to treat leaf cards as 2 sided, ignore light shafts, and optimize the tree geometry for DFAO mesh generation, I received great looking AO.
Post process can be just as important as lighting. Be careful not to set up post process too early however, as compensating for incorrect materials with post process settings is a common trap to fall into. I found adjusting post helped ground this scene and create a thicker ‘atmospheric’ effect that was needed in a scene with not very much hue variation.
On top of that I added in a few motes and falling leaves affects, and subtle lightshafts. I used a cone mesh with inward facing normals, a bit of fresnel, depthfade, and a stretched noise texture set to a low emissive value.
Do you think this environment would work in a game?
Since this was a small scale portfolio environment, I didn’t spend extra time optimizing or really approach this with performance in mind. I did a bit of optimization on the tree meshes along with breaking up my larger meshes into pieces to help with DFAO mesh generation. For a realtime environment, you would want to modularize the architectural elements, and reduce shader complexity.