Is there any way to find output value of a material node in ue4 material graph?

Hello, I am new to unreal engine and I am learning material nodes in ue4. Now I had a doubt that is there any way to find the output value of a material node in ue4. Anyone answer please as soon as possible. It will be very useful for my learning. Thanks in advance.

5 Likes

Can you be more specific, what kind of node and from where?

If you mean know the value of a material node from blueprint, then yes. Once you make it a material instance you can read / write the values from blueprint.

1 Like

Yeah, for example if we use a constant node we can predict the return value of the const depending on the value we may provide or not and fore constant3vector we can find the return value but how can we find the return value(which is output node) of the VertexNormalws node and texture coordinate nodes how can we find them? Hope you understand tha question. Thanks for your reply waiting for this reply.

2 Likes

Yes, parameterized material instance:

See the color is a param. Then make a material instance and control it from BP:

2 Likes

Sorry :frowning: I don’t know much about blueprint so is there any other way it is possible. I have seen many video for finding mesh top of a mesh to make the place snowy but they just use VertexNormalws and use Blue channel to detect top. But I am eager to know what value does the blue channel contain integer or float or what value it is limited to like -1 to 1. From the output they have used power node. For this reason I need to understand the outputs of these nodes if I found the output value I can imagine how we can make the top little snowy or mossy. Please reply? strong text

2 Likes

Not sure if this is what you were looking for but you can see the values with debug nodes.

5 Likes

Thanks for your answer. I will try it today and post in forum. Again thanks for your support MMMarcis and ClockworkOcean I have learnt new things in this forum.

2 Likes

How to get that value to a BP?

2 Likes

You don’t.

Materials Read values.
They have no output of any kind.

Materials happen on your GPU. Calculations you want on the CPU.

1 Like

Draw your material to a render target and then read pixels.

2 Likes

I am trying to avoid using renderpixels() due to the enormous performance impact.

Like I said, you don’t.

Provide the values to the shader in such a way that you have them accessible elsewhere.

READING values is already expensive enough. WRITING values is even more expensive since you go from GPU > CPU > HDD.

Writing, then reading, then using, probably puts your cost at 3 times what you can afford per frame. Same reason why you want to keep RTs to a minimum on projects, even if they do allow for way cool effects that you cannot do without…