1 of 299

Introductory logistics: Yannis

2 of 299

Judge for rendering competition

3 of 299

Remaining logistics

  • Final project reports and code due Friday 5/5, 23:59 ET.
    • Report due on Canvas.
    • Code due on github.

  • Programming assignment competition awards.

4 of 299

Take the course evaluation surveys!

CMU's Faculty Course Evaluations (FCE): https://cmu.smartevals.com/

CMU's TA Evaluations: https://www.ugrad.cs.cmu.edu/ta/S23/feedback/

An end-of-semester survey specific to 15-468/668/868: https://docs.google.com/forms/d/e/1FAIpQLSfvVBaBAAzc009UJTTjqqR-sOJyaGjFPAXzWnlaAM1_Q3hZmw/viewform

5 of 299

Non-Exponential Radiative Transfer and

Position-free Monte Carlo Simulation

Shun Iwase

6 of 299

Non-exponential Radiative Transfer

Exponential Radiative Transfer

Non-exponential Radiative Transfer (Delta function)

Bitterli et al., A radiative transfer framework for non-exponential media, SIGGRAPH Asia 2018

7 of 299

Non-exponential Radiative Transfer

Four types of light transport. p and f denote particle and surface

Bitterli et al., A radiative transfer framework for non-exponential media, SIGGRAPH Asia 2018

8 of 299

Non-exponential Radiative Transfer

Exponential Radiative Transfer

Non-exponential Radiative Transfer (Delta function)

Bitterli et al., A radiative transfer framework for non-exponential media, SIGGRAPH Asia 2018

9 of 299

Comparison to traditional radiative transfer

10 of 299

Position-free Monte Carlo Simulation

  • Only angles and z-axis of a light are considered
    • Assume that incoming and outgoing locations are the same
    • Beneficial for stacking multiple layered materials
  • Interactions with internal media
    • Add a realistic translucent color to a surface (e.g., tinted glass)
  • Physically-valid reflections with dielectric coating
    • Total internal reflections are considered correctly (blend of diffuse + specular doesn’t)

Assumption of small horizontal displacement

Tinted glass

Dielectric coating

11 of 299

Result

Dielectric coating on Lambertian BRDF (spp512)

Dielectric Coating

Lambertian BRDF

12 of 299

Result

Tinted glass with internal media (spp512)

Dielectric Coating

Internal Media

Dielectric Coating

13 of 299

Next Steps

  • Spectral rendering to reproduce interference effects
  • Implement BDPT for position free Monte Carlo simulation

Guillén et al., A General Framework for Pearlescent Materials, SIGGRAPH Asia 2020

14 of 299

Rendering Competition Image (spp4096, 6 hours)

15 of 299

Chen, Kris:

Position-free Monte Carlo Layered Material &&

Spectral Rendering

16 of 299

Position Free Monte Carlo: Layered Mats

Consider the distance between the layers are so small, we ignore the horizontal position shift of light, which give us…

Multilayer structure

Top: dielectric

Middle: any medium

Bottom: any

17 of 299

With Next Event Estimation

Next event points to the upper layer, instead of the light (\wo BTPT)

Next event points to light hit-point (\w BTPT)

18 of 299

Results

\w NEE x10 less sample

19 of 299

Spectral Rendering: Dispersion

Spectrum Lighting Model and BSDF Model

Wavelength 2 RGB

Wavelength based IOR

Wavelength based rays && sampling

20 of 299

Spectral Rendering: challenges & Results

Rendering caustics without BTPT

Scene setup is too hard to use…

1 million samples per pixel

21 of 299

Rendering

Competition

22 of 299

Differentiable rendering of local parameters

Sally Chen

23 of 299

Score function and gradients

*From 15468 slides

Loss function:

Gradient update

24 of 299

Experiments - optimize emission (trivial case)

Iter 0 - emit.r = 0.2

Target - emit.r = 1

25 of 299

Experiments - optimize blend amount

Iter 0 - blend amount 0.5 for all

Target - blend amount 0.0, 0.2, 0.4,0.6, 0.8, 1.0

26 of 299

Experiments - optimize Phong material exponent

Iter 0 - exponent = 1

Target - exponent = 100

Optimized with SGD with momentum

27 of 299

Depth of field rendering with hexagonal aperture

  • Randomly sample location on a hexagonal aperture as ray origin

28 of 299

Rendering competition

29 of 299

Bidirectional Path Tracing

and

Multiplexed Metropolis Light Transport

Ethan Chu

30 of 299

BDPT

31 of 299

32 of 299

s = 1 s = 0

33 of 299

34 of 299

MMLT

Parallelism

35 of 299

Buggy

36 of 299

Competition

37 of 299

38 of 299

Monte Carlo Estimation of Signed Distance

Nicole Feng

39 of 299

The Heat Method for Distance Computation

Idea: Recover (approximate) distance from short-time heat diffusion

Crane, Weischedel, Wardetsky, The Heat Method for Distance Computation (2013)

Diffuse data

Normalize gradient

Integrate

= distance function

40 of 299

Vector heat diffusion

41 of 299

In ℝn, we can solve integral equations instead

(1)

(2)

(3)

From PDEs…

…to integrals.

source term

harmonic Green’s function

heat kernel

42 of 299

What does the source term look like?

(in ℝ2)

M

43 of 299

How NOT to estimate

Walk on Spheres algorithm to solve Dirichlet-Poisson problem:

44 of 299

Better strategy: cache samples of

Similar to e.g., photon mapping

First pass (pre-compute):

Generate & store samples of

