H16 Mantra User Guide REMOVING NOISE...H16 Mantra User Guide As with Motion Blur, removing noise...
Transcript of H16 Mantra User Guide REMOVING NOISE...H16 Mantra User Guide As with Motion Blur, removing noise...
H16MantraUserGuide
REMOVINGNOISEAsdescribedintheSamplingsection,under-samplingisalmostalwaysthecauseofnoiseinyourrenders.Simplyincreasingtheoverallamountofsamplingwillreducetheamountofnoise,butitwillalsocausemanypartsofyourimagetobeover-sampledandyourrendertimestoincrease.Targetingthevarioustypesofraystothecorrectpartofyourimageiscriticalforoptimization,sendingmoreofthewrongkindofraywillnotincreasethequalityofyourrender.Thegoal,whensettingyoursamplingparameters,istobalanceSpeedwithQuality.Formoreinformationaboutthespecificparametersdescribedbelow,seeTheSamplingTabandtheExtraImagePlanesTab.
Ingeneral,whenattemptingtoremovethenoiseinyourrender,itisgoodpracticetostartbyaddingthefollowingimageplanes:
DirectLighting(percomponent)
IndirectLighting(percomponent)
DirectSamples
IndirectSamples
Thesewillallowyoutoanalyzedifferentpartsofyoursceneoneatatime.
Thefollowingrenderisanexampleofascenewithmultiplematerialtypesandmotionblur.AllsamplingvaluesontheMantraNodearesettothedefaultsexceptforPixelSamples,whichare1x1.Onthelimitstab,DiffuseLimithasbeensetto2,VolumeLimithasbeensetto2andSSSlimithasbeensetto1.
H16MantraUserGuide
ForeachExamplebelow,wewilladjustonlytheparametersthatarementionedinthedescriptionsaccompanyingeachnoisetype.
MotionBlurWhen“AllowMotionBlur”isenabledontheMantranode,fastmovingobjectscancauseyourimagetobecomenoisy.Thisnoiseisessentiallyatypeofaliasingthatoccurswhenanobjectmustbesampledacrosstimeaswellasspace.SeethechapteronMotionBlur,foramoreindepthexplanationofhowmantrasamplesobjectsinmotionandhowcertainobjectsmaybeoptimizedforheavilymotionblurredscenes.
IncreasingPixelSamples,alsodescribedasPrimaryRays,istheonlywaytoremovethistypeofnoise.
H16MantraUserGuide
IncreasingPixelSampleswillactasamultiplierforallothertypesofrays(seeSamplingTab).Intheexampleabove,youcanseethatincreasingthepixelsampleshasalsoremovedmostoftheothertypesofnoiseinthisscene.Forthisreason,itisagoodideatoremoveMotionBlurasafirststepasitmaysolveothertypesofnoiseinyoursceneatthesametime.
Toidentifythistypeofnoise,itcanbeusefultochecktheAlphaChannelfornoiseattheendsofobjects.Ifoverlappingobjectsmakethisimpossible,turnoff“AllowMotionBlur”andcheckthenoiselevelsversusthenon-motionblurredscene.
DepthofFieldWhen“EnableDepthofField”ischeckedontheMantraNode,objectswhicharedistantfromthecamera’s“FocusDistance”canbecomenoisy.Thisisespeciallyevidentinbrighthighlightsandtheedgesofobjects.
IncreasingPixelSamplesistheonlywaytoremovethistypeofnoise.
H16MantraUserGuide
AswithMotionBlur,removingnoisefromimageswithDepthofFieldmayhavethesideeffectofremovingothertypesofnoiseaswell.Considerremovingthistypeofnoisefirstbeforeattemptingtoremovenoisefromothersources.However,alwayscheckthe“infocus”areasofyourimageforanyoftheothernoisetypesassomeextraattentionmayberequiredintheseareas.
Toidentifythistypeofnoise,itcanbeusefultochecktheAlphaChannelfornoiseattheedgesofobjectsoralongthemotionpath.Ifoverlappingobjectsmakethisimpossible,turnoff“EnableDepthofField”andchecktheamountofnoiseintheimagewithoutDepthofFieldblurring.
EdgeAliasing
WithoutenoughPrimaryRays,theedgesofobjectscanappearjaggedandrough.Thiscanbeespeciallyevidentinhigh-contrastareasorwithinhigh-frequencypatterns.
IncreasingPixelSamplesistheonlywaytoremovethistypeofnoise.
H16MantraUserGuide
Intheaboveexample,noticehowtheedgesofthesphereandplaneappearjaggedintheimageontheleft.
Toidentifythistypeofnoise,itcanbeusefultochecktheAlphaChannelfornoiseattheedgesofobjectsoralongthemotionpath.
Formanyscenes,settingpixelsamplesto3x3willbesufficienttoremovethistypeofnoise.Forimageswithhighfrequencypatternsgeneratedbyashader,itmaybenecessarytoincreasethesevaluestogetafullyanti-aliasedimage.Ifpossible,itmaybemoreefficienttohandlefilteringintheshader,ratherthatusingthebruteforceapproachofincreasingpixelsamples.
H16MantraUserGuide
DIRECTILLUMINATIONDirectReflectionsDirectReflectionsrefertothereflectionoflightsourcesdirectlyfromthesurfaceofanobject.ThesereflectionscanexhibitaspecklednoisepatternespeciallyinmaterialswithsmallamountsofroughnessincombinationwithAreaLightsorEnvironmentLights.
ThebestwaytoremovethistypeofnoiseistoincreasetheSamplingamountontheLightwhichiscausingthenoise.IncreasingPixelSampleswillalsohelpremovethenoise,butwillcauseanincreaseinallothertypesofrays.ItcanoftenbeagoodideatostartwiththedefaultPixelSamplevalueof3x3becauseitwillalsoremoveanydistractingEdgeAliasingfromyourimage.
IncreasinglightsampleswillactlikeamultiplieronthenumberofDirectRaysinyourscenesoitisnotagoodideatosimplyincreasesamplestoextremelyhighvaluesforalllights.IncreasingDirectrays(MinandMaxRaySamples)willhelpremovethistypeofnoise.Thismeansthatyoumustbalancetheneedtocleanupnoisefromaspecificlight,againstcleaningupDirectSourcesofnoisethroughoutyourimage.
Toidentifythistypeofnoise,enablethe“DirectReflect”imagelayer,thiswillallowyoutoexaminethecontributionstoDirectReflectionswithoutinterferencefromothersourcesofnoiseinyourscene.
H16MantraUserGuide
Intheaboveimages,theDirectReflectionnoiseismuchclearersinceitnolongermixedinwithallothersourcesofnoise.
Forcomplexsceneswithmanylights,itcanbeusefultoexportthe“DirectReflect”layerusingthe“PerLight”option.Thiswillallowyoutoisolatethespecificlightsthatarecausingnoiseinyourscene,allowingyoutoincreasesamplingonlyontheoffendinglightsources.
H16MantraUserGuide
DirectRefractionsDirectRefractionsarecausedbytherefractionoflightsourcesthroughasinglesurface(Agridforinstance)TheserefractionscanexhibitaspecklednoisepatternespeciallyinmaterialswithsmallamountsofroughnessincombinationwithAreaLightsorEnvironmentLights.
(RememberthatanyrefractionsthroughmorethanonesurfacewillbeconsideredanIndirectRefraction.)
ThebestwaytoremovethistypeofnoiseistoincreasetheSamplingamountontheLightwhichiscausingthenoise.IncreasingPixelsampleswillalsohelpremovethenoise,butwillcauseanincreaseinallothertypesofrays,causingareasoftheimagewithoutnoisetobecomeover-sampled.
Intheaboveexample,increasingthePixelSamplesto3x3removesalltheDirectRefractionnoiseandsotheSamplingQualityontheEnvironmentLightdidnotneedtobeadjusted.Thisisanothergoodreasontoapproachtheremovalofnoiseinstages.Forthiscase,RemovingEdgeAliasinghaseffectivelyresolvedtheDirectRefractionnoiseaswell.
IncreasinglightsampleswillactlikeamultiplieronthenumberofDirectRaysinyourscenesoitisnotagoodideatosimplyincreasesamplestoextremelyhighvaluesforalllights.Also,increasingDirectrays(MinandMaxRaySamples)willalsohelpcleanupthistypeofnoise.Thismeansthatyoumustbalancetheneedtocleanupnoisefromaspecificlight,againstcleaningupDirectSourcesofnoisethroughoutyourimage.
Toidentifythistypeofnoise,enablethe“DirectRefract”imagelayer,thiswillallowyoutoexaminethecontributionstoDirectRefractionswithoutinterferencefromothersourcesofnoiseinyourscene.
H16MantraUserGuide
Forcomplexsceneswithmanylights,itcanbeusefultoexportthe“DirectRefract”layerusingthe“PerLight”option.Thiswillallowyoutoisolatethespecificlightsthatarecausingnoiseinyourscene,allowingyoutoincreasesamplingonlyontheoffendinglightsources
DirectShadowsDirectShadows,whichoccurwhenapointinyourscenedoesnothaveadirectpathtoalightsource,canexhibitaspeckledorroughnoisepattern.Thisisespeciallyevidentinsoftshadowscastfromlargearealights.
ThebestwaytoremovethistypeofnoiseistoincreasetheSamplingamountonthelightwhichiscausingthenoise.IncreasingPixelsampleswillalsohelpremovethenoise,butwillcauseanincreaseinallothertypesofrays,causingareasoftheimagewithoutnoisetobecomeover-sampled.
H16MantraUserGuide
Increasinglightsampleswillactlikeamultiplieronthenumberofdirectraysinyourscenesoitisnotagoodideatosimplyincreasesamplestoextremelyhighvaluesforalllights.Also,increasingDirectrays(MinandMaxRaySamples)willalsohelpcleanupthistypeofnoise.Thismeansthatyoumustbalancetheneedtocleanupnoisefromaspecificlight,againstcleaningupDirectSourcesofnoisethroughoutyourimage.
Toidentifythistypeofnoise,enablethe“DirectDiffuse”imagelayer,thiswillallowyoutoexaminetheshadowscausedbydirectlightingwithoutinterferencefromindirectsourcesofshadow.
Intheaboveexample,identifyingwhichlightisresponsibleforthenoiseisdifficult,especiallysinceenvironmentlightshavetheeffectof“fillingin”shadows.Itcanbeusefulinthesecasestoexportthe“DirectDiffuse”layerusingthe“PerLight”option.Thiswillallowyouisolatethespecificlightsthatarecausingnoiseinyourscene,allowingyoutoincreasesamplingonlyontheoffendinglightsources.
H16MantraUserGuide
Intheexamplesabove,itismuchmoreobviouswhichlightiscausingthevarioustypesofnoise.Thisisespeciallyevidentontheedgesoftheshadowscastbythearealight.Inthiscase,youcanseethattheArealightrequiredfewersamplestoremovethenoisethantheEnvironmentlight.Incomplexscenes,thiskindofcloseexaminationofper-lightnoisecanhelppreventsignificantlyover-samplingyourscene.
H16MantraUserGuide
INDIRECTILLUMINATIONIndirectDiffuse
IndirectDiffuse,whichisthelightcontributionfromotherobjectsinascene,canbeasignificantsourceofnoise.Thiscanbeespeciallyevidentinsceneswithphysicallyaccuratelightsourceswhicharealsoverynearotherobjects(Lightsconcesorinsetlights,forinstance.)andonlycontributeasmallamounttodirectlighting.
Thebestwaytoremovethistypeofnoiseistoincreasethenumberofindirectsamplesthatarebeingsent.YoucanachievethisbyadjustingtheDiffuseQualityparameterontheMantranode.IncreasingPixelsampleswillalsohelpremovethenoise,butwillcauseanincreaseinallothertypesofrays,causingareasoftheimagewithoutnoisetobecomeover-sampled.
Toidentifythistypeofnoise,enablethe“IndirectDiffuse”imagelayer,thiswillallowyoutoexaminethelightcontributionstothislayerwithoutinterferencefromothertypesofnoise.
H16MantraUserGuide
Keepinmindthatyoudonothavetocompletelyremovenoisefromthiscomponenttohaveacleanimage,indirectnoiseisoftenimperceptiblewhenithasbeencombinedwithdirectlightinginformation.AlwaysrefertotheCombinedColorimageplanetoseehowyoursamplingisaffectingthefidelityofthefinalimage.
IndirectReflections
IndirectReflections,whicharethereflectionsofotherobjects,canberesponsibleformuchofthenoiseinyourscene.Thiscanbeparticularlyevidentinsceneswithverybrightglossyreflectionsincombinationwithotherobjectswithroughreflections.
Thebestwaytoremovethistypeofnoiseistoincreasethenumberofindirectsamplesthatarebeingsent.YoucanachievethisbyadjustingtheReflectionQualityparameterontheMantranode.IncreasingPixelsampleswillalsohelpremovethenoise,butwillcauseanincreaseinallothertypesofrays,causingareasoftheimagewithoutnoisetobecomeover-sampled.
Toidentifythistypeofnoise,enablethe“IndirectReflect”imagelayer,thiswillallowyoutoexaminetheamountofnoisecausedbyindirectreflectionswithoutinterferencefromothertypesofnoise.
H16MantraUserGuide
Keepinmindthatyoudonothavetocompletelyremovenoisefromthiscomponenttohaveacleanimage,indirectnoiseisoftenimperceptiblewhenithasbeencombinedwithdirectlightinginformation.However,unlikeindirectdiffusenoise,indirectreflectionscanberesponsibleformostofthecolorofafinalpixel.(Anobjectwithamirror-likefinish,forexample)AlwaysrefertotheCombinedColorimageplanetoseehowyoursamplingisaffectingthefidelityofthefinalimage.
IndirectRefractions
IndirectRefractions,whicharetherefractionsofotherobjectsandsurfacesinyourscene,canbesignificantsourcesofnoiseinyourscene.Thisisespeciallytruewhenrenderingrefractiveobjectswithahighroughnessvalue.
Thebestwaytoremovethistypeofnoiseistoincreasethenumberofindirectsamplesthatarebeingsent.YoucanachievethisbyadjustingtheRefractionQualityparameterontheMantranode.IncreasingPixelsampleswillalsohelpremovethenoise,butwillcauseanincreaseinallothertypesofrays,causingareasoftheimagewithoutnoisetobecomeover-sampled.
Toidentifythistypeofnoise,enablethe“IndirectRefract”imagelayer,thiswillallowyoutoexaminetheamountofnoisecausedbyindirectrefractionswithoutinterferencefromothertypesofnoise.
H16MantraUserGuide
Keepinmindthatyoudonothavetocompletelyremovenoisefromthiscomponenttohaveacleanimage,indirectnoiseisoftenimperceptiblewhenithasbeencombinedwithdirectlightinginformation.However,unlikeindirectdiffusenoise,indirectrefractionscanberesponsibleformostofthecolorofafinalpixel.(Aglassofwater,forinstance.)AlwaysrefertotheCombinedColorimageplanetoseehowyoursamplingisaffectingthefidelityofthefinalimage.
SubsurfaceScattering
SubsurfaceScatteringreferstoatypeofindirectlightcausedbylightscatteringinsidethesurfaceofanobjectbeforeexiting.Typically,thiseffectisseeninmaterialslikecandlewaxorhumanskin.ObjectswithSubSurfaceScatteringenabledcancontributeasignificantamountofnoiseinyourscene.
Toremovethistypeofnoise,increasetheSSSQualityparameterontheMantranode.IncreasingPixelsampleswillalsohelpremovethenoise,butwillcauseanincreaseinallothertypesofrays,causingareasoftheimagewithoutnoisetobecomeover-sampled.
Toidentifythistypeofnoise,enablethe“IndirectSSS”imagelayer,thiswillallowyoutoexaminetheamountofnoisecausedbyindirectreflectionswithoutinterferencefromothertypesofnoise
H16MantraUserGuide
Keepinmindthatyoudonothavetocompletelyremovenoisefromthiscomponenttohaveacleanimage,SSSnoiseisoftenimperceptiblewhencombinedwithotherlightingcomponents.However,insomematerialstheSSScomponentmayberesponsibleformuchofthefinalpixelcolor,inthosecasesasignificantincreaseinthenumberofrayssentmaybenecessary.Additionally,becauseSubsurfaceScatteringishighlydependingontheviewingangle,itmaybeagoodideatotestyoursamplingsettingsacrossmultipleframesifyourcameraorobjectisanimated.AlwaysrefertotheCombinedColorimageplanetoseehowyoursamplingisaffectingthefidelityofthefinalimage.
VOLUMES
Volumesrequireadifferentsamplingstrategythansurfaces,rays“march”througheachobjectandaccumulatevaluesacrossmultipledepthsamples.Thisaddedcomplexitycanmakerenderingvolumescostly.Likesurfaces,itisbesttoapproachtheremovalofnoiseinaseriesofstagesbasedonthetypeofnoisepresent.DirectVolumesDirectVolumetriclighting,referstovolumesthathavereceivetheirlightingonlydirectlyfromlightsources.
Whenrenderingvolumes,therecanbemorethanonetypeofnoisepresentpercomponent-noisefromunder-samplingthetransparentpartsofanobjectandnoisefromunder-samplingthelights.
Tobegin,increasingStochasticSampleswilldramaticallyreducenoisewithoutcausingalargeincreaseinrendertimes.Thiswillbemostnotableinsemi-transparentareas,usuallyinthesoftedgesofthevolumetricobject.Atsomepoint,increasingStochasticSampleswillnolongerhaveasignificanteffectonnoise.Ifthisoccurs,andnoiseremainsinthiscomponent,beginincreasingMaxRaySamplesslowlyuntiltheremainingnoiseisremoved.
H16MantraUserGuide
Toidentifythesetypesofnoise,enablethe“DirectVolume”imagelayer,thiswillallowyoutoexaminetheamountofnoiseinthiscomponentwithoutinterferencefromtypesofnoise.
Aswithallnoisetypes,increasingPixelsampleswillhelpreducethistypeofnoise.Thiscanbeparticularlyexpensivewhenrenderingvolumes,soitisbesttoavoidthisifpossible.However,thedefaultsettingof3x3pixelsamplesisoftenagoodstartingplace.
Ifyouplantocompositeyourvolumetricimageswithaseparatebackgroundimage,besuretooccasionallycheckthenoiselevelsaftercompositing.Noisethatisevidentagainstablackbackgroundmaybeinvisibleonyourfinalplate.Theoppositecanalsobetrue,wherenoiseisinvisibleagainstablackbackground,butbecomesobviouswhenthealphachanneloftheimageistakenintoaccount.Asmuchaspossible,refertotheCombinedColorchannel(orthecompositedfinalframe)toverifyhowyoursamplingisaffectingthefidelityofyourimage.
IndirectVolumetricLightingIndirectVolumetricLighting,whichinvolvesvolumeswhichreceivelightfromindirectsourcessuchasotherobjectsorthroughthescatteringoflightwithinthevolumeitself,cancreatesignificantamountsofnoiseinyourrenders.Indirectvolumetricnoiseismostoftennoticeableintheshadowedareasofvolumetricobjects.
H16MantraUserGuide
AswithDirectVolumenoise,beginbyremovingthenoisecausedbyunder-samplingtheopacityofyourvolumebyincreasingStochasticSamples.However,ifyou’vealreadyremovedthistypeofnoisefromyourdirectvolumecomponent,youmayfindthatincreasingthevalueofthisparameterhaslittleeffectsincetransparentsamplesaresharedbetweenthesecomponents.
Theremainingnoiseislikelyduetounder-samplingtheindirectsourcesoflightinyourscene.Toremovethisnoisetype,slowlyincreasetheMaxRaySamplesparameteruntilthenoiseisresolved.LikeStochasticsampling,thisparameterissharedwiththedirectvolumecomponent.However,becauseindirectsamplingofvolumescanbeespeciallynoisy,itislikelyyouwillneedtoincreasethemaxraysamplesfurthertoremovenoisefromthiscomponent.
Toidentifythistypeofnoise,enablethe“IndirectVolume”imagelayer,thiswillallowyoutoexaminetheamountofnoisecausedbyindirectvolumetriclightingwithoutinterferencefromtypesofnoise.
Keepinmindthatyoudonothavetocompletelyremovenoisefromthiscomponenttohaveacleanimage,oftenindirectnoiseisinvisiblewhenithasbeencombinedwithdirectlightinginformation.AlwaysrefertotheCombinedColorimageplanetoseehowyoursamplingisaffectingthefidelityofthefinalimage.
VolumeQualityUnliketheother“Quality”parametersontheSamplingTaboftheMantraNode,VolumeQualitydoesnotrefertotheamountofindirectsampling.Instead,itexplicitlyreferstothenumberofvoxelswhichareconsideredforsampling.(See“TheSamplingtab”formoreinformationonthisparameter)
Ingeneral,itwillbeunnecessarytochangethisparametersolongasStochasticTransparencyinenabled.However,itispossiblethatsmalldetailswillbemissedwhenthisVolumeQualityissettoolow.
H16MantraUserGuide
Ifyoufeelthatthereismoreinformationinthevolumethanappearsintherender,considerincreasingthisvalue.
WhenStochasticTransparencyisdisabled,thisparameterdirectlycontrolstheamountofsamplinginthevolumeandwillhaveadramaticeffectonrendertimes.
FINALIMAGEHereisaversionofthecompletescenewiththerenderingsettingsrequiredtogenerateacleanimage.
SPECIALCASESInsomecases,theremaybespecificobjectsinyourscenethatareespeciallynoisyincomparisontootherobjects.Youmayfindthattogetenoughsamplesontotheseobjectsyouwillendupover-samplingtherestofyourscene.Thiscanoccurinmanydifferentcircumstances,butacommoncausewouldbearefractiveorreflectiveshaderwithhighroughnessvalues.
H16MantraUserGuide
Toavoidthisover-samplingproblem,youcanaddthesamplingpropertiesontotheobjectitself.Thiswillmeanthatonlytheproblem-casewillreceivemoresamples.Toachievethis,gotoanobjectandselectthe“EditRenderingParameters”optioninthegearicon.
Under“RenderProperties”,navigatetotheMantra/Samplingfolder(OrusetheFilterFieldtonarrowyoursearch).Addthefollowingpropertiestoyourobject:–
DiffuseQuality
ReflectionQuality
RefractionQuality
SSSQuality
MaxRaySamples
MinRaySamples
NoiseLevel
ThesepropertieswillgiveyouthesamecontroloversamplingthatyouhaveontheMantranode,butisolatedtothisspecificobject.NotethatPixelSamplescannotbealteredperobject,itisaglobalsetting.
H16MantraUserGuide
ThesphereontherighthashadtheSamplingparametersaddedandthevaluesadjustedtoremoveanynoise.TherestoftheobjectsinthesceneusethesamplingvaluessetontheMantranode.(Forthepurposesofthisexample,NoiseLevel:0.01,MinRays1,MaxRays2).
Youcanseethatmantrasamplestheobjectsinthescenesatdifferentrates,allowingyoutooptimizetherenderingofspecificobjectsinyourscenewithoutnegativelyaffectingtheoverallsamplingofyourimage.