- update help with now working multi-media and optimization pages
- ad blender import help to manual

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9420 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent 5af42b37ce
commit e2473c771c
  1. 6
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html
  2. 27
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/bullet_multithreading.html
  3. 4
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html
  4. 53
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/hud.html
  5. 25
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics.html
  6. 63
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/spatial.html
  7. 4
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/walking_character.html
  8. 14
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_asset.html
  9. 4
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_collision.html
  10. 91
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender.html
  11. BIN
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_apply_bones.png
  12. BIN
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_apply_mesh.png
  13. BIN
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_envelopes.png
  14. BIN
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_finished.png
  15. BIN
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_rootbone.png
  16. 14
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/faq.html
  17. 10
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/headlessserver.html
  18. 235
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/multi-media_asset_pipeline.html
  19. 12
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/optimization.html
  20. 9
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/troubleshooting.html
  21. 2
      sdk/jme3-core/javahelp/com/jme3/gde/core/docs/wiki-map.xml

@ -126,7 +126,7 @@ Loading a model:
Loading a scene from an Ogre3D dotScene file stored inside a zip:
</p>
<pre>assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class.getName&#40;&#41;&#41;;
<pre>assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class&#41;;
Spatial scene = assetManager.loadModel&#40;&quot;main.scene&quot;&#41;;
rootNode.attachChild&#40;scene&#41;;</pre>
@ -134,7 +134,7 @@ rootNode.attachChild&#40;scene&#41;;</pre>
Alternatively to ZipLocator, there is also a HttpZipLocator that can stream models from a zip file online:
</p>
<pre>assetManager.registerLocator&#40;&quot;http://jmonkeyengine.googlecode.com/files/wildhouse.zip&quot;,
HttpZipLocator.class.getName&#40;&#41;&#41;;
HttpZipLocator.class&#41;;
Spatial scene = assetManager.loadModel&#40;&quot;main.scene&quot;&#41;;
rootNode.attachChild&#40;scene&#41;;</pre>
@ -175,7 +175,7 @@ rootNode.attachChild&#40;scene&#41;;</pre>
</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [6199-7127] -->
<!-- EDIT1 TABLE [6179-7107] -->
</div>
<h2><a>NullPointerException: Cannot locate resource?</a></h2>

@ -8,8 +8,8 @@
<div>
<p>
Since bullet is not (yet) multithreaded or GPU accelerated the jME3 implementation allows to run each physics space on a separate thread that is executed in parallel to rendering.
Since bullet is not (yet) multithreaded or GPU accelerated, the jME3 implementation allows to run each physics space on a separate thread that is executed in parallel to rendering.
</p>
</div>
@ -18,24 +18,41 @@ Since bullet is not (yet) multithreaded or GPU accelerated the jME3 implementati
<div>
<p>
A SimpleApplication with a BulletAppState allows setting the threading type via
</p>
<pre>setThreadingType(ThreadingType type);</pre>
<p>
where ThreadingType can be either SEQUENTIAL or PARALLEL.
where ThreadingType can be either SEQUENTIAL or PARALLEL. By default, it&#039;s SEQUENTIAL.
</p>
<p>
In the simpleInitApp() method:
You can activate PARALLEL threading in the simpleInitApp() method:
</p>
<pre>bulletAppState = new BulletAppState&#40;&#41;;
bulletAppState.setThreadingType&#40;BulletAppState.ThreadingType.PARALLEL&#41;;
stateManager.attach&#40;bulletAppState&#41;;</pre>
<p>
The physics update happens in parallel to rendering, after the users changes have been made in the update() call. This way the loop logic is still maintained: the user can set and change values in physics and scenegraph objects before render() and physicsUpdate() are called in parallel. More physics spaces can simply be added by using multiple bulletAppStates.
Now the physics update happens in parallel to render(), that is, after the user&#039;s changes in the update() call have been applied. During update() the physics update loop pauses. This way the loop logic is still maintained: the user can set and change values in physics and scenegraph objects before render() and physicsUpdate() are called in parallel. This allows you to use physics methods in update() as if it was single-threaded.
</p>
<div><table>
<tr>
<th>PARALLEL</th><th>SEQUENTIAL</th>
</tr>
<tr>
<td>1. update(), 2. render() and physics update().</td><td>1. update(), 2. render(), 3. physics update(). </td>
</tr>
<tr>
<td>Physics Debug View is rendered inaccurately (out of sync)</td><td>Physics Debug View is rendered accurately.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [1202-1424] -->
<p>
<p><div>You can add more physics spaces by using multiple PARALLEL bulletAppStates. You would do that if you have sets physical objects that never collide (for example, underground bolders and flying cannon balls above ground), so you put those into separate physics spaces, which improves performances (less collisions to check!).
</div></p>
</p>
<div><span>
<a href="/wiki/doku.php/tag:documentation?do=showtag&amp;tag=tag%3Adocumentation">documentation</a>,

@ -62,6 +62,8 @@ Use <span><a href="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html">C
</li>
<li><div> A Control only has access to and control over the Spatial it is attached to.</div>
</li>
<li><div> Controls can be saved as .j3o file together with a Spatial. </div>
</li>
</ul>
<p>
@ -218,7 +220,7 @@ See also:
<p>
<p><div>If you want to create a Control that also extends another existing class (rare, but possible), then create a custom extension of the Control Interface. You custom Control implements your custom interface.
<p><div>In the less common case that you want to create a Control that also extends another class, create a custom interface that extends jME3&#039;s Control interface. Your class can become a Control by implement the Control interface, and at the same time extend another class.
</div></p>
</p>

