MarianG Posted October 19, 2015 Share Posted October 19, 2015 Hi, guys. Up until today, each time I had more objects of the same kind, I cloned them. But each time i made a clone, the fps decreased drastically.Today I discovered the instances and I can say that there is a big difference between scenery with cloned objects and one with instanced objects. It's just that the instances have a problem. An instanced object takes the reference of the original object skeleton and if I start the animation of one instance it does not start, unless in the same time I start the animation of the original, and if I have multiple instances they all start the animation. And the question is ... Is there a way I can give an instance a clone of the original skeleton, without it acting like a clone and affecting my fps? Sorry my english Thanks. playground: http://www.babylonjs-playground.com/#1GEYSB monkeyface 1 Quote Link to comment Share on other sites More sharing options...
monkeyface Posted October 19, 2015 Share Posted October 19, 2015 Also on a similar topic.... can we give instances a different alpha value without making them clones? I tried to fade in my trees as they get closer and found that doesn't work either Quote Link to comment Share on other sites More sharing options...
BitOfGold Posted October 19, 2015 Share Posted October 19, 2015 Instances are hardware accelerated copies of the same geometry (vertex buffer) with different view matrix.So the only difference can be their rotation and position.Am I right? I also bumped into this problem (fading in objects), but I have no solution for this yet.Thinking of writing a special shader, for this, like a fog effect but with alpha. Quote Link to comment Share on other sites More sharing options...
Convergence Posted October 19, 2015 Share Posted October 19, 2015 In addition to the above, it would also be nice to being able to let instances have different parents. Quote Link to comment Share on other sites More sharing options...
reddozen Posted October 19, 2015 Share Posted October 19, 2015 Would be nice if you could clone the skeleton and instance the mesh. Not sure how possible that would be though... may just have to use clones. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 19, 2015 Share Posted October 19, 2015 @Convergence: I see no problem for instance to have different parents @BitOfGold: this is correct @Bullisor: Unfortunately no Quote Link to comment Share on other sites More sharing options...
MarianG Posted October 20, 2015 Author Share Posted October 20, 2015 Ok, thank you sir. 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.