Insu Yu (Research Fellow) - PowerPoint PPT Presentation

About This Presentation
Title:

Insu Yu (Research Fellow)

Description:

... Sampling Triangular Luminaries Use barycentric coordinates of triangles. The uniform random sampled are given by: Sampling Polygon Luminaries Up to you! – PowerPoint PPT presentation

Number of Views:62
Avg rating:3.0/5.0
Slides: 20
Provided by: ucac2
Category:

less

Transcript and Presenter's Notes

Title: Insu Yu (Research Fellow)


1
Monte Carlo Path Tracing Coursework Notes
  • Insu Yu (Research Fellow)
  • i.yu_at_cs.ucl.ac.uk
  • James Tompkin (Research Engineer T.A.)
  • j.tompkin_at_cs.ucl.ac.uk (email me with questions)

2
What you need to do (in brief)
  1. Shoot many rays through each pixel with
    stratified, jittered sampling.
  2. Modify the direct lighting calculations to add
    support for area light sources.
  3. Add support for sampling a BRDF.
  4. Add support for evaluating the BRDFs at a surface
    point.
  5. Put it all together to form paths that sample all
    the integrals pixels, direct lighting and BRDFs.
  6. Add importance sampling OR unbiased path
    termination (Russian roulette).
  7. Make your own scenes.

3
Path Tracing
  • Review

4
Simple Stochastic Path Tracing
  • Radiance for each ray (eye to pixel in view
    plane) is calculated by
  • The integral cam be evaluated using Monte Carlo
    integration by generating N random direction ?i
    on hemisphere Ox distributed according to some
    probability density function P(x)

5
Monte Carlo Path Tracing
  • Rendering Equation

6
Monte Carlo Path Tracing
7
The Coursework
  • Notes for each part

8
Part 1 Stratified Jittered sampling Function
LitScenerenderPixel, SimpleCameraStratifiedRan
domRay
  • Generate N x N stratified Sample per pixel at
    (i,j)
  • Generate random variable ?1 ?2 to index
    stratified sample
  • Generate Ray COP to sampled position at (i
    ?1,j ?2)
  • Radiance Total Radiance / N_RAYS_PER_PIXEL
  • Remember to change N_RAYS_PER_PIXEL 1 to 1,
    64, 256, 1024 rays, etc.

9
Part 2 Direct Lighting Area light source
sampling
10
Part 2 Direct Lighting Example Spherical Light
sampling
  • Samples the sphere over the solid angle as seen
    from a point
  • Find direction toward sphere in polar coordinates
  • Transform local to world coordinates with U,V,N.
  • Find intersection point (x)
  • Reference Section 3.2 'Sampling Spherical
    Luminaries in "Monte Carlo Techniques for Direct
    Lighting Calculations," ACM Transactions on
    Graphics, 1996

11
Part 2 Direct Lighting Polygon Light sampling
Function PolygonTriangularSampling,
PolygonRectangularSampling
  • Sampling Rectangular Luminaries
  • The uniform random sampled are given by
  • Sampling Triangular Luminaries
  • Use barycentric coordinates of triangles.
  • The uniform random sampled are given by
  • Sampling Polygon Luminaries
  • Up to you!
  • Reference Section 3.3 'Sampling Planar
    Luminaires in "Monte Carlo Techniques for Direct
    Lighting Calculations," ACM Transactions on
    Graphics, 1996

12
Part 3,4,5 Lambertian Reflection
Model Function lambertianBRDFreflection,
lambertianBRDFbrdf
13
Part 3,4,5 Modified Phong Reflection Model
Function phongBRDFreflection, phongBRDFbrdf
14
Part 3,4,5 Modified Phong Reflection Model
15
Part 3,4,5 Modified Phong Reflection
Model Function phongBRDFreflection,
phongBRDFbrdf
16
Part 3,4,5 Modified Phong Reflection Model
17
Part 3,4,5 Modified Phong Reflection Model
  • Reading Lafortune and Willems Using the Modified
    Phong Reflectance Model for Physically-based
    Rendering will help.

18
Part 6 Importance Sampling/Russian Roulette
  • Look up the references on the webpage for these
    techniques to read more about them.
  • Reading Avro and Kirks Particle Transport and
    Image Synthesis is a good place to start.

Part 7 D.I.Y. scenes
  • Try to demonstrate advantages and disadvantages
    of path tracing in your scenes.
  • What limitations exist? Which types of scene
    require more sampling to reduce noise?

19
General Tips
  • Use the paper references!
  • They contain valuable background information
    which will help you understand the problem.
  • Dutres Global Illumination Compendium is named
    precisely.
  • A simple screenshot function exists in
    mainray.cpp for automating capture to .bmp. You
    can use it for your documentation.
  • screenshot(int windowWidth, int windowHeight,
    char filename)
  • Any other questions, e-mail j.tompkin_at_cs.ucl.ac.uk
Write a Comment
User Comments (0)
About PowerShow.com