Incremental Updates for Rapid Glossy Global Illumination

11
Incremental Updates for Rapid Glossy Global Illumination Xavier Granier, George Drettakis To cite this version: Xavier Granier, George Drettakis. Incremental Updates for Rapid Glossy Global Illumina- tion. Computer Graphics Forum, Wiley-Blackwell, 2001, 20 (3), pp.268-277. <10.1111/1467- 8659.00519>. <inria-00510047> HAL Id: inria-00510047 https://hal.inria.fr/inria-00510047 Submitted on 17 Aug 2010 HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L’archive ouverte pluridisciplinaire HAL, est destin´ ee au d´ epˆ ot et ` a la diffusion de documents scientifiques de niveau recherche, publi´ es ou non, ´ emanant des ´ etablissements d’enseignement et de recherche fran¸cais ou ´ etrangers, des laboratoires publics ou priv´ es.

Transcript of Incremental Updates for Rapid Glossy Global Illumination

Incremental Updates for Rapid Glossy Global

Illumination

Xavier Granier, George Drettakis

To cite this version:

Xavier Granier, George Drettakis. Incremental Updates for Rapid Glossy Global Illumina-tion. Computer Graphics Forum, Wiley-Blackwell, 2001, 20 (3), pp.268-277. <10.1111/1467-8659.00519>. <inria-00510047>

HAL Id: inria-00510047

https://hal.inria.fr/inria-00510047

Submitted on 17 Aug 2010

HAL is a multi-disciplinary open accessarchive for the deposit and dissemination of sci-entific research documents, whether they are pub-lished or not. The documents may come fromteaching and research institutions in France orabroad, or from public or private research centers.

L’archive ouverte pluridisciplinaire HAL, estdestinee au depot et a la diffusion de documentsscientifiques de niveau recherche, publies ou non,emanant des etablissements d’enseignement et derecherche francais ou etrangers, des laboratoirespublics ou prives.

EUROGRAPHICS2001/ A. ChalmersandT.-M. Rhyne(GuestEditors)

Volume20 (2001), Number3

Incr ementalUpdatesfor Rapid GlossyGlobal Illumination

Xavier GranierandGeorgeDrettakis

iMAGIS–GRAVIR/IMA G-INRIA2004routedeLucioles,Sophia-Antipolis,F-06902,France

AbstractWe presentan integratedglobal illumination algorithm including non-diffuselight transportwhich can handlecomplex scenesandenablesrapid incrementalupdates.We build on a unifiedalgorithmwhich useshierarchicalradiositywith clusteringandparticle tracingfor diffuseandnon-diffusetransportrespectively. We presenta newalgorithmwhich choosesbetweenreconstructingspeculareffectssuch ascausticson thediffuseradiositymesh,or specialpurposecaustictextures,whenhigh frequenciesare present.Algorithmsare presentedto choosetheresolutionof thesetexturesand to reconstructthehigh-frequencynon-diffuselighting effects.We usea dynamicspatial data structure to restrict the numberof particlesre-emittedduring the local modificationsof the scene.By combiningthis incrementalparticle tracewith a line-spacehierarchy for incrementalupdateof diffuseillumi-nation,wecanlocally modifycomplex scenesrapidly. We alsodevelopan algorithmwhich, by permittingslightquality degradationduring motion,achievesquasi-interactiveupdates.We presentan implementationof our newmethodandits applicationto indoors andoutdoors scenes.

Keywords: GlobalIllumination,Rapid/Interactive Updates,Radiosity, ParticleTracing,Textures,Reconstruction

1. Intr oduction and Moti vation

Global illumination algorithmswhich include specularef-fectsarecurrentlyvery computationallyexpensive. Despitemany recentadvances,it is still very tediousto run suchmethodsin a trial-and-errormannerto correctly positionlights andobjectsor try out different lighting designs.Ide-ally, we want to provide a way for a userto modify a scenewith suchglobalandnon-diffuseeffectsandrapidlyor eveninteractively seetheresultingchangesin lighting (shadows,reflections,causticsetc.).

The efficient treatmentof global speculareffects, suchascaustics,is still problematicfor sceneswhich are mod-eratelyor very complex. Most existing approachesare ei-ther ray-based15, view-dependentsolutions,and thus cum-bersomefor walkthroughand interactive usewhen modi-fying the scene,or dependon particle tracing for all lighttransport29 includingdiffuselight, alsomakinginteractivity

�iMAGIS is a joint researchprojectof CNRS/INRIA/UJF/INPG.

