Просмотр исходного кода

Update materials_overview.adoc

Changed tables to have captions and be numbered.
Changed material definition tables to column width of 20,40,40 to make more readable.
Changed testing table to 20,80 column width to make more readable.
mitm001 9 лет назад
Родитель
Сommit
408f27ac1e
1 измененных файлов с 37 добавлено и 21 удалено
  1. 37 21
      src/docs/asciidoc/jme3/advanced/materials_overview.adoc

+ 37 - 21
src/docs/asciidoc/jme3/advanced/materials_overview.adoc

@@ -48,11 +48,11 @@ jMonkeyEngine supports illuminated and unshaded Material Definitions.
 
 
 “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.
 “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.
 
 
-[cols="20,40,40", options="header", caption=]
-.Material Definition
+[cols="20,40,40", options="header"]
+.Standard Unshaded
 |===
 |===
 
 
-a| Standard Unshaded 
+a| Material Definition 
 a| Usage 
 a| Usage 
 <a| Material Parameters  
 <a| Material Parameters  
 
 
@@ -75,21 +75,25 @@ setColor(“GlowColor, ColorRGBA.White);
 |===
 |===
 
 
 Other useful, but less commonly used material definitions:
 Other useful, but less commonly used material definitions:
-[cols="3", options="header"]
+
+[cols="20,40,40", options="header"]
+.Special Unshaded
 |===
 |===
 
 
-a| Special Unshaded Material Definitions 
+a| Material Definition 
 a| Usage 
 a| Usage 
 <a| Material Parameters  
 <a| Material Parameters  
 
 
-<a| Common/MatDefs/Misc/Sky.j3md            
+<a| Common/MatDefs/Misc/ +
+Sky.j3md            
 a| A solid skyblue, or use with a custom SkyDome texture. +
 a| A solid skyblue, or use with a custom SkyDome texture. +
 See also: <<jme3/advanced/sky#,Sky>> 
 See also: <<jme3/advanced/sky#,Sky>> 
 a| setTexture(“TextureCubeMap, assetManager.loadTexture(“)); +
 a| setTexture(“TextureCubeMap, assetManager.loadTexture(“)); +
 setBoolean(“SphereMap,true); +
 setBoolean(“SphereMap,true); +
 setVector3(“NormalScale, new Vector3f(0,0,0)); 
 setVector3(“NormalScale, new Vector3f(0,0,0)); 
 
 
-a| Common/MatDefs/Terrain/Terrain.j3md 
+a| Common/MatDefs/Terrain/ +
+Terrain.j3md 
 a| Splat textures for e.g. terrains. +
 a| Splat textures for e.g. terrains. +
 See also: <<jme3/beginner/hello_terrain#,Hello Terrain>> 
 See also: <<jme3/beginner/hello_terrain#,Hello Terrain>> 
 a| setTexture(“Tex1, assetManager.loadTexture(“)); +
 a| setTexture(“Tex1, assetManager.loadTexture(“)); +
@@ -103,7 +107,8 @@ setTexture(“Tex3, assetManager.loadTexture(“)); +
 setFloat(“Tex3Scale,1f); +
 setFloat(“Tex3Scale,1f); +
 setTexture(“Alpha, assetManager.loadTexture(“)); 
 setTexture(“Alpha, assetManager.loadTexture(“)); 
 
 
-a|Common/MatDefs/Terrain/HeightBasedTerrain.j3md
+a|Common/MatDefs/Terrain/ +
+HeightBasedTerrain.j3md
 a|A multi-layered texture for terrains. +
 a|A multi-layered texture for terrains. +
 Specify four textures and a Vector3f describing the region in which each texture should appear: +
 Specify four textures and a Vector3f describing the region in which each texture should appear: +
 X = start height, +
 X = start height, +
@@ -127,7 +132,8 @@ setVector3(“region4, new Vector3f(0,0,0)); +
 setTexture(“slopeColorMap, assetManager.loadTexture(“)); +
 setTexture(“slopeColorMap, assetManager.loadTexture(“)); +
 setFloat(“slopeTileFactor,1f);
 setFloat(“slopeTileFactor,1f);
 
 
-<a| Common/MatDefs/Misc/Particle.j3md       
+<a| Common/MatDefs/Misc/ +
+Particle.j3md       
 a| Used with texture masks for particle effects, or for point sprites. +
 a| Used with texture masks for particle effects, or for point sprites. +
 The Quadratic value scales the particle for perspective view (link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java[formula]). +
 The Quadratic value scales the particle for perspective view (link:https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-core/src/main/java/com/jme3/effect/ParticleEmitter.java[formula]). +
 Does support an optional colored glow effect. +
 Does support an optional colored glow effect. +
@@ -149,14 +155,17 @@ jMonkeyEngine supports illuminated and unshaded Material Definitions.
 *  Unshaded materials look more abstract.
 *  Unshaded materials look more abstract.
 
 
 Illuminated materials require a <<jme3/advanced/light_and_shadow#,light source>> 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 <<jme3/advanced/light_and_shadow#,drop shadows>> unless you use a FilterPostProcessor. 
 Illuminated materials require a <<jme3/advanced/light_and_shadow#,light source>> 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 <<jme3/advanced/light_and_shadow#,drop shadows>> unless you use a FilterPostProcessor. 
