Direct 3D

How to use particles in Direct X Manager


Answer this question

Direct 3D

  • Lamaggad

    They seemed to have removed the PointSprites sample from the June SDK. I remember it was in both the managed & unmanaged sides prior to that. I'm not sure why the decision to remove samples while not replacing them with something similar.

  • generic

     Jack Hoxley wrote:
    I'll see if I can find the link in the DX docs for you

    Well, that was... fun... I can't seem to find any general documents for Point Sprites in the official documents. I'm sure they used to be there... Maybe Google will know.

    However, the following things seem to map to the native DX stuff:

    Device.SetRenderState( RenderState.PointSpriteEnable, true );
    Device.SetRenderState( RenderState.PointSize, 10.0f );


    hth
    Jack


  • Helios

     Minh wrote:
    They seemed to have removed the PointSprites sample from the June SDK. I remember it was in both the managed & unmanaged sides prior to that. I'm not sure why the decision to remove samples while not replacing them with something similar.


    The PointSprite sample was removed a while ago.  For those interested in particle systems in Direct3D, you might search the web.  A quick trip to my favorite search engine returned some possibilities:

    http://www.gamedev.net/reference/list.asp categoryid=72#225
    http://www.codesampler.com/dx9src/dx9src_7.htm

    Note, however, that point sprites have a lot of limitations on size and flexibility.  You'll likely quickly run into these limitations with any reasonable particle system, so you might invest in learning other techniques for rendering particle systems.

  • ismail tanberk

    The actual animation/physics of an explosion (and by extension, particle systems) is down to you and your code. Direct3D doesn't simulate those for you due to only being a graphics API.

    What you want to look into is "Point Sprites" - I'm not an MDX programmer so I don't know the exact terms, but you should be able to set them up (activation/size/scaling etc..) using the render states, and you then despatch a list of single vertices (with position/colour) as a standard draw call.

    With point sprites enabled, Direct3D will interpret these single points in 3D space as a sprite with the current texture (and other properties) and transform them accordingly - you'll effectively get a 4-vertex quad for each vertex you send to be rendered.

    I'll see if I can find the link in the DX docs for you, but for some reason the MDX part doesn't seem to work well with FF Tongue Tied

    hth
    Jack


  • Direct 3D