E-mail:{Xavier.Granier|[email protected]://www-imagis.imag.fr/

hard to achieve. For diffuse-onlyglobal illumination, pre-viously developedsolutions2� 7� 6� 20, allow the userto moveobjectsat interactive rates.Also, recentmethodsbasedonray-tracingallow alimited amountof interactivity andscenemodification17� 28. Theseapproachesare however typicallylimited in the lighting effectsthey canreproduce,in the re-sultingimageresolution,andcansuffer from visualartifacts.In summary, it is still currentlyalmostimpossibleto movearounda globally illuminatedscene,containingbothglobaldiffuselighting andglobalspeculareffects(suchascaustics)andrapidlymove objectsin thesceneto seetheresultingef-fects.

We presentan initial solutionto theseshortcomings.Webuild on previous work, which combinedtheadvantagesofhierarchicalradiosityfor diffusetransportandlimited parti-cletracingfor non-diffuseinteractions10, whichwewill referto astheunifiedalgorithm from now on.We alsoextendtheline-spacehierarchyapproach6 (LSH), anduseit for incre-mentaldiffusetransport.

The main problem of the unified algorithm as pre-sentedpreviously10, was its limitation to moderatelycom-plex scenes.This was due to the fact that causticswerereconstructedon the radiosity-basedmesh,resultingin the

c�

TheEurographicsAssociationandBlackwellPublishers2001.Publishedby BlackwellPublishers,108 Cowley Road,Oxford OX4 1JF, UK and350 Main Street,Malden,MA02148,USA.

X. GranierandG. Drettakis/ IncrementalUpdatesfor RapidGlossyGlobal Illumination

(a) (b) (c) (d)

Figure1: (a) Global illuminationsolutioncomputedin 35min.Therearelightsonin thehouse, aswell assunlightwhich is comingin throughthewindow, hits themirror on theleft andreflectson thewall dresserandarmchair on theright. (b) detailsof causticsin thealcoveontheleft.(c)-(d) Thecontaineron thedressercanbemovedat 20 sec/frame. We canalsoachieve 3 sec/frameupdateswith slightly lower quality (seeFig. 5).

needfor excessive subdivision leadingin turn to unmanage-ablememoryandcomputationalrequirements.

We presenta solution to this problem by reconstruct-ing non-diffuseeffectsseparatelyon caustictextures,whenneeded.Our algorithm can thus either choosefrom the“spread-out”reconstructionon a relatively coarseradiositymesh,or finecausticsonatexture,whichwecall caustictex-tures.Caustictexturesarenotpartof theglobalilluminationsolution,sincethey arepart of the final imagereconstruc-tion; asa result the unified algorithmremainsvalid for alllight transfers.We presentmethodsto choosetheappropri-aterepresentation(meshor texture),to choosetheresolutionof thetextureandto performappropriatereconstruction.

Next, wepresentanovel solutionwhichrestrictsthenum-ber of particlesemitteddue to a local modificationin thescene.A dynamicallymodifiedoctreeis usedto compactlystoretheinformationof particlestransitingin thescene.Fastinsertsanddeletesareachievedwith appropriatedatastruc-turesandupdatealgorithms.Wethenintroduceaprogressiveupdatealgorithm,whichallowsquasi-interactiveupdatesin-cludingnon-diffuseeffectsby degradingquality duringob-ject motion. When motion stops,the imagequality is re-stored.

Finally, we have reducedthe memory requirementsoftheoriginal line-spacehierarchy6, andimprovedtheperfor-mancein thecaseof clusters.

Wewill presentresultsof ourimplementationwhichshowthatfor moderatelycomplex scenescontainingmany causticeffectswe canachieve a goodquality solutionwith reason-able computationtime. Fig. 1 shows an exampleof solu-tion computedin approximately35 min� . Note thedetailedspecularreflectionsof morningsunlightoff themirror onthe

�All imageswere generatedwith standardOpenGL hardware

renderingusing raytracing with the RenderCacheto fill in the�L �D � S� E paths(suchas the mirror). All timings are on a Pen-

tium III 733MHzPC(Sgi330with aVR3 (Nvidia Quadro)graphicscard.)

left onto the wall anddresseron the right aswell ason thedressersdue to the spotlights(seeFig. 1(b)). We can thenrapidly modify the scenelocally, achieving rapid updates.Thecontaineronthedressercanbemovedat20secondsperframe(Fig. 1(c)-(d)). If we degradequality slightly duringmotion(seeFig. 5) wecanachieve quasi-interactive updatesataround3 secondsperframe.

2. Relatedwork

For diffuse-only transfer, radiosity methods(e.g., 8� 4) canproducehigh-qualityimages.Combinedwith clustering24� 21

(HRC), hierarchicalradiosity12 can simulateradiosity forlargeenvironmentsrapidly. Weusesuchanapproachfor dif-fuselight transfer.

Much work has been done on global illumination in-cludingnon-diffuselight transport.In particular, severalex-tensionsto the radiosity algorithm have been developed(e.g., 14� 27� 23� 22� 3) which either useexplicit storagefor di-rectional information and/ora secondpassto incorporatenon-diffuse effects. Two methodsare particularly relatedto our approach:The PhotonMap approach15 and densityestimation29 which both useparticlesor photonsfor lighttransport.The photonmap relieson a relatively expensiveMonte-Carloray-castfor diffuse light gatheringand finalimagegeneration.Densityestimationusessophisticatedre-constructiontechniques,similar to thosewe will use,andinvolved meshdecimationtechniquesfor final representa-tion. However, thecomputationalandmemoryrequirementsof all theseapproachesarequitehigh,precludinginteractiveor near-interactive use.

Hardwareaccelerationandmulti-passmethodshave alsobeeninvestigated(e.g.,Diefenbachet al.5 and Stürzlingerand Bastos26). Theseapproachestend to be limited in thephenomenathey canhandlehowever, lackinggenerality.

Recently, researchershave turnedto ray-tracingbasedap-proachesto achieve interactivity. Examplesincludethepar-allel ray-tracingsystemof Parker et al.17 and the RenderCache28. As mentionedin theintroduction,theseapproaches

c�

TheEurographicsAssociationandBlackwell Publishers2001.

X. Granier andG. Drettakis/ IncrementalUpdatesfor RapidGlossyGlobal Illumination

suffer somewhat from limitations in imageresolution,vi-sualartifactsandin thetypeof lighting simulationthey canachieve.

As wewill discusslater, wewill useanspatialsubdivisionstructurefor dynamicupdates.Suchstructureshavebeenre-cently usedto further accelerateinteractive ray-tracingfordynamicscenes18. Wewill alsobeusingtexturesto representcausticor speculareffects.Theoriginsof this ideaareactu-ally quite old, sincesimilar ideashave beendevelopedbyHeckbertin his radiosity texturesapproach13, MyszkowskiandKunii16 andBastosetal.1 amongothers.

In what follows we useHeckbert’s13 regular expressionnotationfor light pathsandlight transport.L is usedfor thelight, E theeye,Sanon-diffusetransfer, D adiffusetransfer,while “*” representszeroor morebounces,“+” at leastonebounceand“ ” is the“or” operator. Thusfor exampleLD Earelight pathsleaving the light, bouncingoff zeroor morediffuseobjectsandarriving at theeye.Thesepathsarewelltreatedby radiosity. All possiblelight pathscanbedescribedby L � D S� E.

2.1. HRC, LSH and the unified method

As mentionedabove, we build on the line-spacehierarchy6

andtheunifiedalgorithmwe developedpreviously10, whichintegrateshierarchicalradiosityfor diffusetransferandpar-ticle tracingfor non-diffusetransfers.To facilitatecompre-hensionwe briefly overview the basicstructuresandalgo-rithmsof HRC,aswell asthesalientpointsof thetwo meth-odswe build on.

For diffusetransport,HRC startsby building a completehierarchyof elements, from input objects,to clusters of ob-jectshierarchicallygroupedinto arootclustercontainingtheentirescene.Light transfersbetweensuchelementsarerep-resentedby links, which areestablishedaccordingto a re-finementcriterion, thusrepresentinglight transferat anap-propriatelevel. After this refinementandconsequentsubdi-vision of surfacesasneeded,light is gathered acrosslinksat differentlevelsof thehierarchy, anda push-pullpassen-suresthat radiosityvaluesremainconsistentover theentirehierarchy.

Thelinks of aradiositysysteminduceasubdivisionof theline-spaceof thescene,following theflow of light betweensceneelements.DrettakisandSillion6 haveaugmentedlinkswith an explicit representationof all lines passingbetweentwo elementsvia a shaft11. Whenanobjectmoves,they ef-ficiently identify the links affected,andthe partsof the ra-diosity hierarchywhich aremodified,by hierarchicallyde-scendingin this line-space.This traversalpermitsefficientidentificationof the pathsin the hierarchywhich aremod-ified. Fast resolutionof the modified part of the systemisachieved,by restrictingpush-pullto thepartsof the hierar-chy which have beenmarked aschanged.We will usetheline-spacehierarchyto acceleratediffuselight updates.

In theunifiedlighting algorithm10, theclusterhierarchyisbuilt asin HRC. Eachlink is examined,andtherefinementprocessdecideswhetherto refinebasedon the chosencri-terion.A “gather” stepfollows, whereeachlink is checked:for links leaving diffuseobjectsandarriving onspecularob-jects,diffuseto speculartransfersareperformedby particletracing.Theuseof thelink structurerestrictsthenumberofparticlesemittedsinceonly a limited partof spaceis treated.This alsosubstantiallyacceleratesparticle tracing itself byaccuratevisibility classification.Particlesaresubsequentlypropagatedinto the environmentboth by reflectionandre-fraction,affectingotherregionsof thescene.

A full iterationof this processis completedby updatingthehierarchy. Particlesarefirst placedatanappropriatelevelin thehierarchy(on objectsor at subdividedelements).Thecontribution of particlesis thenaddedto thediffuselight atthe leavesof the hierarchy;all transfersto diffusesurfacesare thusrecorded.This canbe alsoconsideredasa recon-structionstepfor particles.In this mannerall L � D S� DElight transferis accountedfor.

Renderingis performedby reconstructingthe radiosityvaluesonafinegrid or usingthemeshsubdivision to gener-atetriangularelements.Specularpaths� L D � S� E to theeyemustthenbeaddedby ray-tracing.

3. Dynamic CausticTextures

The reconstructionof causticsaccordingto the subdivi-sion of hierarchicalradiosity as done in the original uni-fied method10 leadsto problemsfor complex scenes.Therepresentationof fine causticscontainingsignificanthigh-frequency detail, leadsto mesheswhich are highly subdi-vided. This implies an unacceptablememorycost,aswellasa highercomputationalcostfor global illumination solu-tions for all stepsinvolving hierarchytraversal(refinementandpush-pull).

To solve this problemwe decidedto usecaustictextureswhereneeded,similar in spirit to Heckbert13. This idea isclosely relatedto that of causticmapsof Wann Jensen15;nonetheless,we choosea representationlinkedto theobjectasopposedto anindependentspatialdatastructure.This al-lows directuseof graphicstexturehardwarefor display. Wealsoprovide automaticsolutionsfor a numberof importantparametersasdescribedbelow. It is importantto alsonotethat our goal is very different from that of Wann Jensen,sincewecreatesolutionswhichcansubsequentlybeviewedinteractively in walkthroughs,by integratingthestrengthsofHRC and particle tracing. In addition, our solution is dy-namic,sincewe will bemodifying the texturesduringuserinteractionwith thescene.

Thefollowing threeproblemsneedto besolvedfor caus-tic textures.Thefirst is thechoiceof whichrepresentationtouse:for low-frequency, “spreadout” illumination, therepre-sentationof theDS D transferscanbe achieved satisfacto-

c�

TheEurographicsAssociationandBlackwell Publishers2001.

X. GranierandG. Drettakis/ IncrementalUpdatesfor RapidGlossyGlobal Illumination

Figure 2: A dresserwith caustics.(left) constant(flat) reconstruction,(middle)reconstructedsmoothlyusingthe radiositymesh,(right) thesamesolutionreconstructedbycaustictextures.

rily by theHRC meshasin theoriginal unifiedalgorithm10.We thus develop a criterion to determinewhether to usethe meshor a texture. Second,if we decidethat a textureis required,we needto determineits resolution;we useavariance-basedapproachto achieve this. Finally, we needto reconstructthe illumination function beforecreatingthetexture usedfor display, andrestrict it to the part which isuseful.

Note that the useof caustictexturesdoesnot affect thelight transportresolutionproblemasperformedby theuni-form algorithm.Particlesarestill storedandintegratedintotheradiosityhierarchyasin theunifiedalgorithm10, andcon-tribute normally to the solution.The differenceis that thesurfacesaresubdividedmuchmorecoarselyandasaconse-quenceparticlesareoftenplacedhigherup in thehierarchy.Theresultis of coursefastercomputation.

The integrateduseof texturesin this context enablesthetreatmentof complex sceneswith involvedsecondaryglobalillumination, which also containmany secondaryspeculareffects suchas caustics.The restrictionof textures to thepartwhich is useful(seeSection3.3), furtherenhancesthiscapacity, sinceweonly build smalltextureswhereneeded.

3.1. Choiceof representation

Intuitively, wewill usetexturesif a largenumberof particleshave arrived on an object,andif they do not have uniformpower values.

After particle tracing, particlesare accumulatedon thehierarchyelements.We traversethe hierarchy, andat eachtop-level object (input polygonetc.),we know the numberof particleswhich have arrived. If this numberis above acertainthreshold(typically 10),we createa “pre-texture” orhistogram,which we useto evaluatewhetherit is appropri-ateto useacaustictexture.Thedimensionsof thehistogramaredeterminedby themethoddescribedbelow (Section3.2),whichis alsothemethodfor choosingthecaustictextureres-olution.

We accumulatetheparticleflux arriving at eachelement

of the histogram.Eachparticle p haspower φp. For a his-togramof dimensionn x m, the element(i � j) of the his-togramcontains:

p � i � j ��� ∑p ��� i � j �

φp

Atex � � n m� � ∑p ��� i � j �

φp n mAtex

(1)

whereAtex is theareaof the texture, p ��� i � j � denotesthatthepositionof particlep is in thetexel � i � j � andAtex � � n m�is the areaof a “pixel” of the histogram.For quadrilateralsAtex, is equalto theareaof thepolygon;for all otherobjectsaboundingquadrilateralis used.

We estimateuniformity of particlepower asfollows:

V � � pmin � pmax�pmax

(2)

wherepmax and pmin arethe maximumandminimum val-uesof thehistogram.Weusethefollowing testto determinewhetheror not to createa texture:

V � η (3)

whereη is auserdefinedthreshold,representingpercentac-ceptablevariation. If Eq. (3) is true, we do not createthetexture.

Theadvantageof usingcaustictexturescanbeseenimme-diately. ConsiderFig. 2, whereon theleft weshow acausticreconstructedon themeshof thedrawer andon theright weshow the sameresultusinga caustictexture.For the samenumberof particlesand the samequality unified solution,weshow a cleargainin visualquality.

3.2. Finding the caustictexture resolution

The choiceof caustictexture resolutionis critical, sinceithasdirect impacton memoryandcomputationcost,aswellasondisplayspeedandvisualquality. Choiceof caustictex-ture resolutioncanbe consideredaspart of the reconstruc-tion process.In essence,a largetextureresolutionrequiresalarge numberof particlesto obtain a low-noiseresult.Al-ternatively, we can considera low-resolutiontexture as asmoothingfilter, thusdiminishingnoise,but increasingbias.

c�

TheEurographicsAssociationandBlackwell Publishers2001.

X. Granier andG. Drettakis/ IncrementalUpdatesfor RapidGlossyGlobal Illumination

Figure3: (Left)Causticshownwithoutrestriction(right) therestrictedcaustic.Therestrictedregionsareoutlinedin white.

Building onthisidea,wedecideoncaustictextureresolutionusingvariancein densityestimationcontext, asdevelopedbyWalteret al.29.

If thefunctionweareestimatingis f , varianceis givenasfollows:

�x � Var � f � x�����

K2

n h2 f � x���

K2

n h2 (4)

whereK is thenormalizedkernel,n is thenumberof parti-clesandh is thesizeof thekernel.

Sincewe areon a finite texture, we take the sizeof thekernelto behalf thesizeof a texel:

h � 12

!1

22d � (5)

whered is theresolutionof the texture.We will choosetheresolutionsothatvarianceis lessthana giventhresholdε:

K 22d

n� ε " (6)

Thustheresolutiond is chosenasfollows:

d # ln � nεK �

2ln2 � 1 " (7)

Thevalueof K is aconstant29, dependingonthechosenker-nel. We usea box filter in our examples.The thresholdεis definedby theuser, andcanbe thoughtof asa “variancethreshold”.We typically usea valueof 1. This processcanbeappliedto bothdimensionsof thetexture.

3.3. Reconstructionand Restriction

If we decideto createa caustictexture,we first chooseitsresolutionasdescribedabove. We thenapplya reconstruc-tion processto createacaustictexturewhichwill beusedfordisplay. Again,we arein thecontext of a trade-off betweennoiseandbias.

We usea smoothingkernelsimilar to thatusedin photonmaps15. We first find the maximumvalueof the histogrampmax. For eachtexel we spiralout,accumulatingparticlesinanauxiliary buffer p$ asfollows:

p$ � i � j �%� ∑r & R p � i � j �N

(8)

where R is a maximum permitted radius, r is the cur-rent radius,and N is the numberof texels under the ker-nel used.However, this accumulationis terminatedif thep$'� i � j �(# pmax.

Constructinga textureon an entireinput surfacesuchasa polygoncanoften be wasteful.Considerfor examplethecaseshown in Fig. 3, whereonly small regionsof the wallandthedressertop arelit by thereflectionfrom thecausticsandspecularreflectionsdue the spot light off the specularring. Instead,we can restrict the texture to the part of thesurfacewhich is actuallyaffectedby thecaustic.

To do this, we use the maximum texture value as ex-plainedabove.Westarttraversingthetextureuntil we find avaluewhich is at leastaslargeasa percentageof themaxi-mumdefinedby theuser(typically between1-5%).Wethenflood fill the texture for aslong aswe areabove this value.This processgivesus the maximumandminimum 2D tex-ture coordinatesin which “valid” causticvaluesexist. Weusetheseto constructa boundingbox,andthenrecreatethetextureusingthesameresolution,but limited to this region.If multiple regionsexist on a surface,we restarttheprocessat thepointwepreviouslystartedaccumulation,aftersettingall pixelsalreadycollectedto zero.

The result of the restriction is evidently higher qualitycausticsfor the sametexture resolution.This can be seenin Fig. 3(right) on thewall.

4. Incr ementalParticle Tracing

An importantgoalof ournew approachis to restrictthenum-ber of particlestracedwhen moving an object, to achieverapid updates.In the original unified algorithm10, all parti-cleswerere-shotduringobjectmotion.While this is a feasi-blesolutionfor smallscenes,it quickly becomesimpracticalfor evenmoderatelycomplex environments.To achieve fastor even interactive updates,we first usethe line-spacehier-archyfor incrementalupdatesof the diffuse transport,andthenrestrictthenumberof particleswhicharere-sentduringobjectmotion.

As with diffusetransfer, thedirecteffect of objectmotionon speculartransfercanbe limited in space(althoughlesssothanfor diffuse).Theideais to find all theparticlepathswhich areaffectedby objectmotion,andonly re-emitthese

c�

TheEurographicsAssociationandBlackwell Publishers2001.

X. GranierandG. Drettakis/ IncrementalUpdatesfor RapidGlossyGlobal Illumination

particles.Wehavechosento achieve thisefficiently usinganadaptive spatialdatastructure,i.e., anoctree.We will storereferencesto links in theoctree,from which we canrecon-structtheparticlepaths.

4.1. Dynamic Octreeand Initialization

Initially, theoctreeis empty. Whenanobjectis selectedformotion (“dynamic object”), we subdivide the octreecellsaroundit upto amaximumdepth.Theoctreeis thusadaptedto themotionandthepositionof thedynamicobject.This isillustratedin Fig. 4.

Figure 4: (Left) TheOctreein initial position(Right)Octreeaftermovement.Noticesimplificationfor thepreviousobjectposition.

During particletracing,links areinsertedinto theoctree.For eachoctreecell, we maintaina hashtable,indexed byreceiver elementr on which the link is stored,andthe linkl . For theinitial particledirection,andevery subsequentre-flectedor refractedparticle,we find the cells of the octreeaffected.The link in questionis then insertedin the hashtablesof the correspondingcells. Evidently, we only con-siderlinks which involve a diffuseto specular(DS ) trans-fer. Whenaccessingthehashtablesto identify links affectedby movement,the additionalelementkey permitsimmedi-ateidentificationof theelementaffected,which is requiredto remove thepreviousparticleinformationandperformre-emission.It alsosavesmemorysincewedonothaveto storetheelementexplicitly.

4.2. Incr ementalUpdate

For a given movementof an object,we know the previousand new positions.The dynamicobject is re-insertedintothe octreein the new position. The octreeis traversedtoperform this insertion,and eachcell is marked either un-affected,changedto contain the object, or changedto nolongercontaintheobject.If a cell containedtheobjectpre-viously, but no longercontainsit, its childrenaresimplified(seeFig. 4(right)).

For changedcellswe collect the links in thecorrespond-ing hashtables.For eachsuch link, we remove the parti-clesandtheir contributionontheelementsaffected.A chainof elementsis maintainedwith eachparticle,andtheparti-cles are removed from all following elementswhich were

affectedby reflection(s)and/orrefraction(s)of this particle.The particlesassociatedwith this link are thenre-emitted,andtheelementsmarkedaschanged.As is thecasefor thediffuseline-spacehierarchy(seeSection2.1and5),wemarkthepartof the line-spacehierarchyaffectedaschanged.Asa result,during push-pullradiosityvaluesareupdatedcon-sistently. Recall that only part of the hierarchyis updated.To obtainsecondaryeffectsdueto DS D transfer, multiplegather/push-pullstepsmustbeapplied.

4.3. Interacti ve Updatewith Quality Degradation

Despitean order of magnitudespeedupcomparedto re-runningtheentiresolution,theupdateratesfor thesolutionpresentedabove arestill quite high (around20 secondsforthe indoorscene).To achieve quasi-interactive rateswe canlimit thenumberof particlesre-emittedduringmotion,withsomelossin quality.

During motion, we keeptrack of all links which shouldbeupdated,but only re-emita small,user-controllableper-centageof them.Whenmotionstops,we simply re-emitallparticleswhich were collectedduring the motion, but notemitted.Theresultsof anexampleareshown in Fig. 5.

5. Impr oved Incr ementalDiffuse Solution

As mentioned in Section 2.1, we use the line-spacehierarchy6 to perform rapid incrementalupdatesfor dif-fuseillumination.Wehavenonethelessintroducedafew im-provementsto thatapproach.

One problemwith the original methodwas the require-mentthat shaftsbe computedandstoredfor the entirelinkhierarchy. Thisproblemwasalsoidentifiedby Schoeffel andPomi19, whousedapredictionapproachto limit theprecom-putation.

Wesimplydonotstoreshafts.Weusetheline-spacecod-ing usedin9, which doesnot requirethenumberingschemeof theoriginalapproach6, andtraversethehierarchyby keep-ing track of the receiver andsenderelementsof the links.During this traversalwe maintaina list of potentialblock-erscreatedby theshaft-cullingprocess.Shaftsarethusbuiltincrementallyonly on the list of currentpotentialblockers,making the operationmuch cheaper. The memorysavingsarevery significant,sincethestorageof all shaftsresultsina prohibitive memoryoverhead,and rendersthe approachinappropriatefor complex scenes(see19 for analysisof thememoryrequirementsof LSH).

Anotherdrawbackof theoriginalline-spaceapproachwasthat when treatingclusters,irradiancehad to be “immedi-atelypushed”down to thesurfaces.This resultsin multiplehierarchytraversals,with consequentcomputationoverhead.Instead,we maintaina list of theaddandremove irradianceoperationsat the level of the link being modified.Duringpush-pullwe accumulatetheselists which arepusheddown

c�

TheEurographicsAssociationandBlackwell Publishers2001.

X. Granier andG. Drettakis/ IncrementalUpdatesfor RapidGlossyGlobal Illumination

Figure 5: (Left) Initial position with good quality shadow. (Middle) two intermediatepositionsduring degraded quality motion at 3-4sec/frame. (Right)Motion hasended,20secondslater weobtainthequality shown,equivalentto normalupdates.

Figure6: Indoors scene. (a) Bedroom,with causticsover thetwo chestof drawers dueto spotlights(lower right), andthecausticsdueto thereflectionof sunlightfromwindow(top) throughthemirror (right) onto thewall anddresser(bottom).(b) Living room,reflectionof sunlightoff themirror (unseenat thelower left). (c) Bathroom,causticsdueto themirror abovethesinkon theleft wall. All imageshardware renderedwith theRenderCache28 for speculareyepathpixels.

thehierarchy, andtheadd/remove operationsareperformedin place,avoidingmultiple hierarchytraversals.

6. Implementation issues

6.1. Caustic TextureRendering

To renderthe caustictextureswith the illumination repre-sentedin the mesh,we use two passes.The textures aremappedon the input level object,for exampletheunsubdi-videdinputpolygon.For agiveninputpolygon,wefirst dis-ablethedepthwriting andrenderatexturedpolygonfor eachcaustictexture.Wethenrenderthesubdividedsub-polygonswith thecorrectilluminationvaluesin astandardfashion,byblendingthe values.The blend function usedis GL_ADD,giving the desiredresult. This allows us to renderan un-limited numberof causticsfor a polygon.

For restrictedtextures,we usethe GL_CLAMP textureparameterandsetthebordercolor to zeroto avoid therepe-tition of thelastpixel color.

6.2. Caustic textureparameterization

To createcausticstextures,we transformthe 3D particleimpact to a 2D texture coordinate.We usean implicit 2D

)0 "*" 1+ x ) 0 "," 1+ parameterizationfor eachobjecttypein oursys-