(Metropolis sample)

Compute normalization factor

(Importance sample)

Compute global shift

Next pass:

At each query point , estimate as

where

45 of 299

Results in ℝ2

46 of 299

Submission for rendering competition

A 2D solution interpolated onto a background mesh.

I didn’t have time to implement my own rendering functions, e.g. sphere tracing.

47 of 299

Bidirectional Path Tracing and GGX BRDF

Dianne Ge

48 of 299

Bidirectional Path Tracing

Motivation: Traditional path tracing can result in varying

images, especially if a light source is hard to reach from

a randomly generated path from the camera. With

bidirectional path tracing, we can more consistently find

paths that have some contribution to the scene.

  1. Generate two paths, one from a light source and one from the camera.
  2. Looping over the lengths of each path, connect all possible paths from the light source to the camera and determine the total contribution of each path
  3. Calculate the weight on the current path contribution by taking into account all the possible ways that the path could have been formed

Veach, Eric, and Leonidas Guibas. ‘Bidirectional Estimators for Light Transport’. Photorealistic Rendering Techniques, edited by Georgios Sakas et al., Springer Berlin Heidelberg, 1995, pp. 145–167.

49 of 299

Possible Paths

50 of 299

Traditional Path Tracing vs BDPT at 128 spp (no MIS)

51 of 299

MIS (buggy)

52 of 299

GGX BRDF

Sampling: Distribution:

Masking Shadowing Function:

Walter, Bruce, et al. ‘Microfacet Models for Refraction through Rough Surfaces’. Proceedings of the 18th Eurographics Conference on Rendering Techniques, Eurographics Association, 2007, pp. 195–206. EGSR’07.

53 of 299

Results

54 of 299

Comparison: Beckmann

55 of 299

Contest Submission

56 of 299

Progressive Photon Mapping and a Step Towards Verified Rendering

Nathan Glover

57 of 299

Math Bugs - The Worst Kind of Bug

  • Normalizing ray directions
  • Dividing by negative or zero PDFs
  • Passing the wrong input to a BSDF or a PDF
  • Forgetting a cosine term
  • Segfaults, accidental mutation, race conditions, and more

All of these are incredibly easy to do, and incredibly hard to catch…

If only there were a way to catch them before running the code!

58 of 299

Future Work on Performant, Verified Rendering

  • Summer project: Type system inspired by the Lean proof assistant (take 21-321 to learn more) and CMU professor Jan Hoffman’s research
  • Further strengthen the type system in my Rust raytracer

End Goal: A formally verified path tracer: Computer-checked proof that the code yields an unbiased estimate of the scene.

59 of 299

Progressive Photon Mapping

A biased approach to annoying light paths; precompute them and store them in a map.

Take a density estimation from the map while path tracing.

Progressive photon mapping averages this process over smaller and smaller density kernels.

60 of 299

Comparison (Underwater)

Path Tracing: 512 spp, 10 minutes

Progressive Photon Mapping:

256 million photons, 64 iterations, 1 spp

4 minutes, including photon map building

61 of 299

Comparison (Dragon)

Path Tracing: 512 spp, 7 minutes

Progressive Photon Mapping:

64 million photons, 64 iterations, 1 spp

3 minutes, including photon map building

62 of 299

Rendering Competition:

Pet Trout

63 of 299

Optimizing Bounding Volume Hierarchy Traversal with Vectorized Instructions

Grey Golla

64 of 299

What’s a BVH?

  • Tree-like structure for making ray-scene intersections O(log(n))
  • Partition space into 2(?) pieces along an axis
  • Intersect ray with bounding box, skip all children if ray does not
  • NOT quite a tree traversal
    • Ray can intersect both children
    • Child bounding boxes can overlap

65 of 299

What are Vectorized Instructions?

  • Single Instruction Multiple Data
  • Hardware support for operating on small vectors
  • Generally only do elementwise operations
    • Add, multiply, abs, min/max, compare
  • Modern vector instructions support 4/8/16 element vectors

https://www.sciencedirect.com/topics/computer-science/vectorization

66 of 299

Main Approach

  • Widen each BVH node
    • Instead of 2 children, have one child per vector slot
  • Compute intersection with all children in parallel
  • Sort the children by the intersection time
    • Earlier intersections occlude later ones

67 of 299

Results

5x more intersections

Same total runtime

8x more intersections

3x total runtime

68 of 299

Discussion

  • 8-wide BVH is much less efficient than “normal” 2-wide
    • Need 5-8x as many intersection tests for same render
  • Non-branching, non-pointer chasing intersection tests are much faster
    • 2-4x faster than existing DIRT implementation
  • Hand-tuning AVX2 vector instructions is a cherry on top
    • 25-30% faster than compiler optimized code
  • DIRT’s BVH building routine is bad
    • Hard to draw good conclusion about useful speedup

69 of 299

Next Steps

  • Make a better BVH builder
    • Surface area heuristic
    • Search for good split planes
  • Further optimize traversal
    • Switch to progressive iterative approach
  • Finish coherent ray bundle tracing

https://rgl.s3.eu-central-1.amazonaws.com/media/papers/NimierDavidVicini2019Mitsuba2_7.pdf

70 of 299

Layered Materials

Dakota Hernandez

71 of 299

Approach

hit.sn -> (0, 0, 1)

- convert dirIn to local space

- shoot new ray into material

- volume render in material

- z value determines

medium/material to sample

- accumulate eval/pdf

- neglect change in position

72 of 299

Lambertian vs (Dielectric <-> Homogeneous <-> Lambertian)

