This project is made for my specialization course at The Game Assembly. The goal of this project was to give me an insight of the work of an environmental artist and what I could do to make their work easier. I did this by deep diving into Unreal Engine 4(UE4) to find solutions and show how it can be used. With a clever use of shaders and tools, I wanted to make it easy for a environmental artist to set up a basic world on wich they could build upon.
Index
Chapter 1 - Landscape
Chapter 2 - Grass
Chapter 3 - Water
Chapter 4 - Environment & Atmosphere
Chapter 5 - Runtime Virtual Texturing
Chapter 6 - Character Bob
Chapter 7 - Life To The World & Gameplay
Chapter 8 - Conclusion & Credits
Chapter 1 - Landscape
The first step was to create a landscape on which to build a world upon. This took me to World Machine(WM). With this I could generate landscapes and output them as heightmaps. It also provides an easy way to export normals and basic textures for the landscape.
In UE4 I then built a landscape shader where you could put in the textures you exported from WM or just colors. These will be used for the materials the player can see in the distance. The right material then gets put in its right place based on angles and slopes. Every layer also got it's own input and parameters for control and customisation options.
By having my materials as functions that are plugged into the landscapes material its easy to access and tweak separate materials without getting overwhelmed. They can then be tweaked through the instance of the landscape material for easy customisation and finally be painted out freely.
I added a debug mode that makes it easier to control the distance of when different resolution textures would be used.
Chapter 2 - Grass
Following the landscape, I moved on to grass. First I integrated it with my landscape material, so it would spawn on the appropriate places. Then I used a render target wich allowed the player character to interact with the grass. Last but not least I worked on the look of the grass. Both making it feel integrated and alive in the world, while also getting the style right.
Using a render target I made it so the vertices of the grass are moved away from the player when you walk through it. After a short delay the grass raises back up into its original position.
Chapter 3 - Water
For the water shader I wanted flexibility. Therefore, I included bools that could be toggle depending on what type of water was needed. It can be used to create a calm lake, a sea with intense Gerstner waves or a flowing steam taking advantage of both flowmaps and UE4 landscape splines.
Cobinding the river option with the Gersner waves makes it possible to create lively streams that are easy to place with the landscape spline.
I make use of distance fields to create foam around objects that are put into the water. This helps the water planes to connect to the rest of the landscape.
Chapter 4 - Environment & Atmosphere
Continuing on I bought a asset pack(link in credits) to start filling the world. I turned to UE4's procedural forests to make it quick for an artist to fill the world and still be able to edit it with the foliage tool. To make this work in the world I had to use make good use of LODs and culling.
I then took to the sky to create volumetric clouds and a nice atmosphere.
UE4.26 introduced volumetric clouds and I saw this as the perfect opportunity to try creating stylized clouds that could be tweaked to fit the scene.
After much work setting up the procedural forest system I could now use volumes to populate areas. This gave me the flexibility to either generate smaller areas with specific meshes or larger areas with much more variety.
With includes and excludes I control on what layers of the landscape material the foliage is allowed to spawn.
Chapter 5 - Runtime Virtual Texturing
Over the corse of the project, I happened to stumble upon runtime virtual texturing(RVT) and I found that this could be utilized in a lot of different ways. I make use of this to blend meshes with the terrain to get softer edges and I incorporated it into my grass shader.
With RVT I can now affect my grass based on the landscape material beneath it. This makes it possible to not only change the color of the grass but also the grass height by affecting the grass vertices.
By cobinding the ability to affect my grass height I also used RVT to draw a mask of certain objects. These masks could then be used to lower the grass where objects were placed. Resulting in avoiding alot of situations where the grass clips into meshes.
I used the same technique to mask out the trees in my scene but in combination with my landscape material. This allowed me to raise the ground around the trees, solidifying them to the landscape by giving them a small undergrowth.
Chapter 6 - Bob
Time to get a playable character for the test game, introducing Bob the bear. After I bought Bob and his animation(link in credits) it was time to solidify him into the world. First I fixed his animations and moveset followed by a few effects that would give him more life.
I used raytracing and physical materials to spawn footprint decals under Bob that could be changed depending on what surface he walks on.
Chapter 7 - Life To The World & Gameplay
Last but not least I had to make the world feel more alive and get some gameplay elements in. To accomplish this, I used particle effects, shaders and blueprints.
For the gameplay I choose to go with a simple find and collect objective. This would give the player a clear goal while at the same time showing them the world.
Instead of animating wildlife, I used vertex offset to get the basic movement and then moved them with blueprints or in particle systems. I then placed everything around the planned gameplay route.
Chapter 8 - Conclusion & Credits
The whole project was a big learning experience. I have especially learnt alot more about shaders and Unreal Engine 4. As it was a learning process there are things I did early in the project that I would like to go back to and rework. An example would be how the grass interacts with the player, instead of a render target I would like to try a different approach that also would allow other objects in the world to interact with it. With more time I would love to continue working on this, something I would like to try my hands on are implementing sounds.
So are there things I could have done better? Absolutely. With the knowledge I have now I would approach things differently and probably ended up with a very different result and a few more tools. But I am happy with the outcome and I am glad I got the time for this project at The Game Assembly.
Did I reach my goal of understanding environmental artists work and develop shaders/tools that could help them? I would say yes and no. I absolutely understand their work and shaders that could be useful for them better. But I feel like I made to little time for developing tools and therefore feel that there is a lot more that I could have done in that department.
Credits
Assets:
https://www.unrealengine.com/marketplace/en-US/product/stylized-forest-vol-01 - Forest Assets
https://sketchfab.com/3d-models/bear-c982b93bb07f4fe2bb6c82d23b68dd8c - Bob
https://sketchfab.com/3d-models/hive-92ad548aebaf4dee89a2e3a5232d74c8 - Hive
https://sketchfab.com/3d-models/gull-stylized-ee7be90e4945454d847d2fb1a77df6d4 - Bird
https://sketchfab.com/3d-models/tiger-barb-43a5984cf83647339260ec392c4a426a - Fish