tem(polygon,sphere,cone,cylinder).

For restrictedtextures we use a matrix transformation,mappingthenew positionsof therestrictedtexturelimits tothe interval

)0 "," 1+ , thusallowing directmappingfrom parti-

cle3D coordinatesto therestricted2D texturecoordinates.

7. Results

We have testedour approachon two scenes,oneof an inte-rior includingartificial lightsandreceiving sunlightthroughthewindows,andoneof anoutdoorsscenein which indirectnon-diffusereflectionsprovide dominantillumination.

The interior sceneis a cabinwith threerooms,the bed-room,thebathroomandtheliving room(Fig. 6). Whentes-sellatedby a traditional radiosity program,the scenecon-tainsapproximately180,000polygons.Weusetheapproachdescribedin10, which recognizeshigh-level primitives,suchasspheresandcylinders.Thereareabout4,000suchinitialobjects,while aftersubdivision thereareabout60,000sub-dividedelements.Theglobal illumination solutionincludesseveral causticsdueto lights in the roomsandearly morn-ing sun light from the window. Imagesof the threeroomsof thehouseareshown in Fig. 6, wherewe canseethatsev-eralspecularreflectionsandcausticsexist in differentrooms.

c�

TheEurographicsAssociationandBlackwell Publishers2001.

X. GranierandG. Drettakis/ IncrementalUpdatesfor RapidGlossyGlobal Illumination

