Maj terminée. Pour consulter la release notes associée voici le lien :
https://about.gitlab.com/releases/2021/07/07/critical-security-release-gitlab-14-0-4-released/

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

Update doc for multi material

parent 0659edc3
......@@ -808,9 +808,18 @@ Note that emittance materials need to be defined inside
a light source markup (e.g., `<area_light>`, `<sphere_light>`)
## Material Aggregate
## Per-face Indexed Material
A mesh may have per-face materials declared. MRF handles this situation using a proxy material aggregating all materials.
A single mesh may use several materials on a per-face basis. MRF handles this situation by using a proxy material aggregating all these materials.
This proxy material is declared as:
<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XML
<material name="a_multi_mat" type="multi_material">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>
All the materials must be present as sub-element of the multi-material.
There two ways of doing so. The first is to declare the materials independently (using the "material" markup and information above) and just reference them by name below the multi-material element:
<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XML
......@@ -818,19 +827,20 @@ A mesh may have per-face materials declared. MRF handles this situation using a
<material name="mat1" type="diffuse">
<some markups />
</material>
<material name="mat2" type="diffuse">
<material name="mat2" type="principled">
<some markups />
</material>
<material name="a_multi_mat" type="multi_material">
<material name="mat1" type="diffuse"/>
<material name="mat2" type="diffuse"/>
<material name="mat1"/>
<material name="mat2"/>
</material>
</materials>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>
It is the syntax used by our blender bridge. The order between in which the single materials and the multi-material are declared is not important.
OR
The second is to declare the materials directly under the multi-material element:
<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XML
......@@ -839,7 +849,7 @@ OR
<material name="mat1" type="diffuse">
<some markups />
</material>
<material name="mat2" type="diffuse">
<material name="mat2" type="PhongNormalized">
<some markups />
</material>
</material>
......@@ -848,7 +858,13 @@ OR
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>
And then the proxy material is attached to the shape with per-face materials declared.
Both ways are equivalent whatever the scene configuration.
All type of materials supported by MRF are also supported as sub-elements of a multi-material.
!!! WARNING Avoid recursivity - Undefined behavior
Using a multi-material as a sub-element of another multi-material leads to undefined behavior and should be avoided.
Then only the proxy multi-material is attached to the shape:
<script type="preformatted">
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XML
......@@ -862,6 +878,13 @@ And then the proxy material is attached to the shape with per-face materials dec
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
</script>
!!! WARNING Limited support for PLY
The support of PLY must be done manually by adding a "mat_idx" property to faces elements. In that case, the materials must be referenced by the multi-material in the exact same order as their index in the PLY (e.g., in the examples above, "mat1" must correspond to material index "0" in the PLY).
If you can, prefer the OBJ mesh format, for which as long as materials have the same name in the material file and in MRF, the match between faces and materials is guaranteed regardless of the order.
!!! Note No support of RTCores
At the moment, this type of material does not exploit RTCores for ray-tracing acceleration in our implementation. If you experience slow performance, consider splitting you mesh beforehand to fall back to a collection of meshes with single material. The full support of RTCores is scheduled for a future version.
# Light sources
All the light sources are stored in the Scene object.
......
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