|
@@ -13,7 +13,7 @@ Or find more background info on <a href="../../jme3/advanced/material_definition
|
|
|
<div class="sect2"><h3 id="unshaded-coloring-and-textures">Unshaded Coloring and Textures</h3><div class="paragraph"><p>jMonkeyEngine supports illuminated and unshaded Material Definitions.</p></div>
|
|
|
<div class="ulist"><ul><li><p>Phong Illuminated materials look more naturalistic.</p></li><li><p>Unshaded materials look more abstract.</p></li></ul></div>
|
|
|
<div class="paragraph"><p>“Unshaded” materials look somewhat abstract because they ignore lighting and shading. Unshaded Materials work even if the scene does not include a light source. These Materials can be single-colored or textured. For example, they are used for cards and tiles, for the sky, billboards and UI elements, for toon-style games, or for testing.</p></div>
|
|
|
-<table class="tableblock frame-all grid-all spread"><caption class="title">Table 1. Standard Unshaded</caption><colgroup><col style="width: 20%;"><col style="width: 25%;"><col style="width: 55%;"></colgroup><thead><tr><th class="tableblock halign-left valign-top">Material Definition</th><th class="tableblock halign-left valign-top">Usage</th><th class="tableblock halign-left valign-top">Material Parameters</th></tr></thead><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Common/MatDefs/Misc/<br>
|
|
|
+<table class="tableblock frame-all grid-all spread"><caption class="title">Table 1. Standard Unshaded</caption><colgroup><col style="width: 20%;"><col style="width: 30%;"><col style="width: 50%;"></colgroup><thead><tr><th class="tableblock halign-left valign-top">Material Definition</th><th class="tableblock halign-left valign-top">Usage</th><th class="tableblock halign-left valign-top">Material Parameters</th></tr></thead><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Common/MatDefs/Misc/<br>
|
|
|
Unshaded.j3md</p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Standard, non-illuminated Materials.</p></div>
|
|
|
<div class="paragraph"><p>Use this for simple coloring, texturing, glow, and transparency.</p></div>
|
|
|
<div class="paragraph"><p>See also: <a href="../../jme3/beginner/hello_material.html">Hello Material</a></p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p><strong>Texture Maps</strong><br>
|
|
@@ -76,7 +76,7 @@ setBoolean(“PointSprite”,true);</p></div></div></td></tr></tbody></t
|
|
|
<div class="sect2"><h3 id="phong-illuminated">Phong Illuminated</h3><div class="paragraph"><p>jMonkeyEngine supports illuminated and unshaded Material Definitions.</p></div>
|
|
|
<div class="ulist"><ul><li><p>Phong Illuminated materials look more naturalistic.</p></li><li><p>Unshaded materials look more abstract.</p></li></ul></div>
|
|
|
<div class="paragraph"><p>Illuminated materials require a <a href="../../jme3/advanced/light_and_shadow.html">light source</a> added to at least one of their parent nodes! (e.g. rootNode.) Illuminated materials are darker on the sides facing away from light sources. They use Phong illumination model (default), or the Ward isotropic gaussian specular shader (WardIso) which looks more like plastic. They do not cast <a href="../../jme3/advanced/light_and_shadow.html">drop shadows</a> unless you use a FilterPostProcessor.</p></div>
|
|
|
-<table class="tableblock frame-all grid-all spread"><caption class="title">Table 3. Standard Illuminated</caption><colgroup><col style="width: 20%;"><col style="width: 25%;"><col style="width: 55%;"></colgroup><thead><tr><th class="tableblock halign-left valign-top">Material Definition</th><th class="tableblock halign-left valign-top">Usage</th><th class="tableblock halign-left valign-top">Material Parameters</th></tr></thead><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Common/MatDefs/Light/<br>
|
|
|
+<table class="tableblock frame-all grid-all spread"><caption class="title">Table 3. Standard Illuminated</caption><colgroup><col style="width: 20%;"><col style="width: 30%;"><col style="width: 50%;"></colgroup><thead><tr><th class="tableblock halign-left valign-top">Material Definition</th><th class="tableblock halign-left valign-top">Usage</th><th class="tableblock halign-left valign-top">Material Parameters</th></tr></thead><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Common/MatDefs/Light/<br>
|
|
|
Lighting.j3md</p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Commonly used Material with Phong illumination.</p></div>
|
|
|
<div class="paragraph"><p>Use this material together with DiffuseMap, SpecularMap, BumpMap (NormalMaps, ParalaxMap) textures.</p></div>
|
|
|
<div class="paragraph"><p>Supports shininess, transparency, and plain material colors (Diffuse, Ambient, Specular).</p></div>
|
|
@@ -108,7 +108,7 @@ setColor(“Specular”, ColorRGBA.White);<br>
|
|
|
setBoolean(“VTangent”,true);<br>
|
|
|
setBoolean(“Minnaert”,true); <span class="footnote">[<a class="footnote" id="_footnoteref_3" href="#_footnote_3" title="View footnote.">3</a>]</span><br>
|
|
|
setBoolean(“WardIso”,true); <span class="footnote">[<a class="footnote" id="_footnoteref_4" href="#_footnote_4" title="View footnote.">4</a>]</span></p></div><div id="footnotes"><hr><div class="footnote" id="_footnote_1"><a href="#_footnoteref_1">1</a>. UseAlpha specifies whether DiffuseMap uses the alpha channel</div><div class="footnote" id="_footnote_2"><a href="#_footnoteref_2">2</a>. LATC Specifies whether NormalMap is BC5/ATI2n/LATC/3Dc-compressed</div><div class="footnote" id="_footnote_3"><a href="#_footnoteref_3">3</a>. Minnaert is a shader type.</div><div class="footnote" id="_footnote_4"><a href="#_footnoteref_4">4</a>. WardIso is a shader type.</div></div></div></td></tr></tbody></table>
|
|
|
-<table class="tableblock frame-all grid-all spread"><caption class="title">Table 4. Special Illuminated</caption><colgroup><col style="width: 20%;"><col style="width: 25%;"><col style="width: 55%;"></colgroup><thead><tr><th class="tableblock halign-left valign-top">Material Definitions</th><th class="tableblock halign-left valign-top">Usage</th><th class="tableblock halign-left valign-top">Material Parameters</th></tr></thead><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Common/MatDefs/Terrain/<br>
|
|
|
+<table class="tableblock frame-all grid-all spread"><caption class="title">Table 4. Special Illuminated</caption><colgroup><col style="width: 20%;"><col style="width: 30%;"><col style="width: 50%;"></colgroup><thead><tr><th class="tableblock halign-left valign-top">Material Definitions</th><th class="tableblock halign-left valign-top">Usage</th><th class="tableblock halign-left valign-top">Material Parameters</th></tr></thead><tbody><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Common/MatDefs/Terrain/<br>
|
|
|
TerrainLighting.j3md</p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Same kind of multi-layered splat texture as Terrain.j3md, but with illumination and shading.</p></div>
|
|
|
<div class="paragraph"><p>Typically used for terrains, but works on any mesh.</p></div>
|
|
|
<div class="paragraph"><p>For every three splat textures, you need one alpha map.</p></div>
|
|
@@ -183,7 +183,7 @@ setBlendMode(BlendMode.Off);</p></div></div></td><td class="tableblock halign-le
|
|
|
<div class="paragraph"><p>Note that gl_PointCoord must be set in the shader.</p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Point sprites are used internally for hardware accelerated particle effects.</p></div></div></td></tr><tr><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>getAdditionalRenderState()<br>
|
|
|
.setPolyOffset();</p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Enable polygon offset.</p></div></div></td><td class="tableblock halign-left valign-top"><div><div class="paragraph"><p>Use this when you have meshes that have triangles really close to each over (e.g. <a href="http://en.wikipedia.org/wiki/Coplanarity">Coplanar</a>), it will shift the depth values to prevent <a href="http://en.wikipedia.org/wiki/Z-fighting">Z-fighting</a>.</p></div></div></td></tr></tbody></table>
|
|
|
<div class="paragraph"><p><strong>Related Links</strong></p></div>
|
|
|
-<div class="ulist"><ul><li><p><a href="../../jme3/advanced/material_specification.html">Developer specification of the jME3 material system (.j3md,.j3m)</a></p></li></ul></div></div></div></div><div id="footer"><div id="footer-text">Version <br>Last updated 2018-07-26 16:44:59 +00:00</div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script><script>docsearch({
|
|
|
+<div class="ulist"><ul><li><p><a href="../../jme3/advanced/material_specification.html">Developer specification of the jME3 material system (.j3md,.j3m)</a></p></li></ul></div></div></div></div><div id="footer"><div id="footer-text">Version <br>Last updated 2018-07-26 16:51:05 +00:00</div></div><script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script><script>docsearch({
|
|
|
apiKey: 'a736b6d93de805e26ec2f49b55013fbd',
|
|
|
indexName: 'jmonkeyengine',
|
|
|
inputSelector: '#doc-search',
|