Scene ITTC TNP OM

Cabin 35mn44s 1,600,000 370KBOutdoors 1h19mn 800,000 2.3MB

Scene UT PT PPT

Cabin 14.5s 0-97,000 0-6%Outdoors 96s 5,700-41,000 0.8-17%

Table 1: ITTC: initial time to convergence. TNP: total numberofparticles,OM: memoryusedby octreeUT: average updatetime tomovean object(container/car).PT: particlestracedduring an up-date, PPT: percentage of total particles.

Thesespecularreflectionsarecreatedthroughtheunifiedhi-erarchicalradiosity/particletracingapproach.

To achieve convergence(i.e.,whenthelevel of energy nolongerchanges),our systemrequired6 iterations,for a totalof 35 minutesand 44 seconds.The total numberof parti-clestracedto createthissolutionwas1.6million. Weuse25causticstexturesfor speculareffectswith anaveragesizeof85x85pixels.

Wetranslatethecylindrical containerontopof thedresserin thebedroom,sothatit will move into thereflectionof thesun due to the mirror. Four positionsof the containerareshown in Fig. 7. The updatetimesandnumberof particlesretracedareshown in thefigure.

As we cansee,thenumberof particlesretracedis around3-4%of thetotalnumberin thescene,resultingin morethanan order of magnitudespeedupcomparedto the completesolution.As aconsequencewecanmovetheobjectataround20 secondsper frame,comparedto the 35 min. neededtocompletelyrecomputethesolution.

