Author Topic: Use vertex paint as substance input color  (Read 129 times)

Hi everyone,
I am currently learning how to use the Substance Plugin inside of UE4. The material I created has an input color and I was wondering if there is some way to use vertex color inside UE4 to drive that input. So far the only thing that seems to work are Substance Input images, but it would be great to make changes in real time just by vertex painting.
Thanks in advance!

Hey @Mammothfur,

Yes this is possible with 4.17 and higher! (in previous versions, UE4 would crash while trying to vertex paint using procedurally created textures and also using image inputs).

This will be a very basic example on how to use vertex painting with substances. This can obviously get way more complicated, but I figured I would show you how to get started. There will be a lot of pictures. :) I am using 4.18.

Here is the substance I created in designer. I have a color input connected to the base color output, and a grayscale input connected to the normal map output. I have also connected a Uniform Color node, and have exposed the color parameter in my substance.



I exported the .sbsar and brought it into UE4. I then created a graph instance of that same substance. I imported my input textures as substance image inputs (.jpg) and loaded them into the input nodes in both of my graph instances.





After that, I created a material (this will be my vertex material) and brought the generated base colors and normals into it. I set up my material like this:



I then applied my vertex material to my mesh and began painting. I also made sure to set the red channel while painting (since I set the material up to use the Red Channel in the Vertex Color).



I then painted my mesh, holding the shift key to erase where needed.



Using my exposed color parameter, I am able to change the color of what I painted.




And voilà! That is how to (very basically) vertex paint using substances (also using input images). I hope that this helps, and I would be more than glad to answer any questions you have. :)
Last Edit: November 03, 2017, 08:45:26 pm
Integrations QA Analyst
keston.gregory@allegorithmic.com

Thanks a lot for all your effort!
Still, you already seem to have a noise map that you import as a Substance Image Input. What I want to do is to use the Vertex Paint itself instead of a Substance Input to be able to for example warp my input color or do whatever with it.
For example, this is a very simple Material I made in Designer; the idea is to have metal heat treat colors based on a greyscale input:

The usage of the input is set to Base Color. In Painter I can use this material as a filter, so when I paint on the Base Color Channel in black and white, the material gives me the colors I want, like this:


Hey @Mammothfur,

Ah I see! I am sorry I misunderstood you. This might be something that UE4 Live Link can solve. We are working on that at the moment. It would allow you to paint the mesh in Painter and the results would be sent to UE4 in realtime. If I am understanding what you are trying to do, then this possibly would give you the results you are looking for without having to use Vertex Paint.

I will update this post when we release it. :)
Integrations QA Analyst
keston.gregory@allegorithmic.com

That would be exactly what I´m looking for. Sounds like a amazing feature and I´m really looking forward to it!