rainerpl Posted November 1, 2018 Share Posted November 1, 2018 Hi, Im fairly new to babylonjs. I need give meshes materials which alpha/color properties depend on the mesh'es location/distance/placement relative to each other( or some internal mesh property that is different for each mesh ) The scene setup is very simple. I have thousands of cubes( all sharing the same material ). Now, i want to make it so that the cube's alpha and color values depend on how close a mesh is to another mesh in the scene. This would create a dynamic range of alpha/color values which are always changing( as meshes change ). I know I could give each mesh its own material, but that would hit the performance( and i need the meshes to share almost all material properties except alpha/color ) Is there a way to share a material between thousands of meshes, but allow each mesh have its own alpha value ? Quote Link to comment Share on other sites More sharing options...
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.