Skip to main content
Participant
Jul 14, 2021 3:24 PM UTC
Answered

Use mask provided by engine to influence graph?

I'm trying to make a kind of lava animation in Substance designer. The animation is pretty much lookign the way I want it, but I've had this idea. What if I make a lava lake and the edge of the lava lake where it touches the walls is brigher/darker?

In Substance I can easily make a mask and use that to influence the material in just the right way I want it. But let's say I want to make two lakes. Of different sizes and shapes. If I don't want to create a new material for every instance of me using lava, I need to get the mask information from the engine. And getting a mask would be no problem.

But is there a way to use a mask from Unity and incorporate it into the graph? On a per item basis?
Or would that be something I'd have to construct from scratch with shaders?

 

 

Thank you!

This topic is closed to new replies. Start a new post to keep the conversation going.
Luca Giarrizzo
Luca GiarrizzoCorrect answer
Community Manager
Jul 15, 2021 10:18 AM UTC

Hello,

 

You can use the scripting API included in the Substance for Unity plugin to pass textures to graph inputs.

 

If you need the mask texture to dynamically adapt to the geometry of the scene, then you need to set up a shader which would detect geometry intersections and write data to a Render Texture (or Render Target) accordingly.

 

Best regards.

 

Luca Giarrizzo | Quality Engineer - Substance 3D Designer | Adobe

3 replies

Luca Giarrizzo
Community Manager
Luca GiarrizzoCommunity ManagerCorrect answer
Community Manager
Jul 15, 2021 10:18 AM UTC

Hello,

 

You can use the scripting API included in the Substance for Unity plugin to pass textures to graph inputs.

 

If you need the mask texture to dynamically adapt to the geometry of the scene, then you need to set up a shader which would detect geometry intersections and write data to a Render Texture (or Render Target) accordingly.

 

Best regards.

 

Translate
Luca Giarrizzo | Quality Engineer - Substance 3D Designer | Adobe
ChaonicAuthor
Participant
Jul 18, 2021 5:25 PM UTC

Thank you very much for the reply!

Translate
Luca Giarrizzo
Community Manager
Community Manager
Jul 19, 2021 6:51 AM UTC

Happy to help @Chaonic!

Translate
Luca Giarrizzo | Quality Engineer - Substance 3D Designer | Adobe