450 likes | 745 Views
How to make a PIXAR movie. Global Illumination Effects. Motivation. Realistic illumination of the scene. Motivation. Soft shadows. Motivation. Subsurface scattering. Motivation. Many algorithms exist Photon mapping Ambient Occlusion …
E N D
Howtomake a PIXAR movie Global Illumination Effects
Motivation • Realisticilluminationofthescene
Motivation • Soft shadows
Motivation • Subsurfacescattering
Motivation • Manyalgorithmsexist • Photon mapping • AmbientOcclusion • … • Common goal: Solvingpartsofthe Rendering Equation
Problems • Scene changes -> New computation • Still not possible in real-time • UsesRaytracingorRadiosity Alreadyexplained Goingtobeexplainednow
Photons • Haveenergy • h: Planck constant • v: Frequencyoflight
Radiance θ: angle betweensurface‘s normal andω cosθ: Lambertianlaw Constant along a ray
BRDF Bidirectionalreflectancedistributionfunction Howmuchlightisreflected
ReflectionEquation Integrateoverthehemisphere
Rendering Equation Radiance BRDF Geometryfactor Visibility Emittedlight Surfaces
Radiosity • Ideal diffuse reflectioncanbesimulatedwithRadiosity • Uses finite elements • IntroducedbyGoral et al.
Radiosity • Origin: Thermal heattransfer • Developed in 1984, still in use • Modellingof diffuse lighting • Doesn‘taccountforspecularlighting • Independent ofviewer • Therefore: Staysconstant in constantscene
RadiosityEquation constant Emissivity Radiosity Reflectivity Form factor
Nusselt Analog • Simple geometric analog forcalculating form factors B A
HemicubeAlgorithm Hemicubeinsteadofhemisphere
HemicubeAlgorithm • Idea: • Precomputedelta form factorsanalytically • Count coveredpixels • Sumupcovereddelta form factorstothetrue form factor
HemicubeAlgorithm on GPU • Useprojectioncenterasviewport • Usecurrentfaceasviewing plane • Do therendering • Grab thecolourbuffer (IDs ofpatches) • Count colouredpixels • Visibilitytestperformedbydepthtest
RadiosityAlgorithm • Compute form factors • Solve linear equationsystem for i = 1, … , n
Von Neumann Series 0 Bounces 1 Bounce 2 Bounces 3 Bounces
RadiosityConclusion • Old, but still in use • Usedforsimulating diffuse lighting • Resultcanbeused in combinationwithother GI algorithms
AmbientOcclusion Motivation • Ambienttermconstant in Phong model • Not veryrealistic • Idea: Computeocclusionofeachface
AmbientOcclusion • Result: Occludedareasappeardarkerthanbrigtherones • MultiplywithusualPhong model • 2 possibilities: • Screen space • Objectspace
Screen Space AmbientOcclusion • Can becompletelydone on GPU • Nopreprocessing • Independent ofscenecomplexity • Idea: Insteadofperformingfullraytracinguseocclusioninformationfrom z-buffer
Screen Space AmbientOcclusion • Take 3D samplesaroundeachpoint • Determineocclusionofeachpointbytestingagainstthedepthbuffer • Farsampleswithlessinfluence • Useblurringfor smooth results
Object Space AmbientOcclusion • Definesurfaceelementas an orienteddisk • UseHeron‘sformula , • Store position, normal andarea in textureforpixelshader
Object Space AmbientOcclusion • Computeaccessibilityvalueat eachelement (% ofhemisphere) • Approximation based on the solid angle of an orienteddisk • Stronglydependent on scene complexity
AmbientOcclusionConclusion • Can bepreprocessedforeachobject • Used in thecurrentversionofPIXAR‘sRenderMan
Outlook • Fastercomputation • Cheaper • Artistscanseeresultsfaster • More realisticlighting
Conclusion • Veryimportantforanyanimatedmovie • Computation time not tooimportant