Challenge 1a – The Exact Opposite

As a little bonus experiment, I’m going to spend today (and possibly a day or two next week) making a scene in Unreal using the opposite of the principles from the previous experiment.

Considering my previous experiment was a large open-world scene, I was limited by to the amount of micro detail I could add. This limitation was not a bad thing because the environment I created was to run as a viable game world. It did that very well in terms of both performance (if the foliage was scaled back slightly) and the time it took to create the scene.

The Unreal Engine is capable of producing some amazing visual results from large open environments, but it is also used for realistic architecture visualisations thanks to its ability to handle small details. There has been a movement by some artists to use the engine to show what levels of detail are possible in real-time by focusing on micro-compositions such as those found in this inspirational video:

I want to see just how good I can make something look using Unreal Engine as the renderer. The only restriction I set upon myself is that it still has to run in real-time, so anything above 60fps on my hardware.

So in summary, the scene will:

  • be lit with static lighting with the Lightmass quality ramped all the way up
  • be small in scale with a focus on an individual hero object (a rock or a log) or maybe a small selection
  • have everything hand-placed, nothing will be added procedurally (except foliage)
  • no limit on texture sizes or shader complexity (providing it still runs ~60fps)

Initial Research

To start, I’m going to ascertain which quality of mesh for the hero object(s) from the Megascans Meadow pack I am going to use. It’s either going to be ‘HIGH’ or ‘LOD0’. There is a HUGE difference in mesh complexity (and therefore file size) between the two so, despite being carefree with the performance, I still have to ensure the scene will run with everything else I plan to add to it.

I decided to do a “quick” test scene and monitor the performance and lighting build times:

The above is the ‘HIGH’ mesh with 503k vertices and 4k textures. I applied a 1024 resolution lightmap to it and the scene is lit with a directional light and a skylight using a HDR image. The framerate was 90fps.

The above is the ‘LOD0’ mesh with 7k vertices and 4k textures. I applied a 1024 resolution lightmap to it and the scene is lit with a directional light and a skylight using a HDR image. The framerate was 120fps.

Conclusion

There is a definite lack of definition in the form of the object when the LOD0 mesh was used. However, the drop in framerate when using the HIGH mesh was a little alarming and could be catastrophic when other high resolution objects are added.

Ideally there needs to be something in-between… and thankfully there is!

A while ago, in this post, I discovered DX11 Tessellation. This is the process of adding a new texture map which displaces the mesh in order to give the object more definition. However, in order to do this, the shader must add more density to the mesh. This is controlled by the tessellation multiplier in the material itself. However, because these operations are carried out in the shader, they are relatively efficient and can be fully controlled.

Additionally, you also need a special type of texture called a displacement map. Thankfully, all Megascans assets come with one of these, even the plant atlases!

Here is the result:

