Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


[DirectX] Particle Systems - Compute Shader


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Nikko_Bertoa   Members   -  Reputation: 424

Like
6Likes
Like

Posted 02 June 2014 - 10:43 PM

Hi community

 
I want to share some demos about Particle Systems I was working on.
 
I implemented those systems with DirectX 11 and Compute Shader
 
I was working on Visual C++ 2013, Windows 8.1, Phenom II x4 965, 8GB Ram, Radeon HD 7850. They run at 60FPS (I limited FPS to 60 FPS)
 
Please, watch demos in HD 1080p.
 
 
Video 1:
There are 1.000.000 particles in this demo which are in 5 different areas.
As demo progress, you can see how particles in each area begin to organize
 
 
 
Video 2:
There are 640.000 particles forming a sphere. Particles are moving slowly to the center of the sphere.
 
 
 
Video 3:
There are 640.000 particles organized in 100 layers of 6400 particles each. Particles move at random speed and direction through the plane of its layer.
 
 
 
Extras
I tested those demos with 10.000.000 particles and they run at 30 FPS approximately. Apparently alpha blending and z tests slow them, because when they are separated, then FPS increment.
 
Future work
Find bottlenecks and learn how to do that faster. I know in AMD video cards, threads per group should be multiple of 64.
Implement systems where particles interact physically between them or with complex AI. I was using steering behaviors in demo 1
 
Web


Sponsor:

#2 Jason Z   Crossbones+   -  Reputation: 5399

Like
1Likes
Like

Posted 03 June 2014 - 04:41 AM

Looks pretty good - how about a description of your rendering setup?  Are you using append/consume buffers?  Are the particles living forever or are they dynamically created and destroyed?



#3 Nikko_Bertoa   Members   -  Reputation: 424

Like
1Likes
Like

Posted 03 June 2014 - 09:05 AM

Hi Jason

 

I am using 2 ID3D11Buffer where I store information for all the particles (positions and velocities). Particles are living forever, they are created once.

 

Those buffers are binded through an Unordered Resource View to Compute Shader and through a Shader Resource View to Vertex Shader.

 

I use a Draw call with the number of particles. SV_VertexID is used in the shader to identify what particle should I process in a Vertex Shader in particular.

 

Particles are represented as points and expanded in a quad that face the camera, inside Geometry Shader.

 

 

I plan to use Append/Consume buffer in the future to create/destroy particles dinamically

 

 

Thanks!


Edited by Nikko_Bertoa, 03 June 2014 - 09:06 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS