Creating The Blacksmith: Stage Preparation, Shading, and Lighting

Original author: Silvia Rasheva
  • Transfer
In previous articles in this series, we talked about the team of the creators of The Blacksmith video , as well as its decoration . Now we will consider the creation of the video from a technical point of view and touch upon aspects of preparing scenes, shading and lighting in Unity 5.

Testing and working with various versions of the engine

We started creating the video on the early alpha and beta versions of Unity, stabilized it on version 5.0. b22, and eventually updated the entire project for the final version of Unity 5.

Using a raw engine at the development stage to create content, you inevitably encounter instability and low efficiency of processes. Every week we faced a choice: update the engine to the version with the corrected errors or skip the update so as not to disrupt the work of the team.

For example, to streamline cameras and animations, we used the Director sequencer as part of the Storytelling toolkit, which at that time was at the initial stage of development. To add this functionality to the project, we had to regularly merge it with the main version of the engine until the release itself.

Our team responsible for the release of content reports bugs and requests new functionality from the relevant departments. But then we can only hope that the developers fix bugs and add new features. Otherwise, we have to look for workarounds. The fact is that in addition to our feedback, Unity developers receive feedback from many users and, as a rule, determine the priority of tasks themselves.

Preparing the scenes

At one of the first stages of creating The Blacksmith, we sketched the geometry of the scenes in gray material.

To create prototypes, packages from the Asset Store, for example Better Rocks and Cliffs from Quantum Theory, were very useful to us . Thanks to them, we immediately began work on the appearance of the objects and very soon we got good results:

Based on the storyboard made at the pre-production, we performed the first iteration of the cameras, roughly identifying the necessary shots, and immediately made a list of resources needed for each of them. At the same time, work on art for 3D character models was in full swing.

We needed ample opportunities to customize the artistic effects for each shot. Therefore, we added the Scene Manager component to the Unity editor, which allows us to group objects by shots. With it, we were able to turn objects on and off for individual cameras, as well as change their properties: location, scale, material, etc. Moreover, unique parameters of light were set for each shot, and the Global Illumination system provided an instant change of lighting in real time.


Unity's Physically Accurate Shader (PBS) is easy to use and configure. We worked with him at all stages of the creation of the project. Writing a separate shader for the skin was not included in the list of our tasks, so we limited ourselves to the standard shader:

Antagonist. Screenshot from Unity Editor

One of the main advantages of the built-in shader in Unity 5 is the ability to flexibly configure and expand in accordance with the specifics of the project. You can download it from the link: (in the "Downloads" menu that opens, select "Built-in Shaders" for your platform). Taking it as a basis, you can easily create unique shaders for your projects, just like we do for our video. Below we will provide some examples.

We added a unique shader recognition feature to the built-in shader. For this modification, we made two versions: for the environment (for example, to take into account atmospheric scattering) and for characters, more complex (to take into account unique shadows and wrinkle maps). In the latter, we slightly improved the UI by adding sliders for the reflection map.

To make the facial expressions of the antagonist more realistic, we added wrinkle-based wrinkle maps to the draft. In each frame, our component determined the blends with the greatest influence and accordingly composed the textures of normals and shadows at the pre-renderer stage. Then, the modified standard shader sampled and unpacked the normals and shadows from the screen buffer, instead of the usual material slots.

The standard Unity shader is well suited for a number of real materials, but, unfortunately, hair is not among them. Despite the fact that hair rendering was not part of the project’s objectives, we wanted to provide characteristic anisotropic lighting, while maintaining proper integration with the physical environment used by other materials. To do this, we modified the built-in shader by changing the reflection distribution model, but left the process of sampling reflections and lighting probes in its original form.

Hair shader. Screenshot from Unity Editor .

For some shots, we wanted to make soft vegetation and find an easy way to diversify it. To this end, we divided the entire process into 2 stages and expanded the functions of creating vegetation built into Unity. Using the small PaintJob tool, we automated the process of adding any static geometry to a world with a temporary landscape. In combination with a set of simple rules that control the process, this allowed us to generate layers of vegetation on meshes of the earth's surface, around objects and on roofs of houses. For rendering, we collected all this data in a unique component for sorting relative to the point of view, sampling global lighting, and controlling selective rendering and level of detail.


We divided the lighting for the characters and the surrounding world into several layers and assigned the appropriate culling masks to the lamps. Thus, we gained more control over each layer. A similar approach is usually used in the film industry, adjusting the lighting depending on the location of the actors in the frame.

To improve the appearance of the characters, we used additional local light sources to soften the shadows (unlit areas) on their faces.

In The Blacksmith demo, we focused on the characters and used a lot of close-up shots. Therefore, it was very important that the shadows were in a sufficiently high resolution. Therefore, especially for the shadows of the characters, we added a separate texture.

As planned, the forge inside should have looked like it was lit by rays penetrating through holes in the walls and roof. To achieve this effect, we used a cookie with the corresponding image.

As for the reflections in the ocean and puddles on the coast, we wanted them to look as clear as possible at the point of contact of the object with the reflecting surface and gradually become blurred as you move away from the object. As a result, we added a convolution step to the shader, taking into account the depth and the ability to customize data depending on the smoothness of the surface. The obtained data was then imported into a standard shader with the replacement of cubic reflection textures with new unique textures.

Also popular now: