royibernthal Posted January 9, 2017 Share Posted January 9, 2017 I have a mesh (container) that contains another mesh (sphere). I'd like to set a material to the container mesh, in a way that it is applied to all the meshes it's parenting. (sphere in this case) I created a PG showing that it doesn't work: http://www.babylonjs-playground.com/#L69M2#1 Is such a thing not supposed to work? My main reason for doing it is adding a material on top of a mesh that already has a material without overriding the previous material. (stacking materials) e.g. adding a material that adds a 50% transparent black tint to a mesh that already has a material, without touching that mesh's material (sort of adding a material on top of it). Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 9, 2017 Share Posted January 9, 2017 Parenting only affects position, scale, enabled, rotation. Materials are what are used to compile to the actual gpu shaders / programs that actually draw. There is no relationship between parenting and materials. Quote Link to comment Share on other sites More sharing options...
royibernthal Posted January 9, 2017 Author Share Posted January 9, 2017 I understand. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.