📜 ⬆️ ⬇️

Unity's demo project The Blacksmith

Hello! We promised to publish assets, unique tools and shaders from The Blacksmith project. No sooner said than done.




First, you can download the demo project in the exe-file.
')
For your convenience, we have divided all assets, tools, and shaders into two packages: The Blacksmith - Characters and The Blacksmith - Environments.

Below is more detailed information about each package, as well as the reasons for choosing one technology or another. We want this project to not only demonstrate the capabilities of Unity 5, but also bring you immediate practical benefits.

Anticipating the question that we often hear after the release of demo materials, we will answer immediately: you can use these resources absolutely freely, even in commercial projects. In this case, the provisions of the standard license Asset Store remain in force. We will be happy if this release is useful to you and contributes to the success of your project.

Exe file

You can control movie playback using a simple interface:

• To fast forward / rewind, use the slider.
• To stop or resume movie playback, click the Play / Pause button or click the mouse outside the UI.
• To look around, slightly changing the viewing angle, click on the pause and move the cursor.
• To turn off audio, press the Mute button.

You can choose one of the preset quality settings:

• Low - recommended for weak devices.
• Medium - recommended for high-end laptops and middle-class desktops. On a laptop with a Quad Core i7 processor (2.5 GHz) and a GeForce GT 750M video card, the video is played in 720p resolution at 30fps.
• High - recommended for most desktops. On a computer with a Core i7 4770 processor and a GeForce GTX 760 video card, the video is played in 1080p resolution at 30fps.
• Very high - recommended for PCs with GTX 760 or higher.

Depending on the platform, loading the project may take more than 30 seconds.

PACKAGE THE BLACKSMITH - CHARACTERS

This package includes:

• blacksmith model;
• antagonist model;
• hair shader;
• wrinkle cards;
• unique shadows of characters;
• planar reflections.

Download The Blacksmith - Characters package here.

Blacksmith and antagonist

Character models in the project are presented separately.
We remade the skin of the antagonist, which was used in the video, to a more universal one. Now you can safely add it to any environment and start experimenting. But keep in mind that for good animation you still have to work on it. As an example, we added two animations to the project: idle (inaction) and walk (walking).



In this package you will also find the main character - the blacksmith. His skin is much more complicated than the antagonist, so we left everything as it is, so as not to waste time wasting. We remind you: you can absolutely free to use this original 3D model in your projects.



Despite the fact that we used some textures in a lower resolution (2K), the package contains the original full-size 4K textures for both characters.
The authors of the models and textures for the characters are Jonas Tornqvist and Sergey Samuilov.

Hair rendering

To make the hair look realistic, we needed characteristic anisotropic lighting, so we decided to make a separate shader for the hair. In addition, we added a component to it that calculates the ambient occlusion value separately for hair, and set up a multi-pass rendering to avoid sorting errors of overlapping transparent polygons.
A hair shader and an accompanying sample of the scene can be downloaded from the Asset Store. Detailed information on its use and configuration is contained in the readme file.

Wrinkle cards

To make the antagonist's mimicry more realistic, we added blend-based wrinkle maps to the project. Our unique component identifies the Blended Shape with the greatest influence and appropriately assembles normal and shading maps at the pre-preg stage. The data is then imported into a standard shader, replacing the normal and shading maps assigned to the material.

A separate pack of wrinkle cards can be downloaded from the Asset Store , and more information can be found here.

Unique character shadows

We sought to ensure that in all close-up shots the characters had soft shadows in high resolution. But at the same time the quality of the shadows of the environment should not have suffered. To solve this problem, we added to the project the ability to customize a unique shadow map for a group of objects.

A pack of character shadows can also be downloaded from the Asset Store , and more information can be found here.

Planar reflections

At first glance, the planar reflections in The Blacksmith video are no different from ordinary reflections on the surface of the water. But everything is not so simple: after rendering, the reflected images are minimized at all mip-levels of the reflective texture. Due to the convolution, the closer to the reflecting surface, the clearer the image becomes. Thus, we create a ray tracing effect. The resulting unique textures replace the cubic reflection textures in the standard shader. At the same time, the smoothness of the material causes the selection of mip-levels. As a result, by switching the corresponding parameter by keyword, the modified standard shader selects reflections from dynamic textures instead of cubic ones.

