Mitsuba2在文档中明确说了不支持这个功能,因此转向0.5版本。总体来说,该功能对带有纹理的材质不是太支持,对无纹理的材质还可以。
下面是一些尝试。
Subsurface |
medium |
BSDF |
后面光照 |
效果 | |||
roughplastic |
roughplastic + texture |
roughdielectric |
无 |
有 | |||
√ |
√ |
没有纹理,只显示材质的颜色 | |||||
√ |
√ |
Subsurface中的scale参数可调整纹理占的比例,越小纹理显示比例越大,但相应的材质透明度降低 | |||||
√ |
√ |
没有纹理,只显示材质的颜色,透光 | |||||
√ |
√ |
只显示纹理 | |||||
√ |
√ |
没有纹理 |
BlendBSDF 、Subsurface+BlendBSDF、medium+BlendBSDF都会在后面有光照的时候透光,含BlendBSDF的方案均不能用。
Subsurface+BSDF(roughplastic)
没有纹理,只显示材质的颜色
后面无光 后面有光
<subsurface type="dipole">
<string name="material" value="Regular Chocolate Milk"/>
<float name="scale" value="0.2"/>
<integer name="irrSamples" value="16"/>
</subsurface>
<bsdf type="roughplastic">
<string name="distribution" value="ggx"/>
<float name="alpha" value="0.1"/>
<float name="intIOR" value="1.3"/>
<string name="extIOR" value="air"/>
<boolean name="nonlinear" value="true"/>
<spectrum name="diffuseReflectance" value="0"/>
</bsdf>
Subsurface+BSDF(roughplastic + texture)
Subsurface中的scale参数可调整纹理占的比例,越小纹理显示比例越大,但相应的材质透明度降低。
后面无光 后面有光
<subsurface type="dipole">
<string name="material" value="Regular Chocolate Milk"/>
<float name="scale" value="0.2"/>
<integer name="irrSamples" value="16"/>
</subsurface>
<bsdf type="roughplastic">
<string name="distribution" value="ggx"/>
<float name="alpha" value="0.1"/>
<float name="intIOR" value="1.3"/>
<string name="extIOR" value="air"/>
<boolean name="nonlinear" value="true"/>
<texture type="bitmap" name="diffuseReflectance">
<string name="filename" value="grape$numtex.png"/>
<transform name="to_uv"/>
</texture>
</bsdf>
Subsurface+BSDF(roughdielectric)
没有纹理,只显示材质的颜色,透光
后面无光 后面有光
<subsurface type="dipole">
<string name="material" value="Regular Chocolate Milk"/>
<float name="scale" value="0.2"/>
<integer name="irrSamples" value="16"/>
</subsurface>
<bsdf type="roughdielectric">
<string name="distribution" value="ggx"/>
<float name="alpha" value="0.1"/>
<float name="intIOR" value="1.2"/>
<string name="extIOR" value="air"/>
<spectrum name="diffuseReflectance" value="0"/>
</bsdf>
medium+BSDF(roughplastic + texture)
只显示纹理
后面无光 后面有光
<medium type="homogeneous" name="interior" >
<string name="material" value="Grape Juice"/>
<float name="scale" value="1000"/>
</medium>
<bsdf type="roughplastic">
<string name="distribution" value="ggx"/>
<float name="alpha" value="0.13"/>
<float name="intIOR" value="1.3"/>
<string name="extIOR" value="air"/>
<boolean name="nonlinear" value="true"/>
<texture type="bitmap" name="diffuseReflectance">
<string name="filename" value="grape$numtex.png"/>
<transform name="to_uv"/>
</texture>
</bsdf>
medium+BSDF(roughplastic)
无纹理
后面无光 后面有光
<medium type="homogeneous" name="interior" >
<string name="material" value="Grape Juice"/>
<float name="scale" value="0.5"/>
</medium>
<bsdf type="roughplastic">
<string name="distribution" value="ggx"/>
<float name="alpha" value="0.13"/>
<float name="intIOR" value="1.3"/>
<string name="extIOR" value="air"/>
<boolean name="nonlinear" value="true"/>
<spectrum name="diffuseReflectance" value="0"/>
</bsdf>
Subsurface+BlendBSDF(roughplastic + texture + roughdielectric)
光会透过
后面无光 后面有光
<subsurface type="dipole">
<string name="material" value="Grape Juice"/>
<float name="scale" value="0.0013"/>
<integer name="irrSamples" value="16"/>
</subsurface>
<bsdf type="blendbsdf">
<float name="weight" value="0.01"/>
<bsdf type="roughplastic">
<string name="distribution" value="ggx"/>
<float name="alpha" value="$alphavalue"/>
<float name="intIOR" value="$int_iorC"/>
<string name="extIOR" value="air"/>
<boolean name="nonlinear" value="true"/>
<texture type="bitmap" name="diffuseReflectance">
<string name="filename" value="grape$numtex.png"/>
<transform name="to_uv"/>
</texture>
</bsdf>
<bsdf type="roughdielectric">
<string name="distribution" value="ggx"/>
<float name="alpha" value="0.1"/>
<float name="int_ior" value="1.2"/>
<string name="ext_ior" value="air"/>
</bsdf>
</bsdf>
medium+BlendBSDF(roughplastic + texture + roughdielectric)
光会透过
后面无光 后面有光
<medium type="homogeneous" name="interior" >
<string name="material" value="Grape Juice"/>
<float name="scale" value="500"/>
</medium>
<bsdf type="blendbsdf">
<float name="weight" value="0.2"/>
<bsdf type="roughplastic">
<string name="distribution" value="ggx"/>
<float name="alpha" value="$alphavalue"/>
<float name="intIOR" value="$int_iorC"/>
<string name="extIOR" value="air"/>
<boolean name="nonlinear" value="true"/>
<texture type="bitmap" name="diffuseReflectance">
<string name="filename" value="grape$numtex.png"/>
<transform name="to_uv"/>
</texture>
</bsdf>
<bsdf type="roughdielectric">
<string name="distribution" value="ggx"/>
<float name="alpha" value="0.1"/>
<float name="int_ior" value="1.2"/>
<string name="ext_ior" value="air"/>
</bsdf>
</bsdf>
BlendBSDF(roughplastic + texture + roughdielectric)
光会透过
后面无光 后面有光
<bsdf type="blendbsdf">
<float name="weight" value="0.2"/>
<bsdf type="roughplastic">
<string name="distribution" value="ggx"/>
<float name="alpha" value="$alphavalue"/>
<float name="intIOR" value="$int_iorC"/>
<string name="extIOR" value="air"/>
<boolean name="nonlinear" value="true"/>
<texture type="bitmap" name="diffuseReflectance">
<string name="filename" value="grape$numtex.png"/>
<transform name="to_uv"/>
</texture>
</bsdf>
<bsdf type="roughdielectric">
<string name="distribution" value="ggx"/>
<float name="alpha" value="0.1"/>
<float name="int_ior" value="1.2"/>
<string name="ext_ior" value="air"/>
</bsdf>
</bsdf>