Hornwall Castle: Working on Environment Shaders and Ambiance

Corentin Clays shared some details behind the production of his environment Hornwall Castle in Unity based on the concept by Santa Norvaisaite.

Introduction

My name is Corentin Clays, and I live in central Europe within a city with a lot of Medieval remains. 

After finishing 3D art school, my first work experience was to create promotional screenshots in Unity for a lot of small mobile games. I had access to all the resources and without modifying models or textures, I was recreating pleasant scenes with proper lighting and camera effects. It helped me a lot in improving my image composition skills and I learned the ways to visually improve a result without modifying the source input. 

After some juggling with freelance work and the Unity store, I finally found a full-time job at a company that creates simulators to instruct tram and train conductors. In these simulators, the trainees are "put" in a copy of the cabin with all the controls while the windows are replaced by screens. I had quit the job two months ago and since then I started my freelance adventure again.

1 of 2

Hornwall Castle: Origin 

My next step was to refresh the portfolio and after quitting my job, I was motivated to give life to a new project. All my past environments resulted in gathering a lot of reference pictures, but this time it was different: I came across a concept by Santa Norvaisaite. In environments, I always put an emphasis on the ambiance and atmosphere and I was stunned by that precise element in Santa's artwork. I was captivated and bewitched by it so much that I kept returning back and looking at the piece until I decided to materialize it in Unity with Santa's permission.

I wanted to focus on two different points of view:

  • The first one needed to replicate the original concept. Here, I wanted to practice in translating 2D into 3D.
  • The second one was going to be much closer to the building in order to dive more into the atmosphere.

Castle & Terrain

Speaking of the modeling phase, I decided that the Hornwall Castle project would be the right time to learn Blender as an addition to 3ds Max. Since the castle mainly consists of basic 3D shapes, modeling itself was clearly not as much of a challenge as learning the software was. To give the building more details here and there, I added a layer of vegetation climbing the walls.

The terrain is made in Unity - there is a minimum of erosion and all the uneven shapes are made of incrusted chunks of rocks that blend with the ground. 

Organic Assets

To accelerate the overall production and asset creation in particular, I used a few models from Megascans. Their library is huge and the time saved by using their content for details is quite considerable. Once the base terrain was shaped, I added three main layers of assets: 

  • Big flat rocks to sharpen the terrain
  • Large vegetation like trees and stumps
  • Small plants and roots

 

To place the vegetation efficiently, I used a scatter plugin for Unity. With it, I was able to paint and place the plants with some random transform constraints. During the process, I have put an emphasis on blending them together as much as possible, so I had to slightly tweak the texture shade/color and other material properties. 

 Shaders

To get the needed look and feel, I had to create custom shaders for certain elements. The first one was for water which had several features: 

  • Edge detection transparency to blend with the terrain and immerged rocks
  • Blended wave normals with a moving panner to make it a little more "alive"
  • A vertex color layer that let me paint and modulate where I wanted to have/avoid reflections
  • An additional layer of grunge to make it dirtier

The Castle shader achieves the fact that the building is lit by the sun despite not being in the angle of the directional light. The shader is using directional masks to make it slightly emissive towards the needed angle to create the illusion. 

The sun is also using a shader to make it blend properly with the skydome. I had control over its alpha, sharpness and different colors. 

All those shaders have been created with the Legacy Shader Graph.

Effects  

When there was a solid base, I focused directly on replicating the concept atmosphere in my scene. I defined it as "a winter morning with unusually thick air due to the mist and bonfires; the diffused light from the sun is just enough to outline the castle and open-air mass graves". 

The smoke and mist are a mix of three elements:

  • Global depth fog that blends elements with the sky
  • Soft particles that blend with the ground and rocks like a mist carpet
  • Chimney and bonfire smoke particles that add some movement to the scene 

Next, I needed to add some sinister and gloomy elements, and there was nothing better than a group of crows and bones on the ground near the bonfires. The latter detail indicated that the smoke went not only from the burning wood...

Skydome & Sun

The skydome is hand-made in Affinity Photo where I blended the right color ramp and light cloud details. This was not an easy task due to some strong deformations of the dome projection in Unity and I had to go back and forth a lot. 

The sun is placed in front of the skydome on a distant plane. I had to tweak both of them in order to match with the initial material. It was a delicate process since the sky and the sun are key elements of the ambiance. Luckily, the custom shader allowed me to control the sun in Unity, and I probably should have done the same for the sky.

Lighting

Before lighting, it's important to make sure that everything is homogeneous and blends together well. To quickly check it, you can use flat and white lighting (as if the ambient was in full power).

The lighting itself consists of a directional light and a three-layer ambient light (Sky/Equator/Ground). Both of them have quite low intensity since I wanted to keep the scene dark and almost indistinguishable in some places. 

The post-process played an important role as well. The two main steps here were bloom to emphasize the emissive power of the sun and obviously tone-mapping. Adding a tint to the bloom is not common, however, it helped me to exactly replicate the red sparks and warm color of the sun and sky from the concept. Finally, I added a custom lens dirt effect for water sparks.

The tone-mapping in Unity's Post-Processing stack V2 let me decrease the contrasts and obtain a dim light quite efficiently. The struggle here was to force myself to go towards the central value of the luminosity distribution because I am more used to going for contrasting results. In addition to that, in the post-processing stack, you will find a few most popular effects such as chromatic aberration, vignetting, film grain, and ambient occlusion. 

Afterword

This has been a really pleasant project to work on since I love the Middle Ages. Most of the time, I had some music playing in the background, mostly medieval songs and ambient metal to feel the environment better. 

If you want to study the scene further, check out an interactive breakdown of the different layers here. To keep an eye on the next projects, you can find me on Artstation or Twitter.

Corentin Clays, 3D Environment Artist

Interview conducted by Kirill Tokarev

Keep reading

You may find this article interesting

Join discussion

Comments 0

    You might also like

    We need your consent

    We use cookies on this website to make your browsing experience better. By using the site you agree to our use of cookies.Learn more