|
@@ -4,7 +4,7 @@
|
|
:keywords: material, texture, file, sdk, wireframe, documentation
|
|
:keywords: material, texture, file, sdk, wireframe, documentation
|
|
|
|
|
|
|
|
|
|
-In the xref:material/material_definitions.adoc[Material Definitions] article you learned how to configure <<jme3/advanced/materials_overview#,Materials>> programmatically in Java code. If you have certain commonly used Materials that never change, you can clean up the amount of Java code that clutters your init method, by moving material settings into .j3m files. Then later in your code, you only need to call one setter instead of several to apply the material.
|
|
|
|
|
|
+In the xref:material/material_definitions.adoc[Material Definitions] article you learned how to configure xref:material/materials_overview.adoc[Materials] programmatically in Java code. If you have certain commonly used Materials that never change, you can clean up the amount of Java code that clutters your init method, by moving material settings into .j3m files. Then later in your code, you only need to call one setter instead of several to apply the material.
|
|
|
|
|
|
If you want to colorize simple shapes (one texture all around), then .j3m are the most easily customizable solution. J3m files can contain texture mapped materials, but as usual you have to create the textures in an external editor, especially if you use UV-mapped textures.
|
|
If you want to colorize simple shapes (one texture all around), then .j3m are the most easily customizable solution. J3m files can contain texture mapped materials, but as usual you have to create the textures in an external editor, especially if you use UV-mapped textures.
|
|
|
|
|
|
@@ -36,9 +36,9 @@ How this file is structured:
|
|
. Header
|
|
. Header
|
|
.. `Material` is a fixed keyword, keep it.
|
|
.. `Material` is a fixed keyword, keep it.
|
|
.. `shiny bumpy rock` is a descriptive string that you can make up. Choose a name to help you remember for what you intend to use this material.
|
|
.. `shiny bumpy rock` is a descriptive string that you can make up. Choose a name to help you remember for what you intend to use this material.
|
|
-.. After the colon, specify on which <<jme3/advanced/materials_overview#,Material>> definition you base this Material.
|
|
|
|
|
|
+.. After the colon, specify on which xref:material/materials_overview.adoc[Materials] definition you base this Material.
|
|
|
|
|
|
-. Now look up the choosen Material Definition's parameters and their parameter types from the <<jme3/advanced/materials_overview#,Material>> table. Add one line for each parameter.
|
|
|
|
|
|
+. Now look up the choosen Material Definition's parameters and their parameter types from the Material table. Add one line for each parameter.
|
|
** For example: The series of four numbers in the example above represent RGBA color values.
|
|
** For example: The series of four numbers in the example above represent RGBA color values.
|
|
|
|
|
|
. Check the detailed syntax reference below if you are unsure.
|
|
. Check the detailed syntax reference below if you are unsure.
|
|
@@ -73,7 +73,7 @@ In the jMonkeyEngine SDK, open menu:Windows[Palette] and drag the `JME Material:
|
|
|
|
|
|
Make sure to get the paths to the textures (.png, .jpg) and material definitions (.j3md) right.
|
|
Make sure to get the paths to the textures (.png, .jpg) and material definitions (.j3md) right.
|
|
|
|
|
|
-* The paths to the built-in .j3md files are relative to jME3's Core Data directory. Just copy the path stated in the <<jme3/advanced/materials_overview#,Material>> table. +
|
|
|
|
|
|
+* The paths to the built-in .j3md files are relative to jME3's Core Data directory. Just copy the path stated in the Material table. +
|
|
`Common/MatDefs/Misc/Unshaded.j3md` is resolved to `jme3/src/src/core-data/Common/MatDefs/Misc/Unshaded.j3md`.
|
|
`Common/MatDefs/Misc/Unshaded.j3md` is resolved to `jme3/src/src/core-data/Common/MatDefs/Misc/Unshaded.j3md`.
|
|
* The paths to your textures are relative to your project's assets directory. +
|
|
* The paths to your textures are relative to your project's assets directory. +
|
|
`Textures/bump_rock_normal.png` is resolved to `MyGame/src/assets/Textures/bump_rock_normal.png`
|
|
`Textures/bump_rock_normal.png` is resolved to `MyGame/src/assets/Textures/bump_rock_normal.png`
|