Search Unity

Procedural materials tutorial – Substance in Unity

This guide is designed to briefly explain what Substance is, how to create new substance materials from a substance material asset, apply them to a mesh and edit parameters.

What are Substance Materials?

Substance materials are procedurally generated assets, from technology developed by Allegorithmic. A ‘substance’ is basically a set of maps, defining a whole material with all channels: Diffuse, Normal, Specular, Bump, etc. 3DS Max and Maya have substance support for rendering, but now with Unity implementation we can make use of them in real-time applications.

Why use Substance materials?

There are a number of reasons to use of procedural materials:

Dynamically updateable in game

Resolution independent

Animation supported

Tiny file size

Really fast to create textures, especially bricks, tiles and other tileable surfaces, that are otherwise time consuming to generate from photographic source

Fast to duplicate and create library of unique material

They are cool

Where do I get Substance Materials?

The Asset Store in unity (Window > Asset Store) includes free and paid substance packages available to browse.

How do I use them?

To customise a substance material and apply in Unity follow these steps:

Import or create a mesh onto which you want to apply materials;

Make sure it is UV’d evenly, or as desired – use a checkerboard or dummy material (Currently unity cannot import subtance materials assigned in external packages)

22 评论

@Aras Pranckevicius: The reason is simple: I have my game made ​​in version 3.3 and tested with version 3.4, leaving me with a lot of the proposed changes at the end instead of moving back would be a lot, that’s why I wanted to see it with any library. NET or something. if possible I would greatly appreciate your help

The reason is simple: I have my game made ​​in version 3.3 and tested with version 3.4, leaving me with a lot of the proposed changes at the end instead of moving back would be a lot, that’s why I wanted to see it with any library. NET or something. if possible I would greatly appreciate your help

@Rune: “they don’t store any bitmap data prior to generation” isn’t really correct either, since most of the more interesting Substances I’ve seen promoted actually have 3 or 4 base textures from which they are generating the result – B2M is the most obvious example of this.

Don’t get me wrong, there will be some cases where dynamic generation like their “slowly aging bathroom” example (http://www.allegorithmic.com/gallery/demos/demo-bathroom) will mean that you get many more output textures for each input Substance, hence multiplying up the advantage. The question is just how well utilized that possibility is in games. I tried hard to find a game-fitting use for it in my game, but ironically I couldn’t even find a good enough “aged bricks” Substance (of all things!) in the small Substance library :-(

I think some of these points have been clarified already, but just to make it extra clear:

The memory footprint is not actually smaller – this was a misunderstanding internally that we’re correcting now. The big advantage is the much smaller file size which can drastically reduce distribution size / download time.

Substance Designer can easily create tiling textures of any kind – not just bricks and the like.

The substances are resolution independent in the sense that they don’t store any bitmap data prior to generation and thus can be generated at any resolution with equal crispness. They work like any other bitmap after generation though (except that they can be regenerated on the fly with different parameters).

re: Hard to make Tileable – if you create a texture using photographic source of tiles/bricks or other images containing vertical and horizontal lines that are captured, artists have to spend a great deal of time aligning, editing seams, stretching and warping and hand painting to remove obviously repeating features. The Procedural tiling does away with lots of this grunt work. Perhaps it could have been better worded @Warick

@Warwick
Resolution independent means you can change the resolution of the texture at any time, from during the authoring to after cooking without embedding full resolution textures into the build.
The smaller memory footprint is not a smaller “video” memory footprint but hard drive memory/download size.

Regarding tiling: substances are automatically tiling. So for bricks it’s indeed not too hard, but for other types it may be more complicated. With substance, it can always tile (doesn’t mean that you don’t repeat patterns however).

The Player got bigger of around 400k, nothing else to download. Substance files are taking in general only a few kb, so it indeed reduces the game size. However once generated they are like any other textures in memory.

Same question for “smaller memory footprint”. Smaller WebPlayer file, yes (assuming the dll isn’t too big… or did the player get bigger?), but if the texture is “generated at load”, how does it use less memory?