mitsuba icon indicating copy to clipboard operation
mitsuba copied to clipboard

BSDF child node for singlescatter BSSRDF

Open xin-xinhanggao opened this issue 5 years ago • 2 comments

I want to render sssdragon with singlescatter plugin and singlescatter needs a BSDF child node. I set the child node like this

<subsurface type="singlescatter">
	<string name="material" value="skin2"/>
	<float name="scale" value="0.25"/>
	
	<bsdf type="dielectric">
		<spectrum name="diffuseReflectance" value="0"/>
	</bsdf>
</subsurface>

but get lots of nan value from ImageBlock

xin-xinhanggao avatar Oct 31 '18 04:10 xin-xinhanggao

I'm going to have a look at it.

holzschu avatar Nov 15 '18 14:11 holzschu

You can add:

 			<boolean name="fastSingleScatter" value="false"/>

if you want the (accurate, but slow) single scattering. I usually use:

		<subsurface type="singlescatter">
			<bsdf type="dielectric">
				<float name="intIOR" value="1.5"/>
				<float name="extIOR" value="1.0"/>
			</bsdf>
			<boolean name="fastSingleScatter" value="false"/>
                        ... material ... 
		</subsurface>

Fast single scatter is very approximate, as it ignores the second refraction. The NaN from ImageBlock occur approximately once every 10 000 sample in the sssDragon scene, less in other scenes. You can safely ignore them.

holzschu avatar Nov 15 '18 16:11 holzschu