@ -35,7 +35,7 @@ You have two options how to create HUDs.
<th>Option</th><th>Pros</th><th>Cons</th>
</tr>
<tr>
<th>Attach elements to default guiNode:</th><td>Easy to learn. jMonkeyEngine built-in <acronym title="Application Programming Interface">API</acronym> for attaching images and bitmap text.</td><td>Only basic features. <br/>
<th>Attach elements to default guiNode:</th><td>Easy to learn. jMonkeyEngine built-in <acronym title="Application Programming Interface">API</acronym> for attaching plain images and bitmap text.</td><td>Only basic features. <br/>
You will have to write custom controls / buttons / effects if you need them.</td>
</tr>
<tr>
@ -44,7 +44,12 @@ Includes buttons, effects, controls. <br/>
Supports <acronym title="Extensible Markup Language">XML</acronym> and Java layouts.</td><td>Steeper learning curve.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [834-1253] -->
<!-- EDIT1 TABLE [834-1259] -->
<p>
Using the <acronym title="Graphical User Interface">GUI</acronym> Node is the default approach in jme3 to create simple HUDs. If you just quickly want to display a line of text, or a simple icon on the screen, use the no-frills <acronym title="Graphical User Interface">GUI</acronym> Node, it&#039;s easier.
</p>
</div>
<h2><a>Simple HUD: GUI Node</a></h2>
@ -52,18 +57,14 @@ Supports <acronym title="Extensible Markup Language">XML</acronym> and Java layo
<p>
Using the <acronym title="Graphical User Interface">GUI</acronym> Node is the default approach in jme3 to create simple HUDs. If you just quickly want to display a line of text, or a simple icon on the screen, use this no-frills method.
</p>
<p>
Next to the rootNode for the 3-dimensional scene graph, jME3 also offers a 2-dimension (orthogonal) node, the <code>guiNode</code>.
You already know the <code>rootNode</code> that holds the 3-dimensional scene graph. jME3 also offers a 2-dimension (orthogonal) node, the <code>guiNode</code>.
</p>
<p>
This is how you use the guiNode for HUDs:
</p>
<ul>
<li><div> Create a <acronym title="Graphical User Interface">GUI</acronym> element: BitmapText or Picture.</div>
<li><div> Create a <acronym title="Graphical User Interface">GUI</acronym> element: a BitmapText or Picture object.</div>
</li>
<li><div> Attach the element to the guiNode. </div>
</li>
@ -76,13 +77,14 @@ The BitmapTexts and Pictures appear as 2 dimensional element on the screen.
</p>
<p>
<strong>Note:</strong> The size unit for the guiNode is pixels, not world units.
<p><div>By default, the guiNode has some scene graph statistics attached. To clear the guiNode before you attach your own <acronym title="Graphical User Interface">GUI</acronym> elements, use the following methods:
</p>
<pre>setDisplayStatView&#40;false&#41;; setDisplayFps&#40;false&#41;;</pre>
<p>
By default, the guiNode has some scene graph statistics attached in SimpleApplication. To clear the guiNode and attach your own <acronym title="Graphical User Interface">GUI</acronym> elements, you detach all children.
</div></p>
</p>
<pre>guiNode.detachAllChildren&#40;&#41;;</pre>
</div>
@ -128,22 +130,12 @@ hudText = new BitmapText(myFont, false);</pre>
</div>
<h3><a>Displaying Geometries in the HUD</a></h3>
<div>
<p>
It is technically possible to attach Quads and 3D Geometries to the HUD. They show up as flat, static <acronym title="Graphical User Interface">GUI</acronym> elements. Note that if you use a lit Material, you must add a light to the guiNode. Also remember that size units are pixels in the HUD (a 2-wu cube is displayed tiny 2 pixels wide!).
</p>
</div>
<h3><a>Positioning HUD Elements</a></h3>
<div>
<ul>
<li><div> When positioning text and images in 2D, the bottom left corner of the screen is <code>(0f,0f)</code>, and the top right corner is at <code>(settings.getWidth(),settings.getHeight())</code>.</div>
<li><div> When positioning <acronym title="Graphical User Interface">GUI</acronym> text and images in 2D, the <strong>bottom left corner</strong> of the screen is <code>(0f,0f)</code>, and the <strong>top right corner</strong> is at <code>(settings.getWidth(),settings.getHeight())</code>.</div>
</li>
<li><div> If you have several 2D elements in the <acronym title="Graphical User Interface">GUI</acronym> bucket that overlap, define their depth order by specifing a Z value. You can use <code>pic.move(x, y, -2)</code> or <code>hudText.setLocalTranslation(x,y,-2)</code>.</div>
<li><div> If you have several 2D elements in the <acronym title="Graphical User Interface">GUI</acronym> bucket that overlap, define their depth order by specifing a Z value. For example use <code>pic.move(x, y, -1)</code> to move the picture to the background, or <code>hudText.setLocalTranslation(x,y,1)</code> to move text to the foreground.</div>
</li>
<li><div> Size and length values in the orthogonal render queue are treated like pixels. A 20*20-wu big quad is rendered 20 pixels wide.</div>
</li>
@ -151,6 +143,21 @@ It is technically possible to attach Quads and 3D Geometries to the HUD. They sh
</div>
<h3><a>Displaying Geometries in the HUD</a></h3>
<div>
<p>
It is technically possible to attach Quads and 3D Geometries to the HUD. They show up as flat, static <acronym title="Graphical User Interface">GUI</acronym> elements. The size unit for the guiNode is pixels, not world units. If you attach a Geometry that uses a lit Material, you must add a light to the guiNode.
</p>
<p>
<p><div>If you don&#039;t see an attached object in the <acronym title="Graphical User Interface">GUI</acronym>, check it&#039;s position and material (add a light to guiNode). Also verify whether it is not too tiny to be seen. For comparison: A 1 world-unit wide cube is only 1 pixel wide when attached to the guiNode! You may need to scale it bigger.
</div></p>
</p>
</div>
<h3><a>Keeping the HUD Up-To-Date</a></h3>
<div>

@ -357,18 +357,19 @@ The PhysicsSpace is an object in BulletAppState that is like a rootNode for Phys
</p>
<ul>
<li><div> Add the PhysicsControl to the PhysicsSpace. <pre>bulletAppState.getPhysicsSpace&#40;&#41;.add&#40;myThing_phys&#41;; ...</pre>
<li><div> Just like you add the Geometry to the rootNode, you add its PhysicsControl to the PhysicsSpace. <pre>bulletAppState.getPhysicsSpace&#40;&#41;.add&#40;myThing_phys&#41;;
rootNode.attachChild&#40;myThing_geo&#41;; </pre>
</div>
</li>
<li><div> When you remove a physical object from the scene, remove the PhysicsControl from the PhysicsSpace, and (as always) remove the Spatial from the rootNode: <pre>bulletAppState.getPhysicsSpace&#40;&#41;.remove&#40;myThing_phys&#41;;
myModel.removeFromParent&#40;&#41;;</pre>
<li><div> When you remove a Geometry from the scene and detach it from the rootNode, also remove the PhysicsControl from the PhysicsSpace: <pre>bulletAppState.getPhysicsSpace&#40;&#41;.remove&#40;myThing_phys&#41;;
myThing_geo.removeFromParent&#40;&#41;;</pre>
</div>
</li>
</ul>
<p>
<p><div>You can register the PhysicsControl to the PhysicsSpace, or register the Geometry to the PhysicsSpace after you added the PhysicsControl to it.
<p><div>You can either add the <em>PhysicsControl</em> to the PhysicsSpace, or add the PhysicsControl to the Geometry and then add the <em>Geometry</em> to the PhysicsSpace. jME3 understands both and the outcome is the same.
</div></p>
</p>
@ -434,7 +435,7 @@ This setting has an impact on performance, so use it sparingly. </td><td> Brick:
Rubber ball: 1.0f </td>
</tr>
</table></div>
<!-- EDIT5 TABLE [14458-15879] -->
<!-- EDIT5 TABLE [14585-16006] -->
<p>
On a RigidBodyControl, you can apply the following physical forces:
@ -458,7 +459,7 @@ On a RigidBodyControl, you can apply the following physical forces:
(See detailed explanation below.) </td>
</tr>
</table></div>
<!-- EDIT6 TABLE [15950-16740] -->
<!-- EDIT6 TABLE [16077-16867] -->
</div>
<h3><a>Kinematic vs Dynamic vs Static</a></h3>
@ -510,7 +511,7 @@ setKinematic(true);</td><td>setMass(1f); <br/>
setKinematic(false);</td>
</tr>
</table></div>
<!-- EDIT7 TABLE [16978-18037] -->
<!-- EDIT7 TABLE [17105-18164] -->
</div>
<h4><a>When Do I Use Kinematic Objects?</a></h4>
@ -571,7 +572,7 @@ Use the following methods to move dynamic physical objects.
<td> clearForces()</td><td>Cancels out all forces (force, torque) etc and stops the motion.</td>
</tr>
</table></div>
<!-- EDIT8 TABLE [19249-20238] -->
<!-- EDIT8 TABLE [19376-20365] -->
<p>
<p><div>It is technically possible to position PhysicsControls using setLocalTranslation(), e.g. to place them in their start position in the scene. However you must be very careful not to cause an &quot;impossible state&quot; where one physical object overlaps with another! Within the game, you typically use the setters shown here exclusively.
@ -611,7 +612,13 @@ removeCollideWithGroup(COLLISION_GROUP_01)</td><td>Collision Groups are integer
<td> setCcdSweptSphereRadius(.5f)</td><td>Bullet does not use the full collision shape for continuous collision detection, insteadit uses a &quot;swept sphere&quot; shape to approximate a motion. Only relevant for fast moving dynamic bodies. (?) </td>
</tr>
</table></div>
<!-- EDIT9 TABLE [20656-22461] -->
<!-- EDIT9 TABLE [20783-22588] -->
<p>
<p><div> You can <code>setApplyPhysicsLocal(true)</code> for an object to make it move relatively to its local physics space. You would do that if you need a physics space that moves with a node (e.g. a spaceship with artificial gravity surrounded by zero-g space). By default, it&#039;s set to false, and all movement is relative to the world.
</div></p>
</p>
</div>
<h2><a>Best Practices</a></h2>

