Sign in to follow this  

Models & animation in (D3)DX?

This topic is 4543 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

I've used the D3DXMesh class befreo for models without any problems, but I have a couple of slightly related questions:
  • For a RTS game with a WarcraftII-like view, I want very low-poly models. Is it likely that having many models with so few polys and loads of vertex buffers is a bad thing, and I should be implementing a centralised VB for drawing all my unit models in a just a few DrawPrimitive calls? Or is this really not an issue?
  • Unfortunately it seems I'll have to do some people in the game which means animation - even if the people have like 20 polys each! Is there any functionality for animation in D3D(X) - I guess I want the simplest method I can get away with!

    Share this post


    Link to post
    Share on other sites
    Quote:
    Original post by d000hg
  • For a RTS game with a WarcraftII-like view, I want very low-poly models. Is it likely that having many models with so few polys and loads of vertex buffers is a bad thing, and I should be implementing a centralised VB for drawing all my unit models in a just a few DrawPrimitive calls? Or is this really not an issue?

  • I would imagine it's possible to get quite a gain from centralising your VB/IB's for something like this for as simple a reason as avoiding resource switching.

    Given that an ID3DXMesh doesn't know about any other ID3DXMesh (afaik) they can't take advantages of the fact that they have common/identical data in the same vertex format.

    The only downside I can see of this is that if you customize/optimize the way that you store your mesh geometry, you're going to lose the advantages of having the D3DX/D3DXMesh tools... The question would therefore be - is the possible performance gain more important than having a ready-to-use mesh library?

    Quote:
    Original post by d000hg
  • Unfortunately it seems I'll have to do some people in the game which means animation - even if the people have like 20 polys each! Is there any functionality for animation in D3D(X) - I guess I want the simplest method I can get away with!

  • There are a couple of animation samples in the SDK iirc, and what looks like quite a powerful D3DX style animation system ready for use. I can't really say any more than that as I don't have any animated meshes to play with! [sad]

    Jack

    Share this post


    Link to post
    Share on other sites
    Thanks for that. I should of mentioned that I'm on DX8.1, I have a SkinnedMesh sample but not the other one. I'll dig into the sdk docs.

    WRT the performance of D3DXMesh, while in the long run it might be a performance issue, the fact that this RTS is my 4E4 entry means I don't have the time!

    Share this post


    Link to post
    Share on other sites
    OK so it looks like that sample does what I want, but it's a bit complex! Please can anyone recommend a tutorial on using the D3DX skinned mesh functionality to display animations? It seems the SDK is a bit scarse.

    Amongst other things, I wonder about having two animations (walking & jumping for instance) - does D3DX support blending between the two or just playing a single animation? Oh, I found this article which looks to explain the basics, but doesn't appear to talk about multiple animations...

    [Edited by - d000hg on July 4, 2005 7:27:59 AM]

    Share this post


    Link to post
    Share on other sites
    Hello d000hg,

    Sadly the skinned mesh example in the SDK is about as good as you can get for a tutorial. It's actually not as complex as it looks. It uses 6 different skinning methods with support to switch between them which clutters up the code.

    I started with this tutorial which is frame based animation with seperate mesh containers for each frame(bone) (no blending). It will introduce you to the hierarchy setup and the animation controller. That allowed me to better understand what was going on in SkinnedMesh. The difference between a skinned mesh and a hierarchical mesh container setup is pretty much all in the rendering process (multiple bones affect your subsets instead of a single one).

    Also, take a look at the source for the DX MeshViewer, it supports skinned meshes as well (but it's documentation is even worse).

    If you want more information check my profile for previous replies. I've posted quite a bit of source in the last while for skinned mesh in managed DirectX 9.0 that might help. This thread and this thread come to mind first.

    Good Luck,

    Share this post


    Link to post
    Share on other sites

    This topic is 4543 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.

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    Sign in to follow this