73 of 299

Final Scene

74 of 299

Procedural Textures

75 of 299

15-668 Final Project Presentation

PSS MLT and Depth of Field

Dakshit Agrawal

75

76 of 299

Primary Sample Space

Metropolis Light Transport

(PSS MLT)

76

77 of 299

Path Space

77

Figure credits: Course slides

78 of 299

Primary Sample Space

78

Figure credits: Course slides

79 of 299

Primary Sample Space

79

Figure credits: Course slides

80 of 299

MLT Integrator

  • Used to estimate the rendering equation “f”

80

81 of 299

MLT Integrator

  • Used to estimate the rendering equation “f”
  • Phase 1: calculate normalization constant “b = f/p”
    • Sample “N” seed paths
    • Pass them to the underlying path tracer and average the returned pixel values

81

82 of 299

MLT Integrator

  • Used to estimate the rendering equation “f”
  • Phase 1: calculate normalization constant “b = f/p”
    • Sample “N” seed paths
    • Pass them to the underlying path tracer and average the returned pixel values
  • Phase 2: sample via path mutations
    • Generate “k” sequences of correlated samples using Metropolis-Hastings algorithm
    • Pass these sequences to the underlying path tracer and accumulate pixel values

82

83 of 299

MLT Integrator

  • Used to estimate the rendering equation “f”
  • Phase 1: calculate normalization constant “b = f/p”
    • Sample “N” seed paths
    • Pass them to the underlying path tracer and average the returned pixel values
  • Phase 2: sample via path mutations
    • Generate “k” sequences of correlated samples using Metropolis-Hastings algorithm
    • Pass these sequences to the underlying path tracer and accumulate pixel values
  • Normalize accumulated pixel value by multiplying with “b/k”

83

84 of 299

Results

84

PSS MLT with MIS Path Tracing (N=20)

85 of 299

Results

85

Only MIS Path Tracing

86 of 299

Results

86

PSS MLT with N=100

87 of 299

Depth of Field

87

88 of 299

Depth of Field

88

89 of 299

Depth of Field

89

Figure credits: Wikipedia

90 of 299

Depth of Field

90

Figure credits: Wikipedia

91 of 299

Depth of Field

91

Figure credits: Wikipedia

92 of 299

Bokeh

92

Square

93 of 299

Bokeh

93

Diamond

94 of 299

Bokeh

94

Triangle

95 of 299

Rendering Competition Submission

95

96 of 299

Map the Photons

Alan Lee

97 of 299

Recall the process…

Direct density estimation

Spatial data structure (KD-tree)

98 of 299

Recall the better processes…

Caustic map

“Final gather”

i.e. path trace until hit second non-specular surface from camera

i.e. store only photons of L(S+)D paths

99 of 299

Photon map visualizations

+

=

Non-caustic only

Caustic only

Combined

Glass

Mirror (metal)

(2,000,000 photons)

*Distorted due to incomplete mapping to camera aperture

100 of 299

Parameter comparisons

(20,000 photons, basic)

10N

100N

300N

500N

Reference (MIS)

*All renders are 100 samples per pixel

101 of 299

Parameter comparisons

(20,000 photons, 100N)

Reference (MIS)

Improved (final gather 3S)

Basic

1.86 min

10.10 min

1.86 min

102 of 299

Parameter comparisons

(20,000 photons, 100N)

Basic

Final Gather 3S

Final Gather 3S + Caustic Map

103 of 299

Parameter comparisons

(Gather 3, 100N)

2,000 + 500

20,000 + 5,000

200,000 + 50,000

Non-caustic + Caustic photon counts

104 of 299

Rendering competition!

105 of 299

Implementation of ReSTIR algorithm

Following Bitterli et al.’s 2020 paper 1�Loïc LESCOAT - May 4 2022

Render above NOT made using ReSTIR2

