1 / 35

Real-Time Rendering

Real-Time Rendering. SPEACIAL EFFECTS Lecture 03 Marina Gavrilova. Brief Outline. Image based Rendering Lens Effects Billboarding Particle Effects Reflection Shadow mapping Edge Effects Volumetric rendering. The Rendering Spectrum.

Pat_Xavi
Download Presentation

Real-Time Rendering

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. Real-Time Rendering SPEACIAL EFFECTS Lecture 03 Marina Gavrilova

  2. Brief Outline • Image based Rendering • Lens Effects • Billboarding • Particle Effects • Reflection • Shadow mapping • Edge Effects • Volumetric rendering

  3. The Rendering Spectrum • Effects can be produced by manipulation of images or geometry or both

  4. Image Based Rendering • Early games used sprites (image object) • Move/scale and draw sprite on screen • Animated texture  animated sprite • Layered Rendering with transparency  • Assign depth to sprite • Render sprites in particular order • Use transparency • Talisman architecture renders objects into layers and composite them for several frames • Lumigraph rendering  Render using image interpolation

  5. Billboarding • Create complex objects using texture and simple geometry • Used extensively in particle rendering systems • Use faceted quads  normal of the quad equals camera direction • Used frequently in games • High performance

  6. Types of billboarding • Screen-aligned billboard • Facted quads/sprites • Flare/glow/smoke • World aligned billboard • Aligned facing camera • Has it’s own up vector • Scenery/complex objects • Axial Billboard • One rotation axis • Tree/objects on terrain

  7. Particle system • Point based sprites • Additive or other blending • Physically based modeling • Realistic volumetric effect

  8. Lenz Effects Effects that makes a scene natural By mimicking physical properties of eye/camera

  9. Lens Flare • Glow of light source • Halo around the source • Streaks and bloom formed around the source • Secondary lens effects (internal reflection and refraction)

  10. Motion Blur • Use accumulation buffer to render object with interpolated coordinate • Requires several rendering passes • Realistic effect • Slow • Texture based motion blur • Other pseudo motion blur techniques are used in games

  11. Reflection • Method 1: Use Environment mapping • Method 2: Flat mirror • Render scene from mirrors point of view • Darken the scene • Use that as a texture

  12. Exposure control • Method 1: render multiple scene and blend with exposure parameter • Method 2: Define per texture luminance • Render using High Dynamic Range luminance (HDR)

  13. Depth of Field • Hold camera target stationery • Vary camera source • Render several pass • Accumulate scene

  14. Shadow mapping Without darkness, light cannot exist Shadow mapping makes a scene significantly more realistic

  15. Shadow in a scene

  16. Planar Shadow • When occluders cast shadow on planar objects (i.e. floor) • Fully shadowed region: umbra • Partially shadowed region: Penumbra • Hard shadow  Projection algorithm • Soft shadow  Shadow mapping

  17. Project the vertices of an object on a plane Render the transformed object with dark color (without lighting) Assume light source=l, vertex projected=v, projected vertex=p In matrix form for plane y=0  (p=Mv): For any arbitrary plane: Matrix M= Projection Shadow

  18. Problems with projective shadow • Hard edge  Less realistic • Rendering on a plane tricky: • Offset from the plane to avoid z buffer overlap • Different offset for different view angle • Anti-shadow problem:

  19. Soft Projective Shadow • Generate a texture (render into texture) • Render the texture as a plain • Only recompute texture if light source changes • Method 1: Render into accumulation buffer with varying light source • Use perspective projection on a plane • Light source = a • Receiver parallelogram: one vertex b and edge ex,ey • Advantage: Free from Anti-shadows and false shadows

  20. Soft Projective Shadow • Method 2: Use spherical light source • Less expensive computationally • Looks better • Problem: Visual artifact when object touching the plane Hard Soft

  21. Shadow on arbitrary object: Shadow Volume • Uses the stencil buffer • Extend a pyramid from a light source through vertices of a triangle • Shadow Volume: volume under the pyramid • Consider a ray from a pixel to an object: if number of times intersecting front face of shadow volume>0 then vertex is under shadow

  22. Shadow Volume Technique • Render the scene with ambient and emission • Compute the faces of shadow volume • Clear the stencil buffer and set to increment • Render the front faces of shadow volumes into stencil • Set Stencil to decrement • Render the back faces of shadow volumes into stencil • Render the scene with light only where stencil=0 • Shadow volume is slow for complex geometry

  23. Shadow Volume

  24. Shadow Mapping • Render the z-buffer from the lights point of view • Shadow map = content of this z-buffer • Render scene using viewer • If distance between a rendered point and light is greater than projected z value then it is under shadow • Use texture mapping hardware

  25. Shadow Mapping Using Texture • First generate the shadow map • Render from viewer using ambient lighting only • Convert shadow map z value to viewers coordinate system • Shadow test: Test z values of point with z values in the shadow map

  26. Shadow mapping steps… • Shadow mapping for a complex scene the pointlight source

  27. Shadow mapping steps… • Scene from light’s point of view

  28. Shadow mapping steps… • Scene from light’s point of view

  29. Shadow mapping steps… • Scene from viewer with shadow map (z values)

  30. Shadow mapping steps… • Test Shadows: non green areas are shadows

  31. Shadow mapping steps… • Finally the scene can be rendered with the shadow

  32. Other Rendering Concerns • Edge highlighting: Draw edge in different color (engineering app) • Polygon Edge rendering: • Render the filled polygon (all buffer active) with z buffer replacement=off • Render the polygon edges (all active) • Render the polygon only to the z buffer

  33. Other Rendering Concerns • Hidden line rendering: Draw filled polygon to z-buffer and lines only on the color buffer (no hidden lines drawn) • Haloing: front-face lines halo the back faced lines • Height field and volumetric rendering: Use of voxels and 3D textures 

  34. Height fields and volumes

  35. End of Lecture 03 Questions?

More Related