Skip to main content
Participant
July 14, 2021
Answered

Use mask provided by engine to influence graph?

  • July 14, 2021
  • 1 reply
  • 391 views

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 has been closed for replies.
Correct answer Luca Giarrizzo

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.

 

1 reply

Luca Giarrizzo
Community Manager
Luca GiarrizzoCommunity ManagerCorrect answer
Community Manager
July 15, 2021

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
ChaonicAuthor
Participant
July 18, 2021

Thank you very much for the reply!

Luca Giarrizzo
Community Manager
Community Manager
July 19, 2021

Happy to help @Chaonic!

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