Blend material¶
Description¶
This special materials does blends, or linear combinations, of two other materials, following a user-defined blend function varying between 0 and 1. This is often used for mixing materials (for instance, with a constant blend function equal to 0.5), or for defining areas with different materials (with a blend function taking only 0 and 1 values).
The bulk medium of material_a is used for the blended material, bulk medium of material_b is ignored. Emitters are ignored
Warning
This material is somewhat dangerous to use, because its behavior is not intuitive with emitters and bulk media. It is deprecated and was replaced by Blend BSDF
Children Nodes¶
The material A |
|
The material B |
|
The blend function defining the ratio of materials A and B, 0 corresponding to A and 1 to B |
Parameters¶
name |
type |
description |
---|---|---|
forcestep |
boolean |
If set to true, apply a step function to the blend shader with a threshold of 0.5 to force 0 and 1 values |
Ocean XML 6.1 example¶
<material type="blend" name="material" forcestep="false">
<material type="generic" name="material_a">
<bsdf type="reflective" name="bsdf" rereflections="true">
<roughness type="phong" name="roughness">
<scalarshader type="uniform" name="exponent" value="500"/>
</roughness>
<intlaw type="cfresnel" name="intlaw">
<dielectricfunc type="linked" name="dielectricfunc" target="ocean-metals::Ti"/>
</intlaw>
</bsdf>
</material>
<material type="generic" name="material_b">
<bsdf type="oren_nayar" name="bsdf">
<filtershader type="uniform" name="diffuse">
<spectrum type="tabulated" name="spectrum">
3.8e-07 0.2 4.37e-07 0.25 4.94e-07 0.3 5.51e-07 0.35 6.09e-07 0.5 6.66e-07 0.6 7.23e-07 0.7 7.8e-07 0.7
</spectrum>
</filtershader>
<scalarshader type="uniform" name="sigma" value="1"/>
</bsdf>
</material>
<scalarshader type="texture" name="blend">
<prm channel="G"/>
<prm scale="1"/>
<prm offset="0"/>
<prm greypt="0.5"/>
<prm uvscale="1"/>
<image type="file" name="image" path="gradient.png"/>
</scalarshader>
</material>