Jump to content

Animated instances


MarianG
 Share

Recommended Posts

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  :D

 

Thanks.

 

 

playground: http://www.babylonjs-playground.com/#1GEYSB

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...