Detailedresultsareshown in table1.Theadditionalmem-ory usedby theoctreeis 370Kb. Note thaton averageonly3% of theparticlesarere-emitted,andthatwe usea modestamountof memoryfor theoctreestorage.

Thesecondexampleis anoutdoorsscene,shown in Fig.8.The sunis on the left, shineson the metalbuilding on theright, whichcreatesthebrightshapesontheleft-handbuild-ing andon the street.A car drivesbetweenthe two build-ing, castingtheshadow seenon theleft. Thescenecontains47,000initial polygons,and 118,000subdivided polygonsaftertheglobalilluminationsolution.

Convergenceof the initial solution took 1h19mn,with800,000particlesat eachiteration.In Fig. 9 we seefour po-sitionsof thecarandthemoving shadow asa consequence.Updatetimesandnumberof particlesareshown in this fig-ure.Notethat in this case,thediffuseupdateis dominantintheupdatetime,dueto thelargenumberof links createdbyour refiner.

It is important to note that all the images presented

here are renderedusing hardware accelerationfor view-independentlightning part, combined with the Render-Cachefor the view-dependantpart,andthusonecaninter-actively walkthroughthe results.When moving objects,itis necessaryto carefully handlethe costof re-creatingdis-play lists andreconstructingillumination. Interactivity canbe maintainedfor the most part if the changesare localenough.

