• Advertisement
Sign in to follow this  

skinnedmesh & instancing

This topic is 2334 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi.

I adapted the skinnedmesh sample from the dx sdk to act as a strategy game. So i have a raptor which I can move to the cursor in 3d space, collision detection and multiple animations.

Now I have to show more than one raptor 'cause you will have more than one of the same unit in a strategy game ^^. I think the best way doing this is instancing.

I know the multianimation sample but its a little to complicated, and in addition I cant use my own meshes (I can switch view and hear walking sounds but it wont show up anything)

What do I have to do to have multiple instances? What do I have to clone exactly (I think the frameroot and animcontroller but I'm not sure)? And how can I copy them during runtime and keep them separated so that my raptors wont do all the same animation?



Edit: And how can I move them separately? If I select one and rightklick on the world only the selected one should move and not all instances (I think to know how to select one)

but do I need a separate world for each instance or is there an other way to do this more efficient?



Thanks in advance



Ritti

Share this post


Link to post
Share on other sites
Advertisement
You might find nVidia's Skinned Instancing demo very useful.

to move them separately, you should pass a transform matrix in your per-instance data that represents there current position/rotation/scale at the time period the instance is rendered (may be a more efficient way however).

Share this post


Link to post
Share on other sites
Yeah thank you, this sample will help me a lot to understand how instancing works :)

Thanks again, Ritti

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement