Loading
Nota de Estudos
Study Reminders
Support
Text Version

Set your study reminders

We will email you at these times to remind you to study.
  • Monday

    -

    7am

    +

    Tuesday

    -

    7am

    +

    Wednesday

    -

    7am

    +

    Thursday

    -

    7am

    +

    Friday

    -

    7am

    +

    Saturday

    -

    7am

    +

    Sunday

    -

    7am

    +

Virtual Reality
Prof. Steve LaValle
Department of Multidisciplinary
Indian Institute of Technology, Madras

Lecture - 14 - 3
Visual Rendering – (overview)


Visual Rendering:

• Chain of Transforms
• Overall transformation
T = Tvp Tcan Teye Trb
• Optical Distortion Transformation
• Frame rates and resolutions photoreceptor

Setting RGB values of each pixel:

• Image order rendering o Pixel-by-pixel o Ray tracing o Easier to implement
o Usually slower

• Object oriented rendering o Triangle-by-triangle
o Rasterization o Used by GPUs
o Usually faster



Virtual Reality
Prof. Steve LaValle
Department of Multidisciplinary
Indian Institute of Technology, Madras

Lecture – 15
Visual Rendering (overview, cont’d)

Virtual Reality- Visual rendering:

• Standard computer graphics techniques
• Challenges and differences of rendering head mounted displays
• Image order (Pixel-by-pixel) vs Object order (Triangle-by-triangle)
• Ray tracing
o Ray generation - Identification of the visibility ray that goes through that pixel to the focal point
o Ray intersection - Identification of the closest triangle that is struck, R G B values for the pixel o Shading

Virtual Reality
Prof. Steve LaValle
Department of Multidisciplinary
Indian Institute of Technology, Madras

Lecture - 15-1
Visual Rendering (shading models)


Visual Rendering

• Shading o Lambertian shading (Diffuse shading)
o The surface is most illuminated when the light source is perpendicular to it




o Model based on the direction of viewing and highlights or shininess of the surface
o Blinn (Direction of viewing and angle of incidence) o Blinn-Phong Shading
- Diffuse component and Specular component
- L = kd Imax(o,n,l) + ks Imax(o,n.h) - Physically realistic rendering (p value)
p = 10 (eggshell) p = 100 (mildly shiny) p = 1000 (really glossy) p = 10000 (nearly mirror like)
• Global Illumination o Linear combination (principle of superposition) o Handling multiple reflections o Very expensive




o Bidirectional Reflectance Distribution Function (BRDF)


Virtual Reality
Prof. Steve LaValle
Department of Multidisciplinary
Indian Institute of Technology, Madras

Lecture - 15-2
Visual Rendering (rasterization)


Rasterisation:

• Blinn-Phong Shading
L = kd Imax(o,n,l)
• In a Lambertian model, the BRDF is constant



• Inside-outside test to check if the pixels fall inside the triangle
• Depth ordering problem
• Painter’s algorithm – sort triangles by furthest to nearest, paint far to near order
(a) Sorting is too costly
(b) Depth cycle o Store depth value (z) at each pixel o Render the triangles in arbitrary order o Render the pixel only if the new z value is less than the stored z value.
o The new point should be closer than the stored one.

• Clipping: Removing triangles behind the eye
• Culling:
o View frustrum: Remove triangles outside of viewing frustrum o Occlusion: Remove hidden triangles o Backface: remove triangles on back of object

• Z buffers for rendering shadows

Virtual Reality
Proof Steve LaValle
Department of Multidisciplinary
Indian Institute of Technology, Madras

Lecture – 62
Visual Rendering (pixel shading)

Pixel Shading:

• Object order rendering - iterating over triangles, figuring out how to shade the pixels
• How to propagate RGB values or attributes which may be surface normals or textures efficiently across the pixels?
• Barycentric coordinates:
o Useful to interpolate over 3 or higher dimensional spaces
o Useful to combine information across a D dimensional simplex using D plus one points


o The coordinates of P can be written as follows. The alpha here is a scalar coefficient
Pi = (xi, yi)
P = 1p1 + 2p2 +3p3 For 0 123 1
and 1 + 2 +3 = 1

o The coordinate 1 0 0 would correspond to P1, 0 1 0 corresponds to P2, 0 0 1 corresponds directly to P3.
o If P1 component is made 0, it should correspond to the edge between P2 and P3

R = 1R1 + 2R2 +3R3
G = 1G1 + 2G2 +3G3 B = 1B1 + 2B2 +3B3
• Texture Mapping: o Challenge - rendering at different scales
o Mipmapping - to overcome difficult aliasing problems o Bump Mapping
- Map a pattern of normals to the surface
- Random perturbation makes the surface look rough
- Star product with the normal makes surface look artificially rough
• Normal Mapping: o Use surface normals from a smooth, higher resolution surface o The triangle is approximating a curved surface
o Latvia Lamberson shading model across either of these bump mappings or normal mappings.



Virtual Reality
Proof Steve LaValle
Department of Multidisciplinary
Indian Institute of Technology, Madras

Lecture – 16-1
Visual Rendering (VR-specific problems)

Specific Problems in Visual Rendering:
• Shading:
o Highlights/ specularities need stereo perspective o Texture maps look like painted cardboard o Bumps/ normal maps looks fake
• Aliasing:
o Needs higher resolution
o Low resolution (staircase effect on the boundary)
o Two different views one for the left eye one for the right eye – stereo causes mismatched stairs per edge
• Render Target o Rendering sent to a rectangular screen
o Use stencil buffer in GPU to deactivate all of the pixels that are outside of the actual field of view due to the optical system
o Correct for optical distortion
• Latency:
o GPU pipeline optimized for triangle throughput, not latency o Latency compensation
- Post-rendering image warp
- Prediction
- Optimize the number of triangles that you blast through the pipeline if your geometry needs to be simpler
- Need not have absolute photorealism
- Errors or instability predicting far into the future o Geometry Errors
- Thin objects look fake or implausible - Holes or isolated points (SLAM data models)
• Antialiasing:
o Getting rid of “jaggers”
o Super sampling - divide pixel into sub pixels o Averaging colours and RGB values
o Ratio of 10:16 for the background and 6:16 for the front
o Shading computations will be at a much higher resolution than the image o Expensive
o Distortion due to spherical lens aberrations