8. Conclusions

We have presenteda new approachfor rapid updatesofglobalillumination in complex scenes,includingcausticandspeculareffects.

We first showed how to separatethe reconstructionofhigh-frequency specularphenomenasuchas causticsfromthereconstructionof theslowly varyingdiffuseillumination,usingcaustictextures.Automaticmethodswerepresentedtodeterminewhento prefer the texturesover the mesh-basedreconstruction,to choosethe resolutionof the texturesandto performappropriatereconstruction.

We next presenteda novel approachto restricttherecast-ing of particlesduringincrementalupdatesin thescene.Weuseanefficient octreestructurewith referencesto the linkswhich generatethe particlesto identify thosewhich moveefficiently. It is thuspossibleto updatetheglobal illumina-tion solutionvery rapidly (for examplein 20 secondsfor asolutionrequiring35minutesto solve theentiresystem).

Finally, we developedanquasi-interactive methodwhichdegradesquality, but achievesmuchfasterupdates,permit-ting rapidpositioningof objectsincludingspecularandcaus-tic effects(3-4secondsperframe,againfor asolutionwhichinitially required35 minutes).

Onedrawbackof ourapproachis thatwehave introducedanumberof user-controlledthresholds,whichshouldbeau-tomaticallychosenby thesystem.Althoughthedefault val-uesof thesethresholdswork well for the scenestested,amore consistentapproachwhich adaptsto different inputscenesis clearlydesirable.Theabundanceof texturemem-ory andmultitexturinghardwareonPCplatformsclearlyar-guesin favour of alsorepresentingshadows by texturesinthespirit of Myszkowski andKunii16, eitherwith theconvo-lution approachof SolerandSillion25 or someothershadowgenerationmethod.Again,aconsistentmethodologyfor do-ing thisshouldbedeveloped.