The above is still the ‘LOD0’ mesh with 7k vertices and 4k textures. It has the same 1024 resolution lightmap applied and the scene is lit with the lighting setup from the previous iterations. The framerate was 120fps. There is DX11 Tessellation added with a strength of 1 and a multiplier of 1 (so effectively doubling the mesh density equivalent -roughly- to 14k vertices.

The last iteration has just about enough definition to its form that it rivals the HIGH mesh while still delivering excellent performance.

This is method I am going to use for all the 3D objects (and possibly the surface materials) for this experiment.

In case you are interested in how the shader looks, below is a reference of the master material I have created based on the above settings for all my Megascans objects:

UPDATE 1

I have been working on this on and off for a few hours over the past week and all was going well. Terrain and objects were looking good with baked light. Then I added foliage meshes. They just didn’t work correctly with baked lighting because the lighting is calculated via their surface normals and baked into a huge texture map (light map). This meant I was having nasty issues with shading, shadows and darkly lit areas, especially on my grass asset.

I did achieve a half-decent looking result by re-modelling the grass mesh and ensuring all normals were facing outwards in a circular pattern, but the time it was taking to build the lighting was getting ridiculous.

My intention for this experiment was to create something similar to the scene found in this video:

However, after some initial experiments, I was miles off. I’m not sure how the meshes were constructed for this scene. The author did share his lighting and lightmass settings but I could not match the quality using baked lighting. Even hand-placed static meshes of foliage didn’t seem to look right.

I did some research into realistic looking foliage in Unreal Engine and found some very useful articles:

https://evermotion.org/vbulletin/showthread.php?116662-Unreal-Engine-Project-Exploring-foliage-and-lighting
https://ue4arch.com/ue4archs-unreal-engine-4-lighting-workflow-part-1/
http://www.creativebloq.com/how-to/create-a-game-environment-in-unreal-engine-4
https://80.lv/articles/realistic-environment-creation-ue4/amp/
http://polycount.com/discussion/149632/forest-lighting-study
http://polycount.com/discussion/183365/mask-modifier-alirezas-art-blog/p1#latest
https://kelheor.space/2017/06/17/layered-materials/

Most of the techniques used movable (fully dynamic) or stationary (semi-dynamic) lighting or a combination of the two. For example, when architecture and landscapes were present in the same scene, the building and terrain tended to be lit by static lighting (or stationary lighting) and the foliage illuminated via movable lighting.

This seemed too complicated for a quick scene so I have decided to switch back to fully-dynamic lighting using all the great new advancements (such as DFAO and Light Propagation Volumes).

This is NOT how the final detail scene will be composed but it is how the lighting setup will be applied:

Now I have the lighting established, and am free of the burden of baking static lighting, I will finish the scene tomorrow and post it below.

UPDATE 2

After viewing the Forest YouTube video (mentioned above) on a large, higher resolution display, it occurred to me that the scene the author was creating (before applying Post Processing), looked impressive because of the shear amount of assets providing detail and because of the overall composition. If you look closely at the grass (below) in relative isolation, it doesn’t look all that realistic:

This highlights two things:

  1. That the composition is worth more than the sum of its parts and that you should not get too bogged down with details until your scene (no matter how big or small) has been fully composed – something I really struggle with.
  2. That the Ambient Occlusion provided by baked lighting (without Post Processing or adjustment of Lightmass settings) really isn’t great for lighting foliage. This is a lesson learned from research in UPDATE 1 anyway.

I plan to finalise the scene over the next few days which will introduce a lot more details from additional assets and hopefully more realism from Post Processing.

UPDATE 3

After playing around with scatter assets on the ground, I realised that to complete a micro scene (or macro scene, depending on your perspective), would require some almost painstaking creation and placement of assets. Although I am keen to create a library of plant/foliage assets from my Megascans atlases for use in future projects, I do want to move on from this scene quite quickly as it was only intended as an experiment on what is possible with real-time 3D graphics.

I therefore decided that instead of replicating what others had done in real-time rendering, I would instead try something that has, until now, as far as I’m aware, only been attempted with fully-featured 3D applications using high-end renderers.

Having been inspired by the video below, where the author records their process for creating a forest floor scene using high-end tools and the V-Ray renderer, I decided I would see how far you could take this approach to composition and scene building in the Unreal Engine:

Obviously, the scene created in the above totals millions of polygons so I would have scale the composition and focus of the scene down somewhat, possibly even further from the original scene above.

I decided to focus on the application of the moss asset to a rock which I placed just in front of the felled tree trunk. After some tweaking to my process I arrived at the following:

I am quite happy with this first go at repurposing the Foliage scatter tool in the engine, which is conventionally used for the placement of grass, plants, trees, boulders, etc. and work at a tiny scale to “paint” moss on the boulder.

There is a LOT of meshes now applied to the boulder, each with a considerable amount of overdraw (as each of the below moss “strands” had to occupy only 2 polygons):

Performance aside, with some more details and more adjustment to the surrounding meshes/foliage, I think this scene would give some of the high-end renders some competition.

For the next (and final update), I intend to implement the following:

  • Improve composition
  • Tighten the focus and blur-out the background a little more
  • Add variety to the colour of the moss (in the same way I applied to the heather in the previous experiment)
  • Adjust the Sub-surface Shading on the some of the surrounding plants
  • Increase the intensity and hue of the direct lighting
  • Add additional scatter assets to the rock and log (if still in focus)
  • Suggest at some “atmosphere” with airborne particles
  • Introduce some Post Processing to improve the presentation and grading

UPDATE 4

Below is my final image from this experiment:

As you can see, there is more definition to the moss (due to a really high density count), a sense of atmosphere thanks to the intensified lighting and particles, better composition and focus and more detail with the addition of the dried leaves. They also add a little colour interest now that the flower foliage has mostly been focused out.

The two aspects I didn’t get around to implementing are the variation in moss colour – which I decided wasn’t required with the additional scatter assets added to the rock, and the colour correction in Post Processing – something I feel I need to learn more about before attempting. I can always come back and implement the latter when I understand the principles better.

In conclusion, and as with most things, this scene has taken a lot longer than I anticipated due to the fact I was trying new techniques and re-learning methods I haven’t touched in a long time (particles). But despite this, I feel confident that I could replicate the above quality, now I have the meshes and understanding of the requirements of shaders for this type of close-up work, in a very short space of time. Maybe one day I will create a speed video of that very thing!

UPDATE 5

In this final image, I demonstrate that all the shaders were setup to receive true dynamic lighting by adjusting the angle of the “sun” to create a scene bathed in sunset. Nothing else was adjusted: