Note: This post was originally written on February 28th 2019
Some more details
At first I wanted to test my wood substance in Unity right away, but I got a little carried away by adding a few more details: long cracks and knots. Both of them are created with the shape nodes which I never used before but I definitely want to play more with it as it allows you create any shapes you want. It is a very powerful node.
Long Cracks
I blended a few thorn shapes that were distorted by a directional wrap.
Using transform 2D, I offseted the shapes so their placement would be appealing.
I then tiled them across the surface.
Knots
By blending multiple disk shape of various size, I was able to create a ripple shape.
I added some distortion with the direction wrap
I created a splatter effect to disperse it on the wood texture.
Input Parameters
By adding those two details, I had to adjust the input parameters so the intensity can be adjusted by the end user.
Using Substances in Unity
Asset Store
Substance isn’t integrated natively in Unity anymore as Unity decided recently to not have any third party system on a native level. You now need to install an external package from the asset store. It is pretty straight forward but reviews shows that the change from being natively implemented to being a package has created problems for a lot of users.
Import
Substance Designer standard files that contains the full graph are .SBS files. To use substances in Unity, you need to publish your substance as a .SBAR file. Once published as a .SBAR file, you can easily add it to a Unity project.
Inside Unity
Inside Unity, you get the following:
It automatically creates a material that can be used on any mesh. The graph object is where you access the exposed parameters. You used to have to bake the substance but it seems now that every changes made to parameters will rebake the maps used in the material.
Something else I noticed was the normal map. It looks yellow, which is obviously a sign that something is wrong with the normal (it should be blue/periwinkle). After some research, it seems to be a consequence from switching to a package instead of being natively supported. Unity simply doesn’t recognize the map as a normal map but the output in the editor looks okay, which suggest some magic under the hood is happening to still make it work.
I was also curious to see the difference in renders between Unity and Substance Designer but it looks quite good. Because I designed this subtance to output a specular map, I switched the shader to Standard Specular, but substances are compatible with Unity’s standard shader as well as Standard Roughness.
Multiple Instances
It is quite easy to create multiple versions of a material. In this example, the Wood.sbsar object allows you to add instances of a material. Now you are free to apply them to different objects, adjust the material independently from the first instance and bake the maps.
Improvements
As with many things, there are multiple ways to approach the creation of wooden planks in Subtance Designer. The way I did it doesn’t give me enough control over each plank so having variety and unique details for each of them wasn’t easily doable. I think I need to plan better masks for the future.
New Substance: Forest Pebble Ground
I wanted to play with the shape node and the tile sampler node and decided to create a pebble ground. This time around, I am way more familiar with the nodes and I was able to be much quicker compare to the wooden planks substance. I created this one during the afternoon.
I also took some advices from the monthly webinar I watched from Allegorithmic (write up coming soon!) in order to add some “randomness” to it.
My main approach was to create the shapes for each elements then tiles them. Some elements have multiple tile texture like the pebble stone because I needed different type of masks (grayscale variation, soft gradient, hard edges, etc). After that, it was just a matter of blending the right masks together and extract the right data.I didn’t have time to properly expose all the parameters for controlling the material. At the moment, only the amount and size of the pebbles are controllable.
I decided to import to unity quickly at the end. It is the first time I’m working with height maps so I was curious to see how it would look.
Improvements
I would like to add some leaves, grass and moss. I also need to properly expose the parameters so every elements can be adjusted.