📜 ⬆️ ⬇️

Creating materials for Unity in Substance Designer


Terrible torment


Texturing and creating gaming materials have always been interesting ... and painful work at the same time. Before switching to Substance Designer, I used to create all the necessary Photoshop and xNormal maps. It was necessary to switch between these two applications many times, and it was annoying. Now I got rid of this problem.

Substance Designer (SD) is software that allows you to create materials and textures on the fly. It uses a surprisingly simple node system. I am an artist, and usually I was very frightened by working with knots (and generally everyone except the brush). Honestly, when I first saw SD, I started slightly. Fortunately, the authors of the program have a video demonstrating its capabilities. They give such a motivating "kick" that you have to make a "leap of faith."

Why SD?


First we decide why we stopped on the Substance Designer? The first reason is that Unity has switched to a new material system called PBS, Physically Based Shading (“physically sound shading”), which is well described in this amazing post . We wanted to make the most of this new technology.

The second reason is that in the game Antegods we wanted to explore the area of ​​procedural generation. SD has surprisingly fast algorithms that allow you to create materials almost instantly. With one click or by adding a new node, you can significantly change the appearance of the entire material.
')
The last reason is that the workflow of transferring materials to Unity is simply flawless. You can export all the material to Unity, change it already there ... and everything works without problems!

Examples


Here are some examples of materials created by us in Substance Designer.

Gold, silver, GreebleCity and wood.

SD learning process never ends. There are so many ways to achieve the same result, and some of them are better or faster than others.

Looking for gold!


Now I will show you a small example on the creation of gold. Alchemists tried to get it for centuries, and this is very important material for our game, based on the ancient Latin American culture.

If you know Substance Designer perfectly, you will probably see a way to make the material much better. If so, tell us! On the other hand, if you are completely new to this software, I suggest you first watch Allegorithmic's very useful instructional videos .

The material "gold" is actually quite simple to create, but it still requires a lot of settings. This is what the final graph looks like in the Substance Designer.


I usually start with the Specular / Glossiness setting. Mainly because I am more used to them than to Metallic / Roughness (metal / roughness). This may already be strange, because the Metallic / Roughness setting is standard in Unity.

Secondly, I needed a beautiful metal or stone structure with cracks and dents.


Cracks & Grain (cracks and grit) is a very subtle structure that is mostly visible on the normal map (Normal), and quite a bit on the diffusion map (Diffuse). I started with a mosaic pattern and connected it to the Clouds (clouds) nodes to get a subtle structure here.


I wanted the cracks to show up more in Normal than in Diffuse, so I put the knot right in front of the exit so it was in the normal map part.


To be plausible, gold should be as smooth as possible, otherwise we will have a yellow foil. Therefore, the normal map is very poorly defined, but it is still visible.


By adding a simple gradient map to the Cracks & Grain map, I can quickly create a Diffuse map.

But we lack something. In Substance Designer it’s convenient that you can work with previously created maps. Here I took a normal map, turned it into a Curvature map, increased the values, and turned it all into a color map. (Grayscale and Color cards do not mix.)


Mixing them on top of an already existing Diffuse card, we get a slightly more interesting texture.


And finally, for Specular, I used a simple Clouds node. With the help of a gradient map, I applied slightly darker colors than in the diffuse map, and on top I added details using curvature with increased values.

For glossiness (Glossiness) I used the same Clouds node, brightened the result (the brighter, the more brilliance), added enlarged details of the Curvature, and that's it!



It remains to export the material by simply clicking on Export. SD exports the .sbsar file to Unity, and it works exactly like the material. It automatically places the cards in the right places, and then allows you to configure. I must say that the materials in Unity look a little different than in the Substance Designer itself, but perhaps the creators of the software fixed this in the latest update.


That's it, the material is already in Unity. As you can see, there are settings below. For example, you can quickly change the size of the texture, which is very convenient if you need to reduce the scale of the project.

Also there is a button Randomize. When pressed, the material alters all generated values. Now my gold doesn’t look the best, because it always uses small values ​​for clouds and cracks. However, if you slightly raise the cracks value and click the Randomize button, the following will happen:


This is already close to the procedural generation we need. Each time the material will look a little different.

But SD is capable of more: you can reveal the necessary nodes and functions. After that, they become visible in Unity, and can be customized. In my example, I revealed two functions: the number of cracks along the X and Y axes. In the editor, you can drag the sliders, adjusting the material to your taste.


Recommended!


In conclusion, I recommend Substance Designer to anyone working with textures and materials. This software provides more freedom and allows you to quickly achieve amazing results. It has so many features that you can, I think, create almost everything.

In parting, here are a few graphs that we created by mastering the program. Good luck in job!




Antegods is supported by the Dutch Cultural Media Fund (Dutch Cultural Media Fund), the Cultural Industries Fund NL (Dutch Cultural Industry Foundation) and the European Union MEDIA Program.

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


All Articles