Mitsuba 0.5 Subsurface scattering的一些尝试

本文详细介绍了Mitsuba2渲染引擎中Subsurface、BSDF和BlendBSDF等技术在处理无纹理和带纹理材质时的效果,特别关注了透光性、纹理占比与材质颜色的展现。重点实验了粗糙塑料、塑料加纹理和粗糙介电体等案例。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值