Every frame rendered independently :(

Motivation of ReSTIR:

  • Reduce cost of rendering new frame/pixel

How?

  • Reuse information from previously rendered frame/other pixels in image when rendering new frame/pixel, using a Reservoir

2 Visible here (in lower resolution): https://youtu.be/lMy_Y10duuo

106 of 299

Applying ReSTIR to our Specific Problem

  • Direct lighting only
  • One reservoir per (pixel, intersection point) pair: holds a point on a light source

107 of 299

Benefits of ReSTIR: Camera movement

If camera moves between frames: change which reservoir we look at in previous frame

Temporal reuse only

108 of 299

Benefits of ReSTIR: Combining Reservoirs

No spatial/temporal reuse

Spatial reuse

Temporal reuse

109 of 299

Rendering Competition Submission

“Wavy Forest: A Bird’s Eye View”

Image clarity made possible with ReSTIR’s temporal reuse

Visible here (in lower resolution): https://youtu.be/MmO_otHGyzc

240 frames

110 of 299

Contents:

  • Benefits of ReSTIR: greater speed and lower variance
  • Consistency of our implementation
  • Extra features:
    • Cube primitive
    • Cylinder primitive
    • Normal mapping
    • Wood-like procedurally-generated texture

Annex

111 of 299

Benefits of ReSTIR: Greater Speed and Lower Variance

“Path_tracer_nee” integrator

(with max_bounces == 1)

Four samples per pixel

448 seconds

Our implementation

One sample per pixel

220 seconds

112 of 299

Benefits of ReSTIR: Reduced variance

ReSTIR improves the quality of light sampling

“Path_tracer_nee” integrator

(with max_bounces == 1)

Our implementation

Four samples per pixel

113 of 299

Consistency of our implementation of ReSTIR

Using temporal reuse, stationary camera, no spatial reuse

Ground truth

(“path_tracer_nee” integrator with max_bounces == 1)

Rendered using our implementation of the unbiased

algorithm

114 of 299

Consistency of our implementation of ReSTIR

Using temporal reuse, stationary camera, no spatial reuse

115 of 299

Extra Features

Normal-mapping support

No normal map: flat appearance

Normal map: relieved appearance

116 of 299

Extra Features

Cube primitive, cylinder primitive, and wood-like texture

Bonus: zoom-in on normal map as light moves overhead

117 of 299

Thank you for listening!

118 of 299

SGGX Microflake Distribution & Layered Material with Statistical Operator

Weisheng Li

119 of 299

Anisotropic RTE

Can be used for rendering cloth, hair, skin and other volumetric material that have anisotropic structures.

RTE (or volume rendering equation) we learned in class:

Anisotropic RTE:

120 of 299

Microflake Theory

Analogous to the microfacet, but in a volume

121 of 299

SGGX Distribution

Define projected area rather than NDF

Orthonormal Eigenvectors

Squared Projected Area

We can then use S to recover projected area and NDF

122 of 299

Layered Material

  • BSDF Lobe:

Contains directional statistics (energy, mean and variance)

  • Adding-Doubling

Combine statistics from two layers into one

123 of 299

Algorithm

For each layer i:

Use Adding equation to compute the statistic from layer 0 to layer i

Spawn a BSDF lobe based on the statistic

Use MIS (weighted by energy) to sample and compute PDF based on ALL BSDFs

124 of 299

Competition Submission

125 of 299

Reference

  • The SGGX microflake distribution [Heitz et al. 2015]
  • A radiative transfer framework for rendering materials with anisotropic structure [Jakob et al. 2010]
  • Efficient Rendering of Layered Materials using an Atomic Decomposition with Statistical Operators [Laurent Belcour 2018]

126 of 299

GGX, Orthographic Camera, Non-Exponential Media, and BRDF Space Learning

Yehonathan Litman

127 of 299

GGX BRDF

128 of 299

Beckmann vs. GGX

129 of 299

Orthographic Camera Model

130 of 299

Non-Exponential Media

Homogeneous + Heterogeneous:

Original:

Mine:

Whereas exponential radiative transfer tries to model interaction process of light with scattering particles, non-exponential radiative transfer estimates the average behavior of light in a medium

Bitterli, B., Ravichandran, S., Müller, T., Wrenninge, M., Novák, J., Marschner, S., & Jarosz, W. (2018). A radiative transfer framework for non-exponential media. ACM Transactions on Graphics (TOG), 37, 1 - 17.

131 of 299

Learning in BRDF Space

Zhang, X., Srinivasan, P.P., Deng, B., Debevec, P.E., Freeman, W.T., & Barron, J.T. (2021). NeRFactor: Neural Factorization of Shape and Reflectance Under an Unknown Illumination. ACM Trans. Graph., 40, 237:1-237:18.

132 of 299

Rendering Competition Image

133 of 299

Specular Manifold Sampling

Shilin Ma

134 of 299

Manifold Next Event Estimation

Paper:https://onlinelibrary.wiley.com/doi/10.1111/cgf.12681, image: https://rgl.epfl.ch/publications/Zeltner2020Specular

135 of 299

Only ONE solution

136 of 299

Specular Manifold Sampling (unbiased)

137 of 299

Basin of Convergence

138 of 299

Results

Reference (50000 spp)

SMS (64 spp)

139 of 299

Importance Sampling the Environment Map

140 of 299

Examples

With importance sampling

No importance sampling

141 of 299

Renders

Competition entry

142 of 299

Primary Sample Space MLT

& Delayed Rejection

MAY 4TH 2023

Yuan Meng

143 of 299

Implementations

  • Primary Sample Space MLT(Gaussian + Large Step)
  • Delayed Rejection PSSMLT(Kelemen + Wrapped Cauchy + Large Step)
  • Sample time to generate motion blur picture (to sum up to 12 points)

144 of 299

Core: Main MLT Loop

  •  

144

145 of 299

Core: PSS Sampler

  • Make Sampler->next1D() & Sampler->next2D() return random float after mutation. (Proposal)
  • Keep the information of random numbers before mutation in case we need to reject.
  • A PSS sampler can be applied to any integrator

145

146 of 299

Improvements on PSSMLT

  • Adaptive Parameter
  • Perturbations
    • Gradient Based
    • Delayed Rejection (kind of adaptive)
      • If an aggressive step gets rejected, try with a smaller step

146

147 of 299

Delayed Rejection

  • Q2 Can be cancelled out if symmetric
  • Q1 need special design to be cancelled out: Circular Distribution
    • Treat primary samples as 2D pairs.
    • Mutate two PSs at a time.

147

148 of 299

Comparison & Insights

Path Tracer

148

149 of 299

Comparison & Insights

PSSMLT

149

150 of 299

Comparison & Insights

PSSMLT-smaller step

150

151 of 299

Comparison & Insights

PSSMLT

151

152 of 299

Comparison & Insights

Delayed Rejection

152

153 of 299

Comparison & Insights

  • MCMC focuses more on light regions, which makes the dark region more noisy
  • MCMC takes longer time to render a same spp image

153

154 of 299

References

  • [1] Csaba Kelemen, László Szirmay-Kalos, György Antal, and Ferenc Csonka. 2002. A Simple and Robust Mutation Strategy for the Metropolis Light Transport Algorithm. Computer Graphics Forum 21, 3 (Sept. 2002), 531–540
  • [2] Damien Rioux-Lavoie, Joey Litalien, Adrien Gruson, Toshiya Hachisuka, and Derek Nowrouzezahrai. Delayed Rejection Metropolis Light Transport. ACM Transactions on Graphics, 39(3), Article 26, May 2020.�

154

155 of 299

155

156 of 299

Progressive Photon Mapping

Bharath Raj Nagoor Kani

157 of 299

Overview

  • I was interested in adding features to DIRT such that I could render a swimming pool realistically.
  • The integrators currently available in DIRT cannot handle paths of type L(S+)D(S+).
  • Unfortunately, those path types commonly occur in the scenes that I am interested in rendering.
  • To overcome this issue, I added support for Photon Mapping in DIRT.

158 of 299

Overview

  • I experimented with improving photon mapping by:
    • Using a separate caustic map
    • Performing final gather
    • Implementing progressive photon mapping
  • I also implemented additional tiny features such as the GGX BRDF and a directional light source

159 of 299

Photon Mapping

  • Two Pass Algorithm
    • Pass 1: Trace photons from a light source and cache them in a photon map.
    • Pass 2: Approximate indirect illumination using the cached photons.

Pass 1

Pass 2

160 of 299

Photon Mapping

  • Pass 1:
    • Photon location and direction is sampled from a random light source.
    • Photon is scattered throughout the scene. Photon records are stored at diffuse interactions.
    • Scattering is terminated using Russian Roulette.
    • Once photon tracing is complete, a cache with all photon records is saved as a json file.

161 of 299

Photon Mapping

  • Pass 1:
    • When using the photon mapping integrator, photon tracing performed only if the cache does not exist on disk.
    • The cache is parsed and loaded onto a KDTree for efficient nearest neighbor queries (which will be useful in Pass 2)

162 of 299

Photon Mapping

  • Pass 2:
    • Shoot a ray into the scene and recurse until a diffuse interaction is reached.
    • Find all photons that exist within a pre-defined radius.
    • Calculate the approximate radiance value using the density of photons.

163 of 299

Photon Mapping

  • Experiments:

PM (without russian roulette)

PM (with russian roulette)

164 of 299

Photon Mapping

  • Experiments:

Experimenting with changing the radius (50000 photons used for each scene)

Radius = 30

Radius = 15

Radius = 5

Radius = 3

165 of 299

Photon Mapping

  • Experiments:

Experimenting with changing the number of photons (radius is 30 for each scene)

#Photons = 50000

#Photons = 5000

#Photons = 500

#Photons = 50

166 of 299

Photon Mapping

  • Experiments:

MIS

PM

Photon Map Visualization

167 of 299

Photon Mapping

  • Experiments:

MIS

PM

Photon Map Visualization

168 of 299

Photon Mapping

  • Experiments:

MIS

PM

Photon Map Visualization

169 of 299

Photon Mapping++

  • Enhancements:
    • Use two photon maps – one caustics photon map and one global photon map.
      • The caustics photon map records photons at all diffuse interactions that happen immediately after a specular interaction.
      • The global photon map records photons at all diffuse interactions that DO NOT happen immediately after a specular interaction.
      • Both maps are created independently.

170 of 299

Photon Mapping++

  • Enhancements:
    • Add an option to perform final gather.
      • Perform ray tracing until the next diffuse interaction and then perform density estimation at that interaction.

171 of 299

Photon Mapping

  • Experiments:

MIS

PM

PM++

172 of 299

Photon Mapping

  • Experiments:

PM++

Caustics Photon Map Visualization

Global Photon Map Visualization

173 of 299

Photon Mapping

  • Experiments:

MIS

PM

PM++

174 of 299

Photon Mapping

  • Experiments:

PM++

Caustics Photon Map Visualization

Global Photon Map Visualization

175 of 299

Photon Mapping

  • Experiments:

PM++ (without final gather)

PM++ (with final gather)

176 of 299

Photon Mapping

  • Experiments:

MIS

PM

PM++

177 of 299

Photon Mapping

  • Experiments:

PM++

Caustics Photon Map Visualization

Global Photon Map Visualization

178 of 299

Progressive Photon Mapping

  • Perform N runs of photon mapping, where each run uses a different radius for density estimation.
    • Each run uses the same photon map.
  • The radius for some step i+1 can be obtained using the relation (here, alpha is a hyper parameter that is set by the user):
  • The renders obtained using N runs are then averaged to create the final rendering.

179 of 299

Progressive Photon Mapping

Stacked Output

Radius = 20.00, i = 0

180 of 299

Progressive Photon Mapping

Stacked Output

Radius = 14.79, i = 3

181 of 299

Progressive Photon Mapping

Stacked Output

Radius = 9.89, i = 20

182 of 299

Progressive Photon Mapping

Stacked Output

Radius = 8.38, i = 40

183 of 299

Additional Features

  • GGX BRDF

184 of 299

Additional Features

  • Directional Light Source

185 of 299

Rendering Competition Submission

  • Performed progressive photon mapping.
  • Aggregated the results of 40 photon mapping runs.
    • Alpha = 0.5, Radius of first run = 20.0
  • Used separate caustic and global photon maps.
  • Russian roulette was used to terminate scattering during photon tracing.
  • Next slide displays the submission image in higher resolution.

186 of 299

187 of 299

Thank you!

188 of 299

Ruben Partono

189 of 299

Normal Maps

We must leverage the wealth of (free!) assets on the internet.

Normal maps are a great way to add realistic detail.

Get a local coordinate frame based on the normal, dp/du, and dp/dv vectors.

190 of 299

Spotlight

Add a linear falloff to emission past a certain angle.

Useful for dramatic effect!

191 of 299

Rough Dielectric (Beckmann)

  • Specular reflection and refraction (w/ dielectric Fresnel)
  • Sample normals from the Beckmann microfacet distribution
  • Be extra careful with pdf calculation!

192 of 299

Volume Renderer

  • There were problems with the calculations for transmission times emission in our volume renderer.
  • The rendering below successfully shows shadowing and scattering.

193 of 299

Surfaces on Volumes

194 of 299

Subsurface Scattering (BSSRDF)

Implementation unfinished.

Sample nearby points on a surface by casting a ray from a random point on a disk above the surface. (Done)

Calculate the Directional Dipole BSSRDF. (Unfinished).

For more, see PBRT and the directional dipole paper.

195 of 299

Rendering Competition Submission

196 of 299

Ajax Shung

Rendering Wood

197 of 299

Basic Structure - Distorting it leads to figure

[NC Brown Cen-

ter for Ultrastructure Studies, SUNY College of Environmental Sci-

ence and Forestry, Syracuse, NY]

198 of 299

Simple BRDF (But loses energy)

Surface BRDF +

Fresnel Factor * (diffuse + “specular”)

Better is to use SGGX microflake distribution that approximates fibers

Make out ellipsoids very long in the grain direction, then use specular flakes

Don’t have to sample BRDF and get energy conservation as a bonus so we can get rid of the random diffuse term

199 of 299

How to get Grain Direction?

Just make our tree a tube…

Then deform it and use jacobian of the deformation to get grain direction

Mainly deform radially and transversally

200 of 299

Knots

How do we get the grain direction now?

How do we even know what the grain should look like?

I want the tube back

Connect the rings by smoothing radial distance (aka age)

What about dead knots? :( Discontinuity. Tree doesn’t even know what it should do :(

201 of 299

Curly Figure - Highlights Move

202 of 299

Competition Image

203 of 299

Practical Path-Guiding

Gustavo Silvera

15-468 Final Project S’23

Based on papers:

[1] Practical Path Guiding for Efficient Light-Transport Simulation - Thomas Müller, Markus Gross, Jan Novak. Proceedings of EGSR 2017, vol. 36, no.4

[2] “Practical Path Guiding” in Production - Thomas Müller, SIGGRAPH 2019

204 of 299

What is Path Guiding?

Allow path-tracing algorithms to iteratively “learn” how to construct high-energy light paths [1]

Goal: importance sample the integral

Learns an approximation of incident radiance Li and samples ωi proportionally [2]

Combined with (standard) BSDF sampling via multiple-importance sampling (MIS) to reduce variance

Iterative learning: Rendering is split into several passes to progressively learn incident-radiance approximations with better predictions (from the previous pass). Final pass is only inference.

Key Terms: Data-driven, Reinforcement learning, Progressive, Unbiased

205 of 299

“Follow the Light”

Credits: Intel

BSDF sampling

PG sampling

206 of 299

How is this practical?

Primary data structure for 5D lightfield (x, y, z, phi, theta) → SD-tree

Spatial-Directional Tree:

  • First partitions space (x,y,z) with adaptive KD-tree
  • Leaves of the D-tree contain a quadtree for the directional domain

Enables logarithmic complexity for queries

Image credit: [2]

207 of 299

Scatter distribution

No path guiding

Path guiding

Path guiding (moved light)

208 of 299

Comparison images @ 64spp mine

209 of 299

Improvements (Stochastic Spatial Filter)

210 of 299

Integrating into Mitsuba3

Therefore, per bounce keep track of:

Let x’ = last bounce with L(e→x’) > 0

After the path, loop and compute:

  • L(x) => T(x’) / T(x)

Finally can use x, d, & L(x)

x

Position

d

Direction

L(e→x)

Path radiance, no NEE

L’(e→x)

Total radiance, with NEE

T(x)

Throughput so far

Image credit: Mitsuba3 Docs

211 of 299

Mitsuba comparison mine

212 of 299

Mitsuba comparison mine

213 of 299

Mitsuba comparison mine

214 of 299

Final Render

Image: 1000x1000 @ 19k spp

(~1k spp for training)

Compute: ~7h @ 10c

Memory: 26 Gb

Assets: PolyHaven, SketchFab

Made in: Blender(Using Mitsuba plugin for export)

Full credits list

215 of 299

Final Render (ref)

Image: 1000x1000 @ 20k spp

(no training)

Compute: ~5.5h @ 10c

Memory: 26 Gb

Assets: PolyHaven, SketchFab

Made in: Blender(Using Mitsuba plugin for export)

Full credits list

216 of 299

Final scene scatter distribution comparison

217 of 299

Subsurface Scattering and Spectral Rendering

Jacky Sun

218 of 299

Subsurface Scattering with BSSRDF

  • Rendering Equation

  • Separable BSSRDF

  • Precompute Profile Table (Photon Beam Diffusion Technique)

[1] Henrik Wann Jensen, Stephen R. Marschner, Marc Levoy, Pat Hanrahan. A Practical Model for Subsurface Light Transport. 2001

[2] Physically Based Rendering: From Theory To Implementation, 3rd Edition.

[3] Habel, R., P. H. Christensen, and W. Jarosz. Photon beam diffusion: a hybrid Monte Carlo method for subsurface scattering. 2013

219 of 299

Sampling BSSRDF

  • Sample on a disk first, and raycast back onto geometry
  • Select among 3 axis
  • Store all intersections within range

uniformly sample one of them

  • Sample ωi using surface BSDF with dummy ωo

220 of 299

BSSRDF Results

Lambertian

SSS

(Glossy Surface)

SSS

(Rough Surface)

221 of 299

Spectral Rendering

  • RGB Model is physically incorrect
  • Human perceive wavelengths from about 400 - 700 nm
  • Use Spectral Power Distribution(SPD) instead of RGB
  • Convert between RGB and SPD with CIE XYZ mapping

222 of 299

Spectral Rendering

  • Upsampling existing material
  • Perform only SPD calculations during path traversal

1 spp

32 spp

223 of 299

Extras - Microfacet Refractions

  • Microfacet BRDF

  • Microfacet BTDF

  • BSDF = BRDF + BTDF
  • GGX + Smith approximation

[2] Bruce Walter1, Stephen R. Marschner, Hongsong Li, Kenneth E. Torrance. Microfacet Models for Refraction through Rough Surfaces. 2007

224 of 299

Extras - Microfacet Refractions

Roughness: 0

(Specular)

Roughness: 0.2

Roughness: 0.02

Roughness: 0.5

225 of 299

Wavelength Dependent Refraction

  • IOR can be approximated with a function of λ

The Sellmeier Equation:

  • Let rays carry wavelength sample(s), and generate path based on λ
  • Stratified Wavelength Sampling
  • Spectral BSDFs

Approximation:

[3] Glenn F. Evans, Michael D. McCool. Stratified Wavelength Clusters for Efficient Spectral Monte Carlo Rendering. 1999

226 of 299

Wavelength Dependent Refraction

  • Hero Wavelength Sampling(TODO)

  • Any of them can be hero

[4] Alexander Wilkie, Sehera Nawaz, Marc Droske, Andrea Weidlich, and Johannes Hanika. Hero wavelength spectral sampling. 2014

227 of 299

Spectral Rendering Result

without wavelength sampling

with wavelength sampling

228 of 299

Problems

  • Hard to obtain LSSDE spectrum
  • Convergent speed is EXTREMELY slow
  • Compatibility

229 of 299

Image for Contest

230 of 299

Placeholder: Wojnovich, Davis

231 of 299

Bi-Directional Path Tracing

  • Leverage Symmetry of Light Transport
  • Trace from the Sensor and Light → Deterministic step.

Veach, E., Guibas, L. (1995). Bidirectional Estimators for Light Transport. In: Sakas, G., Müller, S., Shirley, P. (eds) Photorealistic Rendering Techniques. Focus on Computer Graphics. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-87825-1_11

232 of 299

Results

  • Able to Generate paths with zero and one light vertex
  • Paths with amounts of light vertices suffer from a buggy direct connection function.

Zero Light Vertices

NEE / One Light Vertex

Arbitrary Connections (Buggy)

233 of 299

Render Competition

Mewtwo Model by Luca Romagnoli

https://www.cgtrader.com/yumekofigure

Mewtwo is intellectual property owned by the Pokemon Company

234 of 299

Depth of Field and Bidirectional Path Tracing

Wenlong Yan

Placeholder: Yan, Wenlong

235 of 299

Features

  • Depth of Field� Objects within the target focal range to be rendered sharply. Objects outside the focal range are rendered blurred.�
  • Bidirectional Path Tracing� Sample two paths starting from the camera and from the light sources, then connect two sets of paths to form complete paths of rendering

236 of 299

Depth of Field

  • Our “camera” : puts everything in focus
  • Real camera: objects that are too far or too close will lose focus

Credit: Wikipedia

237 of 299

Depth of Field

  • Our “camera” : puts everything in focus
  • Real camera: objects that are too far or too close will lose focus

Credit: Wikipedia

238 of 299

Results - DOF - Aperture

Aperture 10

Aperture 50

Aperture 90

Focal distance 1300

239 of 299

Results - DOF - Focal Distance

Focal distance 900

Focal distance 1300

Focal distance 1700

Aperture 50

240 of 299

BDPT-Path Generating

  • Two subpaths: light and camera
  • Generating subpaths
    • Sample point on light source/camera lens
    • Generate random ray
    • Trace rest of path using BSDFs of materials
    • Russian Roulette for camera subpath
  • Connecting subpaths:
    • Check for visibility of connecting vertices
    • Check if BSDF scatters light in direction formed by connecting vertices

241 of 299

Result - BDPT (40spp)

Simple Path Tracing

Path Tracing With MIS

Bidirectional Path Tracing�(buggy)

242 of 299

Image for Contest

243 of 299

Placeholder: Yarlott, Lance

244 of 299

Polynomial Optics (and some PSSMLT)

245 of 299

Polynomial Optics: Overview

  • Lenses affect light paths
  • These effects can be explained through equations

M. Hullin et al.�Ray intersection with spherical interface

  • Equation can be expanded
  • Ray deflections simulated

246 of 299

Polynomial Optics: My Implementation

  • Paper’s implementation hard-coded polynomial expansions
  • I used a slightly simpler implementation, using the ray transfer matrix
    • Allows for ray manipulation
    • Allows for lens simulation
  • Needed to convert ray dir into two separate angles
    • Also needed to map to standard range
      • Caused bugs
  • Incomplete but close to functional for various lens types

Source: Wikipedia - Ray transfer matrix analysis

247 of 299

Buggy Image Lightning Round & Post Mortem

248 of 299

249 of 299

250 of 299

251 of 299

PSSMLT: What I Learned from a Failed Implementation

  • It’s difficult!
  • Generating arbitrary amounts of random numbers isn’t the way to go
    • Leads to crashes
  • Path mutations, while somewhat simple in concept, are tricky to implement

Where I could have improved:

  • Carefully extract calls to samplers from path tracing functions
  • Ensure that no “bad data” gets into functions (empty arrays, etc.)
  • Set up a thorough error-checking pipeline before beginning
    • Print statements aren’t enough sometimes

Source: Kelemen et al.

252 of 299

Competition Image

253 of 299

Spectral Rendering

Ziwen Ye

254 of 299

Hero Wavelength sampling

Naive

Herowavelength

255 of 299

Failure cases

256 of 299

Spectrum light and Material

solar spectral irradiance

Copper

257 of 299

Spectral Tracking (Heterogeneous Medium)

Ground Truth

Delta Tracking

Spectral Tracking(Buggy)

258 of 299

Spectral Tracking (Chromatic Medium)

Delta

Spectral

259 of 299

Competition Submission

260 of 299

Placeholder: Zhang, Arthas

261 of 299

Fun with Material and Texture

Lingxi Zhang

Confidential

Customized for Lorem Ipsum LLC

Version 1.0

262 of 299

Worley Noise Basic Version

263 of 299

Worley Noise Premium Version

264 of 299

Idea

265 of 299

t = c * d1

266 of 299

t = c * d2

267 of 299

Competition

268 of 299

Bump Mapping vs Displacement Mapping

269 of 299

Core Idea : Fake the Normals!

We want

Instead of getting the real x’

How about we just have a n’ for shading so that it looks like x’?

270 of 299

Some Math Work

n

dx/du

dx/dv

271 of 299

More Math Work

272 of 299

Implementations : texture!

273 of 299

Small problem :

274 of 299

Result

275 of 299

Result

276 of 299

Thank you.

277 of 299

Can range analysis help raycasting?

Tianyuan Zhang

Physics-based rendering course project, 2023 Spring

278 of 299

279 of 299

Range analysis for ray-casting

[?, ?]

NN

x ∈ [-1, 1]

range tracing / interval tracing

range query

Sharp, N., & Jacobson, A. (2022). Spelunking the deep: guaranteed queries on general neural implicit surfaces via range analysis. ACM Transactions on Graphics (TOG), 41(4), 1-16.

280 of 299

range analysis for neural networks

x ∈ [-1, 3]

3

2

-1

2

3x

2x

y = 4x ∈ [-4, 12]

x ∈ [-1, 3]

ReLU

y = x + 0.75 𝞮; 𝞮∈ [0.25, 0.75]

auxiliary range variable

non-linear layers

linear layers

281 of 299

Compare sphere trace with range trace

wood

acropolis

galaxy

282 of 299

Range trace

Sphere trace

283 of 299

Computational cost

Object:

Wood

Time / ray (s)

Average iters

Sphere Trace

0.132

8.13

Range

0.647

11.95

object:

galaxy

Time / ray

Average iters

Sphere Trace

0.124

10.96

Range

0.673

22.02

Range trace is slower and needs more iterations!

284 of 299

Results for inverse rendering

Range trace

Sphere trace

Range trace gives more stable and faster convergence!

285 of 299

Summary

Range analysis helps:

  • Inverse rendering ✅
  • Forward rendering ❌

286 of 299

Position-Free Monte Carlo Unidirectional Simulation for Layered Material

Robin Zheng

287 of 299

How “position-free” ?

  • Position + direction -> Depth + direction
  • Ignoring displacement of scattering location
  • Assume layered material is locally uniform

288 of 299

Why “position-free” ?

  • Fast - we skip intersection check when tracing light locally
  • Low variance - rolling up light throughput locally rules out geometric terms
  • Free to adjust - each layer are represented independently, quite few assumptions and limitations

289 of 299

Light Path Integral

Path contribution as product of vertex terms and segment terms

290 of 299

Light Path Integral (Cont.)

Segment terms taking depth and obtaining length measure

291 of 299

Then we evaluate BSDF as…

292 of 299

Position-Free In DIRT

sample -> now returns throughput directly after tracing a light path, equivalent to eval/pdf

pdf-> since we don’t use MIS, left blank

eval-> left blank, see evalandSampleNewDir

evalandSampleNewDir->evaluate f(w_i, w_o) and sample a new direction. Used for NEE

Multilayers are implemented recursively

293 of 299

Problems encountered..

  • Double counting throughput..
  • Forgetting jacobian…
  • Highlight needs a special case!

294 of 299

Validation-No medium Interaction

ground truth

500 spp, with mixture sampling

6 minutes

500nd sample a new direction. Used for NEE

Position-free Monte Caro withou NEE

3500 spp

6 minutes

500nd sample a new direction. Used for NEE

Position-free Monte Caro with NEE

3500 spp

8 seconds

500nd sample a new direction. Used for NEE

295 of 299

Validation-Medium Interaction

ground truth

500 spp, with mixture sampling

6 minutes

500nd sample a new direction. Used for NEE

Position-free Monte Caro withou NEE

3500 spp

6 minutes

500nd sample a new direction. Used for NEE

Position-free Monte Caro with NEE

3500 spp

8 seconds

500nd sample a new direction. Used for NEE

296 of 299

Interesting results!

297 of 299

Contest Submission

298 of 299

References

299 of 299

Thank you!