Saturday, November 6, 2010

GPU Particle system demo


I give a try at GPU Particle , here is a screen from a DX10 implementation , (no feature of D3D10 used , so it can be easily adapted in D3D9).

The positions and velocity are computed by the GPU in render targets , moreover billboarding and tesselation is done by the vertex shader using multistream instancing for uv coordinates and vertex texture fetch for retrieving the positions from the rendertarget.
All rendertarget computations are double buffered.

The collision is simply an horizontal plane for the moment , and the force applied to particle is only gravity and a pseudo random spherical velocity distribution.

This is an interesting feature but the physics collision with arbitrary actors can be a pain to implement.
I will try to add interactivity by adapting the ideas from gpu gems 3 smoke demo wich voxelize arbitrary meshes in runtime in a volume texture to handle response of the velocity field.

Work in progress:

Performance :
GPU : Radeon HD5770
Shader are experimentals and far from optimized but heightmap collision with :

1 000 000 particles @ 90Hz

anis refoufi gpu particles
50 000 particles @ 893Hz

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.