ebook img

Monte-Carlo Methods In Global Illumination PDF

123 Pages·1.789 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Monte-Carlo Methods In Global Illumination

MONTE-CARLO METHODS IN GLOBAL ILLUMINATION Script writtenby Szirmay-Kalos La´szlo´ inWSof1999/2000 Institute of Computer Graphics Vienna University of Technology i Contents 1 Introduction 1 1.1 Globalpass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Localpass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Tonemapping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 Globalilluminationproblem 5 2.1 Therenderingequation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Measuringtheradiance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.3 Thepotentialequation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.4 Measuringthepotential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.5 Therenderingproblem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.5.1 Geometryofthesurfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.5.2 Bi-directionalReflectionDistributionFunctions. . . . . . . . . . . . . . . . . . . . . . . 11 2.5.3 Lightsources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.5.4 Measuringdevices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.6 Numericalsolutionoftherenderingequation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.6.1 Errormeasuresfornumerictechniques . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 2.6.2 Propertiesoftherenderingequation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.7 Classificationofthesolutiontechniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3 Opticalmaterialmodels 18 3.1 Diffusereflection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.2 Ideal,mirror-likereflection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.3 Idealrefraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.4 Non-ideal,specularreflection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.4.1 Phongreflectionmodelanditsmodifications . . . . . . . . . . . . . . . . . . . . . . . . 21 3.4.2 Cook-Torrancemodel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4 Solutionstrategiesfortheglobalilluminationproblem 28 4.1 Inversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.2 Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.2.1 Expansionoftherenderingequation:gatheringwalks. . . . . . . . . . . . . . . . . . . . 28 4.2.2 Expansionofthepotentialequation:shootingwalks . . . . . . . . . . . . . . . . . . . . 30 4.2.3 Meritsanddisadvantagesofexpansionmethods . . . . . . . . . . . . . . . . . . . . . . . 31 4.3 Iteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 4.3.1 Analysisoftheiteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 4.4 Analyticalsolutionoftherenderingequation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4.4.1 Sceneswithconstantradiance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.4.2 Sceneswithconstantreflectedradiance . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5 Finite-elementmethodsfortheGlobalIlluminationProblem 35 5.1 Galerkin’smethod. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 5.2 Pointcollocationmethod . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 5.3 Finiteelementmethodsforthediffuseglobalilluminationproblem . . . . . . . . . . . . . . . . . 37 5.3.1 Geometricmethodsforformfactorcomputation . . . . . . . . . . . . . . . . . . . . . . 39 ii CONTENTS iii 6 Numericalquadratureforhighdimensionalintegrals 41 6.1 Monte-Carloquadrature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.2 Quasi-MonteCarloquadrature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 6.2.1 ErrorAnalysisforintegrandsoffinitevariation:Koksma-HlawkaInequality. . . . . . . . 43 6.2.2 Generationofthesamplepoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 6.2.3 Generationoflow-discrepancysequences . . . . . . . . . . . . . . . . . . . . . . . . . . 47 6.3 Importancesampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 6.3.1 Generationofarandomvariablewithaprescribedprobabilitydensity . . . . . . . . . . . 49 6.3.2 Importancesamplinginquasi-MonteCarlointegration . . . . . . . . . . . . . . . . . . . 50 6.3.3 Metropolissampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 6.3.4 ApplicationoftheVEGASalgorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 7 Randomwalksolutionoftheglobalilluminationproblem 53 7.1 WhyshouldweuseMonte-Carloexpansionmethods?. . . . . . . . . . . . . . . . . . . . . . . . 53 7.2 Quasi-MonteCarloquadraturefortherenderingequation . . . . . . . . . . . . . . . . . . . . . . 54 7.2.1 Integratingfunctionsofunboundedvariation . . . . . . . . . . . . . . . . . . . . . . . . 54 7.3 Importancesamplingfortherenderingequation . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 7.3.1 BRDFsampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 7.3.2 Lightsourcesampling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 7.3.3 Samplingthelightsourcesingatheringrandomwalks . . . . . . . . . . . . . . . . . . . . 60 7.3.4 Importancesamplingincoloredscenes . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 7.3.5 Multipleimportancesampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 7.4 Handlinginfinite-dimensionalintegrals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 7.4.1 Russianroulette. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 7.4.2 Russianrouletteinquasi-MonteCarloquadrature . . . . . . . . . . . . . . . . . . . . . . 63 8 Reviewofrandomwalkalgorithms 66 8.1 Gathering-typerandomwalkalgorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 8.1.1 Ray-casting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 8.1.2 Visibilityray-tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 8.1.3 Distributedray-tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 8.1.4 Path-tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 8.2 Shooting-typewalksmethods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 8.2.1 Photontracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 8.2.2 Light-tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 8.2.3 Randomwalksfortheradiositysetting . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 8.3 Bi-directionalrandomwalkalgorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 8.3.1 Bi-directionalpath-tracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 8.3.2 Metropolislighttransport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 8.3.3 Photon-map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 8.3.4 Instantradiosity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 8.4 Globalmethods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 8.4.1 Multi-pathmethodusingglobalrandomlines . . . . . . . . . . . . . . . . . . . . . . . . 82 8.4.2 Globalray-bundletracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 8.4.3 Preprocessingthepointlightsources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 9 Iterationsolutionoftheglobalilluminationproblem 85 9.1 WhyshouldweuseMonte-Carloiterationmethods?. . . . . . . . . . . . . . . . . . . . . . . . . 86 9.2 Formaldefinitionofstochasticiteration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 9.2.1 Otheraveragingtechniques. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 9.2.2 Canweusequasi-MonteCarlotechniquesiniteration? . . . . . . . . . . . . . . . . . . . 88 10 Reviewofstochasticiterationalgorithms 90 10.1 Stochasticiterationforthediffuseradiosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 10.1.1 Stochasticradiosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 10.1.2 Transilluminationradiosity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 10.1.3 Stochasticray-radiosity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 10.2 Definitionoftherandomtransportoperatorforthenon-diffusefinite-elementcase . . . . . . . . . 92 10.2.1 Singleraybasedtransportoperator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 10.2.2 Stochasticiterationusingray-bundles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 CONTENTS iv 11 Implementationofthepath-tracingalgorithm 97 11.1 Vectormodule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 11.1.1 Point3Dclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 11.1.2 Transformationclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 11.2 Containermodule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 11.3 Colormodule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 11.4 Materialmodels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 11.4.1 Diffusematerialclass. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 11.4.2 Idealmirrorclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 11.4.3 Idealrefractingmaterialclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 11.4.4 Specularmaterialclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 11.4.5 Generalmaterialclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 11.5 Lightmodule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 11.5.1 Emitterclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 11.5.2 Positionallightclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 11.6 Modelmodule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 11.6.1 Primitiveclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 11.6.2 Objectclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 11.6.3 Virtualworldclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 11.7 Cameramodule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 11.8 Scenemodule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 11.8.1 Sceneclass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 11.9 Dynamicmodelofpathtracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 11.9.1 Findingthevisibleprimitive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 11.9.2 Detectingthevisiblelightsources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 11.9.3 Directlightsourcecomputation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 11.9.4 Pathtracing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 11.9.5 Renderingcompleteimages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 BIBLIOGRAPHY 111 SUBJECTINDEX 116 Chapter 1 Introduction Theultimateobjectiveofimagesynthesisorrenderingisto providetheuser withtheillusionofwatchingreal objects on the computerscreen (figure1.1). Theimage is generatedfrom an internalmodelwhich is called the virtualworld. Toprovidetheillusionofwatchingtherealworld,thecolorsensationofanobserverlookingatthe artificialimagegeneratedbythegraphicssystemmustbeapproximatelyequivalenttothecolorperceptionwhich would be obtained in the real world. The color perceptionof humansdependson the light power reaching the eyefromagivendirectionandontheoperationoftheeye. Thepower,inturn,isdeterminedfromtheradiance ofthevisiblepoints. Theradiancedependsontheshapeandopticalpropertiesoftheobjectsandontheintensity ofthelightsources. Inordertomodelthiscomplexphenomenon,boththephysical-mathematicalstructureofthe light-objectinteractionandtheoperationoftheeyemustbeunderstood. rendering observer of the computer screen monitor virtual world measuring window R device G Tone B mapping power power l l radiance l color perception in the nerve cells power radiance l observer of the l real world real world Figure1.1:Tasksofrendering Theimagesynthesisusesaninternalmodelconsistingofthegeometryofthevirtualworld,opticalmaterial propertiesandthedescriptionofthelightinginthescene(figure1.2). Fromthese,applyingthelawsofphysics (e.g. Maxwellequations)the realworld opticalphenomenacan besimulatedto find the lightdistributionin the scene.Thisstepiscalledtheview-independentsteportheglobalpassofrendering.Thenameasurementdevice, calledtheeyeorcamera,isplacedintothesceneandthelightdistributionismeasuredfromagivenlocationand orientation.Thisiscalledtheview-dependentsteporthelocalpass. Notethatnotallrenderingalgorithmsmakea cleardistinctionbetweenthedeterminationoftheview-independentlightdistributionandthemeasurementofthis 1 1.1. GLOBALPASS 2 distributionbythecamera,butsimultaneouslycomputethelightdistributionanditseffectonthecamera. Renderingresultsinarepresentationoftheperceivedimage,whichisusuallythecollectionofpixelcolorsor somediscretesamplingoftheradiancefunction. Theexactsimulationofthelightperceivedbytheeyeisimpos- sible,sinceitwouldrequireendlesscomputationalprocess.Ontheotherhand,itisnotevenworthdoingsincethe possibledistributionswhichcanbeproducedbycomputerscreensarelimitedincontrasttotheinfinitevarietyof realworldlightdistributions. Consequently,colorperceptionisapproximatedinsteadofhavingacompletelyac- curatesimulation.Theaccuracyofthisapproximationisdeterminedbytheabilityoftheeyetomakeadistinction betweentwolightdistributions. Computerscreenscanproducecontrollableelectromagneticwaves,orcoloredlight,mixedfromthreeseparate wavelengthsfortheirobservers.Thusinthefinalstepofimagesynthesistonemappingisneededwhichconverts thecomputedcolororradianceinformationtothe , , intensitiesthatcanbeproducedbythecolormonitor. R G B geometry of the virtual world global image material rendering radiance of calculation radiance of tone R,G,B of pixels properties (global pass) surface points (local pass) pixels mapping lighting camera Figure1.2:Dataflowofrendering 1.1 Global pass Theglobalpassdeterminesthelightreflectedoffthesurfacepointsatdifferentdirections.Sincelightisanelectro- magneticwave,lightdistributioninapointandatagivendirectioncanberepresentedbyawavelength-dependent function [A´br97, Ko´n85]. Rendering algorithms usually evaluate this functions at a few representative wave- lengths.Onagivenwavelengththeintensityofthelightisdescribedbytheradiance.Inscenesnotincorporating participatingmediaitisenoughtocalculatetheradianceatsurfacepoints. Theradiancereflectedoffasurface pointisaffectedbytheemissionofthispoint(lighting),theilluminationprovidedbyothersurfacepointsandthe opticalpropertiesofthematerialatthispoint(materialproperties).Formallythisdependenceischaracterizedby aFredholmtypeintegralequationofthesecondkind,whichiscalledtherenderingequation.Frommathematical pointofview,globalpassisthesolutionofthisintegralequationfortherepresentativewavelengths. 1.2 Local pass Thelocalpassmeansthemeasurementoftheglobalradiancefunctionbyacamera. Acameraisacollectionof lightmeasuringdeviceswhichusuallycorrespondtopixelsintheimage. Acertainmeasuringdeviceischaracter- izedbyasensitivityfunctionthatdescribeswhichpointsanddirectionsmayaffectthedevice. 1.3 Tone mapping Lightisanelectromagneticwave,anditscolorisdeterminedbytheeye’sperceptionofitsspectralenergydistri- bution. Due to its internalstructure, theeyeis averypoorspectrometersinceit actuallysamplesand integrates theenergyinthreeoverlappingfrequencyrangesbythreetypesofphotopigmentsaccordingtoawidelyaccepted (butalsoargued)model.Asaconsequenceofthis,anycolorperceptioncanberepresentedbythreescalars(called tristimulusvalues)insteadofcompletefunctions[A´br97,Ko´n85,Nem90]. Aconvenientwaytodefinetheaxesofacoordinatesysteminthethree-dimensionalspaceofcolorsensations istoselectthreewavelengthswhereonetypeofphotopigmentsissignificantlymoresensitivethantheothertwo [SK99c]. This method has been devised by Grassmann, who also specified a criterion for separating the three representativewavelengths. Grassmann laws state that the representativewavelengths should be selected such thatnooneofthemcanbe matchedbythemixtureof theothertwo intermsofcolorsensation(thiscriterionis 1.3. TONEMAPPING 3 similartotheconceptoflinearindependence.)Anappropriatecollectionoftherepresentativewavelengthsis: nm nm nm (1.1) (cid:21)red =645 ; (cid:21)green =526 ; (cid:21)blue =444 : Nowletussupposethatmonochromaticlightofwavelength isperceivedbytheeye.Theequivalentportions of red, greenandbluelight, or ( , , ) tristimulusvalues, can(cid:21)begeneratedby threecolormatchingfunctions ( , and )whicharebrasgedbonphysiologicalmeasurements.Notethenegativesectionof (andtoa lers(s(cid:21)e)xgte(n(cid:21)t)in b((cid:21)))infigure1.3.Itmeansthatnotallcolorscanberepresentedbypositive( , , )vra(l(cid:21)u)es. g((cid:21)) r g b R=645nm, G=526nm, B=444nm matching functions 3.5 r(lambda) g(lambda) b(lambda) 3 2.5 2 b g, 1.5 r, 1 0.5 0 -0.5 400 450 500 550 600 650 700 lambda[nm] Figure1.3:Mean10-degcolormatchingfunctionsofStilesandBurch: , , . r((cid:21)) g((cid:21)) b((cid:21)) Iftheperceivedcolorisnotmonochromatic,butisdescribedbyan distribution,thetristimuluscoordinates are computed using the assumption that the sensation is produced bLy(a(cid:21)n)additive mixture of the perceptions of elementalmonochromaticcomponents: (1.2) r = L((cid:21)) r((cid:21))d(cid:21); g= L((cid:21)) g((cid:21))d(cid:21); b= L((cid:21)) b((cid:21))d(cid:21): (cid:1) (cid:1) (cid:1) Z(cid:21) Z(cid:21) Z(cid:21) For computer generated images, the color sensation of an observer watching a virtual world on the screen must be approximately equivalent to the color sensation obtained in the real world. Since color sensations are representedby ( , , ), it means that the tristimulus values should be identical. If two energydistributionsare associatedwithtrhegsambetristimuluscoordinates,theyproducethesamecolorsensation,andarecalledmetamers. Incomputermonitorsandintelevisionscreensthreephosphorlayerscanbestimulatedtoproducered,green and blue light. The objective, then, is to find the necessary stimulus to produce a metamer of the real energy distribution of the light [Sch96, BS95]. This stimulus can be controlled by the ( , , ) values of the actual pixel.The( , , )matchingfunctionsoffigure1.3dependonthewavelengthoftheRseGlectBedprimaries,whichare notnecessarrilygidbenticaltothewavelengthsonwhichourmonitorcanemitlight. Thisrequirestheconversionof tristimulusvaluesbyalineartransformation. Thecalculationofpixel valuesthusconsistsofthefollowingsteps. Firstthespectrumassociatedwith thepixeliscomputed. ThenRth;eGs;pBectrumismatchedbythreestandardcolormatchingfunctionsdefinedbythree primaries. Finally, the standard color coordinates are transformed to the monitor color coordinates taking into accountthe monitor properties. In practice, the standard color system is usually the CIE XYZ system [WS82] whichusesthreehypotheticalprimariestoallowthedefinitionofanycolorbypositiveweights. The linear transformation that converts from the XYZ system to the monitor RGB system can be obtained fromthe coordinatesoftheemissionsofthethreephosphorsandofthewhitepointofthemonitor. Fora monitorwXit;hYs;tZandardNTSCphosphorsandwhitepoint,thefollowingtransformationcanbeused[Gla95]: R 1:967 0:548 0:297 X (1.3) (cid:0) (cid:0) G = 0:955 1:938 0:027 Y : 2 3 2 (cid:0) (cid:0) 3(cid:1)2 3 B 0:064 0:130 0:982 Z (cid:0) 4 5 4 5 4 5 1.3. TONEMAPPING 4 X,Y,Z matching functions 3.5 X(lambda) Y(lambda) Z(lambda) 3 2.5 2 Z Y, 1.5 X, 1 0.5 0 -0.5 400 450 500 550 600 650 700 lambda[nm] Figure1.4:Mean10-degcolor matchingfunctionsofStilesandBurch: , , XYZ X((cid:21)) Y((cid:21)) Z((cid:21)) Thewholecomputationofthe( , , )valuesinorderforthemonitorcolortobeametamerofthecalculated spectrum is called tone mapping.RThGe (B, , ) values are positive numbersusually in the rangeof [0...255] if8bitsareavailabletorepresentthem. URnfGortuBnately,notallcolorscanbereproducedonthecomputerscreen, becauseofthenegativesectionsofthe colormatchingfunctionsanddueto thefactthatthenumberofavailable intensitylevelsisusuallymuchlessthancanbeperceivedintherealworld.Thustonemappingisalsoresponsible foroptimallyselectingfromtheavailableintensitylevelsforcolorreproduction.Themappingfromthecomputed levels to the available ones can be either linear or logarithmic. The latter takes advantage of the logarithmic characteristicsofthehumanperceptionsystem[PP98]. Chapter 2 Global illumination problem Inthischapterthemathematicalmodelofthelight-surfaceinteractionispresented.Thismathematicalmodelisan integralequation,whichhastobesolvedtoobtainphysicallyaccurateimages. 2.1 The rendering equation Hereinafter, monochromatic light of a representative wavelength will be assumed, since the complete color calculation can be broken down to these representative wavelengt(cid:21)hs. The parameters of the equations usually dependonthewavelength,butfornotationalsimplicity,wedonotalwaysincludethe variableinthem. Inthissection,webrieflyreviewthemeasuresofthelighttransportandthemathem(cid:21)aticalformulationthatcan computethem. z w z w dq q sin q df dq y y f df x x Figure2.1:Definitionofdirectionsinasphericalcoordinatesystem(left)andcalculationofdifferentialsolidangles(right) Thedirectionalpropertyofthelightenergyemissionisdescribedinaso-calledilluminationsphere orin illuminationhemisphere whichcontainthosesolidanglestowherethesurfacepointcanemitenerg(cid:10)y. The surfaceoftransparentmate(cid:10)riHalscanemitinanydirectionsofasphere,whilethesurfaceofopaquematerialscan transferenergyonlytothehemispherethatis“above”thesurface. Settingupasphericalcoordinatesystem(figure2.1),adirection canbedefinedbytwoangles ,where is theanglebetweenthegivendirectionandthe -axis, and is the!anglebetweentheprojectiono(cid:18)f;t(cid:30)hegiven (cid:18)directionontothe planeandthe -axis. z (cid:30) Setsofdirectioxn;syaredefinedbysxolidangles. Bydefinition,asolidangleisaconeorapyramid,withitssize determinedbyitssubtendedareaofaunitspherecenteredaroundtheapex(figure2.2).Adifferential(infinitesimal) solidanglecanalsobegivenbyavector ,wherethevectorequalstoadirectionofthedifferentialset. Adifferentialsolidanglecanalsobed~!expressedbythe angles. Supposethat ismodifiedby and is by . Duringthisthedirectionalvectorscansadifferential(cid:18)r;e(cid:30)ctanglehaving verti(cid:18)caland dh(cid:18)orizo(cid:30)ntal sizeds(cid:30)(rightoffigure2.1),thusthesizeofthesolidangleis d(cid:18) sin(cid:18) d(cid:30) (cid:1) (2.1) d! =sin(cid:18) d(cid:30)d(cid:18): (cid:1) The solid angle, in which a differential surface can be seen from point , is the projected (visible) area perthesquareofthe distanceofthesurfaced(Afigure2.2). If theanglebetweenthp~e surfacenormalof andthe dA 5

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.