程序代写代做代考 chain GPU PowerPoint Presentation

PowerPoint Presentation

17. Rendering Solutions
Dr. Hamish Carr

COMP 5812M: Foundations of Modelling & Rendering
Radiance Field

L is radiance field
E is emitted light
T is scattered light

COMP 5812M: Foundations of Modelling & Rendering
Mutual Visibility
Consider two points P & Q
Can they see each other?
If so, light travels from one to the other
The basis of many optimisations

COMP 5812M: Foundations of Modelling & Rendering
Solution 1: Radiosity
Divide the world into patches
Compute light exchange between patches
Matrix F expresses this interchange

Turns it into a system of linear equations
Which we solve (expensively)

COMP 5812M: Foundations of Modelling & Rendering
Radiosity Result

COMP 5812M: Foundations of Modelling & Rendering
Radiosity Notes
Matrix is sparse – many patches are occluded
Patch shape / details are important
We can progressively refine patches
We can substitute spherical harmonics
But it only works for Lambertian reflection

COMP 5812M: Foundations of Modelling & Rendering
Series Solution
Rewrite equation in terms of emitted light :

And pretend they’re matrices, so invert:

The sum of 0 + 1 + 2 + 3 + … photon bounces
And we can exploit eigenanalysis

COMP 5812M: Foundations of Modelling & Rendering
Path Tracing
Only one recursive ray per path
Subject to noise
But you can repeat for many rays
Or you can share the start of the path

COMP 5812M: Foundations of Modelling & Rendering
Ray-tracing (Kajiya)

Bounce 1
Bounce 2
Bounce 3
Bounce 4
Scatter multiple rays
Share early stages of path

COMP 5812M: Foundations of Modelling & Rendering
Bidirectional Path Tracing
Trace light outwards from light source
Trace paths outwards from eye
Compute all splices between them

COMP 5812M: Foundations of Modelling & Rendering
Occlusion
Not all paths can be spliced
Occluders (black) mean no contribution
So this is wasteful for large scenes– O(N2)

COMP 5812M: Foundations of Modelling & Rendering
Markov Chains
We can reframe this using Markov Chains
Probability of light transport between points
Each ray is a path through the FSM
Expressed (again) as a matrix

COMP 5812M: Foundations of Modelling & Rendering
Metropolis Light Transport
Instead of a random walk between points
Take a random walk between paths
Sampling strategies are difficult
And it starts being evolutionary in nature
Doable, but no guarantees

COMP 5812M: Foundations of Modelling & Rendering
Photon Mapping
Trace light from light sources to patches
Accumulate light on patches
Then trace rays from eye to patches
and collect accumulated photon map

COMP 5812M: Foundations of Modelling & Rendering
Image-Space Photon Maps
1st stage of photon mapping is photon tracing
Trace photons from lights to surfaces
2nd stage is the actual render
And we can substitute projective rendering
i.e. construct a photon map on CPU
render scene with photon map on GPU
“Only” works for point-lights & pinhole

COMP 5812M: Foundations of Modelling & Rendering
Phong Shading
Replaces Gouraud shading of triangles
Render the geometric object
Don’t interpolate shading on triangle
Instead interpolate normal
Then put Phong lighting in a shader
But same pixel may compute many times
And Phong computation is expensive

COMP 5812M: Foundations of Modelling & Rendering
Forward Rendering
Use projective rendering
But with texture coordinates & IDs only
Store the result in the frame buffer
Now render the frame buffer as a quad
Each pixel already knows its u,v & texture(s)
So it can look up everything else

COMP 5812M: Foundations of Modelling & Rendering
Summary
There are many ways to do this
All of them try to accelerate a basic idea
Trace rays from lights to surfaces
Trace rays from surfaces to surfaces
Trace rays from surfaces to camera
Integrate rays at a pixel or point

COMP 5812M: Foundations of Modelling & Rendering