Commit a7ac29a6 authored by MURRAY David's avatar MURRAY David
Browse files

working on doc

parent 9524b2f5
......@@ -55,6 +55,9 @@
<li class="current toctree_l3">
<a class="current" href="./scene_format.md.html#toc3.5">Emissive Materials</a>
</li>
<li class="current toctree_l3">
<a class="current" href="./scene_format.md.html#toc3.6">Material Aggregate</a>
</li>
</ul>
</li>
<li class="current toctree_l2">
......@@ -805,6 +808,61 @@ Note that emittance materials need to be defined inside
a light source markup (e.g., `<area_light>`, `<sphere_light>`)
## Material Aggregate
A mesh may have per-face materials declared. MRF handles this situation using a proxy material aggregating all materials.
<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XML
<materials>
<material name="mat1" type="diffuse">
<some markups />
</material>
<material name="mat2" type="diffuse">
<some markups />
</material>
<material name="a_multi_mat" type="multi_material">
<material name="mat1" type="diffuse"/>
<material name="mat2" type="diffuse"/>
</material>
</materials>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>
OR
<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XML
<materials>
<material name="a_multi_mat" type="multi_material">
<material name="mat1" type="diffuse">
<some markups />
</material>
<material name="mat2" type="diffuse">
<some markups />
</material>
</material>
</materials>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>
And then the proxy material is attached to the shape with per-face materials declared.
<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XML
<shapes>
<shape ref_material="a_multi_mat">
<mesh name="a_mesh">
<obj file="a_mesh.obj"/>
</mesh>
</shape>
</shapes>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>
# Light sources
All the light sources are stored in the Scene object.
Several types of light sources are supported:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment