Jump to content
  • Advertisement
Sign in to follow this  

References Soft Particles

This topic is 4299 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 would appreciate any good references that describe the implementation of soft particles. I found the description in the DirectX SDK. I tried Google first, but did not get any useful hits ... maybe I used the wrong keywords? Thanks in advance, - Wolf

Share this post


Link to post
Share on other sites
Advertisement
i havent the sdk so can only guess what soft particles are but i assume

frag_depth = fragcoord.z + texture2d( particle_tex, tc );

ie u alter the depth based on a height/depth component in the particles texture
though u will prolly need a better implentation than a simple addition since the depthbuffer aint linear.
personally i found whilst it does improve the look, it costs to much performance

Share this post


Link to post
Share on other sites
Maybe using less but more complicated particles would help the performance, since they use up so much fill rate. Writing to depth disables early z optimizations as I'm sure you know.

Share this post


Link to post
Share on other sites
I beleive soft particles are a volumetric particle rendering technique. Crytek uses them alot. The had a presentation at Siggraph this year, the didn't really explain how they worked really (either that or I missed it :). The showed how it made for much better interaction with the geometry (it avoided the hard edges you see when normal particles are clipped with the floor plane).

If anyone has a more info than that I'd be interested too.

Share this post


Link to post
Share on other sites
AFAIK soft particles just get transparent at the intersections with the world geometry. I think this is achieved by rendering the scenes's depth to a texture and when rendering the particles adjust the transparency according to the difference between the particles depth and the one from the scene depth.

regards,
m4gnus

Share this post


Link to post
Share on other sites
Ahh that makes sense. The rest of the presentation was about the various "deffered rendering" style effects they do with a depth texture (the use this for all their atmospheric effects).

Share this post


Link to post
Share on other sites
Quote:
Crytek uses them alot. The had a presentation at Siggraph this year, the didn't really explain how they worked really (either that or I missed it :).

Yep I was sitting in there :-) ...

Share this post


Link to post
Share on other sites
Quote:
Original post by wolf
Yep I was sitting in there :-) ...


So.. were you sleeping ? :)

Each particle is attached a certain "depth" property (nothing to do with depth write in the pixel shader which kills early-Z etc..), then the pixel shader has the nearest opaque object Z as an input. It then takes the difference between the current particle z and the nearest object z, divide it by the depth property value, clamp it to the one and to zero (for negative values, though they shouldn't be drawn anyway), and then modulate alpha with this value.

This way a particle will have a softer look as it comes closer to an object until it disappears completely at an intersection, preventing rough edges.

LeGreg

Share this post


Link to post
Share on other sites
Quote:
So.. were you sleeping ? :)
:-) thanks for the explanation. I did not expect to deal with this stuff soon at that time ...

Share this post


Link to post
Share on other sites
Quote:
Original post by LeGreg
Each particle is attached a certain "depth" property (nothing to do with depth write in the pixel shader which kills early-Z etc..), then the pixel shader has the nearest opaque object Z as an input. It then takes the difference between the current particle z and the nearest object z, divide it by the depth property value, clamp it to the one and to zero (for negative values, though they shouldn't be drawn anyway), and then modulate alpha with this value.

cheers for that, seems very simple to do, though i wont do it with my game due to the performance hit, ill keep it in mind though

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!