Presentation is loading. Please wait.

Presentation is loading. Please wait.

Soft Particles Petter Börjesson, Mattias Thell. Particle Effects Smoke, fire, explosions, clouds, etc Camera-aligned 2D quads – Gives the illusion of.

Similar presentations


Presentation on theme: "Soft Particles Petter Börjesson, Mattias Thell. Particle Effects Smoke, fire, explosions, clouds, etc Camera-aligned 2D quads – Gives the illusion of."— Presentation transcript:

1 Soft Particles Petter Börjesson, Mattias Thell

2 Particle Effects 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 blend if needed

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

7 Depth Values 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 Vertex Shader Geo. Shader Pixel Shader Depth Buffer Color Buffer Pass 1 Vertex Shader Geo. Shader creates sprites Pixel Shader Color Buffer Pass 2 Sprite Z Scene Z

9 Render target Vertex Shader Geo. Shader Pixel Shader Depth Buffer Color Buffer Pass 1 Vertex Shader Geo. Shader creates sprites Pixel Shader Color Buffer Pass 2 Sprite Z Scene Z Render Target

10 2D Particles with depth Store extra depth values in sprite texture During comparison add extra depth

11 2D Particles with depth Billboards Billboards with depth

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

13 Volumetric Particles Find intersections with the sphere and step through. Sprite Sphere Ray Camera

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

15 Volumetric Particles Billboards with depthVolumetric

16 Demo!

17 Performance FPS with GTX 260 – 1280x1024 SoftHard Mountain Billboard Tank demo: With depth Volumetric 65 60

18 Questions?


Download ppt "Soft Particles Petter Börjesson, Mattias Thell. Particle Effects Smoke, fire, explosions, clouds, etc Camera-aligned 2D quads – Gives the illusion of."

Similar presentations


Ads by Google