@ -8,7 +8,11 @@ This is an introduction to the concept of Spatials, the elements of the 3D scene
</p>
<p>
The rootNode is the central element of the scene graph. Even if the scenegraph is empty, it always has at least its rootNode. All other Spatials are <em>attached</em> to the rootNode in a parent-child relationship. If you think you need to understand the scene graph concept better, please read <a href="/com/jme3/gde/core/docs/jme3/scenegraph_for_dummies.html">Scenegraph for dummies</a> first.
The rootNode is the central element of the scene graph. Even if the scene graph is empty, it always contains at least the rootNode. We <em>attach</em> Spatials to the rootNode. Attached Spatials are always in a <em>parent-child relationship</em>. Every time you attach a Spatial to something, it is implicitly detached from its previous parent. A Spatial can have only one parent. A Spatial can have several children.
</p>
<p>
If you think you need to understand the scene graph concept better, please read <a href="/com/jme3/gde/core/docs/jme3/scenegraph_for_dummies.html">Scenegraph for dummies</a> first.
</p>
</div>
@ -18,7 +22,7 @@ The rootNode is the central element of the scene graph. Even if the scenegraph i
<p>
In your Java code, a Spatial is either a com.jme3.scene.Node or a com.jme3.scene.Geometry. You use the two for different purposes:
In your Java code, a Spatial is either a <code>com.jme3.scene.Node</code> or a <code>com.jme3.scene.Geometry</code>. You use the two for different purposes:
</p>
<p>
@ -30,17 +34,18 @@ In your Java code, a Spatial is either a com.jme3.scene.Node or a com.jme3.scene
<td> </td><th>com.jme3.scene.Spatial </th>
</tr>
<tr>
<th> Purpose: </th><td> A Spatial is an abstract data structure that stores transformations (translation, rotation, scale) of elements of the scene graph. Spatials can be saved and loaded using the AssetManager. </td>
<th> Purpose: </th><td> A Spatial is an abstract data structure that stores transformations (translation, rotation, scale) of elements of the 3D scene graph. Spatials can be saved and loaded using the <a href="/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html">Asset Manager</a>. </td>
</tr>
<tr>
<td> </td><th> com.jme3.scene.Geometry </th><th> com.jme3.scene.Node </th>
</tr>
<tr>
<th> Visibility: </th><td> A Geometry represents a visible 3-D object in the scene graph. </td><td> A Node is an invisible &quot;handle&quot; for a group of objects in the scene graph. </td>
<th> Visibility: </th><td> A Geometry represents a <strong>visible</strong> 3D object in the scene graph. </td><td> A Node is an <strong>invisible &quot;handle&quot;</strong> for a group of Spatials in the scene graph. </td>
</tr>
<tr>
<th> Purpose: </th><td> Use Geometries to represent an object&#039;s looks: Every Geometry contains a polygon mesh and a material, specifying its shape, color, texture, and opacity/transparency. <br/>
You can attach a Geometry to a Node. </td><td> Use Nodes to structure and group Geometries and other Nodes. Every Node is attached to one parent node, and each node can have zero or more children attached to itself. When you transform a parent node, all its children are transformed as well. </td>
<th> Purpose: </th><td> Use Geometries to represent an object&#039;s <strong>looks</strong>: Every Geometry contains a polygon mesh and a material, specifying its shape, color, texture, and opacity/transparency. <br/>
You can attach a Geometry to a Node. </td><td> Use Nodes to <strong>structure and group</strong> Geometries and other Nodes. Every Node is attached to one parent node, and each node can have zero or more children attached to itself. <br/>
<strong>When you transform (move, rotate, etc) a parent node, all its children are transformed (moved, rotated, etc).</strong> </td>
</tr>
<tr>
<th> Content: </th><td> Transformations; custom user data; <br/>
@ -48,13 +53,13 @@ mesh, material; </td><td> Transformations; custom user data; <br/>
no mesh, no material.</td>
</tr>
<tr>
<th> Examples: </th><td> Box, sphere, player, building, terrain, vehicle, missiles, NPCs, etc… </td><td> The rootNode, the guiNode, an audio node, a custom grouping node, etc… </td>
<th> Examples: </th><td> Box, sphere, player, building, terrain, vehicle, missiles, NPCs, etc… </td><td> rootNode, guiNode, audioNode, a custom vehicleNode or shipNode with passengers attached, etc. </td>
</tr>
</table></div>
<!-- EDIT1 TABLE [944-2158] -->
<!-- EDIT1 TABLE [1151-2451] -->
<p>
<p><div>You never create a Spatial with <code>Spatial s = new Spatial();</code>! A Spatial is an abstract concept, like a mammal (there is no actual creature called &quot;mammal&quot; walking around here). You create a Node, or load a Geometry object. Some methods however require a Spatial argument: This is because they are able to accept both Nodes and Geometries as arguments. In this case, you must cast a Node or Geometry to Spatial.
<p><div>You never create a Spatial with <code><del>Spatial s = new Spatial();</del></code>! A Spatial is an abstract concept, like a mammal (there is no actual creature called &quot;mammal&quot; walking around here). You either create a Node or a Geometry object. Some methods however require a Spatial argument: This is because they are able to accept both Nodes and Geometries as arguments. In this case, you must <em>cast</em> a Node or Geometry to Spatial.
</div></p>
</p>
@ -84,51 +89,57 @@ The polygon <a href="/com/jme3/gde/core/docs/jme3/advanced/mesh.html">Mesh</a> i
<p>
You can include custom Java objects in Nodes and Geometries. This is useful for maintaining information about a game element, such as health, budget, ammunition, inventory, equipment, etc for players, or landmark locations for terrains, and much more.
You can include custom user data –that is, custom Java objects and methods– in Nodes and Geometries. This is very useful for maintaining information about a game element, such as health, budget, ammunition, inventory, equipment, etc for players, or landmark locations for terrains, and much more.
</p>
<p>
You do not need to create a custom class that extends Node or Geometry to be able to add custom fields to a spatial – use the setUserData() method instead. Neither do you need to create a custom class that extends Node to be able to add custom accessor methods to this spatial – use a Control instead. Where ever the spatial is accessible, you can also access the object&#039;s game data and accessors.
<p><div>Neither do you need to ever extend Node to be able to add custom accessor methods to a spatial – use <a href="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html">Custom Controls</a> instead. There is no need to create a custom class that extends Node or Geometry to be able to add custom fields – use the provided <code>setUserData()</code> method instead. Where ever the Spatial is accessible, you can easily access the object&#039;s game data and accessors this way.
</div></p>
</p>
<p>
For example when you initialize your custom PlayerControl class:
The following example adds an integer field named <code>health</code> to the Spatil <code>player_node</code>, and initializes it to 100.
</p>
<pre>// init custom data fields in this Control's Spatial (Node or Geometry)
spatial.setUserData&#40;&quot;Health&quot;, 100&#41;; </pre>
<pre>player_node.setUserData&#40;&quot;health&quot;, 100&#41;;</pre>
<p>
To be able to add accessors to the player, you create a <a href="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html">custom PlayerControl</a> class and add it to the Spatial.
In your PlayerControl, you offer accessors that manipulate and get this custom data:
</p>
<pre>player_node.addControl&#40;PlayerControl.class&#41;;</pre>
<p>
In PlayerControl you define methods that set and get your users data in the <code>spatial</code> object.
</p>
<pre>public int getHealth&#40;&#41; &#123;
return &#40;Integer&#41;spatial.getUserData&#40;&quot;Health&quot;&#41;;
return &#40;Integer&#41;spatial.getUserData&#40;&quot;health&quot;&#41;;
&#125;
public void setHealth&#40;int h&#41; &#123;
spatial.setUserData&#40;&quot;Health&quot;,h&#41;;
spatial.setUserData&#40;&quot;health&quot;,h&#41;;
&#125;</pre>
<p>
Elsewhere in your code, you can access this data wherever you have access to the spatial.
Elsewhere in your code, you can access this data wherever you have access to the Spatial <code>player_node</code>.
</p>
<pre>health = player_node.getControl&#40;PlayerControl.class&#41;.getHealth&#40;&#41;;
...
player_node.getControl&#40;PlayerControl.class&#41;.setHealth&#40;99&#41;;</pre>
<p>
You can add as many data objects (including Strings, Integers, Floats, Arrays,) to a Spatial as you need. Just make sure to label them with different Strings (<code>health</code>, <code>inventory</code>, <code>equipment</code>, etc). The saved data can also be custom Java objects if you make the Java class implement the Savable interface. When you save a Spatial as a j3o file, the custom data is saved too, and it will be restored the next time you load the j3o!
</p>
<ul>
<li><div> You can add as many data objects (including Strings, Integers, Floats, Arrays,) to a Spatial as you want. Just make sure to label them with unique Strings (<code>health</code>, <code>inventory</code>, <code>equipment</code>, etc). </div>
</li>
<li><div> The saved data can be custom Java objects if you make the custom Java class <a href="/com/jme3/gde/core/docs/jme3/advanced/save_and_load#custom_savable_class.html">implement the Savable interface</a>. </div>
</li>
<li><div> When you save a Spatial as a .j3o file, the custom data is saved, too, and it will be restored the next time you load the .j3o!</div>
</li>
</ul>
<p>
You can list all data keys that are already defined for one Spatial:
This is how you list all data keys that are already defined for one Spatial:
</p>
<pre>for&#40;String key : spatial.getUserDataKeys&#40;&#41;&#41;&#123;
System.out.println&#40;spatial.getName&#40;&#41;+&quot;'s keys: &quot;+key&#41;;
System.out.println&#40;spatial.getName&#40;&#41;+&quot;'s keys: &quot;+key&#41;;
&#125;</pre>
</div>

