H16 Mantra User Guide SAMPLING AND NOISE - … Mantra User Guide SAMPLING AND NOISE When generating an image, Mantra must determine a color value for each pixel by examining the scene

Post on 13-Mar-2018

214 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

Transcript

H16MantraUserGuide

SAMPLINGANDNOISEWhengeneratinganimage,Mantramustdetermineacolorvalueforeachpixelbyexaminingthescenebehindtheimageplane.Mantraachievesthisbysendingoutanumberofraysfromthecamera’spositionuntiltheyhitanobjectinthescene.Everytimearayhitsanobject,itwillreturnsomepieceofinformationabouttheobject(Itscolor,forinstance).Thisprocesscanbroadlybedescribedas“Sampling”thescene.

Samplingonceperpixel,however,cancause“aliasing”whereinformationislostbetweensamples.Thisisparticularlyevidentinsceneswithmorevarietyinshapesandcolors.

Increasingthenumberofsamplesperpixelgivesan“anti-aliased”imagewhichbetterrepresentstheactualscene.

H16MantraUserGuide

Thesamplesdescribedabovecouldbedescribedas“Primary”rays(orpixelsamples).Theycandeterminetheoverallqualityoftheimagebeingrendered,especiallywithregardtotheshapeandaccuracyoftheobjectsinthescene.

Forotheraspectsofanimage,likelighting,reflectionsandrefractions,moreraysmustbecastintothescene,originatingfromthehitlocationoftheprimaryrays.Foreachprimaryray,Mantrawillfireatleastone“Secondary”ray.Thesesecondaryrayscanbedividedintotwotypes-DirectandIndirect.

DirectandIndirectRaysDirectRayscanbedescribedasrayswhichdealwithLights.Thisgenerallymeansthattheraystravelfromsomepositioninthescenetowardthevariouslightsources.Theseraysdetermineifasurfaceisinshadow,andifnot,lightinginformationcanbecalculated.

Thesame“aliasing”problemsdescribedpreviouslycanexistwiththesedirectrays,resultinginanoisyimage.Youwillusuallyfindnoisefromdirectsourcesshowingupwhenrenderingspecular

H16MantraUserGuide

highlightsorthesoftedgesofshadowscastfromarealights.Inthesecases,itmaybenecessarytosendmoredirectrays.

WhenevaluatingtheeffectofsendingmoreDirectRaysinyourrenders,itcansometimesbechallengingtoseparateonesourceofnoisefromanother.Addingthe“DirectLighting(percomponent)”imageplanewillallowyouviewthedirectcontributionofeachcomponentseparately.

Whenattemptingtooptimizethenumberofdirectraysinyourscene,the“DirectSamples”imageplanecanbeadded.Thisplanewillshowyouthenumberofdirectraysusedthroughoutyourimagedisplayedasintensity.

H16MantraUserGuide

IndirectRayscanbedescribedasrayswhichdealwithobjectsandtheirsurfaceproperties.Thisgenerallymeansthatraystravelfromsomepositioninthesceneindirectionsdeterminedbytheshaderattachedtotheobject.Refractionrayswilltravel“through”objects,ReflectionRayswillbounce,andDiffuseRayswillscatterinarandomdirectionwithinahemisphericaldistribution.

Withindirectrays,“aliasing”canbemuchworsethanwithDirectraysandusuallythegreatestcauseofnoiseinarender.Generallyspeaking,small,verybrightfeatureswillcausethemostnoiseinindirectsamples–softreflectionsofverybrightspecularhighlightsonotherobjects,forexample.Inthesecases,itmaybenecessarytosendmoredirectrays.

H16MantraUserGuide

WhenevaluatingtheeffectofsendingmoreIndirectRaysinyourrenders,itcansometimesbechallengingtoseparateonesourceofnoisefromanother.Addingthe“IndirectLighting(percomponent)”imageplanewillallowyouviewthedirectcontributionofeachcomponentseparately.

Whenattemptingtooptimizethenumberofindirectraysinyourscene,the“IndirectSamples”imageplanecanbeadded.Thisplanewillshowyouthenumberofindirectraysusedthroughoutyourimage.

H16MantraUserGuide

VOLUMESSamplingvolumetricobjectsrequiresadifferentapproachthansamplingsurfaces.Whiledirectraysarestillused,theymustsamplethevolumemultipletimeswhiletravellingthroughthevolume.Indirectraysbehaveinasimilarfashion,sentmultipletimesastheray“steps”throughthevolumetricobject.Thismeansthatsamplingvolumesisamuchmoreexpensiveprocessthansamplingasurface.

Asaraytravelsthroughavolume,itmovesforwardataratedeterminedbytheVolumeQuality.Ateachstep,itevaluatestheshaderandaccumulatesthedensityofthevolume.Becausethese

H16MantraUserGuide

densityvaluescanvarydrasticallythroughoutthevolume,nearbyrayscancalculatesubstantiallydifferentvalues,introducingnoiseintotherender.Inthesecases,itmaybenecessarytosendoutmoredirectandindirectraysortotakesmallerstepsthroughthevolume.

Evenatlowsamplingrates,itcanbecostlytorendercleanimagesofvolumetricdata.Thisisbecausetheshadingisrunforeverystepthroughthevolume.However,mantrahasavarietyofwaystooptimizevolumerenderingwhichcandecreaserendertimeswithoutsacrificingdetail.

Oneoptimization,knownasStochasticTransparency,decouplestheaccumulationofdensityvaluesfromtheshadingsamples.Thismeansthattheamountofsamplingcanbegreatlyreducedasvariationsinlightinginformationislessobviousthanvariationsindensity.

H16MantraUserGuide

WhenevaluatingtheeffectofsendingmoreDirectandIndirectraysinyourrenders,itcansometimesbechallengingtoseparateonesourceofnoisefromanother.Addingthe“DirectLighting(percomponent)”and“IndirectLighting(percomponent)”imageplaneswillallowyouviewthedirectandindirectvolumecontributionsseparately.

top related