How to make a material cover part of a 3D primitive node?

35 Views Asked by At

desc

Given a primitive node(could be a box, ball, cylinder, etc.) and a material, how to make the material cover part of the node just like the picture above?

Are there any existing examples in whichever 3D engines for me to check? Any ideas would be appreciated, thanks, guys.

2

There are 2 best solutions below

0
MeshTransform On

The answer to this question is quite simple. The easiest and almost the best way to solve this problem is using shaders. There are concepts like "mix shader" in Blender, which can mix two shaders, and by defining a rule can the shader decide which texture to get color from.

ref: https://docs.blender.org/manual/en/latest/render/shader_nodes/shader/mix.html

mix shader in Blender

0
retrop5 On

I agree with @meshTransform but as a more simpler (if you don't have complicated projects) way would be to assign different materials to different parts of the model in edit mode. This would undoubtedly work exactly the way you want it to.