@ -199,10 +199,10 @@ In a real game, you would load a scene model here instead of a test world. You c
..
public void simpleInitApp&#40;&#41; &#123;
...
//assetManager.registerLocator(&quot;quake3level.zip&quot;, ZipLocator.class.getName());
//assetManager.registerLocator(&quot;quake3level.zip&quot;, ZipLocator.class);
assetManager.registerLocator&#40;
&quot;http://jmonkeyengine.googlecode.com/files/quake3level.zip&quot;,
HttpZipLocator.class.getName&#40;&#41;&#41;;
HttpZipLocator.class&#41;;
MaterialList matList = &#40;MaterialList&#41; assetManager.loadAsset&#40;&quot;Scene.material&quot;&#41;;
OgreMeshKey key = new OgreMeshKey&#40;&quot;main.meshxml&quot;, matList&#41;;
gameLevel = &#40;Node&#41; assetManager.loadAsset&#40;key&#41;;

@ -215,7 +215,7 @@ What if your game relies on user supplied model files, that are not included in
<p>
Here is a usage example of a ZipLocator that is registered to a file <code>town.zip</code> in the top level of your project directory:
</p>
<pre> assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class.getName&#40;&#41;&#41;;
<pre> assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class&#41;;
Spatial scene = assetManager.loadModel&#40;&quot;main.scene&quot;&#41;;
rootNode.attachChild&#40;scene&#41;;</pre>
@ -224,7 +224,7 @@ Here is a HttpZipLocator that can download zipped models and load them:
</p>
<pre> assetManager.registerLocator&#40;
&quot;http://jmonkeyengine.googlecode.com/files/wildhouse.zip&quot;,
HttpZipLocator.class.getName&#40;&#41;&#41;;
HttpZipLocator.class&#41;;
Spatial scene = assetManager.loadModel&#40;&quot;main.scene&quot;&#41;;
rootNode.attachChild&#40;scene&#41;;</pre>
@ -346,7 +346,7 @@ rootNode.attachChild&#40;scene&#41;;</pre>
</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [10838-11892] -->
<!-- EDIT1 TABLE [10818-11872] -->
</div>
<h2><a>Excercise - How to Load Assets</a></h2>
@ -378,7 +378,7 @@ Use the following method to load models from a zip file:
<ol>
<li><div> Verify <code>town.zip</code> is in the project directory.</div>
</li>
<li><div> Register a zip file locator to the project directory: Add the following code under <code>simpleInitApp() {</code><pre> assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class.getName&#40;&#41;&#41;;
<li><div> Register a zip file locator to the project directory: Add the following code under <code>simpleInitApp() {</code><pre> assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class&#41;;
Spatial gameLevel = assetManager.loadModel&#40;&quot;main.scene&quot;&#41;;
gameLevel.setLocalTranslation&#40;0, -5.2f, 0&#41;;
gameLevel.setLocalScale&#40;2&#41;;
@ -472,11 +472,7 @@ Let&#039;s add some action to the scene and continue with the <a href="/com/jme3
<strong>See also:</strong>
</p>
<ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://jmonkeyengine.org/groups/import-assets/forum/topic/blender-2-61-animation-issues/?topic_page=2&amp;num=15"><param name="text" value="<html><u>Forum: How to import animated models from Blender 2.6 correctly</u></html>"><param name="textColor" value="blue"></object> (<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="https://www.youtube.com/watch?v=QiLCs4AKh28"><param name="text" value="<html><u>Video</u></html>"><param name="textColor" value="blue"></object>)</div>
</li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.youtube.com/watch?v=NdjC9sCRV0s"><param name="text" value="<html><u>Video tutorial for animated models from Blender 2.6</u></html>"><param name="textColor" value="blue"></object></div>
</li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="https://docs.google.com/fileview?id=0B9hhZie2D-fENDBlZDU5MzgtNzlkYi00YmQzLTliNTQtNzZhYTJhYjEzNWNk&amp;hl=en"><param name="text" value="<html><u>Exporting OgreXML scenes from Blender to jME</u></html>"><param name="textColor" value="blue"></object> </div>
<li><div> <a href="/com/jme3/gde/core/docs/jme3/external/blender.html">The definitive Blender import tutorial</a></div>
</li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.jmonkeyengine.com/forum/index.php?topic=14418.0"><param name="text" value="<html><u>Screenshots of a great loaded model</u></html>"><param name="textColor" value="blue"></object></div>
</li>

@ -88,7 +88,7 @@ public class HelloCollision extends SimpleApplication
setUpLight&#40;&#41;;
&nbsp;
// We load the scene from the zip file and adjust its size.
assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class.getName&#40;&#41;&#41;;
assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class&#41;;
sceneModel = assetManager.loadModel&#40;&quot;main.scene&quot;&#41;;
sceneModel.setLocalScale&#40;2f&#41;;
&nbsp;
@ -268,7 +268,7 @@ The first thing you do in every physics game is create a BulletAppState object.
<p>
For the scene, you load the <code>sceneModel</code> from a zip file, and adjust the size.
</p>
<pre> assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class.getName&#40;&#41;&#41;;
<pre> assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class&#41;;
sceneModel = assetManager.loadModel&#40;&quot;main.scene&quot;&#41;;
sceneModel.setLocalScale&#40;2f&#41;;</pre>

@ -0,0 +1,91 @@
<h1><a>Creating jME3 models in Blender3D</a></h1>
<div>
<p>
This section discusses how to create and import models from Blender3D (2.62+, see bottom of page for Blender 2.49 and before) to jME3.
</p>
</div>
<h2><a>Asset Management</a></h2>
<div>
<p>
For the managing of assets in general, be sure to read the <a href="/com/jme3/gde/core/docs/jme3/intermediate/multi-media_asset_pipeline.html">Asset Pipeline Documentation</a>. It contains vital information on how to manage your asset files.
</p>
</div>
<h2><a>Creation Process</a></h2>
<div>
<p>
To export an animated model in Blender make sure the following conditions are met:
</p>
<ol>
<li><div> Apply Location, Rotation and Scate to the mesh on Blender: On 3D View editor on Blender, select the mesh in Object Mode and go to the 3D View Editor’s header → Object Menu → Apply → Location / Rotation / Location.</div>
</li>
<li><div> Apply Location, Rotation and Scate to the armature on Blender: On 3D View editor on Blender, select the armature in Object Mode and go to the 3D View Editor’s header → Object Menu → Apply → Location / Rotation / Location.</div>
</li>
<li><div> Set the mesh’s origin point in the bottom of the mesh (see the images bellow).</div>
</li>
<li><div> Set the armature’s origin point in the bottom of the armature (see the images bellow).</div>
</li>
<li><div> Armature’s origin point and mesh’s origin point must be in the same location(see the images bellow).</div>
</li>
<li><div> Use a root bone located in the armature’s origin. This root bone must be in vertical position (see the images bellow) and it is the root bone of the armature. If you rotate the root bone, the the entire armature might be rotate when you import the model into jMonkey (I’m just mentioning the result, I don’t know where is the problem (jmonkey importer or blender’s ogre exporter plugin)).</div>
</li>
<li><div> Uncheck “Bone Envelopes” checkbox on the Armature modifier for the mesh (see the images bellow).</div>
</li>
<li><div> Uncheck “Envelopes” checkbox on the armature (see the images bellow).</div>
</li>
<li><div> Use SkeletonDebugger to show the skeleton on your game in order to check if the mesh and the skeleton are loaded correctly:</div>
</li>
</ol>
<pre> final Material soldier2Mat = assetManager.loadMaterial&#40;&quot;Materials/soldier2/soldier2.j3m&quot;&#41;;
final Spatial soldier2 = assetManager.loadModel&#40;&quot;Models/soldier2/soldier2.j3o&quot;&#41;;
TangentBinormalGenerator.generate&#40;soldier2&#41;;
soldier2.setMaterial&#40;soldier2Mat&#41;;
&nbsp;
final Node soldier2Node = new Node&#40;&quot;Soldier2 Node&quot;&#41;;
&nbsp;
soldier2Node.attachChild&#40;soldier2&#41;;
rootNode.attachChild&#40;soldier2Node&#41;;
&nbsp;
final AnimControl control = soldier2.getControl&#40;AnimControl.class&#41;;
control.addListener&#40;this&#41;;
final AnimChanel channel = control.createChannel&#40;&#41;;
&nbsp;
final SkeletonDebugger skeletonDebug = new SkeletonDebugger&#40;&quot;skeleton&quot;, control.getSkeleton&#40;&#41;&#41;;
final Material mat = new Material&#40;assetManager, &quot;Common/MatDefs/Misc/Unshaded.j3md&quot;&#41;;
mat.setColor&#40;&quot;Color&quot;, ColorRGBA.Green&#41;;
mat.getAdditionalRenderState&#40;&#41;.setDepthTest&#40;false&#41;;
skeletonDebug.setMaterial&#40;mat&#41;;
soldier2Node.attachChild&#40;skeletonDebug&#41;;</pre>
<p>
<img src="nbdocs:/com/jme3/gde/core/docs/jme3/external/blender_rootbone.png">
<img src="nbdocs:/com/jme3/gde/core/docs/jme3/external/blender_apply_mesh.png">
<img src="nbdocs:/com/jme3/gde/core/docs/jme3/external/blender_apply_bones.png">
<img src="nbdocs:/com/jme3/gde/core/docs/jme3/external/blender_envelopes.png">
<img src="nbdocs:/com/jme3/gde/core/docs/jme3/external/blender_finished.png">
</p>
<p>
Also check out these videos and resources:
</p>
<ul>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://jmonkeyengine.org/groups/import-assets/forum/topic/blender-2-61-animation-issues/?topic_page=2&amp;num=15"><param name="text" value="<html><u>Forum: How to import animated models from Blender 2.6 correctly</u></html>"><param name="textColor" value="blue"></object> (<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="https://www.youtube.com/watch?v=QiLCs4AKh28"><param name="text" value="<html><u>Video</u></html>"><param name="textColor" value="blue"></object>)</div>
</li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.youtube.com/watch?v=NdjC9sCRV0s"><param name="text" value="<html><u>Video tutorial for animated models from Blender 2.6</u></html>"><param name="textColor" value="blue"></object></div>
</li>
<li><div> <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="https://docs.google.com/fileview?id=0B9hhZie2D-fENDBlZDU5MzgtNzlkYi00YmQzLTliNTQtNzZhYTJhYjEzNWNk&amp;hl=en"><param name="text" value="<html><u>Exporting OgreXML scenes from Blender 2.49 to jME</u></html>"><param name="textColor" value="blue"></object></div>
</li>
</ul>
</div>
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:external:blender?do=export_xhtmlbody">view online version</a></em></p>

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 KiB

@ -146,7 +146,7 @@ If you are not using the default <code>assets</code> directory, verify that you
</p>
<pre>this.assetManager.registerLocator&#40;&quot;assets/&quot;, FileLocator.class&#41;; // default
this.assetManager.registerLocator&#40;&quot;c:/jme3User/JMEisSoCool/myAwesomeFolder/&quot;, FileLocator.class&#41;;
this.assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class.getName&#40;&#41;&#41;;</pre>
this.assetManager.registerLocator&#40;&quot;town.zip&quot;, ZipLocator.class&#41;;</pre>
<p>
@ -556,7 +556,10 @@ Use a PhysicsControl&#039;s hinges and joints.
<div>
<p>
At the bottom left of every default SimpleGame, you see the <a href="/com/jme3/gde/core/docs/jme3/advanced/statsview.html">StatsView</a> and the FPS (frames per seconds) view. It provides you with extra information during the development phase. For example, if the object count is increasing and the FPS slows down, then you now that your code attaches too many and does not detach enough objects.
At the bottom left of every default SimpleGame, you see the <a href="/com/jme3/gde/core/docs/jme3/advanced/statsview.html">StatsView</a> and the FPS (frames per seconds) view. These views provide you with extra information during the development phase. For example, if you notice the object count is increasing and the FPS is decreasing, then you know that your code attaches too many objects and does not detach enough of them again (maybe a loop gone wild?).
<br/>
<strong>Learn more:</strong> <a href="/com/jme3/gde/core/docs/jme3/advanced/statsview.html">StatsView</a>
</p>
</div>
@ -571,6 +574,13 @@ In the application&#039;s simpleInitApp() method, call:
<pre>setDisplayFps(false); // to hide the FPS
setDisplayStatView(false); // to hide the statistics </pre>
<p>
<br/>
<strong>Learn more:</strong> <a href="/com/jme3/gde/core/docs/jme3/advanced/statsview.html">StatsView</a>
</p>
</div>
<h3><a>How do I display score, health, mini-maps, status icons?</a></h3>

@ -12,7 +12,7 @@
<link rel="pingback" href="http://jmonkeyengine.org/xmlrpc.php" />
<!-- This site is optimized with the Yoast WordPress SEO plugin v1.1.5 - http://yoast.com/wordpress/seo/ -->
<!-- This site is optimized with the Yoast WordPress SEO plugin v1.1.9 - http://yoast.com/wordpress/seo/ -->
<!-- / Yoast WordPress SEO plugin. -->
<link rel="alternate" type="application/rss+xml" title="jMonkeyEngine.org &raquo; Feed" href="http://jmonkeyengine.org/feed/" />
@ -33,10 +33,10 @@
<link rel='stylesheet' id='gsc_style_search_bar-css' href='http://www.google.com/cse/style/look/minimalist.css?ver=3.3.2' type='text/css' media='all' />
<link rel='stylesheet' id='gsc_style_search_bar_more-css' href='http://jmonkeyengine.org/wp-content/plugins/google-custom-search/css/gsc.css?ver=3.3.2' type='text/css' media='all' />
<link rel='stylesheet' id='gsc_style_search_bar_even_more-css' href='http://jmonkeyengine.org/wp-content/plugins/google-custom-search/css/gsc-no-search-button.css?ver=3.3.2' type='text/css' media='all' />
<link rel='stylesheet' id='toc_css-css' href='http://jmonkeyengine.org/wp-content/plugins/seo-friendly-table-of-contents/style.css?ver=3.3.2' type='text/css' media='all' />
<link rel='stylesheet' id='bpgc_screen-css' href='http://jmonkeyengine.org/wp-content/plugins/bp-group-control/css/screen.css?ver=3.3.2' type='text/css' media='all' />
<link rel='stylesheet' id='bp-admin-bar-css' href='http://jmonkeyengine.org/wp-content/plugins/buddypress/bp-core/css/buddybar.css?ver=20110723' type='text/css' media='all' />
<link rel='stylesheet' id='bplabs-autosuggest-css' href='http://jmonkeyengine.org/wp-content/plugins/bp-labs/beakers/css/jquery.mentions.css?ver=1.0' type='text/css' media='all' />
<link rel='stylesheet' id='toc_css-css' href='http://jmonkeyengine.org/wp-content/plugins/seo-friendly-table-of-contents/style.css?ver=3.3.2' type='text/css' media='all' />
<link rel='stylesheet' id='bp-default-main-css' href='http://jmonkeyengine.org/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/default.css?ver=20120110' type='text/css' media='all' />
<link rel='stylesheet' id='bp-jme-1.5-css' href='http://jmonkeyengine.org/wp-content/themes/bp-jme-1.5/style.css?ver=20120110' type='text/css' media='all' />
<link rel='stylesheet' id='bp-default-responsive-css' href='http://jmonkeyengine.org/wp-content/plugins/buddypress/bp-themes/bp-default/_inc/css/responsive.css?ver=20120110' type='text/css' media='all' />
@ -168,7 +168,7 @@ var NS='jme3:intermediate';var JSINFO = {"id":"jme3:intermediate:headlessserver"
<select><option value="wiki">Documentation</option><option value="forums">Topic Titles</option><option value="posts">Blog</option></select>
<input type="submit" name="search-submit" id="search-submit" value="Search" />
<input type="hidden" id="_wpnonce" name="_wpnonce" value="10f6262115" /><input type="hidden" name="_wp_http_referer" value="/com/jme3/gde/core/docs/jme3/intermediate/headlessserver.html" />
<input type="hidden" id="_wpnonce" name="_wpnonce" value="958002dde7" /><input type="hidden" name="_wp_http_referer" value="/com/jme3/gde/core/docs/jme3/intermediate/headlessserver.html" />
</form><!-- #search-form -->
@ -325,7 +325,7 @@ You&#039;ve followed a link to a topic that doesn&#039;t exist yet. If permissio
<div>
<form><div><input type="hidden" name="do" value="edit" /><input type="hidden" name="rev" value="" /><input type="submit" value="Show pagesource" class="button" accesskey="v" title="Show pagesource [V]" /></div></form> <form><div><input type="hidden" name="do" value="revisions" /><input type="submit" value="Old revisions" class="button" accesskey="o" title="Old revisions [O]" /></div></form> </div>
<div>
<form><div><input type="hidden" name="do" value="login" /><input type="hidden" name="sectok" value="3753ba035ed7c95a99863fc877c76d02" /><input type="submit" value="Login" class="button" title="Login" /></div></form> <form><div><input type="hidden" name="do" value="index" /><input type="submit" value="Sitemap" class="button" accesskey="x" title="Sitemap [X]" /></div></form> <a><input type="button" class="button" value="Back to top" onclick="window.scrollTo(0, 0)" title="Back to top" /></a>&nbsp;
<form><div><input type="hidden" name="do" value="login" /><input type="hidden" name="sectok" value="68011036a6d1e292a23f3cddb33fc922" /><input type="submit" value="Login" class="button" title="Login" /></div></form> <form><div><input type="hidden" name="do" value="index" /><input type="submit" value="Sitemap" class="button" accesskey="x" title="Sitemap [X]" /></div></form> <a><input type="button" class="button" value="Back to top" onclick="window.scrollTo(0, 0)" title="Back to top" /></a>&nbsp;
</div>
<div></div>
</div-->
@ -368,7 +368,7 @@ You&#039;ve followed a link to a topic that doesn&#039;t exist yet. If permissio
</ul></div></div><!-- #wp-admin-bar -->
<!-- Generated in 0.260 seconds. (65 q) -->
<!-- Generated in 0.225 seconds. (65 q) -->
<div>
<div></div>

@ -0,0 +1,235 @@
<h1><a>Multi-Media Asset Pipeline</a></h1>
<div>
<p>
Assets are files that are not code. Your multi-media assets includes, for example, your textures (image files), models (mesh files), and sounds (audio files).
</p>
<ul>
<li><div> You create textures in a graphic editor, for example Gimp, and export them as <acronym title="Portable Network Graphics">PNG</acronym> or <acronym title="Joint Photographics Experts Group">JPG</acronym>.</div>
</li>
<li><div> You create models in a 3D mesh editor, for example <a href="/com/jme3/gde/core/docs/jme3/external/blender.html">Blender</a>, and export it in Ogre Mesh <acronym title="Extensible Markup Language">XML</acronym> or Wavefront OBJ format. </div>
</li>
<li><div> You create sounds in an audio editor, for example Audacity, and export them as WAVE or OGG.</div>
</li>
</ul>
<div><table>
<tr>
<th>DO</th><th>DON&#039;T</th>
</tr>
<tr>
<td> Save original models plus textures into <code>assets/Textures</code>. </td><td> Don&#039;t leave textures or models in a folder outside your JME project: The game cannot load or reference them from there. </td>
</tr>
<tr>
<td> Save sounds into <code>assets/Sounds</code>. </td><td> Don&#039;t leave audio files in a folder outside your JME project: The game cannot load or reference them from there. </td>
</tr>
<tr>
<td> Create simple, low-polygon models. </td><td> Don&#039;t create high-polygon models, they render too slow to be useful in games. </td>
</tr>
<tr>
<td> Only use Diffuse Map, Normal Map, Glow Map, Specular Map in your models. </td><td> Don&#039;t use unsupported material properties that are not listed in the <a href="/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html">Materials Overview</a>.</td>
</tr>
<tr>
<td> Use UV texture / texture atlases / baking for each texture map. </td><td> Don&#039;t create models based on multiple separate textures, it will break the model into separate meshes.</td>
</tr>
<tr>
<td> Convert original models to .j3o format. Move .j3o files into <code>assets/Models</code>. </td><td>Don&#039;t reference original Blender/Ogre/OBJ files in your load() code, because these unoptimized files are not packaged into the final JAR.</td>
</tr>
</table></div>
<!-- EDIT1 TABLE [542-1593] -->
<p>
Read on for details.
</p>
</div>
<h3><a>Use The Assets Folder</a></h3>
<div>
<p>
Store your assets in subfolders of your project&#039;s <code>assets</code> directory. The <code>assets</code> directory is the default path where a JME game&#039;s <a href="/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html">Asset Manager</a> looks for files to load.
</p>
<pre>jMonkeyProjects/MyGame/assets/Interface/ # .font, .jpg, .png, .xml
jMonkeyProjects/MyGame/assets/MatDefs/ # .j3md
jMonkeyProjects/MyGame/assets/Materials/ # .j3m
jMonkeyProjects/MyGame/assets/Models/ # .j3o
jMonkeyProjects/MyGame/assets/Scenes/ # .j3o
jMonkeyProjects/MyGame/assets/Shaders/ # .j3f, .vert, .frag
jMonkeyProjects/MyGame/assets/Sounds/ # .ogg, .wav
jMonkeyProjects/MyGame/assets/Textures/ # .jpg, .png; also .mesh.xml+.material, .mtl+.obj, </pre>
<p>
Prepare the <code>asset</code> folder structure for your individual project:
</p>
<ol>
<li><div> Agree on a directory structure with the graphic designers. </div>
</li>
<li><div> Create subfolders of <code>assets</code> in any way that suits your project (see example above). Stick with one system.</div>
<ul>
<li><div> If different assets belong together, create a parallel subdirectory structure for them. <br/>
Example: For car models, create <code>Textures/vehicles/car1/</code>, <code>Materials/vehicles/car1/</code>, <code>Models/vehicles/car1/</code>, , <code>Sounds/vehicles/car1/</code> (etc) directories now.</div>
</li>
</ul>
</li>
<li><div> Agree on a file naming and numbering scheme with the graphic designers. </div>
<ul>
<li><div> Are some assets used interchangeably? Systematic naming and numbering lets developers easily swap out assets by swapping out parts of the path String. </div>
</li>
<li><div> Decide on naming standards for naming interactive parts (arms/legs) of animated models.</div>
</li>
</ul>
</li>
</ol>
<p>
<object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.youtube.com/all_comments?v=HFR4socSv_E"><param name="text" value="<html><u>Video: Horrible things happen if you mess up labeling your assets. Seriously. ;-)</u></html>"><param name="textColor" value="blue"></object>
</p>
<p>
See also:
</p>
<ul>
<li><div> More details on <a href="/com/jme3/gde/core/docs/jme3/advanced/asset_manager.html">Asset Manager</a>, including tips how to work with assets when using other IDEs.</div>
</li>
<li><div> Use <a href="/com/jme3/gde/core/docs/sdk/asset_packs.html">Asset Packs</a> to bundle, share, and manage assets!</div>
</li>
</ul>
</div>
<h3><a>Create Textures and Materials</a></h3>
<div>
<p>
Install a graphic editor such as Gimp or Photoshop. <strong>Consult the graphic editor&#039;s documentation for specific details how to do the following tasks.</strong>
</p>
<ol>
<li><div> Create textures in a graphic editor.</div>
<ul>
<li><div> Save all textures to your prepared subfolders in the <code>assets/Textures</code> directory. </div>
</li>
</ul>
</li>
<li><div> (Optional) If you plan to use JME materials that you set programmatically from the code, create .j3m materials in the <acronym title="Software Development Kit">SDK</acronym>.</div>
<ul>
<li><div> Save these .j3m files into the <code>assets/Materials</code> directory.</div>
</li>
</ul>
</li>
</ol>
<p>
<p><div>Storing the textures inside your project directory is necessary for the paths in JME&#039;s binary model files (.j3o) to work. Treat the paths of your assets like class names of java classes, they define a specific asset. When you later generate .j3o files, compile class files, and distribute the project, paths and files need to be available in their final absolute form. It is imperative to keep the same directory structure from beginning to end. If you ever change the assets directory structure, you have to re-export all affected models, regenerate all affected .j3o files, and manually update all affected paths in your code.
</div></p>
</p>
</div>
<h3><a>Create 3D Models</a></h3>
<div>
<p>
Install a mesh editor such as <a href="/com/jme3/gde/core/docs/jme3/external/blender.html">Blender</a> or 3D Studio MAX. Reuse textures and materials as much as possible. <strong>Consult the mesh editor&#039;s documentation for specific details how to do the following tasks.</strong>
</p>
<ol>
<li><div> Create 3D models in a mesh editor. </div>
<ol>
<li><div> Create simple <strong>low-polygon models</strong>. High-polygon models slow down the game.</div>
</li>
<li><div> Unwrap the model and generate a <strong>UV texture</strong> (i.e. one texture file that contains all the pieces of one model from different angles). <br/>
Don&#039;t use multiple separate texture files with one model, it will break the model into several meshes.</div>
</li>
<li><div> Create textures for the model: Only use <strong>Diffuse Map (minimum), Normal Map, Glow Map, and Specular Map.</strong> <br/>
Everything not listed in the <a href="/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html">Materials Overview</a> is ignored by JME.</div>
</li>
</ol>
</li>
<li><div> Export the model mesh in one of the following formats: <strong>.blend, Wavefront .OBJ/.MTL, Ogre .mesh/.material/.scene</strong>.</div>
<ol>
<li><div> <strong>Bake</strong> each texture into one file when exporting. (Create a Texture Atlas.)</div>
</li>
<li><div> <strong>Save exported models to subfolders of the <code>assets/Textures</code> directory, together with their Textures.</strong> (for now)</div>
</li>
</ol>
</li>
</ol>
<p>
See also: <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><param name="content" value="http://www.gamasutra.com/view/feature/2530/practical_texture_atlases.php"><param name="text" value="<html><u>Texture Atlases on gamasutra</u></html>"><param name="textColor" value="blue"></object>
</p>
<p>
<p><div><strong>When I load the model in JME, why does it look different than in the 3D editor?</strong> <br/>
3D models will never look identical in a game engine and in a mesh editor. Mesh editors are optimized for high-quality offline rendering, and many of the material and texture options simply do not work in a live rendering context. Also, the shaders that render the materials in JME are different than in your mesh editor&#039;s renderer. Remind your graphic designers to only focus on features that game engines support.
</div></p>
</p>
</div>
<h3><a>Convert 3D Models to .j3o Format</a></h3>
<div>
<p>
Convert all models and scenes to jME3&#039;s binary .j3o format to load() them. You use the jMonkeyEngine <acronym title="Software Development Kit">SDK</acronym> to do the conversion.
</p>
<ol>
<li><div> Confirm that you exported the model into the <code>assets/Textures</code> directory (or subdirectories) together with all its textures.</div>
</li>
<li><div> In the <acronym title="Software Development Kit">SDK</acronym>, right-click the model and choose &quot;Convert to j3o Binary&quot;. <br/>
The paths in the j3o now reference files with an absolute <code>assets/Textures/…</code> path.</div>
</li>
<li><div> Now, move the .j3o into the corresponding <code>assets/Models/</code> or <code>assets/Scenes/</code> directory. </div>
</li>
<li><div> Use the AssetManager to load() the .j3o files.</div>
</li>
</ol>
<p>
This process ensures that the texture paths are correct, and it also keeps your <code>assets/Models</code> folder free from textures. You can reuse your set of textures for many models.
</p>
<p>
<strong>Must I convert to .j3o? – Yes!</strong>
</p>
<ul>
<li><div> .j3o is an optimized format to store parts of a jME3 scene graph. A .j3o file can contain one shape, one model, or a whole scene.</div>
</li>
<li><div> Only .j3o files can store all of jme3&#039;s material and other options, other formats can only be considered meshes with UV mapping data and always need to be worked on.</div>
</li>
<li><div> .j3o files work seamlessly across platforms and can also be automatically adapted for certain platforms on distribution.</div>
</li>
<li><div> (Optional) You can store the model&#039;s physical properties, materials, lights, particle emitters, and audio nodes, in the .j3o file. <br/>
Use the jMonkeyEngine SceneComposer to add these properties.</div>
</li>
<li><div> The default Ant build script copies .j3o / .j3m files, sounds, and textures, into the distributable JAR automatically.</div>
</li>
</ul>
<p>
<p><div>Important: Unoptimized external model files (.mesh.xml, .material, .obj, .mat, etc) are not bundled when you build your application! If you try to run the JAR with code referring to non-j3o models, you get a <strong>Runtime Error</strong> because the resource is not found. The final application code should only reference .j3o files.
</div></p>
</p>
<p>
See also: <a href="/com/jme3/gde/core/docs/sdk/model_loader_and_viewer.html">Model Loader and Viewer</a>
</p>
</div>
<p><em><a href="http://jmonkeyengine.org/wiki/doku.php/jme3:intermediate:multi-media_asset_pipeline?do=export_xhtmlbody">view online version</a></em></p>

@ -21,7 +21,8 @@ The reason for this is, that for every object a render command must be done, her
<strong>Possible optimization techniques</strong>
</p>
<ul>
<li><div> Use GeometryBatchFactory.optimize(node) to merge the meshes of the geometries contained in the given node into fewer batches (based on common Material used). You can do this using the SceneComposer in the <acronym title="Software Development Kit">SDK</acronym> as well, just right-click a node and select &quot;Optimize Geometry&quot;</div>
<li><div> Use GeometryBatchFactory.optimize(node) to merge the meshes of the geometries contained in the given node into fewer batches, each based on common Materials used. <br/>
You can optimize nodes using the SceneComposer in the <acronym title="Software Development Kit">SDK</acronym> as well: Right-click a node and select &quot;Optimize Geometry&quot;.</div>
</li>
</ul>
@ -29,7 +30,7 @@ The reason for this is, that for every object a render command must be done, her
<strong>Side-effects</strong>
</p>
<ul>
<li><div> Using GeometryBatchFactory merges individual Geometries into a single mesh. Thereby it becomes hard to apply specific Materials or to remove a single Geometry. Therefore it should be used for static Geometry only that does not require frequent changes or individual materials/texturing.</div>
<li><div> Using GeometryBatchFactory merges individual Geometries into a single mesh. Thereby it becomes hard to apply specific Materials or to remove a single Geometry. Therefore it should be used for static Geometry only that does not require frequent changes or individual materials/texturing. </div>
</li>
<li><div>Using Texture atlases might be a way to provide a limited individual texturing.</div>
</li>
@ -93,11 +94,12 @@ Genereally jME3 is well optimized and optimizes these things correctly. The norm
</li>
<li><div> If the (M) values are much higher than the (F) values, that means a lot more GL objects are in memory than are actually used. This can happen in rare cases, such as extremely large scenes (&gt; 2000 wu). In this case, you should can optimize performance by identifying spatials to cull or detach.</div>
</li>
<li><div> The Object Count (Batch Count) is a very important value that indicates how many geometries were rendered in the last frame. In general, try to keep the object count around 100-200 to keep your game fast and responsive. If the count is permanently higher, optimize your scene via GeometryBatchFactory or other means.</div>
<li><div> The Object Count (Batch Count) is a very important value that indicates how many geometries were rendered in the last frame. In general, try to keep the object count around 100-200 to keep your game fast and responsive. If the count is permanently higher, hand-code rules that detach remote objects, or optimize a complex multi-material scene using: <pre>GeometryBatchFactory.optimize(complexNode, true);</pre>
</div>
</li>
<li><div> Same for Triangle Counts. If your game runs sluggishly and triangle count is high, then you are rendering too many too detailed meshes.</div>
<li><div> Same for Triangle Counts. If your game runs sluggishly and triangle (polygon) count is high, then you are rendering too many too detailed meshes. Tell your graphic designers to create models with lower polygon counts.</div>
</li>
<li><div> FrameBuffers: If you don&#039;t use any post-processing effects (FilterPostProcessor), this count should be zero. The more effects you use, the more FrameBuffers are in use.</div>
<li><div> FrameBuffers: If you don&#039;t use any post-processing effects (FilterPostProcessor), this count should be zero. The more effects you use, the more FrameBuffers are in use. If this value is high while others are normal, you can speed up the application by using fewer post-processing effects.</div>
</li>
</ul>
<div><span>

@ -99,6 +99,15 @@ Compiz on Linux might cause issues, if you set its rendering quality to &quot;me
</div>
<h3><a>Updating problems</a></h3>
<div>
<p>
If you have problems updating the <acronym title="Software Development Kit">SDK</acronym>, try deleting all files from jmonkeyplatform/update/download or [settings folder]/update/download depending on your system (look above for the settings folder location).
</p>
</div>
<h3><a>Known Issues</a></h3>
<div>

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save