UE4 Speedtree Mesozoic Forest

Work has been interesting lately as you may or may not know Mortal Kombat X has been canceled on last gen and I had been working on that for the last 7 months, so that was a bit of a blow. I’m on to a new project though and a publisher I’ve never worked with before so things are new and interesting in that respect. In my spare time I’ve been reading about and really loving the updates to the Unreal Engine for instanced foliage. I’ve taken it upon myself to follow in Koola’s footsteps and create some amazing forest work. If you haven’t seen his work check out his Youtube channel (https://www NULL.youtube NULL.com/user/koooolalala) or WIP thead (https://forums NULL.unrealengine NULL.com/showthread NULL.php?58385-Koola-s-stuff) over at the Epic Games forums. If you’re not aware there have been some big changes to instanced foliage and you can now use Dynamic GI to light them. Coupled with DFAO (https://docs NULL.unrealengine NULL.com/latest/INT/Engine/Rendering/LightingAndShadows/DistanceFieldAmbientOcclusion/index NULL.html) (Distance Field Ambient Occlusion) and Ray Traced Shadows (https://docs NULL.unrealengine NULL.com/latest/INT/Engine/Rendering/LightingAndShadows/RayTracedDistanceFieldShadowing/index NULL.html#settings) it means no more waiting for crazy long lighting bakes. All this realtime lighting does come at a cost though and the performance hit isn’t small. To keep up I’ve had to upgrade my system, but it’s been due for a while.

My current rig (Intel Q9550 @ 2.9Ghz with 8GB RAM, Nvidia 560Ti and 10K RMP HDD) is 7 years old. I’ve decided to follow Epic’s suggestions (https://answers NULL.unrealengine NULL.com/questions/21631/im-building-my-own-pc-for-ue4-development-what-do NULL.html) and upgrade to a i7 5820k (6 core 3.3Ghz) with 32GB RAM and 2 SSDs. The only difference is I chose to go for an Nvidia 960 instead of a 770. With the new Nvidia line (http://wccftech NULL.com/nvidia-pascal-gpu-gtc-2015/) boasting a 10x performance increase coming out next year, I’m going to hold off on a major video card upgrade until then. If you’re interested in trying out the new GI system head over here (https://docs NULL.unrealengine NULL.com/latest/INT/Engine/Rendering/LightingAndShadows/LightPropagationVolumes/index NULL.html) to learn about Light Propagation Volumes and how to enable them in the new engine, there’s some “.ini” tweaking involved.

To test this out I’m creating a small Mesozic forest and I’ve Pinned some reference (https://www NULL.pinterest NULL.com/terrymatthes/prehistoric-forests/) up for anyone who wants to follow along. The biggest difference between forests in the Mesozoic and now is the lack of grasses. Ferns largely took their place. As a species grass didn’t evolve until about 70 Million years ago, which means it missed most of the dinosaurs. Another big difference is the shear amount of Cycads (https://en NULL.wikipedia NULL.org/wiki/Cycad) and Ginko Bilobas (https://en NULL.wikipedia NULL.org/wiki/Ginkgo_biloba). As you can imagine it would be nice to put a dinosaur in this forest, but I’m trying to concentrate on the forest itself and I’m looking locally for someone to collaborate with on the dinosaur(s). I’ve started to create speed tree templates I can work from for the plants while I wait for my new system to arrive. I’m not worrying about LOD too much right now as some early tests showed it’s handled automatically quite well by the Unreal Engine and Speedtree. One thing that’s not though is the lightmap UVs. They are OK, but do need tweaking. Your material also makes a HUGE difference. If you’re expecting to plop plants into your level with a directional light they are not going to look super. You need to put some work into a good material that will properly shade your plants. Here are three of the plant templates I’ve came up with so far. A couple of these are based on speed tree models that were tweaked for performance. I’m going to follow Koola’s suggestions and keep the lowest LOD’s at or below 7K polys. For now I’m using the default Speedtree textures, but will create high resolution custom ones for the final output. The elevation data for this project is based on GIS data from The National Map Viewer (http://nationalmap NULL.gov/viewer NULL.html). When that becomes a bigger part of the  project I’ll expand upon how that’s being used.

Speedtree FernSpeedtree Small PineSpeetree Giant Conifercycad

World Machine Mountains

Mountains and terrain in general is something that I’ve wanted to experiment with more for quite some time. A project came up at work recently and I decided to try my hand at creating some custom terrain in World Machine. Typically my process for creating terrain was fairly simple. First I would model the terrain very roughly on a plane in Zbrush, then I would add detail by adding Perlin noise values. Lastly I would render a height map of this in Maya and then import that into the engine. This time around I’m creating the mountains as a mesh to be rendered in Maya so I though this would be a nice opportunity to use World Machine. The mountains in the shot are to be very sharp and pointed with heavy snow cover. The image below is a node network in World Machine showing the creation of my mountains that led to their final output.

Simple World Machine Mountain Network
The base of the mountains comes from two very strong height maps. The gross shapes are formed from the height map values of a Voronoi noise. The breakup comes from Perlin noise. These two height maps are added together to create the base shape. A large-scale is used for both the Perlin and Voronoi noise to facilitate the larger details. If the noise were smaller this would increase the texture repetition in the noise and give us a higher frequency detail.

The next modification to the shape comes from the “Simple Transform” node. This node isn’t as simple as it’s name makes it out to be. It actually adds quite pronounced features to your terrain. You can create canyons, glacial wear, plateaus and other common terrain features to be eroded further with World Machine’s “Erosion” node. The “Select Height” node is used next. This lets us specify the top heights of the terrain so we can then erode the steep mountain faces in a different way then the low valleys. The low valley detail comes from the second Erosion node in the network. You might think its silly to erode the same terrain twice, but if you look closely you’ll see we’ve plugged the height map output from the first Erosion node into both the main input of the second Erosion node and the mask input. Now we can tweak this node to change the low altitude detail because the mask protects the steep mountain face detail from being eroded again.

Lastly we add snow by plugging the second Erosion node into a “Snow” node. This will give you a basic setup you can tweak for snowy mountains. There is a “Basic Coverage” node used to add some detail, but these mountains will be too far away to benefit from this in the shot. I took some comparison shots of the mountains in world machine at different details. You can set the resolution of your terrain in the “World Properties”. The biggest difference you notice is the tightness of the eroded crevasses. The higher the resolution is the narrower they become. For really far of mountains you could get away with 512 if you had some heavy depth of field. I would prefer the detail in a resolution of 2048 for most shots thought. The jump from 2048 to 4096 doesn’t yield as significant a change as the jump from 1024 to 2048.

World Machine Detail Comparison

That is the base of the mountains for the project, the next part is the sky behind them. I plan on using high resolution NASA galaxies photos in the sky. I’m going to use the photos to texture the emission  of particles coming off of a polygon plane in Maya.