BoundedClustering{ FindingGoodBoundsonClusteredLightTransport MarcStamminger,PhilippSlusallek,andHans-PeterSeidel ComputerGraphicsGroup,UniversityofErlangen fstamminger,slusallek,seidelg@informatik.uni-erlangen.de Abstract Clusteringisaveryecienttechniquetoapplyniteelementmethodstothecomputationofradiosity solutionsofcomplexscenes.bothcomputationtime andmemoryconsumptioncanbereduceddramatically bygroupingtheprimitivesoftheinputsceneintoa hierarchyofclustersandallowingforlightexchange betweenalllevelsofthishierarchy.however,problems canariseduetoclustering,whengrossapproximations aboutacluster'scontentresultinunsatisfactorysolutionsorunnecessarycomputations. Intheclusteringapproachfordiuseglobalilluminationdescribedinthispaper,lightexchangebetweentwo objects patchesorclusters isboundedbyusing geometricalandshadinginformationprovidedbyevery objectthroughauniforminterface.withthisuniform viewofvariouskindsofobjects,comparableandreliable errorboundsonthelightexchangecanbecomputed, whichthenguideastandardhierarchicalradiosityalgorithm. 1.Introduction Computingtheglobalilluminationofavirtualworld isstilloneofthemostchallengingtasksincomputer graphics.signicantsuccesshasbeenachievedincomputingdirectionallyindependentradiositysolutions, suchthatlightingsimulationscannowbecomputed inreasonabletimeevenforcomplexenvironments. Amajorbreakthroughforradiositymethodswasthe introductionofclustering,whichextendstheideaofhierarchicallycomputinglightexchangebetweenobjects intheenvironment.thisresultedinareducedcomputationalcomplexityofo(n)oro(nlogn)compared tothequadraticnatureoftheoriginalalgorithm.for earlyhierarchicalalgorithms[6,5]thisspeedupwas restrictedtoadaptivesubdivisionofinputprimitives. Incontrast,clusteringalgorithmsgroupallprimitives intoasinglehierarchyofclusters,whichconsistofother clusters,surfaceelements,orsubdivisionsthereof.applyingthesameideaofadaptivesubdivisiontothis uniedhierarchyextendsthespeeduptothecomplete scene[16,2,13,4,1]. Therearetwomajorissueswithanyhierarchical method:thedesignofanecientrenerfortheadaptivesubdivisionandofanaccurateestimatortocomputetheactualinteractioncoecients.therenerapproximatestheerrorthatwouldresultbyperforming thelightexchangeonaparticularhierarchylevel.if thaterrorisconsideredunacceptable,oneorbothof theinteractingobjectsaresubdividedandthelightexchangebetweentheirsubdivisionsisconsideredrecursively.iftherenerissatised,thetaskoftheestimatoristocomputeagoodestimateoftheexactlight exchange. 1.1. The Goal of Clustering Thebasicpropertyofeachclusteringalgorithmishow acluster'sradianceeldisrepresented.inorderto handleclustersmoreeciently,usuallyverycrudeapproximationsaremade,suchasneglectingintra-cluster visibility,assumingisotropicscatteringbythecluster, uniformdistributionoftheobjectsinacluster,orneglectingthespatialextentofaclusterandapproximatingitbyapoint.anyoftheseassumptionsis justiedandusefulinordertoecientlyhandleclusters,butitisimportantthattherenerknowsabout theusedsimplicationsandguidestherenementsuch thatartifactsduetothesimpliedviewofaclusterare avoidedbyearlysubdividingsucherrorproneinteractions.atthesametimewewanttoavoidunnecessary renement,whichwouldresultinincreasedcomputationtimes. 1
Thepointisthatawayhastobefoundtogetcomparableandreliableerrorapproximationsofinteractions betweenarbitraryobjects,eitherclustersorpatches. Thisalsomeanstohaveonesingleerrorthresholdparameterforallkindsofinteractions,makingthealgorithmeasytouse.Itiswellworthtospendmoretime inagoodclusteringrener,becauseeveryunnecessary subdivisionthatisavoidedsavessignicantcomputationtime,andamissingnecessaryrenementcanlower thesolutionquality. 1.2. Previous Work Intheoriginalhierarchicalradiositymethodandmany ofitsderivations,theestimatedamountoftransported light,i.e.exitantlightatthereceiverinduceddirectly bythesender,isalsousedfortherener,i.e.the amountoftransportedlightisusedaserrorapproximation[6]. Averyfastmethodtocomputeinteractionsbetween clustersispresentedin[13],whereclustersareapproximatedbyisotropicvolumetricobjects.again,the errorisestimatedbyconsideringonlytheamountof transportedlight.inpracticetheunderlyingassumptionofisotropicbehaviorofaclusteroftenleadsto strongartifactsandtheanisotropyofaclusterisnot measuredbytherenerinordertoguiderenement properly.however,theoracleandformfactorcomputationdonotdierentiatebetweenpatchesandclusters andevenvolumetricobjectscanbehandledeasily.in [15]theisotropyassumptionisliftedbyusingspherical harmonicstorepresenttheanisotropicradiancedistributionofacluster. Abetterrenerwouldestimatetherangeofilluminationvaluesonthereceiverduetothesender[16,9].If theilluminationonthereceivingobjectvariesstrongly, senderand/orreceiverhavetobesubdivided.rening thereceiverdecreasestheerrorbyallowingforamore accuraterepresentationofillumination,whereasare- nementofthesenderimprovestheaccuracyofthe computedlightexchangebyreducingthesolidangle accountedforbyasingleinteraction. Conservativeboundsrestrictedtotheinteractionof surfacepatchesaredescribedin[9],butrequirecomplexgeometriccomputations.anextensiontoclusters seemsdicult.smitsetal.[16]estimateanupper boundontheformfactorintegrandbystochastically samplingtheintegrand.theobtainedupperboundis mostlytoopessimistic,becausetheintrinsicproperties ofaclustersuchasself-occlusionarenotaccountedfor. Christensenetal.[2,1]extendedtheclusteringapproachtoglossysurfaces.Theyalsouseconservative boundsontheinteractionbetweentwoclusters.however,sinceinthisapproachclustershavebeenapproximatedaspointstheseboundsareactuallynotconservativewithrespecttotheoriginalclustersthathave niteextent.therenerdoesnotaccountforthisfact either. Finally,in[4],deterministicsamplingatthereceiveris usedfortherener.forpatch-to-patchinteractions, theilluminationforsomesamplepointsatthereceiver iscomputedanalytically,whichisonlypossibleforvery fewtypesofsendinggeometries(e.g.polygons),andthe variationofilluminationvaluesisusedasrenement criterion.thisrenerperformsextremelywell,especiallyforpartiallyoccludedinteractions.nevertheless, itisasamplingapproachwithalltheproblemsthat canarisefromsampling.furthermore,amethodto analyticallycomputeilluminationisnotavailablefor clusters,whichmakesauniedviewtodierentkinds ofobjectsdicult.theauthorsusetheisotropicclustermodelofsillionetal.[13]withananisotropycorrection.intra-clustervisibility,thatisvisibilityofobjects insideaclusterwithrespecttothecluster'senvironment,isalsoconsideredseparately.theseareallvery usefulimprovements,buttheyallmakeacleardistinctionbetweenpatchesandclustersbyusingcompletely dierenttechniquesforallkindsofinteractions. 1.3. The New Approach Inthispaperwepresentaclusteringalgorithmthat usesauniedviewofobjectsparticipatingintheradiositycomputationofavirtualworld.everycluster isnotonlyseenasasetofindividualpatches,butasa newentitywithnewintrinsicproperties. Let'sconsiderthesceneinFig.1asanextremeexample:Thebookhasbeenmodeledasacluster,containinghundredsofhighlyreectivesurfaces,oneforeach page,allwrappedinadarkcover.additionally,we haveabrightlightsourcethatemitsalargeamountof lightintoasmallconeofdirectionsnotcontainingthe book. Ifwesimplyconsiderbothobjectsasasetofsurfaces, weseeabookwithmanylargeandhighlyreective patches,illuminatedbyabrightlightsource.this pointofviewwillforceboththerenerandtheestimatortodrasticallyoverestimatetheamountoflight exchange.consideringthebookandthelampasdistinctobjectsinitself,allowsustocorrectlyconsider thebookashavingaverylowreectivitywithrespect toitsoutsideandtoestimatelittledirectillumination
onthebookduetothelamp. Modelingeachclusterasadistinctentityallowsto Figure 1. Desk scene: Almost no light is erties,wecanthenreasonabouttheinteractionbe- computeitsintrinsicproperties.basedontheseprop- exchanged between lamp and the book. Most clustering algorithms overestimate this soningisbasedoncomputingupperandlowerbounds tweenclusters.inthepresentedapproach,thisrea- light exchange. usedtocomputethesevalues. Thealgorithmisacontinuationofworkpresentedin onthelightexchangeandeachoftheindividualterms patchobject.asaresult,themoregeneral,butalso ter'sbehaviourdiersstronglyfromthatofanordinary handlearbitrarilyshapedsurfacesfordiuseradiositycomputations.however,itturnedoutthataclus- [18],whereasimplerapproachisusedtouniformly morepowerfulalgorithmdescribedinthefollowingwas integratedwithourapproach.ouraimwastogeta MostofthetechniquesdescribedinSection1.2canbe patchesaswellasforclusters. developed,whichiswellsuitedforplanarandcurved localinformationoneachinteractingobject. globalilluminationcomputationsandhowtheglobal lighttransfercanbecomputedecientlyusingthis clusterorwhatever mustprovidetoparticipatein clearnotionofwhatinformationanobject polygon, senderandthereceiverrespectively.pandqcanbe 2.Notation stanceabox,oraclusterofotherobjects.forevery aplanarorcurvedpatch,acompositeobjectasforin- TwointeractingobjectsarecalledPandQ,forthe objectpointp,asurfacenormaln(p)andareectance ectioninthispaper.directionsaredenotedas!,a value(p)aredened,i.e.weonlyconsiderdiuserewhicharefront-facingwithrespectto!areofinterest forsingle-sidedsurfaces.wedenotethissetoffront Ifweconsideracertaindirection!,onlyobjectpoints rayisdescribedbyapointandadirection(p;!). Becauseweareinterestedininteractionsoftheobject tionv(p;!),wherepisapointonpand!isadirection. withitsenvironment,wedenealocalvisibilityfunc- facingpointsonanobjectpasf(p;!)(seefig.2a). Thevalueofv(p;!)isone,ifpisfront-facingwithrespectto!(p2F(P;!))andtheray(p;!)doesnothijectpointspareofinterestforwhichv(p;!)=1.We Pforanyrayparameter>0.Otherwise,itsvalueis Furthermore,wecalltheratioV(P;!) zero.forinteractionsindirection!onlythesetofob- denotethissetofvisiblepointsasg(p;!)(seefig.2b). objectthatcanactuallyinteractwiththeenvironment describesthefractionoffront-facingpointsonan thelocalvisibilityofobjectpindirection!.it jjg(p;!)jj=jjf(p;!)jj(forsomemeasurejj:jj) = objects. Forourpurpose,anotherbasicpropertyofanobjectP indirection!(seefig.2c).vequalsoneforconvex Thisdenitiontakesintoaccountself-occlusionand canformallybewrittenas G(P;!)ontoaplaneperpendicularto!(seeFig.2d). deneaastheareaoftheprojectionofallpointsof isitsprojectedareaa(p;!)inagivendirection!.we A(P;!)=ZG(P;!)cos(n(p);!)dp =ZPcos(n(p);!)v(p;!)dp: (1) jects,wehavetoconsiderthecompletesetofraysfrom Inordertocomputetheinteractionbetweentwoob- (2) rayscanbesignicantlylargerthantheoriginalsetof easier,weconsiderthesetofalldirectionsofthese raysandlaterexamineallincomingoroutgoingrays withoneofthedirectionsin.notethatthissetof pointsonasenderptoareceiverq.tomakethings allconnectingrays,becauseeverydirectioninisnow facingpointsforanyofthedirectionsin.g(p;), allowedateveryreceivingpoint. A(P;)andV(P;)aredenedanalogously.Further- Furthermore,wedeneF(P;)asthesetoffrontmore,wedeneL(P;)and(P;)asthesetofradianceandreectancevaluesforallpointsinG(P;). Forthepurposeofthefollowingalgorithm,wedo Finally,thesetofcosinevaluesbetweenthesurface normalsofanobjectpandisdenotedascos(p;). tiontotheexpectedvalue.wealsodenotethesevalues (min;exp;max),whereminandmaxareupperand lowerboundsonthesetsandexpisanapproxima- notwanttocomputeanexactrepresentationofthese sets.instead,wecomputerangedescriptionshsi=
points:f(p;!) (a) Front-facing (b)visiblepoints: G(P;!) (c)localvisibility: V(P;!) (d)projected area:a(p;!) V=1 ω ω ω V= 1 / 3 multiplicationanddivisiononthemin/max-valuesis aproperapproximation.thedenitionofaddition, thatofintervalarithmetic[10].usingintervalarithmeticforourcomputationsiscertainlynotoptimal. algorithmdescribedbelowshouldbeeasytotransform. WeareoptimisticthatusingAneArtihmetic[3]insteadmayresultinbetterrangecomputations,asithas asbsc,[s]anddse.inthissense,\computinghsi" meansndinganupperandalowerboundonsand Figure 2. Definition functionsf,g,vandaof object under direction!. betweentwoobjectscanbecomputedusingtheabove Inthefollowing,wedescribehowthelighttransport beenshownforotherrenderingapplications[8,7].the andreceiverhaveboundingboxesbpandbq,theset aboutthespatialextentofanobjectviaabounding volume,mostlyanaxis-alignedboundingbox.ifsender Usually,renderingsystemscanprovideinformation 3.1. ofallconnectiondirectionsfromptoqcanbelimitedbyanewboundingboxbpq=bp BQ,so Bounds on Directions Distances rectionsofallconnectingraysofthesenderptothe denitions.westartbycomputingtherangeofdi- receiverq.usingthisrangeofdirections,wedetermine tondtherangeofincidentradiancearrivingatthe thelightleavingthesendingobjectandtherangeof isbydeningaconeofdirectionswithamainaxisand Amorecommonwaytodescribesuchasetofdirections (seefig.3). canbeboundedbyhibox=f!j9>0:!2bpqg receiver. tocomputetherangeofsolidanglesofthesenderwith thesender'sprojectedareavalues.thelatterallows respecttothereceiver.finally,theserangesareused muchlargerthannecessary,bothdescriptionsofare boundhiconecanbeseeninfig.3.thecomputation rangedescribedbyaconeiseasiertohandle,butoften amaximumdeviationangle.anexampleforsucha ofthisconegivenbpqissimple[18].becausethe providedtothefollowingcomputations.wedenote 3.ComputingBoundsontheInteraction TherangeofdistanceshjjP QjjibetweenpointsofP bothboundsbyhi. BothrangeshiandhjjP Qjjicanbeobtainedby fromtheoriginintobpq,whichiseasytodetermine. andqisboundedbytherangeoflengthsofallvectors objects(clusters,surfaces,andsurfaceelements),we needaccesstoseveralvaluesdependingonboththe sendingandthereceivingobject,asforinstancetheir Tocomputeboundsoninteractionsbetweenanytwo boundingbox,coneofnormals[12]orexitantradiance insomedirection.allobjectsallowtoquerythesevaluesusingacommonsetofmethods,abstractingfrom BoundsontheRadianceKnowingtherangehi ofinteractingdirections,therangeofradiancevalues theconcretetypeofeachobject.inthefollowing,we describethecomputationofrangesofthesequantities hl(p;)isenttowardsthereceivercanbecomputed andhowtocomputeboundsonthelightexchangeusingthisinformation.forthissectionwewillignore sendingobject.anormalpatchobjectmaycontain bythesender.theexactcomputationislefttothe describedinsection5. occlusionbetweenobjects,handlingvisibilityisthen whicharecompletelybackfacingwithrespecttohi minimumandmaximumradiancevaluesofitschildren, cantriviallybeignoredthisway. toitschildrenandcombinetheirresults.children Acluster,however,canrecursivelypropagatethequery whichcanbeupdatedduringthepush/pulloperation. queryingthetwoobjectsfortheirboundingboxesonly. 3.2. Bounds on Light Leaving the Sender
B P B P B PQ =B p B q <Ω> box <Ω> box <Ω> cone B Q B Q Figure 3. Bounding rays between two objects in 2D. From left to right: i) Two objects and their bounding boxesbpandbqii) some rays betweenbpandbqiii) all rays frombptobqtranslated to a common origin define a new bounding boxbpqfor ray end points iv) boundingbpqby more plescenewithalightsourceconsistingofaboxwith sources,whichusuallyexhibithighlyanisotropicexitantradiance.asanexample,fig.6showsasim- Thisisparticularilyusefulforclusterscontaininglight convenient cone of directions. sion.withasimplebackfacetest,however,itcaneas- ceilingisdrasticallyoverestimated,enforcingsubdivi- asisotropic,theradiancefromtheclustertowardsthe clusterandthecluster'sexitantlightisapproximated onelightemittingside.iftheboxlightisputintoa directly,twootherapproachesareusedtogetlower Iftheobjectcannotanswertheprojectedareaquery information. andupperbounds,whichbaseonsimplergeometric insection6.1. ampleandtheresultingsevereartifactsareadiscussed ilybeseenthattheradianceleavingtheclusterup- However,therecursivecomputationofradiancebounds wardsisonlyafractionofitsaverageradiance.thisex- areaofallobjectsintheclustercanbecomearbitrarily ofitsboundingbox.thisboundisparticularlyusefulforclusterscontainingmanyobjects.althoughthjectcanbedeterminedbylookingattheprojectedarea Firstly,anupperboundontheprojectedareaofanob- canbetimeconsumingiftheclusterhierarchyisvery ingthequeriesdownwardsiftheydiersignicantly. deep.wemakeacompromisebypropagatingthequery maximumradiancesofthechildrenandonlypropagatlutionwouldbetostoreforeachobjectminimumand downwardsonlyaxednumberoflevels.abetterso- theprojectedareasofitscontentduetoself-occlusion. seeninfig.4.intheleftandrightimagetheprojected areaofthebookcaseismuchsmallerthanthesumof thatofitsboundingbox.anexampleforthiscanbe large,itsprojectedareacanneverbecomelargerthan agoodupperboundonthecluster'sprojectedarea.in Usingtheprojectedareaoftheboundingboxdelivers one,sothesumoftheprojectedareasoftheobjectsin thecenterimageoffigure4,localvisibilityiscloseto theeectofasenderonareceiver,weboundtheprojectedareaha(p;)iofthesenderwithrespecttothe BoundsontheProjectedAreaInordertobound Inthevisibilityaccellerationmethod,whichisexplainedinSection5.2,inapreprocessingstepaset theclusterisprobablyabetterbound. setofinteractingdirections. minethetransparencyoftheclusterinsomedirections. Everyobjectcanbequeriedforitsrangeofprojected Theseresultscanalsobeusedtocomputeagoodapproximationoftheprojectedareabymulitplyingthe ofsampleraysisshotthrougheveryclustertodeter- areasforacertainhi.severalobjectscananswerthis answeriseveneasier,becausetheprojectedareaofa querydirectly.forplanarpatches,thequerycanbe sphereofradiusrisalwaysr2,fromanydirection. normalandtherangeofdirections.forspheres,the answeredwiththeproductoftheareaofthepatch Similar,butmorecomplexconsiderationsarepossible timestherangeofscalarproductsbetweenthepatch boundonopacitycouldbeprovided,whichisunfortunatelynotpossiblebysampling. Anotherapproachcanbeusediftheobjectprovides terlowerboundthanzerowouldbepossibleifalower averageopacity(=1 transparency).findingabet- expectedprojectedareaoftheboundingboxbyits forobjectsasconesandcylinders,butalsoforboxes. aconeofnormalsthatboundsthesetofallnormalsoftheobject.inthiscase,wecanalsobound thecosinesofanglesbetweenthesesurfacenormals andbyhcos(p;)i.asaresult,wecancom-
(a) left view (b)frontview (c) topview putetherangeofprojectedareasusingequation(2) sameasthemethoddescribedin[18].forconvex hv(p;)i=(0;v;1)inthecaseofcomplexclusters, asarea(p)hcos(p;)ihv(p;)i.thisapproachisthe objects,hv(p;)iisalways(1;1;1).duetodicultiesndinggoodboundsforvisibility,onewoulduse wherevcanforinstancebedeterminedbysampling (seesection5). fortheboundsandthemeanvalueofthetwoapproximationsasnewexpectedvalue.ifthenewexpectatioputedwithbothapproaches,wecombinethesebyusingthesmallermaximumandlargerminimumvalue Afterboundsontheprojectedareahavebeencom- valueisoutsidethebounds,itisclampedtothemini- thereceivercanbecomputed.inthisstep,wesimply combinethepreviouslyobtainedvalues.thesolidangle(p;q)ofthevisiblepointsofthesenderpwith Basedontherangesofprojectedareasanddistances, boundsonthesolidangleofthesenderwithrespectto respecttoapointqisdenedas IfqisanarbitrarypointonareceivingobjectQ,jjq pjj (P;q)=ZPcos(n(p);q p) jjq pjj2 G(p;q p)dp: (3) Figure 4. Projected area of a bookcase. The local visibility for the three views is1for direction a),1for b) and1=3for c). The projected area of the bookcase is thus significantly smaller than the sum of the projected areas of the single objects for viewing directions a) and c). mumormaximumvalue. 3.3. Bounds on the Solid Angle boundson(p;q)canbecomputedash(p;q)i= isboundedbyhjjq Pjji.AccordingtoEquation(2), TheirradianceE(q)atanobjectpointQisdened positivehemispheres+ astheintegralofincidentradiancel(q;!)overthe ceivingcluster,sowehavetoaccountforself-occlusion wherel(q;!)iswithrespecttotheoutsideofthere- E(q)=ZS+cos(n(q);!)v(q;!)L(q;!)d!;(4) rangeofsolidanglesh(p;q)i.tocomputebounds boundedbytherangeofradiancevalueshl(p;)iand bythetermv(q;!). ontheirradiance,weneedtondtherangeofcosine Intheprevioussections,theincominglightwas 1=4istheexpectedpositivecosinevalueforrandomly notavailable,wemustfallbackto(0;1=4;1),where theconeofnormalsand.iftheconeofnormalsis wardthesender.thiscanagainbecomputedfrom valuesonthereceiverwithrespecttodirectionsto- hl(p;)ih(p;q)ihcos(q;)ihv(q;)i. ofcosinevalueshcos(q;)i,wecancomputetherange ofirradiancevaluesduetoasenderpas:hep(q)i= distributedsurfacesinacluster[13].giventherange Togetherwithaboundonthereectanceh(Q;)i anearithmetichasbeendescribedin[8].sampling reectancedescribedbyproceduralshadersbyusing Anovelwayofcomputingconservativeboundson onthereceiver,theresultingreectedradiancerange withmipmapshasbeenusedin[4]. duetosenderpishlp(q)i:=h(q;)ihep(q)i. Puttingitalltogether,wecanobtainarangeonthe reectedradianceatthereceiver: hlp(q)i=hv(q;)ihcos(q;)ih(q;)i ourproblemisnotsymmetricinsenderandreceiver. Note,thatincontrasttotheusualradiosityequation hl(p;)iha(p;)i=hjjp Qjji2(5) Thereasonisthatwecomputeboundsonthereected radianceatthereceiverandthusmaynotintegrate(or notexploittheprojectedareaofthereceivertotighten average)overthereceivingobject.therefore,wecan- theirradiancebounds(atleastnotinanobviousway). areaofthereceivercanbeusedtocomputeanupper Ontheotherhand,theupperboundontheprojected boundontheuxarrivingattheobjectsinthecluster. ha(q;)i=hjjq Pjji2. 3.4. Bounds on Irradiance and Reflected Radiance
Somerenersusethisvalueasabasisfortherenementdecision. Uptonow,allcomputationhavebeenmadeusing strictlyconservativebounds.thishasthebenetthat itcanbeassuredthatnolighttransportcanbemissed duetosamplingproblems[17].initialtessellation, whichisnecessaryforotheralgorithms,canbecompletelyomitted,thealgorithmcanworkonallkindof inputobjects.neverthelessitmustbeseen,thatusingintervalarithmetic,theboundsarealsowiderthan necessaryandthusfornon-criticalcasesnotastightas thoseobtainedinparticularbygibson'smethod[4]. 3.5. Self-interaction Aswithallnon-convexobjects,wehavetotake intoconsiderationself-interactionwithintheclusters, i.e.thataconcaveobjectilluminatesitself.thequestionofhowtocomputesuchaself-formfactorhasonly betreatedmarginallyinpreviouspublications. Ourresultsshowedthatcomputingself-formfactorsby numericalintegrationusingsamplingdoesnotdeliver veryusefulresultsduetosingularitiesintheintegrand [11].Weuseaverysimple,butprobablymuchmore eectivemethod.ourapproachisbasedonthefact thatinclosedscenesallformfactorsfromanobject sumuptoone(pjfij=1).ifwesumuptheform factorsoverwhichanyobjectgathersradiosityfrom allotherobjectsinanormalhierarchicalradiositystep neglectingself-interaction,theformfactorsumspfor anobjectpshouldideallybe1 Fpp,whereFppisthe self-formfactor.inordertoaccountforself-interaction, wethusaddfpplp=(1 Sp)Lptotheirradiancevalue ofp,wherelpisthecurrentradianceofpatchp. Theideaofhierarchicalradiosityistogatherlighton variouslevelsoftheobjecthierarchy.thismeansthat anobjectcanindirectlygatherlightviaitsancestors orchildren.togettheformfactorsumforaparticular object,wehavetosumtheformfactorsofallancestors and weightedbytheirrelativearea{allchildren. Thisisexactlythesameprocedurethatisdonewith irradiancevaluesduringpush/pull. KnowingtheformfactorsumSpforanyobjectinthe scenealsohasanotheradvantage:ifweknowthatan objectisconvex,theself-formfactormustbezero.the dierenceoftheformfactorsumtooneisthusahinton theerrorthatwasmadeapproximatingtheformfactorstothisobject.thiserrorcanthenbe`corrected' byscalingthecomputedirradiancewith1=(1 Sp). Thismethodmaysoundlikeabadhack,butitcan signicantlyimprovethequalityofthesolution,for instancenearthecommonboundaryoftwoperpendicularpatches,whereduetoasingularityintheform factorkernel,numericalproblemsresultinbadform factorapproximations.forisotropicincomingradiance atapatchthiscorrectioncancompletelycompensate theapproximationerrorforthispatch.furthermore, byenforcingthattheformfactorsumisone,wecan guaranteeconvergenceoftheiterativesolverforhierarchicalradiosity,whichisjacobiinourcase. 4.ARenerforBoundedInteractions Basedonthesetofmethodstocomputerangescommontoalltypesofobjects,wehaveshownhowto computeboundsontheradiancelp(q)reectedat QduetoobjectP.Usingthesebounds,therener thenhastomeasuretheresultingerrorwithrespect tosomenormandcomparetheerrortoauserdened errorthreshold. Twocommonchoicesforthenormtomeasuretheerror arethel1-normusingdlp(q)e blp(q)corthel1- normwith(dlp(q)e blp(q)c)area(q).usingthe L1-norm,shadowsarebetterapproximated(atsignicantcostincomputationtime),butthenormhas problemsalongsingularities.ontheotherhand,the L1-normdoesnotexhibitthisbehavior,butitisnot assensitivetoshadows,becauselargerradianceranges areallowedforsmallpatches. Acompromisebetweenthesetwomeasuresisusing (dlp(q)e blp(q)c)size(q),wheresize(q)isameasurefortheone-dimensionalextentofq,forinstance theradiusoftheboundingsphere.insomesense,this measurecorrespondstousingthel2-norm,butitalso makesthin,longobjectsmorelikelytobesubdivided thanrounderobjectswiththesamearea. 5.IncludingVisibility 5.1. Error for Partial Visibility Intheprevioussection,wehaveignoredinter-object visibility,whichinourimplementationisdetermined bycastinganumberofsampleraysbetweentheobjects.ofcoursesuchasamplingschemeisnotconservativeanymore,becausetheresults\totalvisibility" or\totalocclusion"onlymeanthatnosampleraywas foundproovingtheopposite. Ifpartialocclusionisdetected,theminimumvalueof thetransportissettozero,asitisdonein[4].however,thissimpleapproachdoesnotdeliversatisfactory
cluster objects in cluster shaft cross lowerboundtozerodoesnotrelativelyincreasetheerrorapproximationasmuchasitshould.weaccount areusuallywiderthannecessary.thus,decreasingthe boundsforunoccludedlighttransport,thesebounds results:becauseouralgorithmcomputesconservative sections forthiseectbyscalingtheerrorinthecaseofpartial Figure 5. Visibility tests through a cluster. and3turnedouttobeuseful.notethatusinggibson'ssampledboundsandsettingthelowerboundto zeroresultsinabetterrelativeerrorincrease. visibilitybyaconstantfactor,wherevaluesbetween2 Inordertospeedupvisibilitycomputation,wereuse 5.2. erarchy.whentheraydoesnotintersectthebounding theclusterhierarchyalsoasahierarchicalspatialdensityapproximation,asproposedin[14].ifarayistobe shotthroughthescene,theraytraversestheclusterhi- Visibility Accelleration boxofacluster,thecompletesubtreecanbeskipped forintersectiontests.ifthereisanintersectionwith furtherlookatthechildren,asalsodescribedin[14]. ricobjectwithhomogenousdensitywithouttakinga approximatedbyconsideringtheclusterasavolumet- theattenuationoftheraythroughtheclustercanbe theclusterstheraycaneithertraverseitschildren,or cluster'sdensityisapproximatedandonthedecision Theresultingspeedupandqualitydependsonhowthe Wecomputetheobjectdensityinapreprocessingstep whetheraclustercanbeassumedtobehomogenous withrespecttoacertainrayornot. bysamplingraysthrougheveryclusteralongthethree mainaxes.forallthreedirectionsthepercentageof unoccludedraysisstoredasapproximationforthecluster'stransparency.toapproximatethetransparency ofaclusterwithrespecttoaparticularray,weinterpolatebetweenthethreemaintransparenciesaccording localvisibilityofthecluster. cessingstepissmallcomparedtothegainedspeedup, totheray'sdirection.thetimespentfortheprepro- thesamplerayscanalsobeusedtoapproximatethe asisshowninsection6.furthermore,theresultsof plecriteriontakingintoconsiderationthatavisibility Todecidewhetheraclustercanbeapproximatedbya raypassingthroughthesceneisarepresentativefor homogenousmediumforaparticularray,weuseasim- samplingtheshaftbetweentwoobjects.approximatingtheclusterashomogenouscanbeinappropriate,if thesetofvisibilityraysbetweentwoobjectsonlyintersectsasmallpartofthecluster.inthiscase,the willproducealargeerror,whereasforvisibilitycomputationinverticaldirectionbetweenthelargepatches, approximationbytheexpectedvisibilitycanbearbitrarilywrong(seefig.5).forthehorizontallightexchangebetweenthesmallpatches,theapproximation theuniformdensityassumptionissucient. Asaresult,weonlyusetheexpectedtransparencyapproximationofthecluster,ifthesizeoftheclusterinaltothefeature-basedvisibilityapproachbySillionetweentheobjects.Note,thatthiscriterionisorthogo- smallerthanthecross-sectionofthesetofallraysbe- al.[14].ourapproachexploitscoherencebetweenvisibilityrays,whilethefeature-basedapproachisbased Lookingattheeciencygainbythisapproachitisinterestingtonoticethatnotonlydoesthetimedecrease onthecoherencewithinthecluster. signicantlytoshootaraythroughthescene,butunfortunatelyalsothenumberoflinksincreases.the reasonisclear:assoonasaclusterisapproximatedby ahomogeneousmedium,theraywillbeattenuatedby compensatedbythefastershootingofrays. computationtimefortheadditionallinksismorethan avaluebetween0and1,whichisinterpretedaspartialvisibility,whichthenresultsinnersubdivision. However,aswewillshowinSection6,theincreased lightsourceemittinglightonlyononeside.asalso noticedbyothers(e.g.[4]),lightsourcesinsideaclusterareverylikelytocreateartifactsthatcanbeseen appearance.iftheclusterisapporximatedbyisotropic infig.6(lefthalf).becausetheboxlightisinsidea cluster,theclusterexhibitsaverynonuniformexternal toaverysimplesceneofanemptyroomwithabox benetsofourobjectinterface,wecomputedasolution Toshowhowasolutioncanbeimprovedexploitingthe notunpacked,resultinginunderestimated(sidewalls) unpacktheclusterbecomesclearlyvisible.inregions farawayfromthelightsourcecluster,theclusteris emission,theboundary,wherethealgorithmdecidesto 6.Results 6.1. Clustered Light Source
resultingnumberofcreatedlinksisalmostthesame. 6.2. Planar Patches, Curved Patches, and Clusters closeenoughtothelightclustertoenforceopeningthe Figure 6. Simple box scene with a source in a cluster. In the right half image better mations. lightcluster,suddenlythe\true"illuminationbecomes oroverestimatedillumination(ceiling).ifapatchis visible,similarto\popping"inlevel-of-detailapproxi- bounds the leaving the were used in order avoid artifacts. Theseproblemsareusuallysolvedbyputtinglight sourcesalwaysontopoftheclusteringhierarchy,or Inourapproach,theycanalsobesolvedbycomputing byalwaysreningclusterswithlightsourcesrst[4]. betterboundsonthelightleavingthecluster.because subdivisionoftheinteractionbetweenlampclusterand emissivepartsofthelamp.forthatreason,acoarse thattheceilingcanonlyreceivelightfromthenotselfrectionsoflightexchange,ouralgorithmcanndout wecomputeconservativeboundsontheinterestingdi- wallsstrongvariationoftheexitantlightofthecluster BothhalfsinFig.6havebeencomputedwiththesame isdetected,resultinginnersubdivision. ceilingissucient.fortheinteractionwiththeside cluster,whichwasnotmadefortheleftimage.the usedtobetterboundthelightleavingthelightsource halfimageboundsontheinteractiondirectionwere parameters.theonlydierenceisthatfortheright Themainideaofourapproachistohaveauniform viewtovariouskindsofsceneobjects.todemonstrate this,wecomputedaglobalilluminationsolutiontoa slightlyarticialsceneoffourtreesinaroomilluminatedbyanarealightsource.thetreesaremodeled withtruncatedcones,whichareclusteredaccording totheirbranchingdepth.notethateverytruncated resultingproblems. increasingtheinputcomplexityenormouslywithall wouldhavetobesubdividedintoatleastfourobjects, coneisonlyoneinputobject,i.e.noinitialtessellationwasperformed.forotheralgorithms,everycone infig.7took280sona195mhzr10kcpu.other objectsonly.thecomputationofthesolutionshown Consequently,thesceneconsistsofabout4000input insteadofjacobiisdicultinthecontextofclusters andconcavesurfaces. iterationwithoutmultigridding.gauss-seideliteration statisticdataoncomputationofthescenecanbefound intable1.thesolutionwascomputedusingjacobi Althoughourcomputationofboundsisrathercomplex bilityaccellerationrequiresveadditionalsecondsfor comparedtoothermethods,thepercentageoftime spentonitissmall(lessthan5%).usingourvisi- preprocessing,butdecreasestimeforvisibilitytestsby about25%from336sto246s. tationtook853s,againona195mhzr10kcpu.a patcheswith24primarylightsources.thecompulutionofarailwaystationscene,obtainedwithour Fig.8showstwoviewsoftheglobalilluminationso- algorithm.thesceneconsistsofabout37,000input 6.3. Complex Test Scene signicanteciencygainwasachievedbyourvisibility accellerationmethod(from1051sto853s),although additional19shadtobespentonvisibilitypreprocessing.asummaryofthetimingscanbefoundintable2. 7.ConclusionsandFutureWork Wehavepresentedanewclusteringalgorithmtoef- cientlycomputediuseglobalilluminationsolutions forcomplexscenesofverygeneraltypesofobjects. Patches,curvedandplanar,subelementsofpatches, andclustersarealltreateduniformlyusingasimple boundsareoftentoopessimistic,buttheyhavethe transportneglectingvisibilitycanbecomputed.these Usingthesebounds,conservativeboundsonthelight interfacetoqueryeachparticipatingobjectforitsgeometricandlightingpropertiesintheformofbounds. advantagethatnolighttransportcangetlostdueto betweenalltypesofobjectsarewellcomparable.the uniformlythecomputederrorvaluesforinteractions uniformviewtoobjectsdoesalsoallowobjectstode- samplingproblems.becauseallobjectsarehandled
Theuniformtreatmentofallobjectsimmediatelysug- thaninpreviousapproaches. gestsanobject-orientedimplementationofthisframe- work.inourimplementation,thewholelighttransport Sincenothingintheaboveframeworkpreventsitsapplicationtonon-diuseenvironments,itwouldbeinterestingtoextendtheapproachinthisdirection.The usedtoovercometheirrestrictiontoapproximations withpointclusters. sameframeworkcouldbeappliedto[1]andcouldbe Trees inputpatches clusters iterations subdividedpatches vis.acc.onvis.acc.o livermoreinformationabouttheirexternalbehaviour iscomputedinanabstracthrobjectclass,fromwhich patchandclusterclassesarederived. links 25,379 4,095 2,0463 25,407 2,046 4,095 computationtime visibilitycomputation 311,587 292s 246s 297,183 377s 336s 3 visibilitypreprocessing boundscomputation 13s 5s 13s 0s RailwayStation inputpatches clusters iterations subdividedpatches vis.acc.onvis.acc.o 26,778 6,616 26,778 6,616 Table 1. Timings for 74,6224 4 tree scene links computationtime visibilitycomputation visibilitypreprocesing 991,556 853s 689s 953,342 73,986 boundscomputation 19s 36s 1052s 916s 32s 0s References [1]PerH.Christensen,DaniLischinski,EricStollnitz,and Table 2. Timings for railway station scene [2]PerH.Christensen,EricJ.Stollnitz,DavidSalesin,and ACMTransactionsonGraphics,16(1):3{33,January1997. DavidH.Salesin.Clusteringforglossyglobalillumination. [3]Jo~aoL.D.CombaandJorgeStol.Anearithmeticanditsapplicationstocomputergraphics.In 1994. WorkshoponRendering,pages287{301,Darmstadt,June TonyD.DeRose.Waveletradiance.InFifthEurographics [4]S.GibsonandR.J.Hubbold.Ecienthierarchicalrenementandclusteringforradiosityincomplexenvironements. AnaisdoVIISibgrapi,pages9{18,1993.Availablefrom ComputerGraphicsForum,15(5):297{310,dec1996. arith. http://www.dcc.unicamp.br/stol/export/papers/ane- [6]PatHanrahan,DavidSalzman,andLarryAupperle.A [5]StevenJ.Gortler,PeterSchroder,MichaelCohen,and (SIGGRAPH'91Proceedings),25(4):197{206,1991. rapidhierarchicalradiosityalgorithm.computergraphics (SIGGRAPH'93Proceedings),27:221{230,August1993. PatM.Hanrahan.Waveletradiosity.ComputerGraphics [7]W.HeidrichandH.-P.Seidel.Ray-tracingproceduraldisplacementshaders.InProceedingsofGraphicsInterface [8]WolfgangHeidrich,PhilippSlusallek,andHans-PeterSeidel.Samplingproceduralshadersusinganearithmetic. [9]DaniLischinski,BrianSmits,andDonaldP.Greenberg. '98,1998. ics(siggraph'94proceedings),pages67{74,1994. Boundsanderrorestimatesforradiosity.ComputerGraph- ACMTransactionsonGraphics,1998. [12]LeonA.ShirmanandSalimS.Abi-Ezzi.Theconeof [11]H.Schirmacher.Hierarchischevolumen-radiosity.Technical [10]RamonE.Moore.IntervalAnalysis.Prentice-Hall,1966. normalstechniqueforfastprocessingofcurvedpatches. Report9,UniversitatErlangen-Nurnberg,1996. [13]FrancoisSillion.Auniedhierarchicalalgorithmforglobal ceedings),12(3):261{272,september1993. ComputerGraphicsForum(EUROGRAPHICS'93Pro- [14]FrancoisSillionandGeorgeDrettakis.Feature-basedcon- IEEETransactionsonVisualizationandComputerGraphics,1(3),September1995. illuminationwithscatteringvolumesandobjectclusters. [15]FrancoisSillion,GeorgeDrettakis,andCyrilSoler.Aclustrolofvisibilityerror:Amulti-resolutionclusteringalgoronments.InRenderingTechniques'95(Proceedingsoteringalgorithmforradiancecalculationingeneralenvi- GRAPH'95Proceedings),pages145{152,August1995. rithmforglobalillumination.computergraphics(sig- [16]BrianSmits,JamesArvo,andDonaldGreenberg.AclusterputerGraphics(SIGGRAPH'94Proceedings),pages435ingalgorithmforradiosityincomplexenvironments.Com- 205.Springer,August1995. SixthEurographicsWorkshoponRendering),pages196{ [17]MarcStamminger,WolframNitsch,PhilippSlusallek,and diosity implementationandexperiences.inproceedings FifthInternationalConferenceinCentralEuropeonComputerGraphicsandVisualization WSCG'97,1997. Boundedradiosity{illuminationongeneralsurfacesand clusters.computergraphicsforum(eurographics Hans-PeterSeidel.Isotropicclusteringforhierarchicalra- 442,July1994. [18]MarcStamminger,PhilippSlusallek,andHans-PeterSeidel. '97Proceedings),16(3),September1997.
Figure 7. Tree scene. Figure 8. Radiosity solutions of a railway station scene computed with the new algorithm.