Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect...

31
Instant Radiosity Instant Radiosity Paper by Alexander Keller Paper by Alexander Keller
  • date post

    21-Dec-2015
  • Category

    Documents

  • view

    218
  • download

    0

Transcript of Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect...

Page 1: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Instant RadiosityInstant Radiosity

Paper by Alexander KellerPaper by Alexander Keller

Page 2: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

What is Radiosity?What is Radiosity?

Perfect Diffuse InteractionPerfect Diffuse Interaction View-IndependentView-Independent Must be Followed By Projection Must be Followed By Projection

ComputationComputation May have a post-process Ray Tracing May have a post-process Ray Tracing

enhancementenhancement

Page 3: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

ProcessProcess

An array of emitting patchesAn array of emitting patches Diffuse-Diffuse Interaction between Diffuse-Diffuse Interaction between

light patch and all receiving patcheslight patch and all receiving patches Mostly iterative procedureMostly iterative procedure Applied to ENTIRE scene.Applied to ENTIRE scene.

Page 4: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

OutputOutput

Page 5: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Single FrameSingle Frame

Page 6: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Combined SolutionCombined Solution

Page 7: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

AdvantagesAdvantages

Needs only be calculated onceNeeds only be calculated once Only if geometry changes is there a Only if geometry changes is there a

need to recalculate the form factorsneed to recalculate the form factors If lighting changes then only equation If lighting changes then only equation

needs resolvingneeds resolving Viewport changes do not need a form Viewport changes do not need a form

factor recalculationfactor recalculation

Page 8: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

ProblemsProblems

Basic Radiosity Solution is SlowBasic Radiosity Solution is Slow Procedural Process Procedural Process Must cover entire sceneMust cover entire scene

Page 9: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Instant Radiosity SolutionInstant Radiosity Solution

Operates on the textured sceneOperates on the textured scene Produce photorealistic images without any Produce photorealistic images without any

finite kernel or solution discretization of finite kernel or solution discretization of underlying integral equationunderlying integral equation

Rendering rates of a few seconds are Rendering rates of a few seconds are obtained byobtained by Hardware, quasi-random walk, jittered low Hardware, quasi-random walk, jittered low

discrepancy sampling.discrepancy sampling. Does NOT need to evaluate form factors or Does NOT need to evaluate form factors or

generate meshesgenerate meshes

Page 10: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Algorithm BasicsAlgorithm Basics

Photons are traced from the light source Photons are traced from the light source into the sceneinto the scene

At the origin of the path of the photon, and At the origin of the path of the photon, and where it hits a scene a point light is placedwhere it hits a scene a point light is placed

The scene is rendered several times for The scene is rendered several times for each light sourceeach light source

Resulting image is composited in the Resulting image is composited in the accumulation buffer (hardware)accumulation buffer (hardware)

Page 11: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Algorithm BasicsAlgorithm Basics

Generates a particle approximation of the Generates a particle approximation of the diffuse radiant scene using Quasi-random diffuse radiant scene using Quasi-random walk based on quasi-Monte Carlo walk based on quasi-Monte Carlo integrationintegration

Hardware renders an image with shadows Hardware renders an image with shadows for each particle used as point light sourcefor each particle used as point light source

Illumination is obtained by summing up Illumination is obtained by summing up the single images in an accumulation the single images in an accumulation buffer and displaying the resultbuffer and displaying the result

Page 12: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

The AlgorithmThe Algorithm

Calculate the average radiance passing Calculate the average radiance passing through a pixelthrough a pixel

Add that to a discrete density of point light Add that to a discrete density of point light sourcessources

Evaluated for all pixels of the image matrixEvaluated for all pixels of the image matrix

Page 13: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

In Mathematical TermsIn Mathematical Terms

The Radiance of m to n is an The Radiance of m to n is an approximation ofapproximation of Source Radiance * Avg Radiance from m Source Radiance * Avg Radiance from m

to nto n ++ The Sum from 0 to M – 1 points of light ofThe Sum from 0 to M – 1 points of light of

Reflectiveness(BRDF) * Radiance of light i * Reflectiveness(BRDF) * Radiance of light i * Kronecker delta function of The point on the Kronecker delta function of The point on the surface – the position of light isurface – the position of light i

Page 14: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Pseudocode Variable DefsPseudocode Variable Defs

N – Number of ParticlesN – Number of Particles – – average reflectivityaverage reflectivity w – attenuationw – attenuation L – radiance of a pointL – radiance of a point y – point on the surfacey – point on the surface – – aligned normal to yaligned normal to y

Page 15: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Pseudocode 1Pseudocode 1stst Level Loop Level Loop

ФФnn(i) – Base n Halton (i) – Base n Halton SequenceSequence

yyoo((ФФ22(i), (i), ФФ33(i)) – (i)) – Isometry from unit Isometry from unit square to onto each square to onto each light sourcelight source