Finally, we areinvestigatinga moresophisticateddisplayapproachto consistentlyhandletheuseof polygonsandtex-tures,and the book-keepingrequiredto keep track of thepartsof thehierarchywhicharemodifiedor not.

References

1. R. Bastos,M. Goslin,andH. Zhang.Efficient radiosityrenderingusingtexturesandbicubicreconstruction.In

c�

TheEurographicsAssociationandBlackwell Publishers2001.

X. Granier andG. Drettakis/ IncrementalUpdatesfor RapidGlossyGlobal Illumination

19s/47,000part. 19s/47,000part. 20s/47,000part. 22s/57,000part.

Figure7: Four positionsof thecontaineron thedresserin thebedroom,theupdatetimesareshownbeneatheach image. Notetheincreaseinbrightnesson thecontainerandthemoving shadowbehind

Figure8: Outdoors scene(47,000polygons).Thesunlightcomesfromtheleft andthebuilding on theright hasspecularwalls.

Michael CohenandDavid Zeltzer, editors,1997Sym-posiumonInteractive3D Graphics, pages71–74.ACMSIGGRAPH,April 1997.

2. S.E. Chen.Incrementalradiosity:An extensionof pro-gressive radiosityto aninteractive imagesynthesissys-tem. In ComputerGraphics(SIGGRAPH’90 Proceed-ings), pages135–144,August1990.

3. S. E. Chen, Holly E. Rushmeier, G. Miller, andD. Turner. A progressive multi-passmethodfor globalillumination. In ComputerGraphics(SIGGRAPH’91),volume25,pages165–174,July1991.

4. M. F. Cohen,S.E.Chen,J.R.Wallace,andD. P. Green-berg. A progressive refinementapproachto fast ra-diosity imagegeneration.In ComputerGraphics(SIG-GRAPH88), volume22,pages75–84,August1988.

5. P. J. DiefenbachandN. I. Badler. Multi-passpipelinerendering:Realismfor dynamicenvironments. 1997Symposiumon Interactive3D Graphics, pages59–70,April 1997.

