OMAR Posted March 28, 2016 Share Posted March 28, 2016 Hi, can we assign different materials to the instances of the same object so all instances have their own material? -Thanks Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 28, 2016 Share Posted March 28, 2016 You cannot do that with instances, but you can do it with clones. Instances = same geometry + same materials clones = same geometry OMAR 1 Quote Link to comment Share on other sites More sharing options...
OMAR Posted March 28, 2016 Author Share Posted March 28, 2016 @Temechon does using clones increase the number of draw calls made by the CPU? Quote Link to comment Share on other sites More sharing options...
Temechon Posted March 28, 2016 Share Posted March 28, 2016 If each clone has a different material yes. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 28, 2016 Share Posted March 28, 2016 clone the material of the clone. so clone your object... var Obj_B = Obj_A.clone("Obj_b", null, true); Obj_B.material = Obj_A.material.clone(); Im not sure, if that will effectively save on anything because I assume when it clones the object it also clones the material? Im not sure if it clones it or sets a reference to the original... If its just setting a reference then changing anything on the new one I would imagine would effect all of the ones with that same material even if they were cloned objects (im not sure though), if its doing that then the above example will unlock your ability to change the materials without having to define new ones. 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.