21
H16 Mantra User Guide REMOVING NOISE As described in the Sampling section, under-sampling is almost always the cause of noise in your renders. Simply increasing the overall amount of sampling will reduce the amount of noise, but it will also cause many parts of your image to be over-sampled and your render times to increase. Targeting the various types of rays to the correct part of your image is critical for optimization, sending more of the wrong kind of ray will not increase the quality of your render. The goal, when setting your sampling parameters, is to balance Speed with Quality. For more information about the specific parameters described below, see The Sampling Tab and the Extra Image Planes Tab. In general, when attempting to remove the noise in your render, it is good practice to start by adding the following image planes: Direct Lighting ( per component ) Indirect Lighting ( per component ) Direct Samples Indirect Samples These will allow you to analyze different parts of your scene one at a time. The following render is an example of a scene with multiple material types and motion blur. All sampling values on the Mantra Node are set to the defaults except for Pixel Samples, which are 1x1. On the limits tab, Diffuse Limit has been set to 2, Volume Limit has been set to 2 and SSS limit has been set to 1.

H16 Mantra User Guide REMOVING NOISE...H16 Mantra User Guide As with Motion Blur, removing noise from images with Depth of Field may have the side effect of removing other types of

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

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.