Dynamic Materials changes depending on the gradient angle of the surface.

Hi everyone,

is it possible to change values or rather parameters depending on the gradient of the surface where the material is printed.

In order to understand it better: I want to create a material that can change depending on the weather. For example, if it is winter, the material shall be white, but this material could be used to brush on a wall or floor or ceiling, so if this material is used on a floor, it shall change into full white, when it is brushed on a wall, it shall be half white and if it is on a ceiling, it shall not change. This is an easy example. At least the gradient angle of floor is 0°, of wall 90° and of ceiling 180°, so i can equally create a material with a LERP between 0°-180°. The point is, is there a possibility to GET that angle of the surface at the position of every pixel.

Hope you have a nice answer :smiley:

Thanks in advance! If my english is kind of wierd, I come from Germany. Sorry for that :smiley:

Kind regards

Versuche es mit den VertexNormals da kannst du alle pixel rausfiltern die in eine bestimmte richtung zeigen perfekt am anfang dieses Videos erklärt :slight_smile:

Try useing the Vertex normals you can filter all pixels pointing to a certain direction. The above video explains it well.

Thanks,

meanwhile i have still found the solution, but thanks for the reply.

For those who want the right answer, VertexNormals is one solution :smiley:

But there is another, more practical solution. Just go through the tutorial: layered materials.
It is short, easy to understand and more common and it explains exactly how to cover materials with other materials depending on the gradient of the surface.

Link: Unreal Wiki: Layered Materials

Kind regards

well mark the question as solved then or at least as answer :smiley: