Upcoming SlideShare
×

# Motionblur

• 3,189 views

Motion blur in DX9

Motion blur in DX9

More in: Technology
• Comment goes here.
Are you sure you want to
Be the first to comment

Total Views
3,189
On Slideshare
0
From Embeds
0
Number of Embeds
1

Shares
31
0
Likes
3

No embeds

### Report content

No notes for slide

### Transcript

• 1. Pixel Motion Blur http://ozlael.egloos.com
• 2. Motion blur • What is motion blur? – Rapidly moving objects appear to be blurred in direction of motion • What causes motion blur? – In real cameras, film is exposed to moving scene while shutter is open • Why do motion blur? – Adds realism, cinematic look to games – 24fps with motion blur can look better than 60fps without
• 3. Trails behind objects ● Not the same as real motion blur
• 4. Radial Blur ● 2D Effect
• 5. Depth-Base Velocity depth ● For static mesh velocity
• 6. Using Accumulation Buffer ● Large time interval between multiple rend ering
• 7. Image space (2.5D) motion blur ● Pixel Process Motion Blur
• 8. Pixel Motion Blur ● Works as a Post Process ● Blurs an image of the scene based on obj ect velocities ● Not a physically correct but plausible
• 9. Better than Accumulation Buffer
• 10. Algorithm ● 1. Render scene to texture - At current time ● 2. Calculate velocity at each pixel - Another Buffer - Calculate current position – previous po sition ● 3. Render motion blurred scene
• 11. Velocity
• 12. Step 1
• 13. Step 2
• 14. Step 3
• 15. What is the Fault?
• 16. What is the Fault?
• 17. What are the fault? ● Without knowledge of object edges ● Velocity outside silhouette of object is zer o(= no blur) ● Solution : Geometry distortion
• 18. Stretch object geometry
• 19. Matthias Wloka's trick
• 20. Matthias Wloka's trick ● stretch object geometry between previous and current position ● Compare normal direction with motion ve ctor using dot product ● If normal is pointing in direction of motio n, transform vertex by current transform, else transform it by the previous transfor m ● Not perfect, but it works
• 21. Matthias Wloka's trick
• 22. Original Image
• 23. Stretched Geometry
• 24. Velocity Visualization
• 25. Motion Blurred Image
• 26. Well... Not Perfect ● Not information to avoid occlusion artifact s ● Number of samples needed depends on a mount of motion - 8 samples is good, 16 is better - Ironically, more samples will reduce fra me rate, and therefore increase motion m agnitude
• 27. Occlusion fault
• 28. Resolve occlusion Color Motion Depth
• 29. Iterative sampling ● First pass uses 8 samples ● Ping-pong results ● Second pass uses blurred results, this res ults in 8 * 8 samples (virtually 64) ● 3rd = 512 samples, 4th = 4096, etc
• 30. Iterative sampling
• 31. Skinning limitation in DX9 ● 256 vertex shader constant registers limit ● Our characters have an average of 54 Mat rix per drawcall ● For motion blur we need previous frame b one(Matrix)s transformations ● If Bone == Quaternion & Tlanslation then must be Uniform Transform ● Or decrease bone count
• 32. So....? ● In RS3 for Now ● Using Pixel Motion Blur = Only Object’s Tr ansform ● Animation’s Proceed = Using Accumulatio n Buffer ● Any suggestion?
• 33. Reference ● Stupid OpenGL ShaderTricks -Simon Green ● Pixmotor:A Pixel Motion Integrator - Ivan Neulander ● Interactive Real-Time Motion Blur - Matthias M. Wloka & Robert C. Zeleznik ● Motion Blur Using Geometry and Shading Distortion - Natalya Tata rchuk, Chris Brennan, John Isidoro ● Pixel Motion Blur - Direct X SDK ● Motion Blur as a Post-Processing Effect - GPU Gems 3 ● CrysisNext Gen Effects -TiagoSousa ● Hardware Accelerated Motion Blur Generation -Clement Shimizu, A mitShesh, BaoquanChen ● Motionblur - Myia ● http://incrysis.com/forums/ ● Capcom presentation on Lost Planet