PACKAGE THE BLACKSMITH - ENVIRONMENTS

This package includes:

• forge;
• environment;
• atmospheric scattering;
• PaintJob tool (drawing vegetation on any surface);
• vegetation system;
• MaskyMix shader;
• modified standard shader;
• tonemapping.

To switch between the first person view and the animated camera, press the C key. You can switch between lighting modes using the V key.
Download The Blacksmith - Environments package here (note: it is quite large).

Forge

Here is the interior of the forge:


Game view of the forge from The Blacksmith package - Environments

Environment

We decided to slightly transform the original environment from the video to make it easier to use in games. Detailed setup will require additional time, but for you this is a great opportunity to practice. Here is the version of the environment available for download:



The difference is that for our video, we arranged the environment depending on the location of the cameras. If you're interested, this is what the environment looks like in the Scene View window of the original project:


View of the scene in the Scene View window of the original project The Blacksmith

Some assets were not used in the new version of the environment, but we still added them to the project.
The author of the environment scene and most of the resources presented in this package is Plamen Tamnev (Plamen 'Paco' Tamnev).

Atmospheric dispersion

Our unique solution for atmospheric dispersion can be found in this project or downloaded as a separate package on the Asset Store. More information can be found here.

PaintJob tool

This tool allows you to draw vegetation not only on Unity landscapes, but also on any geometry. Thanks to him, we were able to use the built-in tools of Unity to the maximum in accordance with our goals.
You can extract it from The Blacksmith - Environments package and use it freely in your projects.

Vegetation system

When creating vegetation, we faced several tasks. First, we wanted to make it soft and use unique shading for it. Second, it had to maintain a dynamic GI and not mix with the ground (or with what we used as the ground). Finally, we wanted the vegetation to work without Unity landscapes. The last task was solved using the PaintJob tool, but all the others required additional configuration. We decided to create a component that would collect data from PaintJob, as with any other vegetation added manually, and generated the corresponding number of baked meshes. At the same time, we could completely control the process of their rendering, applying any sorting algorithm or projecting data from light probes onto dynamic textures.

Shader MaskyMix

MaskyMix is ​​an advanced standard shader that blends an additional set of texture details based on masking criteria (hence the name MaskyMix). When creating a mask, the angle is taken as the basis between the orientation in the space of the world defined by the material and the pixel normal chosen from the base normal map. In addition, the mask can be modified with a tile texture or an alpha channel with a vertex color of the mesh, if there is one. Depending on the masking thresholds specified in the material, an additional layer of details may be added to the final mask. And if an alpha channel is provided in the mesh, the albedo of this layer can also be colored in vertex color.

Modified Standard Shader

When creating the The Blacksmith video, we used a number of modifications of the standard shader, and also added several new features. Some of them are completely useless beyond the scope of this project, but there are some that may be useful to you - you will find them as part of the standard surface shader in this package. Here are some examples of modifications: the possibility of pixel-by-pixel sampling of the smoothness value from the alpha channel albedo instead of the selected texture, the ability to control culling of any material, the ability to adjust the color and intensity of the reflected global illumination, etc.

Tonemapping

In a previous article, we already talked about color correction and tonal compression in The Blacksmith video. After the release of the short film, our development team decided to embed tonemapping in Unity.

The sky HDR textures in this package are borrowed from the NoEmotionHDRs website (by Peter Sanitra ) under the CC BY-ND 4.0 license and were used without any modifications.

That's all. We have fulfilled our promise and are now embarking on new adventures.
It will be very interesting for us to learn how you use this demo project. You can leave a comment in the comments or email us: demos@unity3d.com. And if you have interesting ideas or practical solutions, be sure to share them with the community.
See you later!

For more information on every aspect of the work on The Blacksmith video you can find in our previous articles:

Meet the Unity Demo Team and The Blacksmith FAQ.
Shadows of the characters in the video The Blacksmith.
Creating The Blacksmith: Staging, Shading and Lighting.
Wrinkle cards in The Blacksmith video.
Atmospheric scattering in The Blacksmith video.
Create The Blacksmith: animation, camera effects, audio / video.
The creation of The Blacksmith: concept and decoration.

Source: https://habr.com/ru/post/273299/


All Articles