Blend material

From Eclat-Digital Ocean 2014 Documentation
Jump to: navigation, search
Example of blend material between a metal and diffuse clay


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).

Children nodes

material-2014.png material_a
Material : The material A
material-2014.png material_b
Material : The material B
scalarshader-2014.png blend
Scalar shader : The blend function defining the ratio of materials A and B, 0 corresponding to A and 1 to B


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 2.0 example

<?xml version="1.0" encoding="UTF-8"?>
<oceanroot version="2.0">
<material type="blend" name="previewmaterial" forcestep="false">
	<material type="reflective" name="material_a" rereflections="true" polarized="true">
		<intlaw type="cfresnel" name="intlaw">
			<medium type="linked" name="medium" target="ocean-metals::Ti"/>
		<roughness type="phong" name="roughness">
			<scalarshader type="uniform" name="exponent" value="500"/>
	<material type="oren_nayar" name="material_b">
		<filtershader type="uniform" name="diffuse">
			<spectrum type="tabulated" start="380E-9" end="780E-9" num="8">
				0.2 0.25 0.3 0.35 0.5 0.6 0.7 0.7
		<scalarshader type="uniform" name="sigma" value="1"/>
	<scalarshader type="texture" name="blend" greypt="0.5">
		<image type="" name="image" path="gradient.png"/>

See also

Material types