-[cols="3", options="header"]
+
+[cols="20,40,40", options="header"]
+.Standard Illuminated
 |===
 |===
 
 
-a|Standard Illuminated Material Definition 
+a|Material Definition 
 a| Usage 
 a| Usage 
 a| Material Parameters 
 a| Material Parameters 
 
 
-<a| Common/MatDefs/Light/Lighting.j3md      
+<a| Common/MatDefs/Light/ +
+Lighting.j3md      
 a| Commonly used Material with Phong illumination. +
 a| Commonly used Material with Phong illumination. +
 Use this material together with DiffuseMap, SpecularMap, BumpMap (NormalMaps, ParalaxMap) textures. +
 Use this material together with DiffuseMap, SpecularMap, BumpMap (NormalMaps, ParalaxMap) textures. +
 Supports shininess, transparency, and plain material colors (Diffuse, Ambient, Specular colors). +
 Supports shininess, transparency, and plain material colors (Diffuse, Ambient, Specular colors). +
@@ -191,14 +200,17 @@ setBoolean(“Minnaert,true); footnote:[Minnaert is a shader type.] +
 setBoolean(“WardIso,true); footnote:[WardIso is a shader type.]  
 setBoolean(“WardIso,true); footnote:[WardIso is a shader type.]  
 
 
 |===
 |===
-[cols="3", options="header"]
+
+[cols="20,40,40", options="header"]
+.Special Illuminated
 |===
 |===
 
 
-a|Special Illuminated Material Definitions 
+a|Material Definitions 
 a| Usage 
 a| Usage 
 a| Material Parameters 
 a| Material Parameters 
 
 
-a|Common/MatDefs/Terrain/TerrainLighting.j3md
+a|Common/MatDefs/Terrain/ +
+TerrainLighting.j3md
 a|Same kind of multi-layered splat texture as Terrain.j3md, but with illumination and shading. +
 a|Same kind of multi-layered splat texture as Terrain.j3md, but with illumination and shading. +
 Typically used for terrains, but works on any mesh. +
 Typically used for terrains, but works on any mesh. +
 For every 3 splat textures, you need one alpha map. +
 For every 3 splat textures, you need one alpha map. +
@@ -237,7 +249,8 @@ setBoolean(“WardIso,true); +
 setBoolean(“useTriPlanarMapping,true); +
 setBoolean(“useTriPlanarMapping,true); +
 setBoolean(“isTerrainGrid,true); 
 setBoolean(“isTerrainGrid,true); 
 
 
-<a| Common/MatDefs/Light/Reflection.j3md    
+<a| Common/MatDefs/Light/ +
+Reflection.j3md    
 a| Reflective glass material with environment map (CubeMap/SphereMap). See also: link:http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/texture/TestCubeMap.java[TestCubeMap.java] 
 a| Reflective glass material with environment map (CubeMap/SphereMap). See also: link:http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/texture/TestCubeMap.java[TestCubeMap.java] 
 a| setTexture(“Texture, assetManager.loadTexture(“)); +
 a| setTexture(“Texture, assetManager.loadTexture(“)); +
 setBoolean(“SphereMap,true); 
 setBoolean(“SphereMap,true); 
@@ -246,13 +259,16 @@ setBoolean(“SphereMap,true);
 
 
 
 
 === Other: Test and Debug
 === Other: Test and Debug
-[cols="2", options="header"]
+
+[cols="20,80", options="header"]
+.Testing
 |===
 |===
 
 
 <a| Material Definition                     
 <a| Material Definition                     
 a| Usage 
 a| Usage 
 
 
-<a| Common/MatDefs/Misc/ShowNormals.j3md    
+<a| Common/MatDefs/Misc/ +
+ShowNormals.j3md    
 a| 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 and no lights, or as fall-back default material. This built-in material has no parameters. 
 a| 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 and no lights, or as fall-back default material. This built-in material has no parameters. 
 
 
 |===
 |===
@@ -261,8 +277,8 @@ a| A color gradient calculated from the model's surface normals. You can use thi
 == RenderStates
 == RenderStates
 
 
 
 
-=== Transparency
 [cols="3", options="header"]
 [cols="3", options="header"]
+.Transparancy
 |===
 |===
 
 
 a|Material Option
 a|Material Option
@@ -334,8 +350,8 @@ geo.setQueueBucket(Bucket.Transparent);
 
 
 
 
 
 
-=== Culling
 [cols="3", options="header"]
 [cols="3", options="header"]
+.Culling
 |===
 |===
 
 
 a|Material Option
 a|Material Option
@@ -361,8 +377,8 @@ a|Use this as an efficient way to make an object temporarily invisible, while ke
 |===
 |===
 
 
 
 
-=== Miscellaneous
 [cols="3", options="header"]
 [cols="3", options="header"]
+.Miscellaneous
 |===
 |===
 
 
 a|getAdditionalRenderState().setColorWrite(false);
 a|getAdditionalRenderState().setColorWrite(false);