Update static version of Materials.md.html
This commit is contained in:
@@ -50,6 +50,10 @@ counter-increment: h6;margin-right:10px}</style><style>.hljs{display:block;overf
|
||||
    <a href="#materialmodels/litmodel/clearcoatnormal" class="level3"><span class="tocNumber">3.1.13  </span>Clear coat normal</a><br>
|
||||
    <a href="#materialmodels/litmodel/emissive" class="level3"><span class="tocNumber">3.1.14  </span>Emissive</a><br>
|
||||
    <a href="#materialmodels/litmodel/post-lightingcolor" class="level3"><span class="tocNumber">3.1.15  </span>Post-lighting color</a><br>
|
||||
    <a href="#materialmodels/litmodel/indexofrefraction" class="level3"><span class="tocNumber">3.1.16  </span>Index of refraction</a><br>
|
||||
    <a href="#materialmodels/litmodel/transmission" class="level3"><span class="tocNumber">3.1.17  </span>Transmission</a><br>
|
||||
    <a href="#materialmodels/litmodel/absorption" class="level3"><span class="tocNumber">3.1.18  </span>Absorption</a><br>
|
||||
    <a href="#materialmodels/litmodel/micro-thicknessandthickness" class="level3"><span class="tocNumber">3.1.19  </span>Micro-thickness and thickness</a><br>
|
||||
  <a href="#materialmodels/subsurfacemodel" class="level2"><span class="tocNumber">3.2  </span>Subsurface model</a><br>
|
||||
    <a href="#materialmodels/subsurfacemodel/thickness" class="level3"><span class="tocNumber">3.2.1  </span>Thickness</a><br>
|
||||
    <a href="#materialmodels/subsurfacemodel/subsurfacecolor" class="level3"><span class="tocNumber">3.2.2  </span>Subsurface color</a><br>
|
||||
@@ -232,10 +236,11 @@ in <a href="#table_standardproperties">table 1</a>.
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">clearCoatNormal</strong> </td><td style="text-align:left"> A detail normal used to perturb the clear coat layer using <em class="underscore">bump mapping</em> (<em class="underscore">normal mapping</em>) </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">emissive</strong> </td><td style="text-align:left"> Additional diffuse albedo to simulate emissive surfaces (such as neons, etc.) This property is mostly useful in an HDR pipeline with a bloom pass </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">postLightingColor</strong> </td><td style="text-align:left"> Additional color that can be blended with the result of the lighting computations. See <code>postLightingBlending</code> </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">ior</strong> </td><td style="text-align:left"> Index of refraction for refractive objects </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">transmission</strong> </td><td style="text-align:left"> Defines how much of the diffuse light of a dielectric is transmitted through the object, in other words this defines how transparent an object is </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">absorption</strong> </td><td style="text-align:left"> Absorption factor for refractive objects </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">ior</strong> </td><td style="text-align:left"> Index of refraction for refractive objects </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">microThickness</strong> </td><td style="text-align:left"> Thickness of the thin layer of refractive objects </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">thickness</strong> </td><td style="text-align:left"> Thickness of the solid volume of refractive objects </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_standardproperties"> </a><b style="font-style:normal;">Table 1:</b> Properties of the standard model</div></div>
|
||||
|
||||
<p></p><p>
|
||||
@@ -256,10 +261,11 @@ The type and range of each property is described in <a href="#table_standardprop
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">clearCoatNormal</strong> </td><td style="text-align:center"> float3 </td><td style="text-align:center"> [0..1] </td><td style="text-align:left"> Linear RGB, encodes a direction vector in tangent space </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">emissive</strong> </td><td style="text-align:center"> float4 </td><td style="text-align:center"> rgb=[0..1], a=[-n..n] </td><td style="text-align:left"> Alpha is the exposure compensation </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">postLightingColor</strong> </td><td style="text-align:center"> float4 </td><td style="text-align:center"> [0..1] </td><td style="text-align:left"> Pre-multiplied linear RGB </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">ior</strong> </td><td style="text-align:center"> float </td><td style="text-align:center"> [1..n] </td><td style="text-align:left"> Optional, usually deduced from the reflectance </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">transmission</strong> </td><td style="text-align:center"> float </td><td style="text-align:center"> [0..1] </td><td style="text-align:left">   </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">absorption</strong> </td><td style="text-align:center"> float3 </td><td style="text-align:center"> [0..n] </td><td style="text-align:left">   </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">ior</strong> </td><td style="text-align:center"> float </td><td style="text-align:center"> [1..n] </td><td style="text-align:left"> Optional, usually deduced from the reflectance </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">microThickness</strong> </td><td style="text-align:center"> float </td><td style="text-align:center"> [0..n] </td><td style="text-align:left">   </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">thickness</strong> </td><td style="text-align:center"> float </td><td style="text-align:center"> [0..n] </td><td style="text-align:left">   </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_standardpropertiestypes"> </a><b style="font-style:normal;">Table 2:</b> Range and type of the standard model's properties</div></div>
|
||||
|
||||
<p></p><p>
|
||||
@@ -312,10 +318,10 @@ The type and range of each property is described in <a href="#table_standardprop
|
||||
|
||||
<code>thickness</code> represents the thickness of solid objects in the direction of the normal, for
|
||||
satisfactory results, this should be provided per fragment (e.g.: as a texture) or at least per
|
||||
vertex. <code>microThickness</code> represent the thickness of the thin layer of an object, and can
|
||||
vertex. <code>microThickness</code> represent the thickness of the thin layer of an object, and can
|
||||
generally be provided as a constant value. For example, a 1mm thin hollow sphere of radius 1m,
|
||||
would have a <code>thickness</code> of 1 and a <code>microThickness</code> of 0.001. Currently <code>thickness</code> is not
|
||||
used when <code>refractionType</code> is set to “thin”.</p></div>
|
||||
used when <code>refractionType</code> is set to <code>thin</code>.</p></div>
|
||||
|
||||
<p></p>
|
||||
<a class="target" name="basecolor"> </a><a class="target" name="materialmodels/litmodel/basecolor"> </a><a class="target" name="toc3.1.1"> </a><h3>Base color</h3>
|
||||
@@ -432,10 +438,10 @@ The effect of <code>roughness</code> on metallic surfaces is shown in <a href="#
|
||||
|
||||
|
||||
The <code>reflectance</code> property only affects non-metallic surfaces. This property can be used to control
|
||||
the specular intensity. This value is defined between 0 and 1 and represents a remapping of a
|
||||
percentage of reflectance. For instance, the default value of 0.5 corresponds to a reflectance of
|
||||
4%. Values below 0.35 (2% reflectance) should be avoided as no real-world materials have such
|
||||
low reflectance.
|
||||
the specular intensity and index of refraction of materials. This value is defined
|
||||
between 0 and 1 and represents a remapping of a percentage of reflectance. For instance, the
|
||||
default value of 0.5 corresponds to a reflectance of 4%. Values below 0.35 (2% reflectance) should
|
||||
be avoided as no real-world materials have such low reflectance.
|
||||
|
||||
</p><p>
|
||||
|
||||
@@ -477,7 +483,25 @@ to 1.0 (right)</div></div></center>
|
||||
<tr><td style="text-align:right"> Default value </td><td style="text-align:left"> 4% </td><td style="text-align:left"> 1.5 </td><td style="text-align:left"> 0.5 </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_commonmatreflectance"> </a><b style="font-style:normal;">Table 5:</b> Reflectance of common materials</div></div>
|
||||
|
||||
<p></p>
|
||||
<p></p><p>
|
||||
|
||||
Note that the <code>reflectance</code> property also defines the index of refraction of the surface.
|
||||
When this property is defined it is not necessary to define the <code>ior</code> property. Setting
|
||||
either of these properties will automatically compute the other property. It is possible
|
||||
to specify both, in which case their values are kept as-is, which can lead to physically
|
||||
impossible materials, however, this might be desirable for artistic reasons.
|
||||
|
||||
</p><p>
|
||||
|
||||
The <code>reflectance</code> property is designed as a normalized property in the range 0..1 which makes
|
||||
it easy to define from a texture.
|
||||
|
||||
</p><p>
|
||||
|
||||
See the <a href="#indexofrefraction">Index of refraction</a> section for more information about the <code>ior</code> property and refractive
|
||||
indices.
|
||||
|
||||
</p>
|
||||
<a class="target" name="clearcoat"> </a><a class="target" name="materialmodels/litmodel/clearcoat"> </a><a class="target" name="toc3.1.7"> </a><h3>Clear coat</h3>
|
||||
<p>
|
||||
|
||||
@@ -709,6 +733,115 @@ this option for more information.
|
||||
<code>postLightingBlending</code> to <code>add</code> and by providing an RGB color with alpha set to <code>0.0</code>.</div>
|
||||
|
||||
<p></p>
|
||||
<a class="target" name="indexofrefraction"> </a><a class="target" name="materialmodels/litmodel/indexofrefraction"> </a><a class="target" name="toc3.1.16"> </a><h3>Index of refraction</h3>
|
||||
<p>
|
||||
|
||||
|
||||
The <code>ior</code> property only affects non-metallic surfaces. This property can be used to control the
|
||||
index of refraction and the specular intensity of materials. The <code>ior</code> property is intended to
|
||||
be used with refractive (transmissive) materials, which are enabled when the <code>refractionMode</code> is
|
||||
set to <code>cubemap</code> or <code>screenspace</code>.
|
||||
|
||||
</p><p>
|
||||
|
||||
The index of refraction (or refractive index) of a material is a dimensionless number that describes
|
||||
how fast light travels through that material. The higher the number, the slower light travels
|
||||
through the medium. More importantly for rendering materials, the refractive index determines how
|
||||
the path light travels is bent when entering the material. Higher indices of refraction will cause
|
||||
light to bend further away from the initial path.
|
||||
|
||||
</p><p>
|
||||
|
||||
<a href="#table_commonmatior">Table 6</a> describes acceptable refractive indices for various types of materials.
|
||||
</p><div class="table">
|
||||
<table class="table"><tbody><tr><th style="text-align:right"> Material </th><th style="text-align:left"> IOR </th></tr>
|
||||
<tr><td style="text-align:right"> Air </td><td style="text-align:left"> 1.0 </td></tr>
|
||||
<tr><td style="text-align:right"> Water </td><td style="text-align:left"> 1.33 </td></tr>
|
||||
<tr><td style="text-align:right"> Common liquids </td><td style="text-align:left"> 1.33 to 1.5 </td></tr>
|
||||
<tr><td style="text-align:right"> Common gemstones </td><td style="text-align:left"> 1.58 to 2.33 </td></tr>
|
||||
<tr><td style="text-align:right"> Plastics, glass </td><td style="text-align:left"> 1.5 to 1.58 </td></tr>
|
||||
<tr><td style="text-align:right"> Other dielectric materials </td><td style="text-align:left"> 1.33 to 1.58 </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_commonmatior"> </a><b style="font-style:normal;">Table 6:</b> Index of refraction of common materials</div></div>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
The appearance of a refractive material will greatly depend on the <code>refractionType</code> and
|
||||
<code>refractionMode</code> settings of the material. Refer to the <a href="#blendingandtransparency:refractiontype">Blending and transparency: refractionType</a> section and the <a href="#blendingandtransparency:refractionmode">Blending and transparency: refractionMode</a> section for more information.
|
||||
|
||||
</p><p>
|
||||
|
||||
The effect of <code>ior</code> when <code>refractionMode</code> is set to <code>cubemap</code> and <code>refractionType</code> is set to <code>solid</code>
|
||||
can be seen in <a href="#figure_iorproperty2">figure 17</a> (click on the image to see a larger version).
|
||||
|
||||
</p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/materials/ior.png" target="_blank"><img class="markdeep" src="images/materials/ior.png"></a><div class="imagecaption"><a class="target" name="figure_iorproperty2"> </a><b style="font-style:normal;">Figure 17:</b> <code>transmission</code> varying from 1.0
|
||||
(left) to 1.5 (right)</div></div></center>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
<a href="#figure_iorproperty">Figure 18</a> shows the comparison of a sphere of <code>ior</code> 1.0 with a sphere of <code>ior</code> 1.33, with
|
||||
the <code>refractionMode</code> set to <code>screenspace</code> and the <code>refractionType</code> set to <code>solid</code>
|
||||
(click on the image to see a larger version).
|
||||
|
||||
</p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/material_ior.png" target="_blank"><img class="markdeep" src="images/material_ior.png"></a><div class="imagecaption"><a class="target" name="figure_iorproperty"> </a><b style="font-style:normal;">Figure 18:</b> <code>ior</code> of 1.0 (left) and 1.33 (right)</div></div></center>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
Note that the <code>ior</code> property also defines the reflectance (or specular intensity) of the surface.
|
||||
When this property is defined it is not necessary to define the <code>reflectance</code> property. Setting
|
||||
either of these properties will automatically compute the other property. It is possible to specify
|
||||
both, in which case their values are kept as-is, which can lead to physically impossible materials,
|
||||
however, this might be desirable for artistic reasons.
|
||||
|
||||
</p><p>
|
||||
|
||||
See the <a href="#reflectance">Reflectance</a> section for more information on the <code>reflectance</code> property.
|
||||
|
||||
</p><p>
|
||||
|
||||
</p><div class="admonition tip">Refractive materials are affected by the <code>roughness</code> property. Rough materials will scatter
|
||||
light, creating a diffusion effect useful to recreate “blurry” appearances such as frosted
|
||||
glass, certain plastics, etc.</div>
|
||||
|
||||
<p></p>
|
||||
<a class="target" name="transmission"> </a><a class="target" name="materialmodels/litmodel/transmission"> </a><a class="target" name="toc3.1.17"> </a><h3>Transmission</h3>
|
||||
<p>
|
||||
|
||||
|
||||
The <code>transmission</code> property defines what ratio of diffuse light is transmitted through a refractive
|
||||
material. This property only affects materials with a <code>refractionMode</code> set to <code>cubemap</code> or
|
||||
<code>screenspace</code>.
|
||||
|
||||
</p><p>
|
||||
|
||||
When <code>transmission</code> is set to 0, no amount of light is transmitted and the diffuse component of
|
||||
the surface is 100% visible. When <code>transmission</code> is set to 1, all the light is transmitted and the
|
||||
diffuse component is not visible anymore, only the specular component is.
|
||||
|
||||
</p><p>
|
||||
|
||||
The effect of <code>transmission</code> on a glossy dielectric (<code>ior</code> of 1.5, <code>refractionMode</code> set to
|
||||
<code>cubemap</code>, <code>refractionType</code> set to <code>solid</code>) is shown in <a href="#figure_transmissionproperty">figure 19</a>
|
||||
(click on the image to see a larger version).
|
||||
|
||||
</p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/materials/transmission.png" target="_blank"><img class="markdeep" src="images/materials/transmission.png"></a><div class="imagecaption"><a class="target" name="figure_transmissionproperty"> </a><b style="font-style:normal;">Figure 19:</b> <code>transmission</code> varying from 0.0
|
||||
(left) to 1.0 (right)</div></div></center>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
</p><div class="admonition tip">The <code>transmission</code> property is useful to create decals, paint, etc. at the surface of refractive
|
||||
materials.</div>
|
||||
|
||||
<p></p>
|
||||
<a class="target" name="absorption"> </a><a class="target" name="materialmodels/litmodel/absorption"> </a><a class="target" name="toc3.1.18"> </a><h3>Absorption</h3>
|
||||
|
||||
<a class="target" name="micro-thicknessandthickness"> </a><a class="target" name="materialmodels/litmodel/micro-thicknessandthickness"> </a><a class="target" name="toc3.1.19"> </a><h3>Micro-thickness and thickness</h3>
|
||||
|
||||
<a class="target" name="subsurfacemodel"> </a><a class="target" name="materialmodels/subsurfacemodel"> </a><a class="target" name="toc3.2"> </a><h2>Subsurface model</h2>
|
||||
|
||||
<a class="target" name="thickness"> </a><a class="target" name="materialmodels/subsurfacemodel/thickness"> </a><a class="target" name="toc3.2.1"> </a><h3>Thickness</h3>
|
||||
@@ -730,19 +863,19 @@ forward/backward scattering. Some fabrics also exhibit two-tone specular colors
|
||||
|
||||
</p><p>
|
||||
|
||||
<a href="#figure_materialcloth">Figure 17</a> shows how the standard material model fails to capture the appearance of a
|
||||
<a href="#figure_materialcloth">Figure 20</a> shows how the standard material model fails to capture the appearance of a
|
||||
sample of denim fabric. The surface appears rigid (almost plastic-like), more similar to a tarp
|
||||
than a piece of clothing. This figure also shows how important the softer specular lobe caused by
|
||||
absorption and scattering is to the faithful recreation of the fabric.
|
||||
|
||||
</p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_cloth.png" target="_blank"><img class="markdeep" src="images/screenshot_cloth.png"></a><div class="imagecaption"><a class="target" name="figure_materialcloth"> </a><b style="font-style:normal;">Figure 17:</b> Comparison of denim fabric rendered using the standard model
|
||||
</p><center><div class="image" style><a href="images/screenshot_cloth.png" target="_blank"><img class="markdeep" src="images/screenshot_cloth.png"></a><div class="imagecaption"><a class="target" name="figure_materialcloth"> </a><b style="font-style:normal;">Figure 20:</b> Comparison of denim fabric rendered using the standard model
|
||||
(left) and the cloth model (right)</div></div></center>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
Velvet is an interesting use case for a cloth material model. As shown in <a href="#figure_materialvelvet">figure 18</a>
|
||||
Velvet is an interesting use case for a cloth material model. As shown in <a href="#figure_materialvelvet">figure 21</a>
|
||||
this type of fabric exhibits strong rim lighting due to forward and backward scattering. These
|
||||
scattering events are caused by fibers standing straight at the surface of the fabric. When the
|
||||
incident light comes from the direction opposite to the view direction, the fibers will forward
|
||||
@@ -751,7 +884,7 @@ direction, the fibers will scatter the light backward.
|
||||
|
||||
</p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_cloth_velvet.png" target="_blank"><img class="markdeep" src="images/screenshot_cloth_velvet.png"></a><div class="imagecaption"><a class="target" name="figure_materialvelvet"> </a><b style="font-style:normal;">Figure 18:</b> Velvet fabric showcasing forward and
|
||||
</p><center><div class="image" style><a href="images/screenshot_cloth_velvet.png" target="_blank"><img class="markdeep" src="images/screenshot_cloth_velvet.png"></a><div class="imagecaption"><a class="target" name="figure_materialvelvet"> </a><b style="font-style:normal;">Figure 21:</b> Velvet fabric showcasing forward and
|
||||
backward scattering</div></div></center>
|
||||
|
||||
<p></p><p>
|
||||
@@ -764,7 +897,7 @@ anisotropic material models.
|
||||
|
||||
The cloth material model encompasses all the parameters previously defined for the standard
|
||||
material mode except for <em class="underscore">metallic</em> and <em class="underscore">reflectance</em>. Two extra parameters described in
|
||||
<a href="#table_clothproperties">table 6</a> are also available.
|
||||
<a href="#table_clothproperties">table 7</a> are also available.
|
||||
|
||||
</p><p>
|
||||
|
||||
@@ -772,16 +905,16 @@ material mode except for <em class="underscore">metallic</em> and <em class="und
|
||||
<table class="table"><tbody><tr><th style="text-align:right"> Parameter </th><th style="text-align:left"> Definition </th></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">sheenColor</strong> </td><td style="text-align:left"> Specular tint to create two-tone specular fabrics (defaults to \(\sqrt{baseColor}\)) </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">subsurfaceColor</strong> </td><td style="text-align:left"> Tint for the diffuse color after scattering and absorption through the material </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_clothproperties"> </a><b style="font-style:normal;">Table 6:</b> Cloth model parameters</div></div>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_clothproperties"> </a><b style="font-style:normal;">Table 7:</b> Cloth model parameters</div></div>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
The type and range of each property is described in <a href="#table_clothpropertiestypes">table 7</a>.
|
||||
The type and range of each property is described in <a href="#table_clothpropertiestypes">table 8</a>.
|
||||
</p><div class="table">
|
||||
<table class="table"><tbody><tr><th style="text-align:right"> Property </th><th style="text-align:center"> Type </th><th style="text-align:center"> Range </th><th style="text-align:left"> Note </th></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">sheenColor</strong> </td><td style="text-align:center"> float3 </td><td style="text-align:center"> [0..1] </td><td style="text-align:left"> Linear RGB </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">subsurfaceColor</strong> </td><td style="text-align:center"> float3 </td><td style="text-align:center"> [0..1] </td><td style="text-align:left"> Linear RGB </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_clothpropertiestypes"> </a><b style="font-style:normal;">Table 7:</b> Range and type of the cloth model's properties</div></div>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_clothpropertiestypes"> </a><b style="font-style:normal;">Table 8:</b> Range and type of the cloth model's properties</div></div>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
@@ -813,12 +946,12 @@ two-tone specular materials.
|
||||
|
||||
</p><p>
|
||||
|
||||
The effect of <code>sheenColor</code> is shown in <a href="#figure_materialclothsheen">figure 19</a>
|
||||
The effect of <code>sheenColor</code> is shown in <a href="#figure_materialclothsheen">figure 22</a>
|
||||
(click on the image to see a larger version).
|
||||
|
||||
</p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_cloth_sheen.png" target="_blank"><img class="markdeep" src="images/screenshot_cloth_sheen.png"></a><div class="imagecaption"><a class="target" name="figure_materialclothsheen"> </a><b style="font-style:normal;">Figure 19:</b> Blue fabric without (left) and with (right) sheen</div></div></center>
|
||||
</p><center><div class="image" style><a href="images/screenshot_cloth_sheen.png" target="_blank"><img class="markdeep" src="images/screenshot_cloth_sheen.png"></a><div class="imagecaption"><a class="target" name="figure_materialclothsheen"> </a><b style="font-style:normal;">Figure 22:</b> Blue fabric without (left) and with (right) sheen</div></div></center>
|
||||
|
||||
<p></p>
|
||||
<a class="target" name="subsurfacecolor"> </a><a class="target" name="materialmodels/clothmodel/subsurfacecolor"> </a><a class="target" name="toc3.3.2"> </a><h3>Subsurface color</h3>
|
||||
@@ -835,12 +968,12 @@ useful to create softer fabrics.
|
||||
|
||||
<p></p><p>
|
||||
|
||||
The effect of <code>subsurfaceColor</code> is shown in <a href="#figure_materialclothsubsurface">figure 20</a>
|
||||
The effect of <code>subsurfaceColor</code> is shown in <a href="#figure_materialclothsubsurface">figure 23</a>
|
||||
(click on the image to see a larger version).
|
||||
|
||||
</p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_cloth_subsurface.png" target="_blank"><img class="markdeep" src="images/screenshot_cloth_subsurface.png"></a><div class="imagecaption"><a class="target" name="figure_materialclothsubsurface"> </a><b style="font-style:normal;">Figure 20:</b> White cloth (left column) vs white cloth with
|
||||
</p><center><div class="image" style><a href="images/screenshot_cloth_subsurface.png" target="_blank"><img class="markdeep" src="images/screenshot_cloth_subsurface.png"></a><div class="imagecaption"><a class="target" name="figure_materialclothsubsurface"> </a><b style="font-style:normal;">Figure 23:</b> White cloth (left column) vs white cloth with
|
||||
brown subsurface scatting (right)</div></div></center>
|
||||
|
||||
<p></p>
|
||||
@@ -851,23 +984,23 @@ brown subsurface scatting (right)</div></div></center>
|
||||
The unlit material model can be used to turn off all lighting computations. Its primary purpose is
|
||||
to render pre-lit elements such as a cubemap, external content (such as a video or camera stream),
|
||||
user interfaces, visualization/debugging etc. The unlit model exposes only two properties described
|
||||
in <a href="#table_unlitproperties">table 8</a>.
|
||||
in <a href="#table_unlitproperties">table 9</a>.
|
||||
</p><div class="table">
|
||||
<table class="table"><tbody><tr><th style="text-align:right"> Property </th><th style="text-align:left"> Definition </th></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">baseColor</strong> </td><td style="text-align:left"> Surface diffuse color </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">emissive</strong> </td><td style="text-align:left"> Additional diffuse color to simulate emissive surfaces. This property is mostly useful in an HDR pipeline with a bloom pass </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">postLightingColor</strong> </td><td style="text-align:left"> Additional color to blend with base color and emissive </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_unlitproperties"> </a><b style="font-style:normal;">Table 8:</b> Properties of the standard model</div></div>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_unlitproperties"> </a><b style="font-style:normal;">Table 9:</b> Properties of the standard model</div></div>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
The type and range of each property is described in <a href="#table_unlitpropertiestypes">table 9</a>.
|
||||
The type and range of each property is described in <a href="#table_unlitpropertiestypes">table 10</a>.
|
||||
</p><div class="table">
|
||||
<table class="table"><tbody><tr><th style="text-align:right"> Property </th><th style="text-align:center"> Type </th><th style="text-align:center"> Range </th><th style="text-align:left"> Note </th></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">baseColor</strong> </td><td style="text-align:center"> float4 </td><td style="text-align:center"> [0..1] </td><td style="text-align:left"> Pre-multiplied linear RGB </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">emissive</strong> </td><td style="text-align:center"> float4 </td><td style="text-align:center"> rgb=[0..1], a=N/A </td><td style="text-align:left"> Pre-multiplied linear RGB, alpha is ignored </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">postLightingColor</strong> </td><td style="text-align:center"> float4 </td><td style="text-align:center"> [0..1] </td><td style="text-align:left"> Pre-multiplied linear RGB </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_unlitpropertiestypes"> </a><b style="font-style:normal;">Table 9:</b> Range and type of the unlit model's properties</div></div>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_unlitpropertiestypes"> </a><b style="font-style:normal;">Table 10:</b> Range and type of the unlit model's properties</div></div>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
@@ -878,12 +1011,12 @@ blending mode specified by the <code>postLightingBlending</code> material option
|
||||
|
||||
</p><p>
|
||||
|
||||
<a href="#figure_materialunlit">Figure 21</a> shows an example of the unlit material model
|
||||
<a href="#figure_materialunlit">Figure 24</a> shows an example of the unlit material model
|
||||
(click on the image to see a larger version).
|
||||
|
||||
</p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_unlit.jpg" target="_blank"><img class="markdeep" src="images/screenshot_unlit.jpg"></a><div class="imagecaption"><a class="target" name="figure_materialunlit"> </a><b style="font-style:normal;">Figure 21:</b> The unlit model is used to render debug information</div></div></center>
|
||||
</p><center><div class="image" style><a href="images/screenshot_unlit.jpg" target="_blank"><img class="markdeep" src="images/screenshot_unlit.jpg"></a><div class="imagecaption"><a class="target" name="figure_materialunlit"> </a><b style="font-style:normal;">Figure 24:</b> The unlit model is used to render debug information</div></div></center>
|
||||
|
||||
<p></p>
|
||||
<a class="target" name="specularglossiness"> </a><a class="target" name="materialmodels/specularglossiness"> </a><a class="target" name="toc3.5"> </a><h2>Specular glossiness</h2>
|
||||
@@ -902,17 +1035,17 @@ This model encompasses the parameters previously defined for the standard lit mo
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">baseColor</strong> </td><td style="text-align:left"> Surface diffuse color </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">specularColor</strong> </td><td style="text-align:left"> Specular tint (defaults to black) </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">glossiness</strong> </td><td style="text-align:left"> Glossiness (defaults to 0.0) </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_glossinessproperties"> </a><b style="font-style:normal;">Table 10:</b> Properties of the specular-glossiness shading model</div></div>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_glossinessproperties"> </a><b style="font-style:normal;">Table 11:</b> Properties of the specular-glossiness shading model</div></div>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
The type and range of each property is described in <a href="#table_glossinesspropertiestypes">table 11</a>.
|
||||
The type and range of each property is described in <a href="#table_glossinesspropertiestypes">table 12</a>.
|
||||
</p><div class="table">
|
||||
<table class="table"><tbody><tr><th style="text-align:right"> Property </th><th style="text-align:center"> Type </th><th style="text-align:center"> Range </th><th style="text-align:left"> Note </th></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">baseColor</strong> </td><td style="text-align:center"> float4 </td><td style="text-align:center"> [0..1] </td><td style="text-align:left"> Pre-multiplied linear RGB </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">specularColor</strong> </td><td style="text-align:center"> float3 </td><td style="text-align:center"> [0..1] </td><td style="text-align:left"> Linear RGB </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">glossiness</strong> </td><td style="text-align:center"> float </td><td style="text-align:center"> [0..1] </td><td style="text-align:left"> Inverse of roughness </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_glossinesspropertiestypes"> </a><b style="font-style:normal;">Table 11:</b> Range and type of the specular-glossiness model's properties</div></div>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_glossinesspropertiestypes"> </a><b style="font-style:normal;">Table 12:</b> Range and type of the specular-glossiness model's properties</div></div>
|
||||
|
||||
<p></p>
|
||||
<a class="target" name="materialdefinitions"> </a><a class="target" name="materialdefinitions"> </a><a class="target" name="toc4"> </a><h1>Material definitions</h1>
|
||||
@@ -1086,7 +1219,7 @@ non-shader data.
|
||||
|
||||
</p></dd><dt>Value</dt><dd><p> Each entry is an object with the properties <code>name</code> and <code>type</code>, both of <code>string</code> type. The
|
||||
name must be a valid GLSL identifier. The type must be one of the types described in
|
||||
<a href="#table_materialparamstypes">table 12</a>.
|
||||
<a href="#table_materialparamstypes">table 13</a>.
|
||||
|
||||
</p></dd></dl><div class="table">
|
||||
<table class="table"><tbody><tr><th style="text-align:left"> Type </th><th style="text-align:left"> Description </th></tr>
|
||||
@@ -1111,7 +1244,7 @@ non-shader data.
|
||||
<tr><td style="text-align:left"> sampler2d </td><td style="text-align:left"> 2D texture </td></tr>
|
||||
<tr><td style="text-align:left"> samplerExternal </td><td style="text-align:left"> External texture (platform-specific) </td></tr>
|
||||
<tr><td style="text-align:left"> samplerCubemap </td><td style="text-align:left"> Cubemap texture </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_materialparamstypes"> </a><b style="font-style:normal;">Table 12:</b> Material parameter types</div></div>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_materialparamstypes"> </a><b style="font-style:normal;">Table 13:</b> Material parameter types</div></div>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
@@ -1431,33 +1564,33 @@ non-shader data.
|
||||
<p></p><p>
|
||||
|
||||
</p><ul>
|
||||
<li class="minus"><code>default</code>: the transparent object is rendered normally (as seen in <a href="#figure_transparencydefault">figure 22</a>),
|
||||
<li class="minus"><code>default</code>: the transparent object is rendered normally (as seen in <a href="#figure_transparencydefault">figure 25</a>),
|
||||
honoring the <code>culling</code> mode, etc.
|
||||
</li>
|
||||
<li class="minus"><code>twoPassesOneSide</code>: the transparent object is first rendered in the depth buffer, then again in
|
||||
the color buffer, honoring the <code>cullling</code> mode. This effectively renders only half of the
|
||||
transparent object as shown in <a href="#figure_transparencytwopassesoneside">figure 23</a>.
|
||||
transparent object as shown in <a href="#figure_transparencytwopassesoneside">figure 26</a>.
|
||||
</li>
|
||||
<li class="minus"><code>twoPassesTwoSides</code>: the transparent object is rendered twice in the color buffer: first with its
|
||||
back faces, then with its front faces. This mode lets you render both set of faces while reducing
|
||||
or eliminating sorting issues, as shown in <a href="#figure_transparencytwopassestwosides">figure 24</a>.
|
||||
or eliminating sorting issues, as shown in <a href="#figure_transparencytwopassestwosides">figure 27</a>.
|
||||
<code>twoPassesTwoSides</code> can be combined with <code>doubleSided</code> for better effect.</li></ul>
|
||||
|
||||
<p></p><pre class="listing tilde"><code><span class="line">material {</span>
|
||||
<span class="line"> transparency : twoPassesOneSide</span>
|
||||
<span class="line">}</span></code></pre><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_transparency_default.png" target="_blank"><img class="markdeep" src="images/screenshot_transparency_default.png"></a><div class="imagecaption"><a class="target" name="figure_transparencydefault"> </a><b style="font-style:normal;">Figure 22:</b> This double sided model shows the type of sorting issues transparent
|
||||
</p><center><div class="image" style><a href="images/screenshot_transparency_default.png" target="_blank"><img class="markdeep" src="images/screenshot_transparency_default.png"></a><div class="imagecaption"><a class="target" name="figure_transparencydefault"> </a><b style="font-style:normal;">Figure 25:</b> This double sided model shows the type of sorting issues transparent
|
||||
objects can be subject to in <code>default</code> mode</div></div></center>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_twopasses_oneside.png" target="_blank"><img class="markdeep" src="images/screenshot_twopasses_oneside.png"></a><div class="imagecaption"><a class="target" name="figure_transparencytwopassesoneside"> </a><b style="font-style:normal;">Figure 23:</b> In <code>twoPassesOneSide</code> mode, only one set of faces is visible
|
||||
</p><center><div class="image" style><a href="images/screenshot_twopasses_oneside.png" target="_blank"><img class="markdeep" src="images/screenshot_twopasses_oneside.png"></a><div class="imagecaption"><a class="target" name="figure_transparencytwopassesoneside"> </a><b style="font-style:normal;">Figure 26:</b> In <code>twoPassesOneSide</code> mode, only one set of faces is visible
|
||||
and correctly sorted</div></div></center>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_twopasses_twosides.png" target="_blank"><img class="markdeep" src="images/screenshot_twopasses_twosides.png"></a><div class="imagecaption"><a class="target" name="figure_transparencytwopassestwosides"> </a><b style="font-style:normal;">Figure 24:</b> In <code>twoPassesTwoSides</code> mode, both set of faces are visible
|
||||
</p><center><div class="image" style><a href="images/screenshot_twopasses_twosides.png" target="_blank"><img class="markdeep" src="images/screenshot_twopasses_twosides.png"></a><div class="imagecaption"><a class="target" name="figure_transparencytwopassestwosides"> </a><b style="font-style:normal;">Figure 27:</b> In <code>twoPassesTwoSides</code> mode, both set of faces are visible
|
||||
and sorting issues are minimized or eliminated</div></div></center>
|
||||
|
||||
<p></p>
|
||||
@@ -1623,14 +1756,14 @@ and sorting issues are minimized or eliminated</div></div></center>
|
||||
|
||||
</p></dd><dt>Description</dt><dd><p> When adding a clear coat layer, the change in index of refraction (IoR) is taken into account
|
||||
to modify the specular color of the base layer. This appears to darken <code>baseColor</code>. When this
|
||||
effect is disabled, <code>baseColor</code> is left unmodified. See <a href="#figure_clearcoatiorchange">figure 25</a> for an
|
||||
effect is disabled, <code>baseColor</code> is left unmodified. See <a href="#figure_clearcoatiorchange">figure 28</a> for an
|
||||
example of how this property can affect a red metallic base layer.
|
||||
|
||||
</p></dd></dl><p></p><pre class="listing tilde"><code><span class="line">material {</span>
|
||||
<span class="line"> clearCoatIorChange : false</span>
|
||||
<span class="line">}</span></code></pre><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_clear_coat_ior_change.jpg" target="_blank"><img class="markdeep" src="images/screenshot_clear_coat_ior_change.jpg"></a><div class="imagecaption"><a class="target" name="figure_clearcoatiorchange"> </a><b style="font-style:normal;">Figure 25:</b> The same rough metallic ball with a clear coat layer rendered
|
||||
</p><center><div class="image" style><a href="images/screenshot_clear_coat_ior_change.jpg" target="_blank"><img class="markdeep" src="images/screenshot_clear_coat_ior_change.jpg"></a><div class="imagecaption"><a class="target" name="figure_clearcoatiorchange"> </a><b style="font-style:normal;">Figure 28:</b> The same rough metallic ball with a clear coat layer rendered
|
||||
with <code>clearCoatIorChange</code> enabled (left) and disabled
|
||||
(right).</div></div></center>
|
||||
|
||||
@@ -1646,21 +1779,21 @@ with <code>clearCoatIorChange</code> enabled (left) and disabled
|
||||
</p></dd><dt>Description</dt><dd><p> Multi-bounce ambient occlusion takes into account interreflections when applying ambient
|
||||
occlusion to image-based lighting. Turning this feature on avoids over-darkening occluded
|
||||
areas. It also takes the surface color into account to generate colored ambient occlusion.
|
||||
<a href="#figure_multibounceao">Figure 26</a> compares the ambient occlusion term of a surface with and without
|
||||
<a href="#figure_multibounceao">Figure 29</a> compares the ambient occlusion term of a surface with and without
|
||||
multi-bounce ambient occlusion. Notice how multi-bounce ambient occlusion introduces color
|
||||
in the occluded areas. <a href="#figure_multibounceaoanimated">Figure 27</a> toggles between multi-bounce ambient
|
||||
in the occluded areas. <a href="#figure_multibounceaoanimated">Figure 30</a> toggles between multi-bounce ambient
|
||||
occlusion on and off on a lit brick material to highlight the effects of this property.
|
||||
|
||||
</p></dd></dl><p></p><pre class="listing tilde"><code><span class="line">material {</span>
|
||||
<span class="line"> multiBounceAmbientOcclusion : true</span>
|
||||
<span class="line">}</span></code></pre><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_multi_bounce_ao.jpg" target="_blank"><img class="markdeep" src="images/screenshot_multi_bounce_ao.jpg"></a><div class="imagecaption"><a class="target" name="figure_multibounceao"> </a><b style="font-style:normal;">Figure 26:</b> Brick texture amient occlusion map rendered with multi-bounce ambient
|
||||
</p><center><div class="image" style><a href="images/screenshot_multi_bounce_ao.jpg" target="_blank"><img class="markdeep" src="images/screenshot_multi_bounce_ao.jpg"></a><div class="imagecaption"><a class="target" name="figure_multibounceao"> </a><b style="font-style:normal;">Figure 29:</b> Brick texture amient occlusion map rendered with multi-bounce ambient
|
||||
occclusion enabled (left) and disabled (right).</div></div></center>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_multi_bounce_ao.gif" target="_blank"><img class="markdeep" src="images/screenshot_multi_bounce_ao.gif"></a><div class="imagecaption"><a class="target" name="figure_multibounceaoanimated"> </a><b style="font-style:normal;">Figure 27:</b> Brick texture rendered with multi-bounce ambient
|
||||
</p><center><div class="image" style><a href="images/screenshot_multi_bounce_ao.gif" target="_blank"><img class="markdeep" src="images/screenshot_multi_bounce_ao.gif"></a><div class="imagecaption"><a class="target" name="figure_multibounceaoanimated"> </a><b style="font-style:normal;">Figure 30:</b> Brick texture rendered with multi-bounce ambient
|
||||
occclusion enabled and disabled.</div></div></center>
|
||||
|
||||
<p></p>
|
||||
@@ -1675,13 +1808,13 @@ occclusion enabled and disabled.</div></div></center>
|
||||
</p></dd><dt>Description</dt><dd><p> Static ambient occlusion maps and dynamic ambient occlusion (SSAO, etc.) apply to diffuse
|
||||
indirect lighting. When setting this property to true, a new ambient occlusion term is
|
||||
derived from the surface roughness and applied to specular indirec lighting. This effect
|
||||
helps remove unwanted specular reflections as shown in <a href="#figure_specularao">figure 28</a>.
|
||||
helps remove unwanted specular reflections as shown in <a href="#figure_specularao">figure 31</a>.
|
||||
|
||||
</p></dd></dl><p></p><pre class="listing tilde"><code><span class="line">material {</span>
|
||||
<span class="line"> specularAmbientOcclusion : true</span>
|
||||
<span class="line">}</span></code></pre><p>
|
||||
|
||||
</p><center><div class="image" style><a href="images/screenshot_specular_ao.gif" target="_blank"><img class="markdeep" src="images/screenshot_specular_ao.gif"></a><div class="imagecaption"><a class="target" name="figure_specularao"> </a><b style="font-style:normal;">Figure 28:</b> Comparison of specular ambient occlusion on and off. The effect is
|
||||
</p><center><div class="image" style><a href="images/screenshot_specular_ao.gif" target="_blank"><img class="markdeep" src="images/screenshot_specular_ao.gif"></a><div class="imagecaption"><a class="target" name="figure_specularao"> </a><b style="font-style:normal;">Figure 31:</b> Comparison of specular ambient occlusion on and off. The effect is
|
||||
particularly visible under the hose.</div></div></center>
|
||||
|
||||
<p></p>
|
||||
@@ -2083,7 +2216,7 @@ source material definition file.
|
||||
<p>
|
||||
|
||||
|
||||
The command line flags relevant to application development are described in <a href="#table_matcflags">table 13</a>.
|
||||
The command line flags relevant to application development are described in <a href="#table_matcflags">table 14</a>.
|
||||
</p><div class="table">
|
||||
<table class="table"><tbody><tr><th style="text-align:right"> Flag </th><th style="text-align:center"> Value </th><th style="text-align:left"> Usage </th></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">-o</strong>, <strong class="asterisk">—output</strong> </td><td style="text-align:center"> [path] </td><td style="text-align:left"> Specify the output file path </td></tr>
|
||||
@@ -2092,7 +2225,7 @@ The command line flags relevant to application development are described in <a h
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">-S</strong>, <strong class="asterisk">—optimize-size</strong> </td><td style="text-align:center"> N/A </td><td style="text-align:left"> Optimize compiled material for size instead of just performance </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">-r</strong>, <strong class="asterisk">—reflect</strong> </td><td style="text-align:center"> parameters </td><td style="text-align:left"> Outputs the specified metadata as JSON </td></tr>
|
||||
<tr><td style="text-align:right"> <strong class="asterisk">-v</strong>, <strong class="asterisk">—variant-filter</strong> </td><td style="text-align:center"> [variant] </td><td style="text-align:left"> Filters out the specified, comma-separated variants </td></tr>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_matcflags"> </a><b style="font-style:normal;">Table 13:</b> List of <code>matc</code> flags</div></div>
|
||||
</tbody></table><div class="tablecaption"><a class="target" name="table_matcflags"> </a><b style="font-style:normal;">Table 14:</b> List of <code>matc</code> flags</div></div>
|
||||
|
||||
<p></p><p>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user