LLee(y) * supp L(y) * supp Lee – Sum – Sum of source radiance of source radiance for for y y * support of * support of the light sourcesthe light sources

Page 16: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Pseudocode 2Pseudocode 2ndnd Level Loop Level Loop

- Shoot A - Shoot A ray into directionray into direction

- Return the - Return the first point hit when first point hit when shooting a ray from shooting a ray from y into y into

- Reflectivity of - Reflectivity of the diffuse surface the diffuse surface texture / texture /

Page 17: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

GL CallsGL Calls

glRenderShadowedScene(LigglRenderShadowedScene(LightPower,LightPosition)htPower,LightPosition) 2d image that doesn't 'see' 2d image that doesn't 'see'

that light is black, otherwise that light is black, otherwise it is colored as usual (hard it is colored as usual (hard shadows)shadows)

glAccum(GL_ACCUM, weight)glAccum(GL_ACCUM, weight) 2d image that was rendered 2d image that was rendered

in previous step added to in previous step added to current accumulated buffercurrent accumulated buffer

Repeated for different bright Repeated for different bright spots until N iterations are spots until N iterations are complete. Result is a soft complete. Result is a soft shadowed scene that can be shadowed scene that can be rendered very quickly in rendered very quickly in OpenGLOpenGL

Page 18: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

ResultResult

Page 19: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

DisadvantagesDisadvantages

View-dependencyView-dependency Rendering tens to hundreds of light sources Rendering tens to hundreds of light sources

each frame is too costlyeach frame is too costly Somewhat more suitable for generating Somewhat more suitable for generating

quick previews than interactive quick previews than interactive walkthroughswalkthroughs

Not very preciseNot very precise Many point sources have to be rendered for Many point sources have to be rendered for

accurate imagesaccurate images Problematic! Accumulation buffer only has a limited Problematic! Accumulation buffer only has a limited

precision!precision!

Page 20: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

WalkthroughsWalkthroughs

They are possibleThey are possible We could render each lit surface into a We could render each lit surface into a

texture, and use these as light mapstexture, and use these as light maps Very time consuming since for every texture a Very time consuming since for every texture a

lot of images have to be compositedlot of images have to be composited Keep last N images from the last N paths Keep last N images from the last N paths

in memory, while the system keeps in memory, while the system keeps rendering new images for new pathsrendering new images for new paths When an image is finished, the oldest image is When an image is finished, the oldest image is

replaced by the new one.replaced by the new one. Suited for extremely slow walkthroughsSuited for extremely slow walkthroughs

Page 21: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Specular EffectsSpecular Effects

Specular EffectsSpecular Effects Let the algorithm use a full BRDF in the Let the algorithm use a full BRDF in the

hardware lighting pass, enabling hardware lighting pass, enabling specular highlightsspecular highlights

In The particle generation phase, In The particle generation phase, random surfaces are tested to be random surfaces are tested to be specular or diffuse.specular or diffuse.

Virtual Lights for specular objectVirtual Lights for specular object

Page 22: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

ConclusionsConclusions

Provides quickly rendered images for Provides quickly rendered images for the Global Illumination problemthe Global Illumination problem

Low precisionLow precision Inherent upper bounds issues with Inherent upper bounds issues with

respect to hardwarerespect to hardware

Page 23: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

OpenGL ImplementationOpenGL Implementation

2D Points and the Depth Buffer2D Points and the Depth Buffer Shadow MapsShadow Maps Software RestraintsSoftware Restraints

Accumulation BufferAccumulation Buffer Hardware IssuesHardware Issues

ResultsResults

Page 24: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

2D Points and the Depth 2D Points and the Depth BufferBuffer

Page 25: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

ApplicationsApplications

Stored Z Values for an X,Y pointStored Z Values for an X,Y point Clamped [0, 1]Clamped [0, 1]

Crude vector-object collision detectionCrude vector-object collision detection Special CasesSpecial Cases

Shadow MapsShadow Maps Hardware RestraintsHardware Restraints

Software RestraintsSoftware Restraints

Page 26: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Hardware Shadow Vs. Software Hardware Shadow Vs. Software ShadowsShadows

Page 27: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Accumulation BufferAccumulation Buffer

Not Hardware Accelerated (Most Not Hardware Accelerated (Most Cases)Cases)

Average execution timeAverage execution time N = 300N = 300

~265 seconds total~265 seconds total ~270 for Software Render~270 for Software Render

~264 seconds in accumulator~264 seconds in accumulator

Page 28: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Original SceneOriginal Scene

Page 29: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Results: N=75Results: N=75

Page 30: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Results: N=150Results: N=150

Page 31: Instant Radiosity Paper by Alexander Keller. What is Radiosity? Perfect Diffuse Interaction Perfect Diffuse Interaction View-Independent View-Independent.

Results: N=300Results: N=300