#7: Photorealism

#7:Photorealism
TheHighEnd
ElementsoftheFinalImage
• 
• 
• 
• 
• 
• 
Geometry
Lights
Materiality
Viewpoints&focalpoints
Cameras&op5cs
Rendering:color&light
SyntheAcCameraIssues
“thefamiliar”
SyntheAcCamera
“beyondourscope”
Rendering:Color&Light
“it’saboutlight&surface”
Review:ClassicalRendering
“Top-down”(Phong,etal.)
•  Assumesperfectlydiffusesurfaces
•  Worksfromgeometrydatatoscreen
•  Asidefromshadows,ignoresothergeometry
•  DoesnotrenderindirectilluminaAon,color
bleed,ambientocclusion,causAcs,ormost
speculareffects(refracAonandreflecAon).
•  SoluAonisview-dependent
Wait!Whatdowemeanby…
• 
• 
• 
• 
• 
• 
IndirectilluminaAon
Colorbleed
Speculareffects:ReflecAon&RefracAon
CausAcs
Ambientocclusion
View-independence
Indirectillumina5on
Lightsourceinvisible.Lightdistributedby
diffusereflecAonoffsurfaces.
KimbellArtMuseum,LouisKahn,1972
ColorBleed
Whatcoloristhis
wall?
Whatcoloristhis
wall?
ColorBleed
DiffusereflecAonofcolorfrom
adjacentsurfaces.
Theresultofdiffuseinter-reflecAon.
SpecularEffects
ReflecAon
Specular(mirror-like)reflecAonof
geometryinasurface.
SpecularEffects
RefracAon
Lightbentduringtransmission
throughtransparentobjects.
Thelightpa]ern
onthetableisa
caus.c.
Caus5cs
Refractedlight
DiffusereflecAonoflightAFTER
specularrefracAon.
Earlyraytracing
photograph
DiffuseSurface
Theshadow
doesn’tshow
causAcfrom
glass.
AmbientOcclusion
Closelyspacedsurfaces
block(occlude)ambient
lightentry,makingdark
seamsandjoints.
AmbientOcclusion
WithAmbientOcclusion
Chaos-groupgraphic
WithoutAmbientOcclusion
Whatis“View-dependence”
•  LightdistribuAonintherealworlddoesnot
dependonthecameraposiAon(noflash!).
•  Arenderingalwayshasgeometrical
dependenciesonviewpoint/etc.
•  GiventhecostofcompuAnglightdistribuAon,
itwouldbeniceifasinglelighAngsoluAon
couldbesharedbyaseriesofrenderings,asin
ananimaAon.
Now:ImprovingClassicalRendering
•  AnA-aliasbysuper-sampling@3:1or4:1
•  AnA-aliastexturestoo
•  Useextra“fill”lights(noshadows)
Let’stryadifferentapproach
Lightreflectsin“infinite”ways,butthere
areafinitenumberofscreenpixelsand
modelsurfaces. RealLight:
FirstApproximaAon:RayTracing
“individualrays”
AlmostRealLight
Chaos-groupgraphic
Ray-SurfaceInterac5ons
Lighttravelsinstraightlines
Toreachtheeye,itcamefromthepixel
Toreachthepixelitcame“from”themodel
Eachbounceisspecular
Workbackwards
Eachpixelis
separate
•  AddupthecontribuAons
ofeachbounce.
• 
• 
• 
• 
• 
RayTracing“scorecard”
•  ReflecAon✔
•  RefracAon✔
•  IndirectIlluminaAon✖
•  ColorBleed ✖
•  CausAcs✖
•  AmbientOcclusion✖
- View-dependentsoluAon
GePngaGoodRay-tracing
•  AnA-aliasbysuper-sampling@3:1or4:1
•  AnA-aliastexturestoo
•  Set“maximum-bounces”higher
(note,bounces=0/1->“hiddensurfaces”)
TheFEM“energyexchange”model
Correctindiffuseenvironments
DevelopedatCornellUniversity
Radiosityenergyexchange
DevelopedatCornellUniversity
Radiosity:energyexchange
Dividesurfaces
Compute‘anglefactors’
DistributedirectilluminaAon
Computerbounce
redistribuAon.
•  Subdividehigh-contrast
edges.
•  SmoothresulAngimage
• 
• 
• 
• 
Radiosity“scorecard”
•  ReflecAon✖
•  RefracAon≈
•  IndirectIlluminaAon✔
•  ColorBleed✔
•  CausAcs✖
•  AmbientOcclusion✖
+ SoluAonisview-independent
GePngGoodRadiosityResult
•  AnA-aliasbysuper-sampling@3:1or4:1
•  AnA-aliastexturestoo
•  Set“%energydistribuAon”tohighnumber
(e.g.99%)
•  CombinewithRay-TracingforreflecAon&
refracAoneffects
GePngBothSpecularandDiffuse
EffectsinOneRendering?
Path-Tracing:Enhancedray-tracing
Worktheproblemfrombothends:
1.Tracelightfromsourcestosurfaces
2.Tracelightfromeyeintoscene.
- AND-
3.ComputediffusereflecAonsbyusingstaAsAcal
(“sampling”)approach
Chaos-groupgraphic
PathTracing:TwoPasses
1.TraceForwardfromtheLights
•  Send“photons”intothescene(distribute
accurately)
•  Wheneveraphotonstrikesasurface,record
where&inwhatdirecAonina“photonmap”
•  UsesurfacequaliAes(BRDF)tocompute
probablebouncedirecAon.
•  Bounce
•  Repeat
2.TraceBackwardsfromtheEye
• 
• 
• 
• 
“Backtrace”rayintoscene
Atsurfaces,searcharoundinphotonmap.
Computeeffectofphotons.
Ifsurfaceisspecular,followclassicalbounce
Review…
ImprovingPathTracing
• 
• 
• 
• 
• 
• 
AnA-aliasbysuper-sampling@3:1or4:1
AnA-aliastexturestoo
Increasenumberofphotonsinphase1
Increasenumberofbouncesinphase2
Decreasesearchradiustosharpenimage
Increaseimagesamplestoimprovedetail
…umm..BRDF?
Realsurfacesbouncelightincomplex
waysthatdependonthewavelength
ofthelight,theangleofincidence,
etc.ThefuncAonthatdescribeshow
muchlightgoeswhereiscalled…
“BRDF”
BidirecAonalReflectanceDistribuAonFuncAon
(wherereflectedlightreallygoes)
Thespecular-ishbounce
Thediffuse-ishbounce
#7:Photorealism
NotTheEnd