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.
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.
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.
Yes, parameterized material instance:
See the color is a param. Then make a material instance and control it from BP:
Sorry 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
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.
How to get that value to a BP?
You don’t.
Materials Read values.
They have no output of any kind.
Materials happen on your GPU. Calculations you want on the CPU.
Draw your material to a render target and then read pixels.
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…