Computer Graphics Notes
Motion Capture
- Motion capture aims at capturing the motion of a model from a real-life actor.
- Markers are placed on the actor's body, typically at joints, to record motion in real time.
- Markers are tracked using multiple calibrated cameras.
- Joint position is estimated using triangulation.
Rendering Pipeline in 3D Graphics
- Stages include modelling, transformation, lighting, rasterisation, and pixel shading.
- Transforms 3D objects into a 2D image by projecting vertices onto the screen.
- Applies lighting and shading calculations.
- Rasterises the result into pixels for display.
Alpha Channel in Texture Mapping
- Represents transparency.
- Allows textures to have varying levels of opacity.
- Enables rendering of transparent objects like glass, while maintaining realistic interactions with other objects.
MIP Mapping in OpenGL
- Improves texture rendering by creating a series of prefiltered texture images at different resolutions.
- Advantages:
- Better texture quality at varying distances.
- Enhanced performance.
- Prevention of texture popping artefacts.
- Particularly useful in real-time graphics and scenarios where consistent texture quality across distances is critical.
Global Illumination
- Simulates how light interacts with surfaces and scatters throughout a scene, considering specular and diffuse lighting.
- Differs from local illumination models, which do not consider object-to-object interactions.
- Examples: ray tracing, path tracing, and radiosity.
Rendering Capabilities Characterization
- Gouraud shading: (single diffuse or specular reflection).
- Phong shading: (single diffuse or specular reflection).
- Ray tracing: (single diffuse but multiple specular reflections).
- Radiosity method: (multiple diffuse reflections).
Primary Uses of Normals in Computer Graphics
- Lighting Calculations:
- Normals determine how light interacts with a surface, affecting its brightness and shading.
- Different lighting models use normals to compute diffuse and specular reflections accurately.
- Bump Mapping and Displacement Mapping:
- Normals are employed to simulate fine surface details without altering the geometry.
- By perturbing normals, these techniques create the illusion of bumps and deformations.
- Surface Smoothing:
- Normals play a role in creating smooth surfaces.
- In techniques like Gouraud and Phong shading, normals are interpolated across vertices to create the illusion of smooth shading.
Caustic Effects Rendering Comparison
- Phong Model:
- Only considers local geometry and incoming light direction.
- Would estimate a reflection intensity unaffected by the gemstone.
- Velvet surface colors would be represented without shadows or caustics.
- Ray Tracing:
- Approximates the velvet surface as an ideal diffuse surface.
- Backward tracing of the ray would stop at the surface.
- A shadow ray from the point to the light source would be created.
- Gemstone occludes the shadow ray, classifying the point as in shadow.
- Highlighted area rendered as completely in shadow, without caustics.
- Path Tracing:
- Shoots many rays for every pixel on the cushion surface, each following a random walk.
- Some rays are refracted within the gemstone and hit the light source for bright caustic regions.
- Aggregating the contributions of all random rays simulates complex interactions.
- Illumination on the cushion surface includes realistic caustics.
Specular Highlight Peak Calculation
- Reflection direction r is (3, −1, −6), defined by , where L is the light direction and n is the normal vector.
- Ray from reflection point to the eye: (4, 2, 6) = (b, 4, d) + t(3, −1, −6).
- Solve for t using the y coordinate: t = 2.
- Substituting gives b = −2 and d = 18.
Shape Transformation Matrix Sequence
Scale shape M with two in y direction.
Rotate it for 45 degrees around the z-axis.
Translate with the vector (+2,-2,0).
The matrix applied to shape M is then:
Z-Buffer Algorithm
- Handles occlusions by recording the depth of each rendered pixel.
- Overwrites it if a new, closer surface is rendered on the same location.
- Steps:
- Render the yellow bar.
- Render the green bar.
- Render the red bar.
Translucency Rendering
- If alpha = 0.4, Painters algorithm is a better choice than Z-buffer.
- Z-buffer cannot easily deal with translucency as it requires storing multiple depths in the depth buffer.
- Painters can render the yellow bar by blending the pixel’s color with the previous color using the appropriate alpha instead of overwriting it.