Author Topic: Re-using Substances  (Read 2982 times)

Hi I was wondering. If you reused the same substance on multiple objects in a scene, are you able to change the substances values without effecting the other objects, or will it change them all?


*edit* By this I mean using one graph on multiple objects with different values/effects. Is this possible?
Last Edit: August 18, 2014, 04:13:13 pm

I'll go into more detail, I have a substance that has one graph in it with a lot of modifications to things like colour, dirt and other effects as well as type (presets of other values). I want it so that I can use that substance graph on multiple versions of that object, but have different amounts of dirt or colours. However in unity when I tested it when i changed one object the rest changed as well. Does this mean I have to create multiple graphs for the different types instead or is there another way?

If I had a tiled texture with dirt on it and would like to have different dirt types on different tiles to make it not repeat, is it possible and in a single graph?


As single material in unity = effect to all model.

Cloned material in unity = effect on model link to material only.

Same story to substance. If you want to put differs value per model.. Clone substances.

Hold on.. Try add more output. Might working.
Last Edit: August 19, 2014, 12:39:29 am

Thanks for the reply, but I'm not sure I follow. By add more outputs, do you mean multiple graphs in my substance to attach to multiple objects, or do you mean multiple clones of the substance? Because that would be quite heavy to the load times.

this is really the way substances work - they are procedural UP TO the pixel output. they are basically textures. in unity, and in unreal, you should have one substance instance per unique material.  this means that if you require the output of the substance to be different, you need to clone the substance.

of course, with complex materials in these two engines, we should all be thinking about how we can make the materials themselves achieve the variation we require, and using tools like substance to be clever about what information we pack into the pixels which we feed into the materials.

in your case - making dirt behave in a different way to the underlying color, why not rig up a graph that outputs some dirt to an extra rgb texture, then set up the material to overlay that using a different UV scale, different uv channel, or world-space uvs?

my favourite trick for this in unreal is to get the position of the object which the material is applied to, and add the x, y and z values together to produce a simple *offset*, and add that to the uv position of the dirt. the upshot is that the dirt is differently positioned on every object.

here's a part of a scene i'm doing that in.  this is all just one material, and just one dirt texture. i'm also using vertex painting to multiply the opacity of the dirt, as well as the automatic position offset.
Last Edit: August 20, 2014, 12:09:42 am

Yeah that would work too.

About extra output in substance graph.
You can create single material with extra diffuse output.
Use same texture but before add dirt, split them up and add dirt on each before output.

On unreal you can select which output you need.

Thanks guys for the replies. Unfortunately I am a complete newbie to most of this, especially code as I focus more on the art side so I don't know how to do things such as moving UV's using world space. However I now know what to look for and to learn about to get this working using the least amount of resources. For now I will ensure I have a few extra dirt graphs just to keep the surfaces less repetitive by using the same dirt texture repositioned on different outputs. Pretty sure it means more textures but hopefully it will do the job for now.
Thanks again for the tips, Ill take a look into them. Also are their any tutorials of this sort of thing anywhere that you know of where you can direct me?
Appreciate it  :)