First, you can download a demo project in the EXE file.
For your convenience we separated all asseta, tools and shaders into two packets: The Blacksmith – Characters (Characters) and The Blacksmith – Environments (Environment).
Below more detailed information on each packet, and also arguments for benefit of the choice of this or that technology is provided. We want that this project not only showed possibilities of Unity 5, but also brought you direct practical benefit.
Advancing a question which we often hear after release of a demo materials, we will answer immediately: you can use absolutely freely these resources, even in commercial projects. At the same time provisions of the standard license Asset Store remain in force. We will be glad if this release is useful to you and will promote success of your project.
It is possible to manage reproduction of a roller by means of the simple interface:
• For rewind use a slider forward/back.
• To stop or resume reproduction of a roller, click Play/Pause or click with a mouse outside UI.
• To look round, having slightly changed a viewing angle, click a pause and move the cursor.
• To switch off audio, click Mute.
You can select one of the preset quality settings:
• Low – it is recommended for weak devices.
• The average – is recommended for high-performance notebooks and desktop PCs of middle class. On the notebook with the Quad Core i7 processor (2,5 GHz) and the video card GeForce GT 750M the roller is reproduced in permission 720p at 30fps.
• High – it is recommended for the majority of desktop PCs. On the computer with the Core i7 4770 processor and the video card GeForce GTX 760 the roller is reproduced in permission 1080p at 30fps.
• Very high – it is recommended for the PC with the video card GTX 760 above.
Depending on a platform, loading of the project can take more than 30 seconds.
THE BLACKSMITH PACKET – CHARACTERS
Are a part of this packet:
• smith's model;
• antagonist's model;
• shader of hair;
• cards of wrinkles;
• unique shadows of characters;
• planar reflections.
Characters can download The Blacksmith packet – here.
Smith and antagonist
Models of characters are presented in the project separately.
We remade a skin of the antagonist which was used in a roller, on more universal. Now it can be added safely to any environment and to begin to experiment. But consider that for good animation over it all the same it is necessary to work. As an example, we added two animations to the project: idle (failure to act) and walk (walking).
You will also find the main character in this packet – the smith. Its skin is much more difficult, than at the antagonist therefore we left everything as it is not to spend time in vain. We remind: you can use absolutely freely this original 3D model in your projects.
In spite of the fact that we used some textures in smaller permission (2K), at a packet there are original full-size 4K-textures for both characters.
Authors of models and textures for characters – Joonas Tornkvist and Sergey Samuylov.
Rendering of hair
That hair looked is realistic, we needed characteristic anisotropic lighting therefore for hair we decided to make a separate shader. Besides, we added to it the component calculating ambient occlusion value separately for hair and configured multipass rendering in order to avoid errors of sorting of the blocked transparent polygons.
The shader of hair and the accompanying sample of a scene can be downloaded on Asset Store. Detailed information on its use and setup contains in the readme-file.
Cards of wrinkles
To make a mimicry of the antagonist of more realistic, we added to the draft of the map of wrinkles on the basis of blendsheyp. Our unique component defines blendsheypa with the greatest influence and as appropriate arranges the normal map and shadowings at a stage of a prerender. Then data retrieveds are imported to a standard shader, replacing the normal map and shadowings, assigned in material.
Separate packet with cards of wrinkles it is possible it is possible to find here.
Unique shadows of characters
We aimed at that in all shota with a close up characters had soft shadows in high resolution. But at the same time quality of shadows of an environment should not have suffered. To solve this problem, we added a feature for setup of the unique card of shadows for an object group in the project.
Packet with shadows of characters also mozhnonayt here.
At first sight, planar reflections in The Blacksmith roller differ in nothing from normal reflections on a water surface. But everything is not so simple: after rendering the reflected images are turned at all mip-levels of the reflecting texture. Due to convolution, the closer to a reflective surface, the image becomes more accurate. Thus, we create effect of ray tracing. The received unique textures replace cube textures of reflections in a standard shader. At the same time smoothness of material causes selection of mip-levels. As a result, by switching on a key word of the corresponding parameter, the modified standard shader selects reflections from dynamic textures instead of cubic.
THE BLACKSMITH PACKET – ENVIRONMENTS
Are a part of this packet:
• atmospheric dispersion;
• the PaintJob tool (plotting of vegetation on any surface);
• system of vegetation;
• MaskyMix shader;
• the modified standard shader;
For switching between a type from the first person and the animated camera key C. It is possible to switch between the lighting modes by means of a key V.
Environments can download The Blacksmith packet – here (pay attention: it quite big).
Here so the smithy interior looks:
Game type of a smithy from The Blacksmith packet – Environments
We decided to transform a little an original environment from a roller that it was more convenient to be used in games. Detailed setup will demand an extra time, but for you it is an excellent opportunity to practise. Here so the version of an environment available to downloading looks:
The difference is that for our roller we arranged an environment depending on an arrangement of cameras. If it is interesting to you, here an environment in the Scene View window of the original project so looks:
Type of a scene in the Scene View window of the original The Blacksmith project
Some asseta were not used in the new version of an environment, but all of us equally added them to the project.
The author of a scene of an environment and the majority of the resources provided in this packet – Plamen Tamnev (Plamen ‘Paco’ Tamnev).
Our unique solution for atmospheric dispersion can be found as a part of this project or it is possible to find here.
This tool allows to draw vegetation not only on Unity landscapes, but also on any geometry. Thanks to it we managed to use the built-in Unity tools according to our purposes to the maximum.
You can retrieve it from The Blacksmith packet – Environments and to use freely in your projects.
System of vegetation
During creation of vegetation we were faced by several tasks. First, we wanted to make it soft and to use for it unique shading. Secondly, it had to support dynamic GI and not mix up with the earth (or with what we used as the earth). And at last, we wanted that the vegetation worked without Unity landscapes. The last problem managed to be solved with the help of the PaintJob tool, and here all others demanded additional setup. We decided to create a component which would collect data from PaintJob, as well as from any other vegetation added manually and generated the corresponding quantity baked by meshy. At the same time we could manage completely process of their rendering, applying any algorithm of sorting or projecting data from lighting probes on dynamic textures.
MaskyMix is an expanded standard shader which mixes an additional set of textures of parts on the basis of criteria of masking (from here and the name MaskyMix). During creation of a mask value of a corner between the orientation in space of the world determined by material, and the pixel-by-pixel normal selected from the basic normal map is taken as a basis. Besides, the mask can be modified by taylovy texture or the alpha channel with verteksny color of a mesh if that is available. Depending on the thresholds of masking specified in material the additional layer of parts can be added to a final mask. And if the alpha channel is provided in a mesha, the albedo of this layer can also be colored in the verteksny color.
The modified standard shader
During creation of a roller of The Blacksmith we used a number of modifications of a standard shader, and also added several new features. Some of them are absolutely useless beyond the scope of this project, but is also such which can be useful to you – you will find them as a part of a standard surface shader in this packet. Here several examples of modifications: a possibility of pixel-by-pixel selection of smoothness value of the alpha channel of albedo instead of the selected texture, a possibility of management of the culling mode of any material, an opportunity to configure color and intensity of the reflected global lighting, etc.
In one of previous articles we already told about color correction and a tone compression in The Blacksmith roller. And after release of a short film our design team decided to implement tonemapping in Unity.
HDR textures of the sky in this packet are borrowed from the website NoEmotionHDRs (the author – Peter Sanitra) according to the license CC BY-ND 4.0 and used without any modifications.
On it all. We kept the promise and now we go towards to new adventures.
It will be very interesting to us to learn about how you use this demo project. You can leave a comment in comments or write to us on mail: email@example.com. And if you have interesting ideas or practical solutions, surely share them with community.
You can find more detailed information on each aspect of work on The Blacksmith roller in our previous articles:
Acquaintance to the Unity Demo Team and FAQ command on the The Blacksmith project.
Shadows of characters in The Blacksmith roller.
Creation of The Blacksmith: preparation of scenes, shading and lighting.
Cards of wrinkles in The Blacksmith roller.
Atmospheric dispersion in The Blacksmith roller.
Creation of The Blacksmith: animation, effects of the camera, audio/video.
Creation of The Blacksmith: concept and decorating.
This article is a translation of the original post at habrahabr.ru/post/273299/
If you have any questions regarding the material covered in the article above, please, contact the original author of the post.
If you have any complaints about this article or you want this article to be deleted, please, drop an email here: firstname.lastname@example.org.
We believe that the knowledge, which is available at the most popular Russian IT blog habrahabr.ru, should be accessed by everyone, even though it is poorly translated.
Shared knowledge makes the world better.