6. G. DrettakisandF. Sillion. Interactive updateof globalilluminationusingaline-spacehierarchy. In Proc.SIG-

GRAPH’97, Annual ConferenceSeries,pages57–64,August1997.

7. D. W. George,F. X. Sillion, andD. P. Greenberg. Ra-diosity redistribution for dynamicenvironments.IEEEComputerGraphicsandApplications, 10(4),July1990.

8. C. M. Goral, K. K. Torrance,D. P. Greenberg, andB. Battaile. Modelling the interaction of light be-tweendiffuse surfaces. In ComputerGraphics(SIG-GRAPH’84), volume18,pages213–222,1984.

9. X. GranierandG. Drettakis.Controllingmemorycon-sumptionof hierarchicalradiositywith clustering. InGraphicsInterface, pages58–65,June1999.

10. X. Granier, G.Drettakis,andB. Walter. Fastglobalillu-minationincludingspeculareffects. In 11thEG Work-shop on Rendering, "Rendering Techniques 2000",pages47– 59.SpringerWien,2000.

11. E. A. HainesandJ. R. Wallace. Shaftculling for effi-cient ray-tracedradiosity. 2nd EG Workshopon Ren-dering (Photorealistic Renderingin ComputerGraph-ics), 1994.

12. P. Hanrahan,D. Salzman,andL. Aupperle. A hierar-

c�

TheEurographicsAssociationandBlackwell Publishers2001.

X. GranierandG. Drettakis/ IncrementalUpdatesfor RapidGlossyGlobal Illumination

71s/11,000part. 93s/23,000part. 136s/139,000part. 114s/24,000part.

Figure9: Four positionsof thecar in theoutdoors scenes.Updatetimesandparticlesusedareshownbeneatheach image. Notetheincreasein brightnessof thecar andthemovingshadowof thecar ontothefloor on theleft.

chicalradiosityalgorithm.In ComputerGraphics(SIG-GRAPH’91), volume25,pages197–206,July1991.

13. P. S. Heckbert. Adaptive radiosity texturesfor bidi-rectional ray tracing. In ComputerGraphics (SIG-GRAPH’90), volume24,pages145–154,August1990.

14. D. S. Immel, M. F. Cohen,and D. P. Greenberg. Aradiositymethodfor non-diffuseenvironments. Com-puter Graphics(SIGGRAPH’86), 20(4):133–142,Au-gust1986.

15. H. Wann Jensen. Global illumination using photonmaps. In 7th EG RenderingWorkshop,"RenderingTechniques’96", pages21–30.SpringerWien,1996.

16. K. Myszkowski andT. L. Kunii. Texturemappingasanalternative for meshingduringwalkthroughanimation.In PhotorealisticRenderingTechniques, Eurographics,pages389–400.Springer-Verlag,1994.

17. S.Parker, W. Martin, P-PJ.Sloan,P. Shirley, B. Smits,andC.Hansen.Interactiveraytracing.1999ACM Sym-posiumon Interactive 3D Graphics, pages119–126,April 1999.

18. E. Reinhard,B. Smits,andC. Hansen.Dynamicaccel-erationstructuresfor interactive ray tracing. In 11thEG Workshopon Rendering, "RenderingTechniques2000", pages299–306.SpringerWien,2000.

19. F. Schoeffel andA. Pomi. Reducingmemoryrequire-mentsfor interactive radiosityusingmovementpredic-tion. In 10thEG Workshopon Rendering, "RenderingTechniques’99". SpringerWien,1999.

20. E. Shaw. Hierarchicalradiosity for dynamicenviron-ments. ComputerGraphics Forum, 16(2):107–118,1997.

21. F. X. Sillion. A unified hierarchicalalgorithm forglobal illumination with scatteringvolumesandobjectclusters. IEEE Trans.on Visualizationand ComputerGraphics, 1(3):240–254,September1995.

22. F. X. Sillion, J.R. Arvo, S.H. Westin,andD. P. Green-berg. A global illumination solution for generalre-

flectancedistributions. In ComputerGraphics (SIG-GRAPH’91), volume25,pages187–196,July1991.

23. F. X. Sillion andC. Puech.A generaltwo-passmethodintegratingspecularanddiffusereflection.In ComputerGraphics(SIGGRAPH’89), volume23,pages335–344,July1989.

24. B. Smits, J. Arvo, and D. P. Greenberg. A cluster-ing algorithm for radiosity in complex environments.In Proc. SIGGRAPH’94, Annual ConferenceSeries,pages435–442,July1994.

25. C. Soler and F. X. Sillion. Texture-basedvisibilityfor efficient lighting simulation.ACM TransactionsonGraphics, October2000.To appear.

26. W. StürzlingerandR. Bastos.Interactive renderingofglobally illuminated glossyscenes. In 8th EG Work-shoponRendering, "RenderingTechniques’97", pages93–102.SpringerWien,1997.

27. J.R.Wallace,M. F. Cohen,andD. P. Greenberg. A two-passsolutionto therenderingequation:A synthesisofraytracingandradiositymethods.In ComputerGraph-ics (SIGGRAPH’87), volume21, pages311–320,July1987.

28. B. Walter, G. Drettakis,andS. Parker. Interactive ren-deringusingthe rendercache. In 10th EG Workshopon Rendering, "Rendering Techniques’99". SpringerWien,June1999.

29. B. Walter, P. M. Hubbard,P. Shirley, andD. P. Green-berg. Globalilluminationusinglocallineardensityesti-mation.ACM Trans.onGraphics, 16(3):217–259,July1997.

c�

TheEurographicsAssociationandBlackwell Publishers2001.