Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms...

17
Retrospect Digital Image Synthesis Yu-Ting Wu

Transcript of Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms...

Page 1: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Retrospect

Digital Image SynthesisYu-Ting Wu

Page 2: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

So far we have learned:

• Geometry and transforms• Shapes• Accelerators• Color and radiometry• Cameras• Sampling and reconstruction• Reflection models• Materials• Textures

Page 3: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Recap: the process of renderingCamerasorthogonal, perspective, environment, realistic …

Samplingrandom, stratified, low-discrepancy, best candidate …Reconstructionbox, triangle, sinc, Gaussian, Mitchell …

GenerateRay

Intersect

Shapessphere, disk, cylinder, triangle meshes, subdivision surfaces …

IntersectionDifferentialGeometryBSDFs

Materialsmatte, plastic, mix, measured, metal, substrate …

Lightspoint, distant, spot, area, environment …

Acceleratorsgrid, bvh, kdtree …

)ωp,( ooL )ω,p( oeL

iω 2

ds iiio θcos)ωp,()ω,ωp,( iLf

GetBSDF

Page 4: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Cameras

• GenerateRay– Given a sample on the image film (in raster

space), generate the corresponding camera ray (in world space) according to the type of camera.

environment

Page 5: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Cameras

• Depth-of-field and motion blur

Depth-of-field

Motion blur

Page 6: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Shapes

• Intersect (used for radiance ray)• Given a ray, does it has intersection with the

shape?• If yes, fill the information in

DifferentialGeometry• IntersectP (used for shadow ray)

– Given a ray, does it has intersection with the shape?

IntersectIntersect

IntersectP

scene

Page 7: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Materials, textures and reflectance models• Materials

– GetBSDF

• Reflectance models (BxDFs)– f– Sample_f

• Textures– Evaluate

Material

TextureSpatially-varying

parameters

BxDFsreflectance models

Page 8: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Accelerators

• Construction• Traversal

• Intersect (used for radiance ray)– IntersectP (used for shadow ray)

BVH Uniform grid Octree Kdtree BSP tree

Page 9: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Sampling and reconstruction

• Use sub-pixel samples for– Antialiasing– Distributed effects

• Depth-of-field• Motion blur• Soft shadows• Glossy reflection• Global illumination

Page 10: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Sampling and reconstruction

• Sampling patterns

random stratified uniform stratified jittered

Halton Hammersley best candidate

Page 11: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Call stack in pbrtRenderer::Render RenderTask::Run Camera::Film::WriteImage

RenderTask::Run Camera::GenerateRay Renderer::Li

Renderer::Li Scene::Intersect if there is an intersection SurfaceIntegrator::Li else Light::Le VolumeIntegrator::Li return T * Li + Lvi

[render a block of pixels]

[output an image]

[obtain a camera ray for each camera sample][compute the radiance carried by the camera ray]

[obtain the intersection of the ray and the scene]

[compute the surface reflectance along the ray]

[possibly add emittance from all lights]

[compute volume contribution and transmittance]

Page 12: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Call stack in pbrtScene::Intersect Aggregate::Intersect SurfaceIntegrator::Li Intersection::GetBSDF <Do shading based on the shading geometry and BSDF>

Intersection::GetBSDF Primitive::GetBSDF

Primitive::GetBSDF Shape::GetShadingGeometry Material::GetBSDF

[call acceleration structure for intersection]

[get BSDF for shading]

[call the intersected primitive to fill the BSDF ]

[call shape to get shading geometry]

[do bump mapping if necessary, call material to get BSDF]

Page 13: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Remaining components:

• Lights• Monte Carlo• Surface integrators• Volume integrators

Page 14: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Recap: the process of renderingCamerasorthogonal, perspective, environment, realistic …

Samplingrandom, stratified, low-discrepancy, best candidate …Reconstructionbox, triangle, sinc, Gaussian, Mitchell …

GenerateRay

Intersect

Shapessphere, disk, cylinder, triangle meshes, subdivision surfaces …

IntersectionDifferentialGeometryBSDFs

Materialsmatte, plastic, mix, measured, metal, substrate …

Lightspoint, distant, spot, area, environment …

Acceleratorsgrid, bvh, kdtree …

Li

How much radiance reflected from surface? Surface Integrators

GetBSDF

Page 15: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Recap: the process of renderingCamerasorthogonal, perspective, environment, realistic …

Samplingrandom, stratified, low-discrepancy, best candidate …Reconstructionbox, triangle, sinc, Gaussian, Mitchell …

GenerateRay

Intersect

Acceleratorsgrid, bvh, kdtree …

Shapessphere, disk, cylinder, triangle meshes, subdivision surfaces …

How much radiance absorbed and scattered by the media? Volume Integrators

IntersectionDifferentialGeometryBSDFs

Materialsmatte, plastic, mix, measured, metal, substrate …

Lightspoint, distant, spot, area, environment …

GetBSDF

Page 16: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

Recap: the process of rendering

• Are we close to this beautiful image?

Page 17: Retrospect Digital Image Synthesis Yu-Ting Wu. So far we have learned: Geometry and transforms Shapes Accelerators Color and radiometry Cameras Sampling.

What’s for next?

• Lights• Homework assignment #3• A brief introduction to the Many-Light

rendering