#Blending Standard Materials

3 messages · Page 1 of 1 (latest)

cobalt zenith
#

Hello everyone,
i have a dynamically generated mesh (terrain), and now want to create multiple materials for this one mesh. The idea is to blend those materials according to the mesh geometry/height.

My take on this is to pass all needed pbr textures into one shader, e.g. grass_color, grass_normal, rock_color, rock_normal, rock_ao, ...; create the pbr input for each material (grass, rock, ...) and then blend them according to the mesh geometry. (if this is even possible)
I looked into the custom_material and extended_material shader examples, and it seems the best way to do this is to create multiple pbr materials and then blend them, or is there a better way to achieve this kind of functionality?

And my second question, whats the difference between a custom_material and a extended_material?

Thanks in advance

cloud gust
#

Regarding your second question. As the name suggests ExtendedMaterial, extends a certain material, usually StandardMaterial. So if you want a shader that's based on StandardMaterial, you'd go with ExtendedMaterial, because it already sets up all the bindings, etc. for StandardMaterial.

#

You probably want to extend StandardMaterial, though I can't tell how you should blend the different materials