|
@@ -4,60 +4,91 @@
|
|
|
|
|
|
<p>
|
|
<p>
|
|
|
|
|
|
-Geometries have Materials (.j3m), Materials are based on material definitions (.j3md). You can <a href="/com/jme3/gde/core/docs/jme3/advanced/j3m_material_files.html">write .j3m files in a text editor</a>, or <a href="/com/jme3/gde/core/docs/sdk/material_editing.html">use the jMonkeyEngine SDK to generate</a> them for you.
|
|
|
|
|
|
+A Geometry (mesh) is just the shape of the object. jMonkeyEngine cannot render a shape without knowing anything about its surface properties. You need to apply a color or texture to the surface of your Geometries to make them visible. In jMonkeyEngine, colors and textures are represented as Material objects.
|
|
</p>
|
|
</p>
|
|
|
|
|
|
<p>
|
|
<p>
|
|
-This table shows you the material definitions that jMonkeyEngine supplies by default. You want to make the most of your models by using the right material parameters. The developers should be in contact with the graphic designer regarding which of the available jMonkeyEngine features individual Materials and Textures require. You must have an understanding what <a href="/com/jme3/gde/core/docs/jme3/terminology#materialstextures.html">texture maps</a> are to be able to use textured materials.
|
|
|
|
|
|
+All Geometries have Materials: You either use the setters described here to specifiy the Material's properties in your Java code, or you load a custom .j3m file that lists the properties. To improve performance, reuse Materials for similar models, don't create a new Material object for every Geometry. (E.g. use one bark Material for many tree models.)
|
|
|
|
+</p>
|
|
|
|
+
|
|
|
|
+<p>
|
|
|
|
+You can <a href="/com/jme3/gde/core/docs/jme3/advanced/j3m_material_files.html">write .j3m files in a text editor</a>, or <a href="/com/jme3/gde/core/docs/sdk/material_editing.html">use the jMonkeyEngine SDK to create .j3m files</a> for you. (Advanced users can also create custom Material Definitions.)
|
|
|
|
+</p>
|
|
|
|
+
|
|
|
|
+<p>
|
|
|
|
+Each Material is based on one of the default material definitions (.j3md files) that are included in the engine. The Materials table shows you the material definitions that jMonkeyEngine supports by default. You want to make the most of your models by setting good looking material parameters: The developers should be in contact with the graphic designer regarding which of the available jMonkeyEngine features (listed here) are intended to be used in individual Models' Materials. You must have an understanding what <a href="/com/jme3/gde/core/docs/jme3/terminology#materialstextures.html">texture maps</a> are to be able to use textured materials.
|
|
</p>
|
|
</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-<h2><a>Usage</a></h2>
|
|
|
|
|
|
+<h2><a>Code Sample</a></h2>
|
|
<div>
|
|
<div>
|
|
|
|
|
|
<p>
|
|
<p>
|
|
|
|
|
|
-There are two types of material definitions below, illuminated and unshaded. Illuminated materials look more naturalistic, unshaded ones look more abstract.
|
|
|
|
|
|
+The following samples assume that you loaded a Geometry, e.g. <code>Spatial myGeometry = assetManager.loadModel("Models/Teapot/Teapot.j3o");</code>
|
|
</p>
|
|
</p>
|
|
|
|
+<pre>Material mat = new Material(assetManager, // Create new material and
|
|
|
|
+ "Common/MatDefs/Misc/Unshaded.j3md"); // specify .j3md file path.
|
|
|
|
+mat.setColor("Color", ColorRGBA.Blue); // Set one or more parameters.
|
|
|
|
+myGeometry.setMaterial(mat); // Use material on Geometry.</pre>
|
|
|
|
|
|
<p>
|
|
<p>
|
|
-Most parameters are not mandatory, even if they are not explicitly marked optional. For example, it is okay to specify solely the <code>DiffuseMap</code> and <code>NormalMap</code> when using <code>Lighting.j3md</code>, and leave the rest empty. You are only using a subset of the available features, but that's fully acceptable if it already results in the material you want. You can always add more texture maps later.
|
|
|
|
|
|
+or
|
|
</p>
|
|
</p>
|
|
|
|
+<pre>myGeometry.setMaterial( (Material)assetManager.loadAsset( "myMaterial.j3m") );</pre>
|
|
|
|
|
|
<p>
|
|
<p>
|
|
-<p><div>1) Looks confusing? Start with <code>Unshaded.j3md</code>, and then <code>Lighting.j3md</code>. <br/>
|
|
|
|
|
|
+Most Material parameters are not mandatory. For example, it is normal to specify solely the <code>DiffuseMap</code> and <code>NormalMap</code> when using <code>Lighting.j3md</code>, and leave the rest empty. You are only using a subset of the advanced features, but that's acceptable if it results in the material looking the way you want. You can always add more texture maps later.
|
|
|
|
+</p>
|
|
|
|
+
|
|
|
|
+<p>
|
|
|
|
+<p><div>1) Looks confusing? Start with <code>Unshaded.j3md</code>, then look into <code>Lighting.j3md</code>. <br/>
|
|
2) The jMonkeyEngine <a href="/com/jme3/gde/core/docs/sdk.html">SDK</a> offers a visual editor where you can set properties and preview the outcome. The <acronym title="Software Development Kit">SDK</acronym> Palette contains code snippets to load materials. <br/>
|
|
2) The jMonkeyEngine <a href="/com/jme3/gde/core/docs/sdk.html">SDK</a> offers a visual editor where you can set properties and preview the outcome. The <acronym title="Software Development Kit">SDK</acronym> Palette contains code snippets to load materials. <br/>
|
|
-3) If you don't know what an optional setting means, you're likely not using it.
|
|
|
|
|
|
+3) If you don't know what an obscure parameter means, you're likely not using it.
|
|
</div></p>
|
|
</div></p>
|
|
</p>
|
|
</p>
|
|
|
|
|
|
|
|
+<p>
|
|
|
|
+jMonkeyEngine supports illuminated and unshaded Material Definitions.
|
|
|
|
+</p>
|
|
|
|
+<ul>
|
|
|
|
+<li><div> Phong Illuminated materials look more naturalistic.</div>
|
|
|
|
+</li>
|
|
|
|
+<li><div> Unshaded materials look more abstract.</div>
|
|
|
|
+</li>
|
|
|
|
+</ul>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-<h2><a>Standard Coloring and Textures</a></h2>
|
|
|
|
|
|
+<h2><a>Unshaded Coloring and Textures</a></h2>
|
|
<div>
|
|
<div>
|
|
|
|
|
|
<p>
|
|
<p>
|
|
|
|
|
|
-Standard materials look slightly abstract because they ignore light sources. They work even if the scene does not include a light source. They are single-colored or textured and have no shadows.
|
|
|
|
|
|
+"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>
|
|
</p>
|
|
<div><table>
|
|
<div><table>
|
|
<tr>
|
|
<tr>
|
|
- <th> Basic Material Definition </th><th> Usage </th><th> Parameter : Type </th>
|
|
|
|
|
|
+ <th> Basic Material Definition </th><th> Usage </th><th> Parameter </th>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td> Common/MatDefs/Misc/Unshaded.j3md </td><td> Standard, non-illuminated Materials. Use this for simple coloring, simple texturing, simple glow, simple transparency. <br/>
|
|
|
|
-See also: <a href="/com/jme3/gde/core/docs/jme3/beginner/hello_material.html">Hello Material</a> </td><td> ColorMap : Texture <br/>
|
|
|
|
-LightMap : Texture <br/>
|
|
|
|
-Color : Color <br/>
|
|
|
|
-VertexColor : Boolean <br/>
|
|
|
|
-SeparateTexCoord : Boolean <br/>
|
|
|
|
-GlowMap : Texture <br/>
|
|
|
|
-GlowColor: Color </td>
|
|
|
|
|
|
+ <td> Common/MatDefs/Misc/Unshaded.j3md </td><td> Standard, non-illuminated Materials. <br/>
|
|
|
|
+Use this for simple coloring and texturing, glow, and transparency. <br/>
|
|
|
|
+See also: <a href="/com/jme3/gde/core/docs/jme3/beginner/hello_material.html">Hello Material</a> </td><td> <strong>Texture Maps</strong> <br/>
|
|
|
|
+setTexture("ColorMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+ setBoolean("SeparateTexCoord",true); <br/>
|
|
|
|
+setTexture("LightMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+<strong>Colors</strong> <br/>
|
|
|
|
+setColor("Color", ColorRGBA.White); <br/>
|
|
|
|
+setBoolean("VertexColor",true); <br/>
|
|
|
|
+<strong>Glow</strong> <br/>
|
|
|
|
+setTexture("GlowMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setColor("GlowColor", ColorRGBA.White); </td>
|
|
</tr>
|
|
</tr>
|
|
</table></div>
|
|
</table></div>
|
|
-<!-- EDIT1 TABLE [1907-2345] -->
|
|
|
|
|
|
+<!-- EDIT1 TABLE [3394-4032] -->
|
|
<p>
|
|
<p>
|
|
|
|
|
|
Other useful, but less commonly used material definitions:
|
|
Other useful, but less commonly used material definitions:
|
|
@@ -65,23 +96,23 @@ Other useful, but less commonly used material definitions:
|
|
</p>
|
|
</p>
|
|
<div><table>
|
|
<div><table>
|
|
<tr>
|
|
<tr>
|
|
- <th> Special Material Definitions </th><th> Usage </th><th> Parameter : Type </th>
|
|
|
|
|
|
+ <th> Special Material Definitions </th><th> Usage </th><th> Setter, Parameter, Type </th>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td> Common/MatDefs/Misc/Sky.j3md </td><td> A solid skyblue, or use with a custom SkyDome texture. <br/>
|
|
<td> Common/MatDefs/Misc/Sky.j3md </td><td> A solid skyblue, or use with a custom SkyDome texture. <br/>
|
|
-See also: <a href="/com/jme3/gde/core/docs/jme3/advanced/sky.html">Sky</a> </td><td> Texture : TextureCubeMap <br/>
|
|
|
|
-SphereMap : Boolean <br/>
|
|
|
|
-NormalScale : Vector3 </td>
|
|
|
|
|
|
+See also: <a href="/com/jme3/gde/core/docs/jme3/advanced/sky.html">Sky</a> </td><td> setTexture("TextureCubeMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+ setBoolean("SphereMap",true); <br/>
|
|
|
|
+setVector3("NormalScale", new Vector3f(0,0,0)); </td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td> Common/MatDefs/Terrain/Terrain.j3md </td><td> Splat textures for e.g. terrains. <br/>
|
|
<td> Common/MatDefs/Terrain/Terrain.j3md </td><td> Splat textures for e.g. terrains. <br/>
|
|
-See also: <a href="/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html">Hello Terrain</a> </td><td> Texture1 : Texture (red) <br/>
|
|
|
|
-Texture1Scale : Float <br/>
|
|
|
|
-Texture2 : Texture (green) <br/>
|
|
|
|
-Texture2Scale : Float <br/>
|
|
|
|
-Texture3 : Texture (blue) <br/>
|
|
|
|
-Texture3Scale : Float <br/>
|
|
|
|
-Alpha : Texture </td>
|
|
|
|
|
|
+See also: <a href="/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html">Hello Terrain</a> </td><td> setTexture("Texture1", assetManager.loadTexture("")); (red) <br/>
|
|
|
|
+ setFloat("Texture1Scale",1f); <br/>
|
|
|
|
+ setTexture("Texture2", assetManager.loadTexture("")); (green) <br/>
|
|
|
|
+ setFloat("Texture2Scale",1f); <br/>
|
|
|
|
+setTexture("Texture3", assetManager.loadTexture("")); (blue) <br/>
|
|
|
|
+ setFloat("Texture3Scale",1f); <br/>
|
|
|
|
+setTexture("Alpha", assetManager.loadTexture("")); </td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td>Common/MatDefs/Terrain/HeightBasedTerrain.j3md</td><td>A multi-layered texture for terrains. <br/>
|
|
<td>Common/MatDefs/Terrain/HeightBasedTerrain.j3md</td><td>A multi-layered texture for terrains. <br/>
|
|
@@ -93,31 +124,31 @@ Texture regions can overlap. <br/>
|
|
For example: Specify a seafloor texture for the lowest areas, <br/>
|
|
For example: Specify a seafloor texture for the lowest areas, <br/>
|
|
a sandy texture for the beaches, <br/>
|
|
a sandy texture for the beaches, <br/>
|
|
a grassy texure for inland areas, <br/>
|
|
a grassy texure for inland areas, <br/>
|
|
-and a rocky texture for mountain tops.</td><td> terrainSize : Float <br/>
|
|
|
|
-region1ColorMap : Texture2D <br/>
|
|
|
|
-region2ColorMap : Texture2D <br/>
|
|
|
|
-region3ColorMap : Texture2D <br/>
|
|
|
|
-region4ColorMap : Texture2D <br/>
|
|
|
|
-region1 : Vector3 <br/>
|
|
|
|
-region2 : Vector3 <br/>
|
|
|
|
-region3 : Vector3 <br/>
|
|
|
|
-region4 : Vector3 <br/>
|
|
|
|
|
|
+and a rocky texture for mountain tops.</td><td> setFloat("terrainSize",512f); <br/>
|
|
|
|
+setTexture("region1ColorMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setTexture("region2ColorMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setTexture("region3ColorMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setTexture("region4ColorMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setVector3("region1", new Vector3f(0,0,0)); <br/>
|
|
|
|
+ setVector3("region2", new Vector3f(0,0,0)); <br/>
|
|
|
|
+ setVector3("region3", new Vector3f(0,0,0)); <br/>
|
|
|
|
+ setVector3("region4", new Vector3f(0,0,0)); <br/>
|
|
<strong>Settings for steep areas:</strong> <br/>
|
|
<strong>Settings for steep areas:</strong> <br/>
|
|
-slopeColorMap : Texture2D <br/>
|
|
|
|
-slopeTileFactor : Float</td>
|
|
|
|
|
|
+setTexture("slopeColorMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+ setFloat("slopeTileFactor",1f);</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td> Common/MatDefs/Misc/Particle.j3md </td><td> Used with texture masks for particle effects, or for point sprites. <br/>
|
|
<td> Common/MatDefs/Misc/Particle.j3md </td><td> Used with texture masks for particle effects, or for point sprites. <br/>
|
|
The Quadratic value scales the particle for perspective view (<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/core/com/jme3/effect/ParticleEmitter.java"><param name="text" value="<html><u>formula</u></html>"><param name="textColor" value="blue"></object>). <br/>
|
|
The Quadratic value scales the particle for perspective view (<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/core/com/jme3/effect/ParticleEmitter.java"><param name="text" value="<html><u>formula</u></html>"><param name="textColor" value="blue"></object>). <br/>
|
|
Does support an optional colored glow effect. <br/>
|
|
Does support an optional colored glow effect. <br/>
|
|
-See also: <a href="/com/jme3/gde/core/docs/jme3/beginner/hello_effects.html">Hello Effects</a> </td><td> Texture : Texture <br/>
|
|
|
|
-GlowMap : Texture <br/>
|
|
|
|
-GlowColor : Color <br/>
|
|
|
|
-Quadratic : Float <br/>
|
|
|
|
-PointSprite : Boolean </td>
|
|
|
|
|
|
+See also: <a href="/com/jme3/gde/core/docs/jme3/beginner/hello_effects.html">Hello Effects</a> </td><td> setTexture("Texture", assetManager.loadTexture("")); <br/>
|
|
|
|
+setTexture("GlowMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setColor("GlowColor", ColorRGBA.White); <br/>
|
|
|
|
+ setFloat("Quadratic",1f); <br/>
|
|
|
|
+ setBoolean("PointSprite",true); </td>
|
|
</tr>
|
|
</tr>
|
|
</table></div>
|
|
</table></div>
|
|
-<!-- EDIT2 TABLE [2407-4279] -->
|
|
|
|
|
|
+<!-- EDIT2 TABLE [4094-6616] -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<h2><a>Phong Illuminated</a></h2>
|
|
<h2><a>Phong Illuminated</a></h2>
|
|
@@ -125,50 +156,50 @@ PointSprite : Boolean </td>
|
|
|
|
|
|
<p>
|
|
<p>
|
|
|
|
|
|
-Illuminated materials require a <a href="/com/jme3/gde/core/docs/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 do not automatically cast <a href="/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html">drop shadows</a>. They use Phong illumination model (default), or the Ward isotropic gaussian specular shader (WardIso) which looks more plastic like.
|
|
|
|
|
|
+Illuminated materials require a <a href="/com/jme3/gde/core/docs/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="/com/jme3/gde/core/docs/jme3/advanced/light_and_shadow.html">drop shadows</a> unless you use a FilterPostProcessor.
|
|
|
|
|
|
</p>
|
|
</p>
|
|
<div><table>
|
|
<div><table>
|
|
<tr>
|
|
<tr>
|
|
- <th>Illuminated Material Definition </th><th> Usage </th><th> Parameters </th>
|
|
|
|
|
|
+ <th>Illuminated Material Definition </th><th> Usage </th><th> Setter, Parameter, Type </th>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td> Common/MatDefs/Light/Lighting.j3md </td><td> Standard lit material with Phong Illumination. <br/>
|
|
|
|
|
|
+ <td> Common/MatDefs/Light/Lighting.j3md </td><td> Commonly used Material with Phong illumination. <br/>
|
|
Use this material together with DiffuseMap, SpecularMap, BumpMap (NormalMaps, ParalaxMap) textures. <br/>
|
|
Use this material together with DiffuseMap, SpecularMap, BumpMap (NormalMaps, ParalaxMap) textures. <br/>
|
|
Supports shininess, transparency, and plain material colors (Diffuse, Ambient, Specular colors). <br/>
|
|
Supports shininess, transparency, and plain material colors (Diffuse, Ambient, Specular colors). <br/>
|
|
-See also: <a href="/com/jme3/gde/core/docs/jme3/beginner/hello_material.html">Hello Material</a> <br/>
|
|
|
|
- Glowing materials require a <a href="/com/jme3/gde/core/docs/jme3/advanced/bloom_and_glow.html">FilterPostProcessor</a>! </td><td> DiffuseMap : Texture <br/>
|
|
|
|
-UseAlpha<sup><a href="#fn__1">1)</a></sup> : Boolean <br/>
|
|
|
|
-NormalMap : Texture <br/>
|
|
|
|
-LATC<sup><a href="#fn__2">2)</a></sup> : Boolean <br/>
|
|
|
|
-SpecularMap : Texture <br/>
|
|
|
|
-Shininess : Float [1-128] <br/>
|
|
|
|
-ParallaxMap : Texture <br/>
|
|
|
|
-AlphaMap : Texture <br/>
|
|
|
|
-AlphaDiscardThreshold: Float <br/>
|
|
|
|
-ColorRamp : Texture <br/>
|
|
|
|
-<strong>Glow (optional)</strong> <br/>
|
|
|
|
-GlowMap : Texture <br/>
|
|
|
|
-GlowColor : Color <br/>
|
|
|
|
-<strong>Performance and quality (optional)</strong> <br/>
|
|
|
|
-VertexLighting : Boolean <br/>
|
|
|
|
-UseVertexColor : Boolean <br/>
|
|
|
|
-LowQuality : Boolean <br/>
|
|
|
|
-HighQuality : Boolean <br/>
|
|
|
|
-<strong>Material Colors (optional)</strong> <br/>
|
|
|
|
-UseMaterialColors : Boolean <br/>
|
|
|
|
-Diffuse : Color <br/>
|
|
|
|
- Ambient : Color <br/>
|
|
|
|
-Specular : Color <br/>
|
|
|
|
-<strong>Tangent shading (optional):</strong> <br/>
|
|
|
|
-VTangent : Boolean <br/>
|
|
|
|
-Minnaert<sup><a href="#fn__3">3)</a></sup> : Boolean <br/>
|
|
|
|
-WardIso<sup><a href="#fn__4">4)</a></sup> : Boolean </td>
|
|
|
|
|
|
+See also: <a href="/com/jme3/gde/core/docs/jme3/beginner/hello_material.html">Hello Material</a> </td><td> <strong>Texture Maps</strong> <br/>
|
|
|
|
+setTexture("DiffuseMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setBoolean("UseAlpha",true);<sup><a href="#fn__1">1)</a></sup> <br/>
|
|
|
|
+setTexture("NormalMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setBoolean("LATC",true); <sup><a href="#fn__2">2)</a></sup> <br/>
|
|
|
|
+setTexture("SpecularMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+ setFloat("Shininess",64f); <br/>
|
|
|
|
+setTexture("ParallaxMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setTexture("AlphaMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+ setFloat("AlphaDiscardThreshold",1f); <br/>
|
|
|
|
+setTexture("ColorRamp", assetManager.loadTexture("")); <br/>
|
|
|
|
+<strong>Glow</strong> <br/>
|
|
|
|
+setTexture("GlowMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setColor("GlowColor", ColorRGBA.White); <br/>
|
|
|
|
+<strong>Performance and quality</strong> <br/>
|
|
|
|
+setBoolean("VertexLighting",true); <br/>
|
|
|
|
+ setBoolean("UseVertexColor",true); <br/>
|
|
|
|
+ setBoolean("LowQuality",true); <br/>
|
|
|
|
+ setBoolean("HighQuality",true); <br/>
|
|
|
|
+<strong>Material Colors</strong> <br/>
|
|
|
|
+ setBoolean("UseMaterialColors",true); <br/>
|
|
|
|
+setColor("Diffuse", ColorRGBA.White); <br/>
|
|
|
|
+ setColor("Ambient", ColorRGBA.White); <br/>
|
|
|
|
+setColor("Specular", ColorRGBA.White); <br/>
|
|
|
|
+<strong>Tangent shading:</strong> <br/>
|
|
|
|
+ setBoolean("VTangent",true); <br/>
|
|
|
|
+ setBoolean("Minnaert",true);<sup><a href="#fn__3">3)</a></sup> <br/>
|
|
|
|
+setBoolean("WardIso",true);<sup><a href="#fn__4">4)</a></sup> </td>
|
|
</tr>
|
|
</tr>
|
|
</table></div>
|
|
</table></div>
|
|
-<!-- EDIT3 TABLE [4746-6102] --><div><table>
|
|
|
|
|
|
+<!-- EDIT3 TABLE [7108-8822] --><div><table>
|
|
<tr>
|
|
<tr>
|
|
- <th>Special Illuminated Material Definitions </th><th> Usage </th><th> Parameters </th>
|
|
|
|
|
|
+ <th>Special Illuminated Material Definitions </th><th> Usage </th><th> Setter, Parameter, Type </th>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
<td>Common/MatDefs/Terrain/TerrainLighting.j3md</td><td>Same kind of multi-layered splat texture as Terrain.j3md, but with illumination and shading. <br/>
|
|
<td>Common/MatDefs/Terrain/TerrainLighting.j3md</td><td>Same kind of multi-layered splat texture as Terrain.j3md, but with illumination and shading. <br/>
|
|
@@ -177,69 +208,140 @@ For every 3 splat textures, you need one alpha map. <br/>
|
|
You can use a total of 11 texture maps in the terrain's splat texture: <br/>
|
|
You can use a total of 11 texture maps in the terrain's splat texture: <br/>
|
|
Note that diffuse and normal maps all count against that. <br/>
|
|
Note that diffuse and normal maps all count against that. <br/>
|
|
For example, you can use a maximum of 9 diffuse textures, two of which can have normal maps; <br/>
|
|
For example, you can use a maximum of 9 diffuse textures, two of which can have normal maps; <br/>
|
|
-or, five textures with both diffuse and normal maps.</td><td>Diffuse : Color <br/>
|
|
|
|
-Ambient : Color <br/>
|
|
|
|
-Shininess : Float <br/>
|
|
|
|
-Specular : Color <br/>
|
|
|
|
-SpecularMap : Texture <br/>
|
|
|
|
-WardIso : Boolean <br/>
|
|
|
|
-useTriPlanarMapping : Boolean <br/>
|
|
|
|
-isTerrainGrid : Boolean <br/>
|
|
|
|
-<strong>Texture Splat Maps</strong> <br/>
|
|
|
|
-DiffuseMap : Texture <br/>
|
|
|
|
-DiffuseMap_0_scale : Float <br/>
|
|
|
|
-NormalMap : Texture <br/>
|
|
|
|
-DiffuseMap_1 : Texture <br/>
|
|
|
|
-DiffuseMap_1_scale : Float <br/>
|
|
|
|
-NormalMap_1 : Texture <br/>
|
|
|
|
-DiffuseMap_2 : Texture <br/>
|
|
|
|
-DiffuseMap_2_scale : Float <br/>
|
|
|
|
-NormalMap_2 : Texture <br/>
|
|
|
|
-DiffuseMap_3 : Texture <br/>
|
|
|
|
-DiffuseMap_3_scale : Float <br/>
|
|
|
|
-NormalMap_3 : Texture <br/>
|
|
|
|
|
|
+or, five textures with both diffuse and normal maps.</td><td><strong>Texture Splat Maps</strong> <br/>
|
|
|
|
+ setTexture("DiffuseMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+ setFloat("DiffuseMap_0_scale",1f); <br/>
|
|
|
|
+setTexture("NormalMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setTexture("DiffuseMap_1", assetManager.loadTexture("")); <br/>
|
|
|
|
+ setFloat("DiffuseMap_1_scale",1f); <br/>
|
|
|
|
+setTexture("NormalMap_1", assetManager.loadTexture("")); <br/>
|
|
|
|
+setTexture("DiffuseMap_2", assetManager.loadTexture("")); <br/>
|
|
|
|
+ setFloat("DiffuseMap_2_scale",1f); <br/>
|
|
|
|
+setTexture("NormalMap_2", assetManager.loadTexture("")); <br/>
|
|
|
|
+setTexture("DiffuseMap_3", assetManager.loadTexture("")); <br/>
|
|
|
|
+ setFloat("DiffuseMap_3_scale",1f); <br/>
|
|
|
|
+setTexture("NormalMap_3", assetManager.loadTexture("")); <br/>
|
|
etc, up to 11. <br/>
|
|
etc, up to 11. <br/>
|
|
<strong>Alpha Maps</strong> <br/>
|
|
<strong>Alpha Maps</strong> <br/>
|
|
-AlphaMap : Texture <br/>
|
|
|
|
-AlphaMap_1 : Texture <br/>
|
|
|
|
-AlphaMap_2 : Texture <br/>
|
|
|
|
|
|
+setTexture("AlphaMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setTexture("AlphaMap_1", assetManager.loadTexture("")); <br/>
|
|
|
|
+setTexture("AlphaMap_2", assetManager.loadTexture("")); <br/>
|
|
<strong>Glowing</strong> <br/>
|
|
<strong>Glowing</strong> <br/>
|
|
-GlowMap : Texture <br/>
|
|
|
|
-GlowColor : Color </td>
|
|
|
|
|
|
+setTexture("GlowMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setColor("GlowColor", ColorRGBA.White); <br/>
|
|
|
|
+<strong>Miscellaneous</strong> <br/>
|
|
|
|
+setColor("Diffuse", ColorRGBA.White); <br/>
|
|
|
|
+setColor("Ambient", ColorRGBA.White); <br/>
|
|
|
|
+setFloat("Shininess",64f); <br/>
|
|
|
|
+setColor("Specular", ColorRGBA.White); <br/>
|
|
|
|
+setTexture("SpecularMap", assetManager.loadTexture("")); <br/>
|
|
|
|
+setBoolean("WardIso",true); <br/>
|
|
|
|
+ setBoolean("useTriPlanarMapping",true); <br/>
|
|
|
|
+ setBoolean("isTerrainGrid",true); </td>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td> Common/MatDefs/Light/Reflection.j3md </td><td> Reflective glass material with environment map (CubeMap/SphereMap). See also: <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/texture/TestCubeMap.java"><param name="text" value="<html><u>TestCubeMap.java</u></html>"><param name="textColor" value="blue"></object> </td><td> setTexture("Texture", assetManager.loadTexture("")); <br/>
|
|
|
|
+ setBoolean("SphereMap",true); </td>
|
|
</tr>
|
|
</tr>
|
|
|
|
+</table></div>
|
|
|
|
+<!-- EDIT4 TABLE [8824-11115] -->
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<h2><a>Testing and Debugging</a></h2>
|
|
|
|
+<div>
|
|
|
|
+<div><table>
|
|
<tr>
|
|
<tr>
|
|
- <td> Common/MatDefs/Light/Reflection.j3md </td><td> Reflective glass material with environment map (CubeMap/SphereMap). See also: <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/texture/TestCubeMap.java"><param name="text" value="<html><u>TestCubeMap.java</u></html>"><param name="textColor" value="blue"></object> </td><td> Texture : Texture <br/>
|
|
|
|
-SphereMap: Boolean </td>
|
|
|
|
|
|
+ <th> Material Definition </th><th> Usage </th>
|
|
|
|
+ </tr>
|
|
|
|
+ <tr>
|
|
|
|
+ <td> Common/MatDefs/Misc/ShowNormals.j3md </td><td> A color gradient calculated from the model's surface normals. You can use this built-in material to debug the generation of normals in meshes, to preview models that have no material, or as fall-back default material. This built-in material has no parameters. </td>
|
|
</tr>
|
|
</tr>
|
|
</table></div>
|
|
</table></div>
|
|
-<!-- EDIT4 TABLE [6104-7693] -->
|
|
|
|
|
|
+<!-- EDIT5 TABLE [11152-11509] -->
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<h2><a>Activate Special Features</a></h2>
|
|
|
|
+<div>
|
|
|
|
+
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<h3><a>NormalMap (Bumpiness)</a></h3>
|
|
|
|
+<div>
|
|
|
|
+
|
|
<p>
|
|
<p>
|
|
|
|
|
|
-<p><div><strong>Shininess Tip:</strong> To deactivate Shininess, do not set <code>Shininess</code> to 0, but instead set the <code>Specular</code> color to <code>ColorRGBA.Black</code>!
|
|
|
|
-</div></p>
|
|
|
|
|
|
+A NormalMap (alos called BumpMap) describes the fine bumpy details of the Material surface that are not part of the mesh itself. E.g. cracks, pores, creases, notches.
|
|
</p>
|
|
</p>
|
|
|
|
+<ol>
|
|
|
|
+<li><div> Generate normals for the Mesh (not for the Geometry!) <pre>TangentBinormalGenerator.generate(mesh);</pre>
|
|
|
|
+</div>
|
|
|
|
+</li>
|
|
|
|
+<li><div> Specify the <code>NormalMap</code> texture. (<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Bump_mapping"><param name="text" value="<html><u>More about BumpMaps here.</u></html>"><param name="textColor" value="blue"></object>)</div>
|
|
|
|
+</li>
|
|
|
|
+</ol>
|
|
|
|
+
|
|
|
|
+</div>
|
|
|
|
+
|
|
|
|
+<h3><a>Specular (Shininess)</a></h3>
|
|
|
|
+<div>
|
|
|
|
|
|
<p>
|
|
<p>
|
|
-<p><div><strong>Bumpiness Tip:</strong> Before you can use NormalMaps, you must generate normals for the mesh (not the Geometry). <code>TangentBinormalGenerator.generate(mesh);</code>
|
|
|
|
-</div></p>
|
|
|
|
|
|
+
|
|
|
|
+To activate Shininess:
|
|
</p>
|
|
</p>
|
|
|
|
+<ol>
|
|
|
|
+<li><div> Specify the <code>Shininess</code> intensity. <br/>
|
|
|
|
+A float value between 1 (rough surface with blurry shininess) and 128 (very smooth surface with focused shininess)</div>
|
|
|
|
+</li>
|
|
|
|
+<li><div> Specify a Color as <code>Specular</code> value. <br/>
|
|
|
|
+The ColorRGBA value of the light source, e.g. often RGBA.White.</div>
|
|
|
|
+</li>
|
|
|
|
+<li><div> (Optionally for some Materials) Specify a <code>SpecularMap</code> texture. <br/>
|
|
|
|
+This grayscale texture outlines in detail where the DiffuseMap texture should be shiny (white) and were not (black), instead of rendering the whole material evenly shiny.</div>
|
|
|
|
+</li>
|
|
|
|
+</ol>
|
|
|
|
+
|
|
|
|
+<p>
|
|
|
|
+
|
|
|
|
+To deactivate shininess
|
|
|
|
+</p>
|
|
|
|
+<ul>
|
|
|
|
+<li><div> Set the <code>Specular</code> color to <code>ColorRGBA.Black</code>. Do not just set <code>Shininess</code> to 0.</div>
|
|
|
|
+</li>
|
|
|
|
+</ul>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-<h2><a>Testing and Debugging</a></h2>
|
|
|
|
|
|
+<h3><a>Glow</a></h3>
|
|
<div>
|
|
<div>
|
|
-<div><table>
|
|
|
|
- <tr>
|
|
|
|
- <th> Material Definition </th><th> Usage </th><th> Parameters </th>
|
|
|
|
- </tr>
|
|
|
|
- <tr>
|
|
|
|
- <td> Common/MatDefs/Misc/ShowNormals.j3md </td><td> A color gradient calculated from the model's surface normals. You can use this built-in material to test models that have no material, or as fall-back default material. </td><td> – </td>
|
|
|
|
- </tr>
|
|
|
|
-</table></div>
|
|
|
|
-<!-- EDIT5 TABLE [8058-8343] -->
|
|
|
|
|
|
+
|
|
|
|
+<p>
|
|
|
|
+
|
|
|
|
+To activate glow:
|
|
|
|
+</p>
|
|
|
|
+<ol>
|
|
|
|
+<li><div> Add a <a href="/com/jme3/gde/core/docs/jme3/advanced/bloom_and_glow.html">FilterPostProcessor</a> in your simpleInit() method.</div>
|
|
|
|
+</li>
|
|
|
|
+<li><div> Specify a Color as <code>Glow</code> value. <br/>
|
|
|
|
+A ColorRGBA value of your choice, e.g. choose a warm or cold color for different effects.</div>
|
|
|
|
+</li>
|
|
|
|
+<li><div> (Optionally for some Materials) Specify a <code>GlowMap</code> texture. <br/>
|
|
|
|
+This texture outlines in detail where the DiffuseMap texture glows, instead of making the whole material glow everwhere evenly.</div>
|
|
|
|
+</li>
|
|
|
|
+</ol>
|
|
|
|
+
|
|
|
|
+<p>
|
|
|
|
+
|
|
|
|
+To deactivate glow
|
|
|
|
+</p>
|
|
|
|
+<ul>
|
|
|
|
+<li><div> Set the <code>Glow</code> color to <code>ColorRGBA.Black</code>.</div>
|
|
|
|
+</li>
|
|
|
|
+</ul>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-<h2><a>Transparency</a></h2>
|
|
|
|
|
|
+<h3><a>Transparency</a></h3>
|
|
<div>
|
|
<div>
|
|
|
|
|
|
<p>
|
|
<p>
|
|
@@ -253,80 +355,83 @@ Additionally, you must specify a blendmode:
|
|
</p>
|
|
</p>
|
|
<div><table>
|
|
<div><table>
|
|
<tr>
|
|
<tr>
|
|
- <th>Option</th><th>Usage</th><th>Example</th>
|
|
|
|
|
|
+ <th>Material option</th><th>Usage</th><th>Example</th>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setBlendMode(BlendMode.Off);</td><td>Opaque</td><td></td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setBlendMode(BlendMode.Off);</td><td>Opaque</td><td></td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setBlendMode(BlendMode.Alpha);</td><td>Use this for normal transparency. Interpolates the background pixel with the current pixel by using the current pixel's alpha.</td><td>Hair texture, window panes, ice, glass, alpha-blended vegetation textures. </td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setBlendMode(BlendMode.Alpha);</td><td>Interpolates the background pixel with the current pixel by using the current pixel's alpha.</td><td>Use this for normal every-day translucency: Frosted window panes, ice, glass, alpha-blended vegetation textures… </td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setDepthWrite(false);</td><td>Use this on materials if you have several transparent objects obscuring one another. Disables writing of the pixel's depth value to the depth buffer.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setDepthWrite(false);</td><td>Disables writing of the pixel's depth value to the depth buffer.</td><td>Use this on Materials if you have several transparent/translucent objects obscuring one another, but you want to see through both.</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setAlphaFallOff(0.5f); <br/>
|
|
|
|
-mat.getAdditionalRenderState().setAlphaTest(true)</td><td>Enables alpha test. Works the same way as "AlphaDiscardThreshold".</td><td>Generally used for vegetation etc.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setAlphaFallOff(0.5f); <br/>
|
|
|
|
+getAdditionalRenderState().setAlphaTest(true)</td><td>Enables alpha test. Works the same way as "AlphaDiscardThreshold".</td><td>Used for textures that have fully opaque pixels next to fully transparent pixels, e.g. foliage, hair, vegetation.</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setBlendMode(BlendMode.Additive);</td><td>Additive alpha blending adds colors in a commutative way, i.e. the result does not depend on the order of transparent layers. Adds the scene's background pixel color to the current pixel color. Note that viewed in front of a white scene, these textures become fully transparent. This is useful if you have many transparent textures overlapping.</td><td>Used for particle effect textures that have a black color background. </td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setBlendMode(BlendMode.Additive);</td><td>Additive alpha blending adds colors in a commutative way, i.e. the result does not depend on the order of transparent layers, since it adds the scene's background pixel color to the current pixel color. This is useful if you have lots of transparent textures overlapping and don't care about the order. <br/>
|
|
|
|
+Viewed in front of a white background, Additive textures become fully transparent! </td><td>Used for particle effect textures that have a black color background. </td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setBlendMode(BlendMode.AlphaAdditive);</td><td>Same as "Additive", except first it multiplies the current pixel color by the pixel alpha.</td><td>Used for particle effects that have alpha as background. </td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setBlendMode(BlendMode.AlphaAdditive);</td><td>Same as "Additive", except first it multiplies the current pixel color by the pixel alpha.</td><td>Used for particle effects that have alpha as background. </td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setBlendMode(BlendMode.Color);</td><td>Blends by color.</td><td>Generally useless.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setBlendMode(BlendMode.Color);</td><td>Blends by color.</td><td>Generally useless.</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setBlendMode(BlendMode.Modulate);</td><td>Multiplies the background pixel by the current pixel.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setBlendMode(BlendMode.Modulate);</td><td>Multiplies the background pixel by the current pixel.</td><td>?</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setBlendMode(BlendMode.ModulateX2);</td><td>Same as "Modulate", except the result is doubled.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setBlendMode(BlendMode.ModulateX2);</td><td>Same as "Modulate", except the result is doubled.</td><td>?</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setBlendMode(BlendMode.PremultAlpha);</td><td>Pre-multiplied alpha blending. E.g. if the color of the object has already been multiplied by its alpha, this is used instead of "Alpha" blend mode.</td><td>For use with premult alpha textures.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setBlendMode(BlendMode.PremultAlpha);</td><td>Pre-multiplied alpha blending. E.g. if the color of the object has already been multiplied by its alpha, this is used instead of "Alpha" blend mode.</td><td>For use with Premult Alpha textures.</td>
|
|
</tr>
|
|
</tr>
|
|
</table></div>
|
|
</table></div>
|
|
-<!-- EDIT6 TABLE [8698-10778] -->
|
|
|
|
|
|
+<!-- EDIT6 TABLE [13546-15768] -->
|
|
<p>
|
|
<p>
|
|
|
|
|
|
-Also note the AlphaDiscardThreshold value for materials based on Lighting.j3md. The renderer does not render pixels whose transparancy is below the threshold.
|
|
|
|
|
|
+<p><div>For partially transparent Materials based on Lighting.j3md, consider setting the <code>AlphaDiscardThreshold</code> value. The renderer only renders pixels above your alpha threshold, and does not render pixels below the threshold. This means, that gradients in the AlphaMap are no longer interpreted as soft translucency, but parts of the texture become either fully opaque or fully transparent. You typically activate Alpha Testing for partially transparent objects such as foliage, hair, etc.
|
|
|
|
+
|
|
|
|
+</div></p>
|
|
</p>
|
|
</p>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
-<h2><a>Material Options</a></h2>
|
|
|
|
|
|
+<h3><a>Advanced Options</a></h3>
|
|
<div>
|
|
<div>
|
|
<div><table>
|
|
<div><table>
|
|
<tr>
|
|
<tr>
|
|
- <th>Material Option</th><th>Usage</th>
|
|
|
|
|
|
+ <th>Material Option</th><th>Usage</th><th>Example</th>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setWireframe(true);</td><td>Switch to showing the (textured) Material in wireframe mode</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setWireframe(true);</td><td>Switch to showing the (textured) Material in wireframe mode. For debugging or "matrix/holodeck" effect.</td><td></td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Back); </td><td>Activate back-face culling. Mesh faces that are not visible are not rendered, which saves time. Backface culling is activated by default as an optimization.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.Back); </td><td>Activate back-face culling. Mesh faces that are not facing the camera are not rendered, which saves time. Backface culling is activated by default as a major optimization.</td><td>The backside of mesh polygons (and the inside of models) is invisible. </td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off); </td><td>No culling. All meshes are rendered even if they are out of view. Slow.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.Off); </td><td>Nothing is culled. Both mesh faces are rendered, even if they face away from the camera. Slow.</td><td>Sometimes used to debug custom meshes if you messed up some of the polygon sides, or for special shadow effects.</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.Front); </td><td>Activate front-face culling. Mesh faces facing the camera are not rendered. Typically not used.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.Front); </td><td>Activate front-face culling. Mesh faces facing the camera are not rendered.</td><td>Typically not used.</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setFaceCullMode(FaceCullMode.FrontAndBack)</td><td>Activate both back- and frontface culling. Use this as an efficient way to make an object temporarily invisible. All it's other in-game properties, collision shapes, interactions, etc remain active.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setFaceCullMode(FaceCullMode.FrontAndBack)</td><td>Cull both backfaces and frontfaces.</td><td>Use this as an efficient way to make an object temporarily invisible, while keeping all its other in-game properties (node attachment, collision shapes, interactions, etc) active.</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setColorWrite(false);</td><td>Disable writing the color of pixels. Use this together with setDepthWrite(true) to write pixels only to the depth buffer, for example. </td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setColorWrite(false);</td><td>Disable writing the color of pixels.</td><td>Use this together with setDepthWrite(true) to write pixels only to the depth buffer, for example. </td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setPointSprite(true);</td><td>Enables point-sprite mode, so meshes with "Mode.Points" will be rendered as textured sprites. Note that gl_PointCoord must be set in the shader. Point sprites are used for hardware accelerated particle effects. </td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setPointSprite(true);</td><td>Enables point-sprite mode, e.g. meshes with "Mode.Points" will be rendered as textured sprites. Note that gl_PointCoord must be set in the shader.</td><td>Point sprites are used internally for hardware accelerated particle effects.</td>
|
|
</tr>
|
|
</tr>
|
|
<tr>
|
|
<tr>
|
|
- <td>mat.getAdditionalRenderState().setPolyOffset();</td><td>Enable polygon offset. Use this when you have meshes that have triangles really close to each over (e.g. <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Coplanarity"><param name="text" value="<html><u>Coplanar</u></html>"><param name="textColor" value="blue"></object>), it will shift the depth values to prevent <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Z-fighting"><param name="text" value="<html><u>Z-fighting</u></html>"><param name="textColor" value="blue"></object>.</td>
|
|
|
|
|
|
+ <td>getAdditionalRenderState().setPolyOffset();</td><td>Enable polygon offset.</td><td>Use this when you have meshes that have triangles really close to each over (e.g. <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Coplanarity"><param name="text" value="<html><u>Coplanar</u></html>"><param name="textColor" value="blue"></object>), it will shift the depth values to prevent <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://en.wikipedia.org/wiki/Z-fighting"><param name="text" value="<html><u>Z-fighting</u></html>"><param name="textColor" value="blue"></object>.</td>
|
|
</tr>
|
|
</tr>
|
|
</table></div>
|
|
</table></div>
|
|
-<!-- EDIT7 TABLE [10970-12683] -->
|
|
|
|
|
|
+<!-- EDIT7 TABLE [16304-18289] -->
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<div><sup><a href="#fnt__1">1)</a></sup>
|
|
<div><sup><a href="#fnt__1">1)</a></sup>
|