Texture Atlas to single Shader Material texture

Hey !

Hope you are well,

I’m currently working with Blender and React Three Fiber,

I have a parent mesh, that contains children meshes. A hierarchy. In Three, I want to be able to use raycast and other selectable features on my meshes.

I’m trying to apply the texture on the parent, through a Shader Material, so that it only load once, and unwrap to all the children.

So, I’ve created a Texture Atlas in blender, that I export and pass through the Shader Material of the parent.

My problem is : The children materials are invisible ! (I pass no materials to them, with purpose), but I thought it will unwrap correctly to all children.

How to do that ?

Have a nice day !

you have to assign the same material to all children individually… there is no inheritance of materials down the hierarchy.

yourObject.traverse(e=>e.isMesh&&(e.material=yourMaterial))