1 / 18

Soft Particles

Soft Particles. Petter Börjesson, Mattias Thell. Particle Effects. Smoke, fire, explosions, clouds, etc Camera-aligned 2D quads Gives the illusion of a 3D volume. Illusion breakers. Intersection with world geometry. To the rescue !. Soft Particles Soften the edges

wilbur
Download Presentation

Soft Particles

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Soft Particles Petter Börjesson, Mattias Thell

  2. ParticleEffects • Smoke, fire, explosions, clouds, etc • Camera-aligned 2D quads • Gives the illusion of a 3D volume

  3. Illusion breakers • Intersection with world geometry

  4. To the rescue! • Soft Particles • Soften the edges • Use depth information to blend the sprite with the background

  5. Compare Z values • Compare Sprite Z vs World Z • Check distance and blendif needed

  6. Blending • Simple approach: D = saturate((Zscene – Zparticle) * scale) • Can produce artifacts • Better approach: D = 0.5 * saturate(2*X)Contrast 1 – input if input > 0.5 Where X = Input otherwise

  7. DepthValues • How do we get depth information? • Paper presents two ways: • Access depth buffer in pixel shader (DX 10) • Use a render target to read depth information

  8. Read Z in pixel shader Pass 1 Pass 2 VertexShader VertexShader Geo. Shader Geo. Shader creates sprites Scene Z Pixel Shader Sprite Z Pixel Shader Color Buffer DepthBuffer Color Buffer

  9. Rendertarget Pass 1 Pass 2 VertexShader VertexShader Geo. Shader Geo. Shader creates sprites Scene Z Pixel Shader Sprite Z Pixel Shader Render Target Color Buffer DepthBuffer Color Buffer

  10. 2D Particles with depth • Store extra depth values in spritetexture • During comparisonadd extra depth

  11. 2D Particles with depth Billboards Billboards with depth

  12. VolumetricParticles • Enclose sprite in an imaginary sphere and trace rays through each pixel. Sphere Ray Sprite Camera

  13. VolumetricParticles • Find intersections with the sphere and step through. Sphere Ray Sprite Camera

  14. VolumetricParticles • Stop if we collide with the depth buffer. • Do blending as before. Depth buffer Ray Camera

  15. VolumetricParticles Billboards with depth Volumetric

  16. Demo!

  17. Performance • FPS with GTX 260 – 1280x1024 Hard Soft Mountain 215 215 Tank demo: Billboard 480 360 With depth 420 330 Volumetric 65 60

  18. Questions?

More Related