diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/1.jpg b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/1.jpg
new file mode 100644
index 000000000..7886f41fc
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/1.jpg differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/2.jpg b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/2.jpg
new file mode 100644
index 000000000..0fc95724d
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/2.jpg differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/3.jpg b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/3.jpg
new file mode 100644
index 000000000..e966d4faf
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/3.jpg differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/3d_models.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/3d_models.html
index 695e39682..5e929f3d4 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/3d_models.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/3d_models.html
@@ -40,14 +40,20 @@ To create 3D models and scenes, you need a 3D Mesh Editor such as
FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
-SSAOFilter ssaoFilter = new SSAOFilter(12.94f, 43.92f, 0.33f, 0.61);
+SSAOFilter ssaoFilter = new SSAOFilter(12.94f, 43.92f, 0.33f, 0.61f);
fpp.addFilter(ssaoFilter);
viewPort.addProcessor(fpp);
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/loading_screen.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/loading_screen.html
index 1cdc62859..a1715e0d2 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/loading_screen.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/loading_screen.html
@@ -257,8 +257,7 @@ public class TestLoadingScreen extends SimpleApplication implements ScreenContro
} else if (frameCount == 5) {
AbstractHeightMap heightmap = null;
Texture heightMapImage = assetManager.loadTexture("Textures/Terrain/splat/mountains512.png");
- heightmap = new ImageBasedHeightMap(
- ImageToAwt.convert(heightMapImage.getImage(), false, true, 0));
+ heightmap = new ImageBasedHeightMap(heightMapImage.getImage());
heightmap.load();
terrain = new TerrainQuad("my terrain", 65, 513, heightmap.getHeightMap());
@@ -479,8 +478,7 @@ public class TestLoadingScreen1 extends SimpleApplication implements ScreenContr
AbstractHeightMap heightmap = null;
Texture heightMapImage = assetManager.loadTexture("Textures/Terrain/splat/mountains512.png");
- heightmap = new ImageBasedHeightMap(
- ImageToAwt.convert(heightMapImage.getImage(), false, true, 0));
+ heightmap = new ImageBasedHeightMap(heightMapImage.getImage());
heightmap.load();
terrain = new TerrainQuad("my terrain", 65, 513, heightmap.getHeightMap());
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/localization.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/localization.html
index c55f0a6cd..de4bb918f 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/localization.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/localization.html
@@ -151,18 +151,20 @@ Only localize messages and UI text!
Typical problems include:
-
Localized strings will be of vastly different lengths and will totally break your UI layout. ⇒ Test every localization
+
Localized strings will be of vastly different lengths and will totally break your UI layout. ⇒ Test every localization.
-
Strings with variable text or numbers don't work the same in different languages. ⇒ Either work in grammatical cases/numbers/gender for each language, or find a work-around.
+
Strings with variable text or numbers don't work the same in different languages. ⇒ Either work in grammatical cases/numbers/gender for each language, or use or .
-
The localizer only sees the strings, without any context. E.g. does "Search History" mean "display the history of searches", or "search through the history"? ⇒ Use clear key labels and work closely with the localizers if they require extra info.
+
The localizer only sees the strings, without any context. E.g. does "Search History" mean "display the history of searches", or "search through the history"? ⇒ Use clear key labels. Work closely with the localizers if they require extra info, and add that info as comments to the translation file.
-
Broken international characters ⇒ Make sure the files are saved with the right character encoding for the language.
+
Broken international characters ⇒ Make sure the files are saved with the same character encoding as the font file(s) you're using. Nowadays, that usually means UTF-8 since font files tend to come for Unicode.
+
+
Missing international characters ⇒ Make sure that there's a glyph for every needed character in your font, either by using more complete font files or by having the translation changed.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/material_definitions.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/material_definitions.html
index 69aa90679..980a0206a 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/material_definitions.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/material_definitions.html
@@ -4,7 +4,16 @@
-All Geometries need a Materual. Every Material is based on a Material Definition. The most common Material Definitions are included in the engine, advanced users can create custom ones.
+All Geometries need a Material to be visible. Every Material is based on a Material Definition. Material definitions provide the "logic" for the material, and a shader draws the material according to the parameters specified in the definition. The J3MD file abstracts the shader and its configuration away from the user, allowing a simple interface where the user can simply set a few parameters on the material to change its appearance and the way its handled by the shaders.
+
Spatial myGeometry = assetManager.loadModel("Models/Teapot/Teapot.j3o");
Material mat = new Material(assetManager, // Create new material and...
@@ -13,44 +22,44 @@ mat.setColor("Color", ColorRGBA.Blue); // Set one or more
myGeometry.setMaterial(mat); // Use material on this Geometry.
Choose a Material Definition that has the features that you need.
-
Tip: If you don't know, you can always start with Unshaded.j3md.
+
Tip: If you don't know, start with Unshaded.j3md or Lighting.j3md.
-
Look at the applicable parameters of the Material Definition and determine which parameters you need to achieve the desired effect (e.g. "glow" or "color"). Most parameters are optional.
+
Look at the applicable parameters of the Material Definition and determine which parameters you need to achieve the desired effect (e.g. "glow" or "color"). Most parameters are optional!
-
Create and save the necessary Texture files to your assets directory.
+
Create and save the necessary Texture files to your assets/Textures directory.
-
E.g. ColorMap; DiffuseMap, NormalMap, AlphaMap, etc…
+
E.g. mytex_diffuse.png as ColorMap / DiffuseMap, mytex_normal.png as NormalMap, mytex_alpha.png as AlphaMap, etc…
Determine the required values to achieve the effect that you want.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html
index 90b041cb3..92c700e12 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/materials_overview.html
@@ -368,7 +368,17 @@ Later, put the Geometry (not the Material!) in the appropriate render queue
getAdditionalRenderState().setPolyOffset();
Enable polygon offset.
Use this when you have meshes that have triangles really close to each over (e.g. ), it will shift the depth values to prevent .
-You can split the screen and look into the 3D scene from different camera angles at the same time.
+You can split the screen and look into the 3D scene from different camera angles at the same time. E.g. you can have two rootnodes with different scene graphs, and two viewPorts, each of which can only see its own subset of the scene with its own subset of port-processing filters, so you get two very different views of the scene.
@@ -12,13 +12,13 @@ The packages used in this example are com.jme3.renderer.Camera and
-The default viewPort is as big as the window. If you have several, the must be of different sizes, either overlapping or adjacent to one another. How do you tell jME which of the ViewPorts should appear where on the screen, and how big it should be?
+The default viewPort is as big as the window. If you have several, they must be of different sizes, either overlapping or adjacent to one another. How do you tell jME which of the ViewPorts should appear where on the screen, and how big they should be?
@@ -74,7 +74,7 @@ Example: Cam2's rectangle is int he bottom right: It extends from mid (x1=0
@@ -104,7 +104,7 @@ Optionally, place the main camera in the scene and rotate it in its start positi
cam.setRotation(new Quaternion (-0.07f, 0.92f, -0.25f, -0.27f));
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/networking.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/networking.html
index 29847a3e4..4e93b1c92 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/networking.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/networking.html
@@ -10,17 +10,17 @@ This document introduces you to the SpiderMonkey networking
+
@@ -41,7 +41,7 @@ The SpiderMonkey API com.jme3.network.Client
==
com.jme3.network.HostedConnection
-
+
You can register several types of listeners to be notified of changes.
@@ -56,12 +56,12 @@ You can register several types of listeners to be notified of changes.
@@ -158,7 +158,7 @@ The server refers to a connected client as com.jme3.network.HostedConnection obj
myServer.getConnection(0)
Server gets the first (0), second (1), etc, connected HostedConnection object (one client).
-
+
Your game can define its own game data based on whatever criteria you want, typically these include player ID and state. If the server needs to look up player/client-specific information, you can store this information directly on the HostedConnection object. The following examples read and write a custom Java object MyState in the HostedConnection object conn:
@@ -175,14 +175,14 @@ Your game can define its own game data based on whatever criteria you want, typi
MyState state = conn.getAttribute("MyState")
Server can read an attribute of the HostedConnection.
-The last two broadcasting methods use com.jme3.network.Filters to select a subset of recipients. If you know the exact list of recipients, always send the messages directly to them using the Filters; avoid floodig the network with unnessary broadcasts to all.
+The last two broadcasting methods use com.jme3.network.Filters to select a subset of recipients. If you know the exact list of recipients, always send the messages directly to them using the Filters; avoid flooding the network with unnecessary broadcasts to all.
@@ -328,7 +328,7 @@ A server has a game version and game name property. Each client expects to commu
myClient.getVersion()
Client queries the version of the server it is connected to.
-
+
Typically, your networked game defines its own attributes (such as player ID) based on whatever criteria you want. If you want to look up player/client-specific information beyond the game version, you can set this information directly on the Client/HostedConnection object (see Getting Info About a Client).
@@ -336,12 +336,12 @@ A server has a game version and game name property. Each client expects to commu
@@ -408,21 +408,21 @@ The com.jme3.network.ClientStateListener notifies the Client when the Client has
ClientStateListener interface method
Purpose
-
public void clientConnected(Client c){}
Implement here what happens as soon as this clients has fully connected to the server.
+
public void clientConnected(Client c){}
Implement here what happens as soon as this client has fully connected to the server.
public void clientDisconnected(Client c, DisconnectInfo info){}
Implement here what happens after the server kicks this client. For example, display the DisconnectInfo to the user.
-
+
-First implement the ClientStateListener interface in the Client class. Then register it to myClient in MyGameClient's simeplInitApp() method:
+First implement the ClientStateListener interface in the Client class. Then register it to myClient in MyGameClient's simpleInitApp() method:
+
+In addition to the nifty.addXml() methods to attach many nifty XML files, there exists a nifty.registerScreenController() method to explicitly attach more screen controllers.
+
+
+
+The following code sample shows how you can explicitly attach several screen controllers before adding the XML file to nifty, which would otherwise cause nifty to implicitly instantiate the screen controller class.
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ogre_solved.jpg b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ogre_solved.jpg
new file mode 100644
index 000000000..53e69c31a
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ogre_solved.jpg differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ogre_solved2.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ogre_solved2.png
new file mode 100644
index 000000000..cf2f87355
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ogre_solved2.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ogrecompatibility.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ogrecompatibility.html
new file mode 100644
index 000000000..a2ccc023d
--- /dev/null
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/ogrecompatibility.html
@@ -0,0 +1,72 @@
+
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics.html
index 328aa39f6..d2056e8df 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/physics.html
@@ -196,7 +196,7 @@ All non-mesh CollisionShapes can be used for dynamic, kinematic, as well as stat
Limitations: CPU intensive, use sparingly! We recommend using HullCollisionShape (or CompoundShape) instead to improve performance. Collisions between two mesh-accurate shapes cannot be detected, only non-mesh shapes can collide with this shape.
Complex dynamic objects (like spiders) in Virtual Reality or scientific simulations.
-
HeightFieldCollisionShape
A mesh-accurate shape optimized for static terrains. This shape is much faster than other mesh-accurate shapes.
+
HeightfieldCollisionShape
A mesh-accurate shape optimized for static terrains. This shape is much faster than other mesh-accurate shapes. Limitations: Requires heightmap data. Collisions between two mesh-accurate shapes cannot be detected, only non-mesh shapes can collide with this shape.
+The PhysicsSpace also manages global physics settings. Typically, you can leave the defaults, and you don't need to change the following settings, but it's good to know what they are for:
+
+
+
+
bulletAppState.getPhysicsSpace() Method
Usage
+
+
+
setGravity(new Vector3f(0, -9.81f, 0));
Specifies the global gravity.
+
+
+
setAccuracy(1f/60f);
Specifies physics accuracy. The higher the accuracy, the slower the game. Increase value if objects are passing through one another, or bounce oddly.
+
+
+
setMaxSubSteps(4);
Compensates low FPS: Specifies the maximum amount of extra steps that will be used to step the physics when the game fps is below the physics fps. This maintains determinism in physics in slow (low-fps) games. For example a maximum number of 2 can compensate for framerates as low as 30 fps (physics has a default accuracy of 60 fps). Note that setting this value too high can make the physics drive down its own fps in case its overloaded.
Specifies the size of the physics space as two opposite corners (only applies to AXIS_SWEEP broadphase).
+
+
+
setCcdMotionThreshold()
The amount of motion in 1 physics tick to trigger the continuous motion detection in moving objects that push one another. Rarely used, but necessary if your moving objects get stuck or roll through one another.
Bounciness. By default objects are not bouncy (0.0f). For a bouncy rubber object set this > 0.0f.
+Both the object and the surface must have non-zero restitution for bouncing to occur.
This setting has an impact on performance, so use it sparingly.
Brick: 0.0f
Rubber ball: 1.0f
-
+
On a RigidBodyControl, you can apply the following physical forces:
@@ -451,17 +462,14 @@ On a RigidBodyControl, you can apply the following physical forces:
setPhysicsRotation()
Rotates the object. Do not use setLocalRotate() for physical objects.
-
-
setCcdMotionThreshold(0.1f)
The amount of motion in 1 physics tick to trigger the continuous motion detection. Rarely used, but necessary if you need to fiddle with details.
-
setKinematic(true)
By default, RigidBodyControls are dynamic (kinematic=false) and are affected by forces. If you set kinematic=true, the object is no longer affected by forces, but it still affects others. A kinematic is solid, and must have a mass.
(See detailed explanation below.)
@@ -572,7 +580,7 @@ Use the following methods to move dynamic physical objects.
clearForces()
Cancels out all forces (force, torque) etc and stops the motion.
-
+
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 "impossible state" where one physical object overlaps with another! Within the game, you typically use the setters shown here exclusively.
@@ -606,13 +614,13 @@ removeCollideWithGroup(COLLISION_GROUP_01)
Collision Groups are integer
setSleepingThreshold(float,float)
Sets the sleeping thresholds which define when the object gets deactivated to save resources. The first value is the linear threshold and the second the angular. Low values keep the object active when it barely moves (slow precise performance), high values put the object to sleep immediately (imprecise fast performance). (?)
-
setCcdMotionThreshold(0f)
Sets the amount of motion that has to happen in one physics tick to trigger the continuous motion detection. This avoids the problem of fast objects moving through other objects. Set to zero to disable (default).
+
setCcdMotionThreshold(0f)
Sets the amount of motion that has to happen in one physics tick to trigger the continuous motion detection in movign obejcts that push one another. This avoids the problem of fast objects moving through other objects. Set to zero to disable (default).
-
setCcdSweptSphereRadius(.5f)
Bullet does not use the full collision shape for continuous collision detection, insteadit uses a "swept sphere" shape to approximate a motion. Only relevant for fast moving dynamic bodies. (?)
+
setCcdSweptSphereRadius(.5f)
Bullet does not use the full collision shape for continuous collision detection, instead it uses a "swept sphere" shape to approximate a motion, which can be imprecise and cause strange behaviours such as objects passign through one another or getting stuck. Only relevant for fast moving dynamic bodies.
-
+
You can setApplyPhysicsLocal(true) 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's set to false, and all movement is relative to the world.
@@ -620,7 +628,7 @@ removeCollideWithGroup(COLLISION_GROUP_01)
Buggy? If you get weird behaviour, such as physical nodes jittering wildy and being ejected "for no apparent reason", it means you have created an impossible state – solid objects overlapping. This can happen when you position solid spatials too close to other solid spatials, e.g. when moving them with setLocalTranslation().
+
Eject? If you have physical nodes jittering wildy and being ejected "for no apparent reason", it means you have created an impossible state – solid objects overlapping. This can happen when you position solid spatials too close to other solid spatials, e.g. when moving them with setLocalTranslation(). Solution: Use the debug mode to make CollisionShapes visible and verify that CollisionShapes do not overlap.
Buggy? If you get weird behaviour, such as physical nodes passing through one another, or getting stuck for no reason.
+Solution: Look at the physics space accessors and change the acuracy and other parameters.
+
+
+
Need more interactivity? You can actively control a physical game by triggering forces. You may also want to be able respond to collisions, e.g. by substracting health, awarding points, or by playing a sound. Solution: To specify how the game responds to collisions, you use Physics Listeners.
-The awesome SeaMonkey water Filter is highly configurable. It can render any type of water and also simulates the underwater part of the effect, including "caustics". It is is based on published on gamedev.net. Here's a video:
+The awesome SeaMonkey WaterFilter is highly configurable. It can render any type of water and also simulates the underwater part of the effect, including light effects called caustics. The effect is based on published on gamedev.net. Here's a video:
@@ -12,11 +12,12 @@ The awesome SeaMonkey water Filter is highly configurable. It can render any typ
The SeaMonkey WaterFilter is ideal for oceans and lakes, and expecially for under-water scenes. If you only need a small simple water surface, such as a water trough or a shallow fountain, the SimpleWaterProcessor may already be all you need.
+
-In the simpleInitApp() method, you attach your scene to the rootNode, typically a terrain with a sky. Remember to add a directional light, since the water relies on the light direction vector. The WaterFilter constrcutor expects a node with the scene attached that should be reflected in the water, and vector information from the light source's direction.
+In the simpleInitApp() method, you attach your scene to the rootNode, typically a terrain with a sky. Remember to add a directional light, since the water relies on the light direction vector. The WaterFilter constructor expects a node with the scene attached that should be reflected in the water, and vector information from the light source's direction.
@@ -108,7 +109,7 @@ Usually you make the water reflect everything attached to the rootNode. But you
Sets At what depth the refraction color extincts. The three values are RGB (red, green, blue) in this order. Play with these parameters to "muddy" the water.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html
index 675b13ba3..02153ea17 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/save_and_load.html
@@ -1,19 +1,27 @@
-
-Spatials can contain Nodes, Geometries, and user data (player score, health, inventory, etc). You can save and load individual Nodes or Geometries, as well as whole scenes using com.jme3.export.binary.BinaryExporter and com.jme3.export.binary.BinaryImporter. The jMonkeyEngine's serialization system is the com.jme3.export.Savable interface; the jMonkeyEngine's binary file format is called .j3o. You can open, view, and edit .j3o files in the jMonkeyEngine SDK.
+Spatials (that is Nodes and Geometries) can contain audio and light nodes, particle emitters, controls, and user data (player score, health, inventory, etc). For your game distribution, you must convert all original models to a faster binary format. You save individual Spatials as well as scenes using com.jme3.export.binary.BinaryExporter.
-
JME's BinaryExporter/BinaryImporter can read and write standard Java objects, JME objects, and primitive data types that are included in a spatial's user data. See below how to make additional custom classes "Savable".
+The jMonkeyEngine's binary file format is called .j3o. You can convert, view and edit .j3o files and their materials in the jMonkeyEngine SDK and compose scenes (this does not include editing meshes). For the conversion, you can either use the BinaryExporters, or a context menu in the SDK.
+
+
+
+
The jMonkeyEngine's serialization system is the com.jme3.export.Savable interface. JME3's BinaryExporter can write standard Java objects, JME3 objects, and primitive data types that are included in a spatial's user data. If you use custom game data classes, see below how to make them "Savable".
+
+There is also a com.jme3.export.xml.XMLExporter and com.jme3.export.xml.XMLImporter that similarly converts jme3 spatials to an XML format. But you wouldn't use that to load models at runtime (quite slow).
+
-The following example overrides destroy() to save the rootNode to a file when the user quits the application. The saved rootNode is a normal .j3o binary file that you open in the SDK.
+The following example overrides stop() in SimpleApplication to save the rootNode to a file when the user quits the application. The saved rootNode is a normal .j3o binary file that you can open in the SDK.
-
Note that when you save a model that has textures the textures are references to those textures are stored as absolute paths, so when loading the j3o file they have to be accessible at the exact location (relative to the assetmanager root) they were loaded from. This is why the SDK manages the conversion on the project level.
+
Note that when you save a model that has textures, the references to those textures are stored as absolute paths, so when loading the j3o file again, the textures have to be accessible at the exact location (relative to the assetmanager root, by default the assets directory) they were loaded from. This is why the SDK manages the conversion on the project level.
/* This is called when the user quits the app. */
@Override
- public void destroy() {
+ public void stop() {
String userHome = System.getProperty("user.home");
BinaryExporter exporter = BinaryExporter.getInstance();
- File file = new File(userHome+"/MySuperGame/"+"LastSavedGame.j3o");
+ File file = new File(userHome+"/Models/"+"MyModel.j3o");
try {
exporter.save(rootNode, file);
} catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, "Error: Failed to save game!", ex);
}
- super.destroy(); // continue quitting the game
+ super.stop(); // continue quitting the game
}
-
-
You can add a timestamp to your saved files:
-
-
long timestamp = System.currentTimeMillis()/1000;
-File file = new File(userHome+"/MySuperGame/"+"/SavedGame-"+timestamp+".j3o");
-The following example uses simpleInitApp() to load the last saved game when the game is initialized.
+The following example overrides simpleInitApp() in SimpleApplication to load Models/MyModel.j3o when the game is initialized.
-JME's BinaryExporter/BinaryImporter can read and write standard Java objects (String, ArrayList, buffers, etc), JME objects (Savables, such as Material), and primitive data types (int, float, etc). If you are using any custom class together with a Spatial, then the custom class must implement the com.jme3.export.Savable interface. There are two common cases where this is relevant:
+JME's BinaryExporter can write standard Java objects (String, ArrayList, buffers, etc), JME objects (Savables, such as Material), and primitive data types (int, float, etc). If you are using any custom class together with a Spatial, then the custom class must implement the com.jme3.export.Savable interface. There are two common cases where this is relevant:
@@ -182,7 +170,18 @@ To make a custom class savable:
As with all serialization, remember that if you ever change data types in custom classes, the updated read() methods will no longer be able to read your old files.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/screenshots.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/screenshots.html
index 3b6ec010e..3261f3ba7 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/screenshots.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/screenshots.html
@@ -8,14 +8,18 @@ The com.jme3.app.state.ScreenshotAppState enables your users to take screenshots
-You activate it as follows in your simpleInitApp() method:
+You activate this feature as follows in your simpleInitApp() method:
-
ScreenshotAppState state = new ScreenshotAppState();
-this.stateManager.attach(state);
+
ScreenshotAppState screenShotState = new ScreenshotAppState();
+this.stateManager.attach(screenShotState);
-The default screenshot key is KeyInput.KEY_SYSRQ, alos known as "System Request / Print Screen" key. On Mac OS, you can take screenshots using Command+Shift+3 (fullscreen) or Command+Shift+4, and then press space to select a window.
+The default screenshot key is KeyInput.KEY_SYSRQ, alos known as "System Request / Print Screen" key. On Mac keyboards, this key does not exist, so on Mac OS you take screenshots using Command+Shift+3 (fullscreen) or Command+Shift+4 (windowed: press space to select a window and then click).
+
+
+
+The screenshot is saved to the user directory.
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/shape.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/shape.html
index 01d992918..1fb7ba1cf 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/shape.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/shape.html
@@ -101,12 +101,13 @@ These maths objects are invisible and are used for collision testing (ray castin
+
To add a shape to the scene:
Create the base mesh shape.
-
Wrap it into a Geometry.
+
Wrap the mesh into a Geometry.
Assign a Material to the Geometry.
@@ -114,6 +115,12 @@ To add a shape to the scene:
+
+
+
Create one static shape as mesh and use it in several geometries, or clone() the geometries.
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/spatial.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/spatial.html
index 008ad78c7..dd202740f 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/spatial.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/spatial.html
@@ -22,7 +22,7 @@ If you think you need to understand the scene graph concept better, please read
-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 com.jme3.scene.Node or a com.jme3.scene.Geometry instance. You use the two types of Spatials for different purposes:
@@ -34,7 +34,7 @@ In your Java code, a Spatial is either a com.jme3.scene.Node or a <
com.jme3.scene.Spatial
-
Purpose:
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 Asset Manager.
+
Purpose:
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 Asset Manager.
com.jme3.scene.Geometry
com.jme3.scene.Node
@@ -44,27 +44,27 @@ In your Java code, a Spatial is either a com.jme3.scene.Node or a <
Purpose:
Use Geometries to represent an object's looks: Every Geometry contains a polygon mesh and a material, specifying its shape, color, texture, and opacity/transparency.
-You can attach a Geometry to a Node.
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.
+You attach Geometries to Nodes.
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 (Nodes or Geometries) attached to itself. When you transform (move, rotate, etc) a parent node, all its children are transformed (moved, rotated, etc).
Content:
Transformations; custom user data;
-mesh, material;
Transformations; custom user data;
+mesh and material;
Transformations; custom user data;
no mesh, no material.
rootNode, guiNode, audioNode, a custom grouping node such as vehicleNode or shipNode with passengers attached, etc.
-
+
-
You never create a Spatial with Spatial s = new Spatial();! A Spatial is an abstract concept, like a mammal (there is no actual creature called "mammal" 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 cast a Node or Geometry to Spatial.
+
You never create a Spatial with Spatial s = new Spatial();! A Spatial is an abstract concept, like a mammal (there is no actual creature called "mammal" walking around here). You create either a com.jme3.scene.Node, or a com.jme3.scene.Geometry object. Some methods, however, require a spatial as argument: This is because they are able to accept both Nodes and Geometries as arguments. In this case, you simply cast a Node or Geometry to Spatial.
+
+Cloned spatials share the same mesh, while each cloned spatial can have its own local transformation (translation, rotation, and scale) in the scene. This means you only use clone() on spatials whose meshes never change. The most common use case for cloning is when you use several Spatials that are based on the same Shapes.
+
+
+
+The second use case is: When you load a model using loadModel() from the AssetManager, you may get a clone()ed object. In particular:
+
+
+
If the model is not animated (it has no AnimControl), you get a clone. All clones share one mesh object. (Uses less memory)
+
+
If the model is animated (it has a AnimControl), then loadModel() duplicates the mesh for each loaded instance. (Uses more memory)
+
+
+
+
+Usually there is no need to manually use any of the clone() methods on models. Using the Asset Manager's loadModel() method will automatically do the right thing for your models.
+
+
+
+
"Box worlds" are not made up of statically cloned Box() shapes, this would still be too slow for large worlds. To learn how to make real fast box worlds, search the web for voxelization techniques.
+
@@ -93,24 +122,23 @@ You can include custom user data –that is, custom Java objects and methods–
-
Neither do you need to ever extend Node to be able to add custom accessor methods to a spatial – use Custom Controls 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 setUserData() method instead. Where ever the Spatial is accessible, you can easily access the object's game data and accessors this way.
+
You want to add custom accessor methods to a spatial? Do not extend Node or Geometry, use Custom Controls instead. You want to add custom fields to a spatial? Do not extend Node or Geometry, use the built-in setUserData() method instead. Where ever the Spatial is accessible, you can easily access the object's class fields (user data) and accessors (control methods) this way.
-The following example adds an integer field named health to the Spatil player_node, and initializes it to 100.
+This first example adds an integer field named health to the Spatial player_node, and initializes it to 100.
player_node.setUserData("health", 100);
-To be able to add accessors to the player, you create a custom PlayerControl class and add it to the Spatial.
-
+The second example adds a set of custom accessor methods to the player object. You create a custom PlayerControl() class and you add this control to the Spatial:
-
player_node.addControl(PlayerControl.class);
+
player_node.addControl(new PlayerControl());
-In PlayerControl you define methods that set and get your users data in the spatial object.
+In your PlayerControl() class, you define custom methods that set and get your user data in the spatial object. For example, the control could add accessors that set and get the player's health:
public int getHealth() {
return (Integer)spatial.getUserData("health");
@@ -126,11 +154,11 @@ Elsewhere in your code, you can access this data wherever you have access to the
...
player_node.getControl(PlayerControl.class).setHealth(99);
-
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 (health, inventory, equipment, etc).
+
You can add as many data objects (of String, Boolean, Integer, Float, Array types) to a Spatial as you want. Just make sure to label them with unique case-sensitive strings (health, Inventory, equipment, etc).
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/terrain_collision.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/terrain_collision.html
index 8d7338d1e..62d5caf5e 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/terrain_collision.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/terrain_collision.html
@@ -101,8 +101,7 @@ public class HelloTerrainCollision extends SimpleApplication
AbstractHeightMap heightmap = null;
Texture heightMapImage = assetManager.loadTexture(
"Textures/Terrain/splat/mountains512.png");
- heightmap = new ImageBasedHeightMap(
- ImageToAwt.convert(heightMapImage.getImage(), false, true, 0));
+ heightmap = new ImageBasedHeightMap(heightMapImage.getImage());
heightmap.load();
/** 3. We have prepared material and heightmap.
@@ -145,7 +144,7 @@ public class HelloTerrainCollision extends SimpleApplication
player.setJumpSpeed(20);
player.setFallSpeed(30);
player.setGravity(30);
- player.setPhysicsLocation(new Vector3f(0, 10, 0));
+ player.setPhysicsLocation(new Vector3f(-10, 10, 10));
// We attach the scene and the player to the rootnode and the physics space,
// to make them appear in the game world.
@@ -214,12 +213,12 @@ Compile and run the code. You should see a terrain. You can use the WASD keys an
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/water.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/water.html
index 4d3087f4e..11f064e5c 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/water.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/advanced/water.html
@@ -4,6 +4,10 @@
+jMonkeyEngine offers a SimpleWaterProcessor that turns any quad (flat rectangle) into a reflective water surface with waves. You can use this quad for simple limited water surfaces such as water troughs, shallow fountains, puddles, shallow water in channels. The SimpleWaterProcessor has less performance impact on your game than the full featured SeaMonkey WaterFilter; the main difference is that the SimpleWaterProcessor does not include under-water effects.
+
+
+
Here is some background info for JME3's basic water implementation:
@@ -21,7 +25,7 @@ Here is some background info for JME3's basic water implementation:
-
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_animation.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_animation.html
index c856f73af..4e94750b6 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_animation.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_animation.html
@@ -16,8 +16,14 @@ This tutorial shows how to add an animation controller and channels, and how to
+
+
To use the example assets in a new jMonkeyEngine SDK project, right-click your project, select "Properties", go to "Libraries", press "Add Library" and add the "jme3-test-data" library.
+
@@ -151,8 +157,27 @@ After you load the animated model, you register it to the Animation Controller.
channel.setAnim("stand");
...
+
+
In response to a question about animations on different channels interefering with each other, Nehon on the jME forum ,
+
+
+
+"You have to consider channels as part of the skeleton that are animated. The default behavior is to use the whole skeleton for a channel.
+In your example the first channel plays the walk anim, then the second channel plays the dodge animation.
+Arms and feet are probably not affected by the doge animation so you can see the walk anim for them, but the rest of the body plays the dodge animation.
+
+
+
+Usually multiple channels are used to animate different part of the body. For example you create one channel for the lower part of the body and one for the upper part. This allow you to play a walk animation with the lower part and for example a shoot animation with the upper part. This way your character can walk while shooting.
+
+
+
+In your case, where you want animations to chain for the whole skeleton, you just have to use one channel."
+
To use the example assets in a new jMonkeyEngine SDK project, right-click your project, select "Properties", go to "Libraries", press "Add Library" and add the "jme3-test-data" library.
+
@@ -239,7 +245,7 @@ Now every sound knows whether it should loop or not.
-Apart from the looping boolean, another difference is where play() (playInstace()) is called on those nodes:
+Apart from the looping boolean, another difference is where play().playInstance() is called on those nodes:
You start playing the background nature sound right after you have created it, in the initAudio() method.
audio_nature.play(); // play continuously!
@@ -259,7 +265,7 @@ Apart from the looping boolean, another difference is where play()
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_effects.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_effects.html
index cb9be34aa..fe0960b03 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_effects.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_effects.html
@@ -46,8 +46,13 @@ These scene elements cannot be modeled by meshes. In very simple terms:
Particle effects can be animated (e.g. sparks, drops) and static (strands of grass, hair). Non-particle effects include bloom/glow, and motion blur/afterimage. In this tutorial you learn how to make animated particles (com.jme3.effect).
+
+
To use the example assets in a new jMonkeyEngine SDK project, right-click your project, select "Properties", go to "Libraries", press "Add Library" and add the "jme3-test-data" library.
+
Whether particles fall down (positive) or fly up (negative). Set to 0f for a zero-g effect where particles keep flying.
-
+
You can find details about effect parameters here.
@@ -331,7 +336,7 @@ Add and modify one parameter at a time, and try different values until you get t
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_input_system.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_input_system.html
index 216b95b64..aec5c578c 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_input_system.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_input_system.html
@@ -284,16 +284,22 @@ Mappings registered to the AnalogListener are triggered repeate
JME gives you access to the name of the triggered action.
-
JME gives you access to a gradual value how long the key has been pressed.
+
JME gives you access to a gradual value showing the strength of that input. In the case of a keypress that will be the tpf value for which it was pressed since the last frame. For other inputs such as a joystick which give analogue control though then the value will also indicate the strength of the input premultiplied by tpf. For an example on this go to jMonkeyEngine 3 Tutorial (5) - Hello Input System - Variation over time key is pressed
+
+
+
+
+In order to see the total time that a key has been pressed for then the incoming value can be accumulated. The analogue listener may also need to be combined with an action listener so that you are notified when they key is released.
+
+
Example: Navigational events (e.g. Left, Right, Rotate, Run, Strafe), situations where you interact continuously.
-
Mappings registered to the ActionListener are digital either-or actions – "Pressed or released? On or off?"
@@ -318,7 +324,7 @@ Mappings registered to the ActionListener are digital either-or
}
-
+
@@ -354,14 +360,14 @@ You can find the list of input constants in the files src/core/com/jme3/in
KeyTrigger(KeyInput.KEY_LEFT), KeyTrigger(KeyInput.KEY_RIGHT)
-
+
Tip: If you don't recall an input constant during development, you benefit from an IDE's code completion functionality: Place the caret after e.g. KeyInput.| and trigger code completion to select possible input identifiers.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_main_event_loop.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_main_event_loop.html
index d8084eeef..e9d707fd9 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_main_event_loop.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_main_event_loop.html
@@ -181,8 +181,15 @@ Here are some fun things to try:
Look back at the Hello Node tutorial if you do not remember the transformation methods for scaling, translating, and rotating.
+
+
Link to user-proposed solutions:
+Be sure to try to solve them for yourself first!
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_material.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_material.html
index 3bfcd67c4..8ef63cfb5 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_material.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_material.html
@@ -13,8 +13,14 @@ The term Material includes everything that influences what the surface of a 3D m
+
+
To use the example assets in a new jMonkeyEngine SDK project, right-click your project, select "Properties", go to "Libraries", press "Add Library" and add the "jme3-test-data" library.
+
For a game, you create custom Materials based on these existing MaterialDefintions – as you have just seen in the example with the shiny rock's material.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_physics.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_physics.html
index c3b8ed4cb..b19f1ba67 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_physics.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_physics.html
@@ -38,8 +38,13 @@ All these physical properties can be simulated in JME3. Let's have a look a
+
+
To use the example assets in a new jMonkeyEngine SDK project, right-click your project, select "Properties", go to "Libraries", press "Add Library" and add the "jme3-test-data" library.
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html
index f3f74196e..7c6a26cf3 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/beginner/hello_terrain.html
@@ -19,8 +19,13 @@ One way to create a 3D landscape is to sculpt a huge terrain model. This gives y
Note: If you get an error when trying to create your ImageBasedHeightMap object, you may need to update the SDK, click on "Help" / "Check for updates"
+
+
To use the example assets in a new jMonkeyEngine SDK project, right-click your project, select "Properties", go to "Libraries", press "Add Library" and add the "jme3-test-data" library.
+
package jme3test.helloworld;
@@ -39,6 +44,8 @@ import com.jme3.texture.Texture.WrapMode;
import java.util.ArrayList;
import java.util.List;
+/** Sample 10 - How to create fast-rendering terrains from heightmaps,
+and how to use texture splatting to make the terrain look good. */
public class HelloTerrain extends SimpleApplication {
private TerrainQuad terrain;
@@ -117,7 +124,7 @@ When you run this sample you should see a landscape with dirt mountains, grass p
@@ -480,14 +487,15 @@ Instead, you can also let JME3 generate a random landscape for you:
What result do you get when you replace the above two heightmap lines by the following lines and run the sample?
HillHeightMap heightmap = null;
+HillHeightMap.NORMALIZE_RANGE = 100; // optional
try {
- heightmap = new HillHeightMap(513, 1000, 50, 100, (byte) 3);
+ heightmap = new HillHeightMap(513, 1000, 50, 100, (byte) 3); // byte 3 is a random seed
} catch (Exception ex) {
ex.printStackTrace();
}
-
Change one parameter at a time, and the run the sample again. Note the differences. Can you find out which of the values has which effect on the generated terrain?
+
Change one parameter at a time, and the run the sample again. Note the differences. Can you find out which of the values has which effect on the generated terrain (look at the javadoc also)?
Which value controls the size?
@@ -497,15 +505,15 @@ try {
Which value controls the number of hills generated?
-
Which values control the minimum and maximum radius of the hills?
+
Which values control the size and steepness of the hills?
-
What happens if the minimum is bigger than the maximum?
+
What happens if the min is bigger than or equal to max?
-
+
What happens if both min and max are small values (e.g. 10/20)?
-
Which value controls the flattening of the hills?
-
-
What happens if this value is 1 ?
+
What happens if both min and max are large values (e.g. 1000/1500)?
+
+
What happens if min and max are very close(e.g. 1000/1001, 20/21)? Very far apart (e.g. 10/1000)?
@@ -514,12 +522,16 @@ try {
+You see the variety of hilly landscapes that can be generated using this method.
+
-Tip: For this exercise, you can keep using the splat Material from the sample code above. Just don't be surprised that the Material does not match the shape of the newly randomized landscape. If you want to generate real matching splat textures for randomized heightmaps, you need to write a custom method that, for example, creates an alphamap from the heightmap by replacing certain grayscales with certain RGB values.
+
+
For this exercise, you can keep using the splat Material from the sample code above. Just don't be surprised that the Material does not match the shape of the newly randomized landscape. If you want to generate real matching splat textures for randomized heightmaps, you need to write a custom method that, for example, creates an alphamap from the heightmap by replacing certain grayscales with certain RGB values.
+
-You have learned how to create terrains that are more efficient as loading one giant model. You know how to create generate random or handmade heightmaps. You can add a LOD control to render large terrains faster. You are aware that you can combine what you learned about collison detection to make the terrain solid to a physical player. You are also able to texture a terrain "like a boss" using layered Materials and texture splatting. You are aware that the jMonkeyEngine SDK provides a TerrainEditor that helps with most of these manual tasks.
+You have learned how to create terrains that are more efficient than loading one giant model. You know how to create generate random or handmade heightmaps. You can add a LOD control to render large terrains faster. You are aware that you can combine what you learned about collison detection to make the terrain solid to a physical player. You are also able to texture a terrain "like a boss" using layered Materials and texture splatting. You are aware that the jMonkeyEngine SDK provides a TerrainEditor that helps with most of these manual tasks.
-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.
+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. Furthermore it explains how you can create various typical game-related assets like normal maps of high-poly models and baked lighting maps.
+Game-compatible models are models that basically only consist of a mesh and UV-mapped textures, in some cases animations. All other material parameters or effects (like particles etc.) can not be expected to be transferred properly and probably would not translate to live rendering very well anyway.
+
+
+
+Note that BMeshes are not yet supported by the importers and exporters so please use the "legacy mesh format" for now in blender 2.63+
+
+To successfully import a texture, the texture has to be UV-mapped to the model. Heres how to assign diffuse, normal and specular maps:
+
+
+
+
+
+
+
+
+
+
+Its important to note that each used texture will create one separate geometry. So its best to either combine the UV maps or use a premade atlas with different texture types from the start and then map the uv coords of the models to the atlas instead of painting on the texture. This works best for large models like cities and space ships.
+
+
@@ -25,25 +59,37 @@ To export an animated model in Blender make sure the following conditions are me
+
The animation bas to be a bone animation
+
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 / Scale.
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 / Scale.
-
Set the mesh’s origin point in the bottom of the mesh (see the images bellow).
-
-
Set the armature’s origin point in the bottom of the armature (see the images bellow).
+
Set the mesh’s origin point in the bottom of the mesh (see the images below).
-
Armature’s origin point and mesh’s origin point must be in the same location(see the images bellow).
+
Set the armature’s origin point in the bottom of the armature (see the images below).
-
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)).
+
Armature’s origin point and mesh’s origin point must be in the same location(see the images below).
-
Uncheck “Bone Envelopes” checkbox on the Armature modifier for the mesh (see the images bellow).
+
Use a root bone located in the armature’s origin. This root bone must be in vertical position (see the images below) 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)).
-
Uncheck “Envelopes” checkbox on the armature (see the images bellow).
+
Uncheck “Bone Envelopes” checkbox on the Armature modifier for the mesh (see the images below).
-
Use SkeletonDebugger to show the skeleton on your game in order to check if the mesh and the skeleton are loaded correctly:
+
Uncheck “Envelopes” checkbox on the armature (see the images below).
+
+
+
+
+
+
+
+
+
+You can use SkeletonDebugger to show the skeleton on your game in order to check if the mesh and the skeleton are loaded correctly:
+
+
final Material soldier2Mat = assetManager.loadMaterial("Materials/soldier2/soldier2.j3m");
final Spatial soldier2 = assetManager.loadModel("Models/soldier2/soldier2.j3o");
TangentBinormalGenerator.generate(soldier2);
@@ -67,20 +113,9 @@ To export an animated model in Blender make sure the following conditions are me
-
-
-
-
-
-
-
-
-
-
-
Also check out these videos and resources:
@@ -95,5 +130,343 @@ Also check out these videos and resources:
+
+Models for live rendering should have a low polygon count. To increase the perceived detail of a model normal maps are commonly used in games. This tutorial will show how to create a normalmap from a highpoly version of your model that you can apply to a lowpoly version of the model in your game.
+
+
+If you use the multiresolution modifier you only need one object. Lets look at this example:
+
+
+
+
+
+
+
+Add a multiresolution modifier:
+
+
+
+
+
+
+
+There are two types of modifiers: Catmull-Clark and Simple.
+- Simple is better for things like walls or floors.
+- Catmull-Clark is better for objects like spheres.
+
+
+
+When using Catmull-Clark with a higher "subdivide" value (more than 3) its good to have the "preview" value above 0 and less than the subdivide level. This is because Catmull-Clark smoothes the vertices, so the normalMap is not so precise.
+
+
+
+Here is an example of Prewiew 1, it's more smooth than the original mesh:
+
+
+
+
+
+
+
+Enable "Sculpt Mode" in blender and design the highPoly version of your model like here:
+
+
+
+
+
+
+
+Now go into Render Tab, and bake a normalMap using same configuration as here:
+
+
+
+
+
Remember! The actual preview affects the baking output and mesh export!
+
+
+The goal of this tutorial is to explain briefly how to bake light map in blender with a separate set of texture coordinates and then export a model using this map in jME3.
+
+create a mesh in blender and unwrap it to create uvs
+
+
+
+
+
+
+
+In the mesh tab you can see the sets of Uvs, it will create the first one.
+
+You can assign w/e texture on it, i used the built in checker of blender for the example.
+
+Then in this list, create a new one and click on the camera icon so that baking is made with this set. Name it LightUvMap.
+
+Then in the 3D view in edit mode select all your mesh vertice and hit 'U'/LightMap pack then ok it will unfold the mesh for light map.
+
+Then create a new image, go to the render tab an all at the end check the "Bake" section and select shadows. Then click bake.
+
+If all went ok it will create a light map like this.
+
+
+
+
+
+Then go to the material tab, create a new one for your model and go to the Texture Tab.
+
+Create 2 textures one for the color map, and one for the light map.
+
+In the Mapping section be sure to select coordinates : UV and select the good set of coordinates.
+
+
+
+Once this is done, export your model with the ogre exporter, and turn it into J3o with the SDK.
+
+Create material for it using the lighting definition.
+
+Add the colorMap in the diffuse map slot and the lightMap in the light map slot.
+
+Make sure you check "SeparateTexCoords"
+
+
+
+
+
+It should roughly result in something like that :
+
+
+
+
+
+The blend file, the ogre xml files and the textures can be found in the download section of the google code repo
+
+
+
+There are several ways to create static images to use for a sky in your game. This will describe the concepts used in blender and create an ugly sky Check the links below for other ways and prettier skies.
+
+
+
+A sky box is a texture mapped cube, it can also, loosely, be called en EnvMap or a CubeMap. The camera is inside the cube and the clever thing that jME does is to draw the sky so it is always behind whatever else is in your scene. Imagine the monkey is the camera in the picture.
+
+
+
+
+
+
+
+But a real sky is not a box around our heads, it is more like a sphere. So if we put any old image in the sky it will look strange and might even look like a box. This is not what we want. The trick is to distort the image so that it will look like a sphere even if it in fact is a picture pasted on a box. Luckily blender can do that tricky distortion for us.
+
+
+
+The screenshots are from Blender 2.63 but the equivalent operations have been in blender for years so with minor tweaks should work for almost any version.
+
+
+
+So let's get started, fire up blender and you'll see something like this.
+
+
+
+
+
+
+
+The cube in the start scene is perfect for us. What we'll do is have Blender render the scene onto that cube. The resulting image is what we'll use for our sky box. So our jME sky will look like we stood inside the blender box and looked out on the scene in blender.
+
+
+
+Start by selecting the box and set its material to shadeless.
+
+
+
+
+
+
+
+Now we will create a texture for the box. Make sure the texture is an Environment Map, that the Viewpoint Object is set to the cube. The resolution is how large the resulting image will be. More pixels makes the sky look better but comes at the cost of texture memory. You'll have to trim the resolution to what works in your application.
+
+
+
+
+
+
+
+Next up is the fun part, create the sky scene in blender. You can do whatever fits your application, include models for a city landscape, set up a texture mapped sphere in blender with a nice photographed sky, whatever you can think will make a good sky.
+I am not so creative so I created this scene:
+
+
+
+
+
+
+
+Now render the scene (press F12). It doesn't actually matter where the camera is in blender but you might see something similar to this:
+
+
+
+
+
+
+
+You can see that Blender has actually drawn the scene onto the cube. This is exactly what we want. Now to save the image.
+
+
+
+Select the texture of the cube and select save environment map.
+
+
+
+
+
+
+
+That is it for Blender. Open the saved image in some image editor (I use the Gimp from here).
+
The SDK also contains an image editor, right-click the image and select "edit image" to open it.
+
+You will notice that Blender has taken the 6 sides of the cube and pasted together into one image (3x2). So now we need to cut it up again into 6 separate images. In gimp I usually set the guides to where I want to cut and then go into Filters→Web→Slice and let gimp cut it up for me.
+
+
+
+
+
+
+
+Next up is to move the image files into your assets directory and create the sky in jME. You can do that in the Scene Composer by right clicking the scene node, select Add Spatial and then select Skybox.
+If you want to do it from code, here is an example:
+
This example uses a strange normalScale, this is to flip the image on the X-axis and might not be needed in your case. Hint: the texture is applied on the outside of the cube but we are inside so what do we see?
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_apply_bones.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_apply_bones.png
index 617454726..8040bc887 100644
Binary files a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_apply_bones.png and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_apply_bones.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_apply_mesh.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_apply_mesh.png
index c063a8d1b..285d40c30 100644
Binary files a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_apply_mesh.png and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_apply_mesh.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_envelopes.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_envelopes.png
index eee1b7aaf..4f8ecfa50 100644
Binary files a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_envelopes.png and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_envelopes.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_finished.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_finished.png
index 006f4cb21..95da95bf5 100644
Binary files a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_finished.png and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_finished.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_rootbone.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_rootbone.png
index 9bb251d2a..5fa522745 100644
Binary files a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_rootbone.png and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/blender_rootbone.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/exception2.gif b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/exception2.gif
new file mode 100644
index 000000000..33ae2834b
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/exception2.gif differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/post-slice.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/post-slice.png
new file mode 100644
index 000000000..8b531700b
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/post-slice.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/ready_normal.gif b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/ready_normal.gif
new file mode 100644
index 000000000..bacec1605
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/ready_normal.gif differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/render.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/render.png
new file mode 100644
index 000000000..9430652a2
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/render.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/saveenvmap.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/saveenvmap.png
new file mode 100644
index 000000000..a7436867a
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/saveenvmap.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/scene.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/scene.png
new file mode 100644
index 000000000..03fac4a57
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/scene.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/shadeless.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/shadeless.png
new file mode 100644
index 000000000..a282df212
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/shadeless.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/skybox-concept.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/skybox-concept.png
new file mode 100644
index 000000000..c51e5e4f5
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/skybox-concept.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/start-screen2.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/start-screen2.png
new file mode 100644
index 000000000..eeadda404
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/start-screen2.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/texture.png b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/texture.png
new file mode 100644
index 000000000..dce99a568
Binary files /dev/null and b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/external/texture.png differ
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/faq.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/faq.html
index eebc1c900..2c5df4dd7 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/faq.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/faq.html
@@ -161,15 +161,16 @@ this.assetManager.registerLocator("town.zip", ZipLocator.class)
Follow our best practices for the multi-media asset pipeline.
-You create 3-D models in a 3-D mesh editor, for example Blender, and export it in Ogre Mesh XML or Wavefront OBJ format.
+You create 3-D models in a 3-D mesh editor, for example Blender, and export it in Ogre Mesh XML (animated objects, scenes) or Wavefront OBJ format (static objects, scenes).
You create textures in a graphic editor, for exmaple Gimp, and export them as PNG or JPG.
You create sounds in an audio editor, for example, Audacity, and export them as WAVE or OGG.
-Learn more:3D Models, , , , Multi-Media Asset Pipeline.
+Learn more:3D Models, Multi-Media Asset Pipeline, JME3's blend-to-j3o importer;
+, , , .
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/best_practices.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/best_practices.html
index 3b9590339..f374c36f3 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/best_practices.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/best_practices.html
@@ -91,39 +91,46 @@ E.g. models, terrains; materials, textures; noises, music, voices; video, cutsce
Use an to outline what features you want and what components are needed.
-
Pre-Alpha
+
Pre-Alpha Development
Artwork: Test asset loading and saving with mock-ups and stock art.
Lay out the overall application flow, i.e. switching between intro / options / game screen, etc.
-
Get one typical level working. E.g. if the game is a "Jump'n'Run", jumping and running must work before you can announce Alpha.
+
Get one typical level working before you can announce the Alpha Release.
+E.g. if the game is a "Jump'n'Run", jumping and running must work.
Alpha Release
+
+
Pre-Beta Development
Artwork: Replace all mock-ups with first drafts of real media and level maps.
-
Run alpha tests, track bugs, debug, optimize.
+
Have your team members review and "alpha test" it on various systems, track bugs, debug, optimize.
-
Declare before you announce Beta. This prevents a bottomless pit of new bugs.
+
Declare before you announce the Beta Release to prevent a bottomless pit of new bugs.
Beta Release
+
+
Post-Beta Development
Artwork: Fill in the final media and level maps.
-
Have external people review and "beta test" it (track bugs).
+
Have external people review and "beta test" it, make it easy to report bugs.
-
Even out the kinks in code and gameplay – don't add any more new features.
+
Fix high-priority bugs, even out the kinks in code and gameplay, don't add new features for now!
@@ -229,26 +236,26 @@ For your future game releases, you will want to rely on your own base framework:
You have a list of features that you want in game, but which one do you implement first? You will keep adding features to a project that grows more and more complex, how can you minimize the amount of rewriting required?
-
Make sure the game's high-level frame (screen switching, networking, loading/saving) is sound and solid.
+
Make sure the game's high-level frame (screen switching, network sync, loading/saving) is sound and solid.
-
Start with implementing the most complex game feature first – the one that imposes most constraints on the structure of your project (for example: networking or physics.)
+
Start with implementing the most complex game feature first – the one that imposes most constraints on the structure of your project (for example: multi-player networking, or physics.)
-
Add only one larger feature at a time. If there are complex interactions (such as "networking + physics"), start with a small test case ("one cube") and work your way up, don't start with a whole scene.
+
Add only one larger feature at a time. If there are complex interactions (such as "networking + physics"), start with a small test case ("one shared cube") and work your way up. Starting with a whole scene introduces too many extra soruces of error.
Implement low-complexity decorations (audio and visual effects) last.
-
Test for side-effects on existing code after you add a feature.
+
Test for side-effects on existing code after you add a new feature (regression test).
-
Acknowledge whether you want a feature because it is necessary for gameplay, or simply because "everyone else has it". Your goal should be to bring out the essence of your game idea. Don't water down gameplay but attempting to make it "do everything, but better". Successful high-performance games are the ones where someone made smart decisions what to keep and what to drop.
+
Acknowledge whether you want a feature because it is necessary for gameplay, or simply because "everyone else has it". Your goal should be to bring out the essence of your game idea. Don't water down gameplay by attempting to make it "do everything, but better". Successful high-performance games are the ones where someone made smart decisions what to keep and what to drop.
-SimpleApplication gives you access to game features such as a the rootNode, assetManager, guiNode, inputManager, audioManager, physicsSpace, viewPort, and the camera. But what if you need access to the assetManager or rootNode etc from another class? Don't pass around lots of object references in constructors. This is a sign that this class should be designed as an AppState (read details there).
-
-
-
-An AppState has access to all game features in the SimpleApplication via the this.app and this.stateManager objects.
+SimpleApplication gives you access to game features such as a the rootNode, assetManager, guiNode, inputManager, audioManager, physicsSpace, viewPort, and the camera. But what if you need this access also from another class? Don't extend SimpleApplication a second time, and don't pass around tons of object references in constructors! Needing access to application level objects is a sign that this class should be designed as an AppState (read details there).
-Examples:
+An AppState has access to all game features in the SimpleApplication via the this.app and this.stateManager objects. Examples:
Multithreading – use concurrency, and don't change the scene graph from outside the update loop.
+
Multithreading – Use concurrency for long-running backgroudn tasks, but don't manipulate the scene graph from outside the main thread (update loop)!
You can add a Java Profiler to the jMonkeyEngine SDK via Tools → Plugins → Available. The profiler presents statistics on the lifecycle of methods and objects. Performance problems may be caused by just a few methods that take long, or are called too often (try to cache values to avoid this). If object creation and garbage collection counts keep increasing, you are looking at a memory leak.
-These tips are especially for users who already know jME2. Automatic handling of the Geometric State has improved in jME3, and it is now a best practice to not mess with it.
+These tips are especially important for users who already know jME2. Automatic handling of the Geometric State has improved in jME3, and it is now a best practice to not mess with it.
-
Do not call updateGeometricState() on anything but the root node!
+
Do not call updateGeometricState() on anything but the root node!
-
Do not override or mess with updateGeometricState() at all.
+
Do not override or mess with updateGeometricState() at all.
-
Do not use getLocalTranslation().set() to move a spatial, always use setLocalTranslation().
+
Do not use getLocalTranslation().set() to move a spatial in jME3, always use setLocalTranslation().
-A Java Debugger is included in the jMonkeyEngine SDK. It allows you to set a break point in your code near the point where an exception happens. Then you step through the execution line by line and watch object and variable states to detect where the bug starts.
+A Java Debugger is included in the jMonkeyEngine SDK. It allows you to set a break point in your code near the line of code where an exception happens. Then you step through the execution line by line and watch object and variable states live, to detect where the bug starts.
@@ -423,7 +427,7 @@ Treat javadoc as messages to your future self. "genNextVal() generates the
-Unit Testing () has a different status in 3D graphics development than in other types of software. You cannot write assertions that automatically test whether the rendered image looks correct, or whether interactions are intuitive. Still you should create simple test cases for individual game features such as loaders, content generators, effects. Run the test cases now and then to see whether they still work as intended – or whether they are suffering from side-effects. Keep the test classes in a test directory in the project, don't include them in the distribution.
+Unit Testing () has a different status in 3D graphics development than in other types of software. You cannot write assertions that automatically test whether the rendered image looks correct, or whether interactions are intuitive. Still you should create simple test cases for individual game features such as loaders, content generators, effects. Run the test cases now and then to see whether they still work as intended – or whether they are suffering from regressions or side-effects. Keep the test classes in the test directory of your project, don't include them in the distribution.
@@ -431,20 +435,20 @@ Treat javadoc as messages to your future self. "genNextVal() generates the
-Alpha and Beta Testing means that you ask someone to try to install and run your game. It should be a real user situation, where they are left to figure the gameplay out by themselves (you only can include the usual read-me and help docs). Provide the testers with an easy method to report back problems, or why they gave up. Evaluate whether these problems are exceptions or must be fixed for the game to be playable.
+Alpha and Beta Testing means that you ask someone to try to install and run your game. It should be a real user situation, where they are left to figure out the installation and gameplay by themselves–you only can include the usual read-me and help docs. Provide the testers with an easy method to report back what problems they encountered, what they liked best, or why they gave up. Evaluate whether reported problems are one-off glitches, or whether they must be fixed for the game to be playable for everyone.
Prepare promotional art: Cool screenshots (in thumbnail, square, vertical, horizontal, and fullscreen formats) and video clips. Include name, contact info, slogan, etc., so future customers can find you.
+
Prepare promotional art: The most awesome screenshots (in thumbnail, square, vertical, horizontal, and fullscreen formats) and video clips. Include name, contact info, slogan, etc., so future customers can find you.
Prepare a readme.txt file, or installation guide, or handbook – if applicable.
-
Get a certificate if it is required for your distribution method (see below).
+
Get a certificate if one is required for your distribution method (see below).
-The jMonkeyEngine SDK helps you with deployment: You specify your branding and deployment options in the Project Properties dialog, and then choose Clean and Build from the context menu. If you use another IDE, then consult the IDE's documentation.
+The jMonkeyEngine SDK helps you with deployment: You specify your branding and deployment options in the Project Properties dialog, and then choose Clean and Build from the context menu. If you use another IDE, consult this IDE's documentation.
-Decide whether you want to release your game as WebStart, Desktop JAR, or Applet – Each has its pros and cons.
+Decide whether you want to release your game as WebStart, desktop JAR, mobile APK, or browser Applet – Each has its pros and cons.
@@ -503,7 +507,7 @@ Decide whether you want to release your game as WebStart, Desktop JAR, or Applet
(.APK)
Game runs on Android devices.
Android devices do not support post-procesor effects.
-
+
Which ever method you choose, a Java-Application works on the main operating systems: Windows, Mac OS, Linux, Android.
@@ -515,5 +519,5 @@ The distribution appears in a newly generated dist directory inside
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/how_to_use_materials.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/how_to_use_materials.html
index 6abb26463..2cd9a979e 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/how_to_use_materials.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/how_to_use_materials.html
@@ -26,7 +26,7 @@ You want to make the most of your 3D models by specifying good looking material
-If you want more advanced background info: You can learn more about Material Definitions in general here. You can find the full list of Material Parameters in the Material Definitions Properties overview. The following sections introduce you to the most commonly used cases. You typically initialize Material objects in the initSimpleApp() method, and configure them using the setters described here. Then load the Materials using myGeometry.setMaterial(mat).
+If you want more advanced background info: You can learn more about Material Definitions in general here. You can find the full list of Material Parameters in the Material Definitions Properties overview. The following sections introduce you to the most commonly used cases. You typically initialize Material objects in the simpleInitApp() method, and configure them using the setters described here. Then load the Materials using myGeometry.setMaterial(mat).
@@ -230,7 +230,7 @@ viewPort.addProcessor(fpp);
Specify a Glow color.
-A ColorRGBA value of your choice, e.g. choose a warm or cold color for different effects, or white for a neutral glow.
mat.setColor("Glow",ColorRGBA.White);
+A ColorRGBA value of your choice, e.g. choose a warm or cold color for different effects, or white for a neutral glow.
mat.setColor("GlowColor",ColorRGBA.White);
(Optional) Specify a GlowMap texture.
@@ -244,7 +244,7 @@ This texture outlines in detail where the DiffuseMap texture glows. If you don
To deactivate glow:
Put the Geometry (not the Material!) in the appropriate render queue
+
Put the Geometry (not the Material!) in the appropriate render queue bucket.
+Objects in the translucent bucket (e.g. particles) are not affected by SceneProcessors (e.g. shadows). Obejcts in the transparent bucket (e.g. foliage) are affected by SceneProcessors (e.g. shadows).
Enables Alpha Testing
Deactivate Alpha Testing for gradually translucent objects, such as colored glass, smoked glass, ghosts.
-
+
It is possible to load a DiffuseMap texture that has an Alpha channel, and combine it with an underlying Material Color.
@@ -338,7 +339,7 @@ Deactivate Alpha Testing for gradually translucent objects, suc
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/optimization.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/optimization.html
index 5e99f434e..82207e01a 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/optimization.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/jme3/intermediate/optimization.html
@@ -14,7 +14,7 @@ This page is intended as a reference collection of optimization tricks that can
The more Geometry objects are added to the scene, the harder it gets to handle them in a speedy fashion.
-The reason for this is, that for every object a render command must be done, here is a bottleneck between the CPU and the graphics card.
+The reason for this is that a render command must be done for every object, potentially creating a bottleneck between the CPU and the graphics card.
@@ -32,80 +32,65 @@ You can optimize nodes using the SceneComposer in the Texture Atlas provides limited individual texturing of batched geometries.
-When you use math operations like vectorA.mult(vectorB); new objects are created that have to be garbage collected when you don't use them anymore. Check your math operations for opportunities to use the local version of the math operations, e.g. vectorA.multLocal(vectorB). This way the result is stored in vectorA and no new object needs to be created.
+When you use math operations like vectorA.mult(vectorB);, they create new objects for the result. These objects have to be garbage collected when you don't use them anymore.
+
+
+
+Check your math operations for opportunities to use the local version of the math operations, e.g. vectorA.multLocal(vectorB). Local methods store the result in vectorA and do not create a new object. Use local methods if you do not need to keep the previous vectorA.
-To offload much computation to the less CPU intense physics broadphase collision check, avoid having large meshes that cover e.g. the whole map of your level. Instead separate the collision shapes into multiple smaller parts. Obviously this can also be overdone as excessive amounts of physics objects can bring other performance problems.
+To offload much computation to the less CPU intense physics broadphase collision check, avoid having large meshes that cover e.g. the whole map of your level. Instead, separate the collision shapes into multiple smaller chunks. Obviously, don't exaggerate the chunking, because having excessive amounts of physics objects similarly cause performance problems.
-SimpleApplication displays a HUD with statistics. Use app.setDisplayStatView(true); to activate it, and false to deactivate it.
-It counts how many FrameBuffers, Textures, or Shaders…
+
+SimpleApplication displays a HUD with statistics. Use app.setDisplayStatView(true); to activate it, and false to deactivate it.
+The StatsView counts Objects,Uniforms,Triangles,Vertices are in the scene, and it counts how many FrameBuffers, Textures, or Shaders:
… were switched in the last frame (S)
… were used during the last frame (F)
-
… exist in memory (M)
+
… exist in OpenGL memory (M)
-Example:
+
+For example, Textures (M) tells you how many textures are currently in OpenGL memory.
-
-
Textures (M) = how many textures are currently in the OpenGL driver
-
-
Textures(F) = how many textures were used in the last frame
-
-
Textures(S) = how many texture switches were done in the last frame.
-
-
-Genereally jME3 is well optimized and optimizes these things correctly. The normal state is that the (S/F/M) values should be in the same order of magnitude; (S) values can be lower than (F).
+Generally jME3 is well optimized and optimizes these things correctly. Read statsview to learn the details about how to interpret the statistics, how to tell whether your values are off, or whether they point out a problem.
-
-
If the (S) values are significantly higher than the (F) values, that means there are a lot of extra switches happening which can cause a performance loss. Switches happen for instance if you have many transparent materials in your scene. In that case this tells you that you should use fewer transparent materials.
-
-
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 (> 2000 wu) with lots of spatials or lots of different materials. In this case, you should can optimize performance by identifying spatials to cull or detach.
-
-
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:
GeometryBatchFactory.optimize(complexNode, true);
-
-
-
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.
-
-
FrameBuffers: If you don'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.
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/application_deployment.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/application_deployment.html
index f9abb24d2..bc009c810 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/application_deployment.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/application_deployment.html
@@ -187,7 +187,7 @@ A browser Applet is a Java application that runs in the web browser while the us
-These instrcutions assume that you have already written a game that you want to turn into an Applet. As opposed to other jME3 games, Applets cannot capture the mouse for navigation, so the camera will be switched to dragToRotate mode. The jMonkeyEngine SDK and the included build script already contain what you need.
+These instructions assume that you have already written a game that you want to turn into an Applet. As opposed to other jME3 games, Applets cannot capture the mouse for navigation, so the camera will be switched to dragToRotate mode. The jMonkeyEngine SDK and the included build script already contain what you need.
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/blender.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/blender.html
index debbc7a4c..93234ce7e 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/blender.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/blender.html
@@ -16,8 +16,13 @@ It was important to have always the lates version of the script that is compatib
Now we have an opportunity to simplify the import process by loading data directly from blender binary files: *.blend.
+
@@ -43,6 +48,8 @@ By default a BlenderModelLoader is registered with your assetManager to load ble
User defined UV coordinates are read.
+
Loading BMesh is supported.
+
Loading textures.
@@ -73,6 +80,8 @@ By default a BlenderModelLoader is registered with your assetManager to load ble
Generated textures are 'baked' into 2D textures and merged to create one flat texture. They can be freely merged with image textures.
+
Generated textures can be used as normal maps (but this looks poor when large amount of small triangles is used; incleasing generated texture ppu in blender key might help a little)
+
Loading materials.
@@ -152,12 +161,10 @@ By default a BlenderModelLoader is registered with your assetManager to load ble
@@ -291,7 +298,7 @@ Here is the list of how blender features are mapped into jme.
Surface
Node
The surface is transformed to the proper mesh
-
+
Using BlenderLoader can allow you to use blend file as your local assets repository.
@@ -301,7 +308,7 @@ Probably versions before 2.49 will work pretty well too, but I never checked tha
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/material_editing.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/material_editing.html
index 4b3671d37..3bfb567e0 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/material_editing.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/material_editing.html
@@ -116,9 +116,12 @@ Or in your Java code
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/project_creation.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/project_creation.html
index db688dd61..c3ad71cd9 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/project_creation.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/project_creation.html
@@ -96,13 +96,25 @@ Now let's have a look at the project's file structure in the File Expl
+Right-Click the project to open the Project properties.
+
+
+
+In the Run section, specify the main class of your project. (Pressing F6 runs this main class.)
+In the Run section, you can optionally configure JVM options and command line parameters (in most cases set the-Xms VMOption [NUMBER] m for the memory usage. for example (-Xms500m). see ).
+In the Application section, specify the game title (by default the game will be named BasicGame).
+In the Application section, specify the vendor name (your name), a short description, your project's homepage, and a splash screen.
+
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/troubleshooting.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/troubleshooting.html
index a7d4838a3..246da1a75 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/troubleshooting.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/troubleshooting.html
@@ -3,7 +3,7 @@
+When an exception happens in the SDK, a small warning sign appears in the lower right corner of the main window. Double-click it to open a window that allows you to see the exception stack trace. When posting about issues in the forum, always post the stack trace along with a description of what happens and how it can be reproduced.
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/version_control.html b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/version_control.html
index 7d4ae0369..fdc710e0b 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/version_control.html
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/sdk/version_control.html
@@ -8,11 +8,24 @@ Whether you work in a development team or alone: File versioning is a handy meth
+For every team member, the file versioning workflow is as follows:
+
+
+
Once: Download a working copy of the project from the repository ("checkout").
+
+
Regularly: Upload your own changes to the repository ("commit").
+
+
Regularly: Download updates by others from the repository ("update").
+
+
+
+
+
Note: Since the jMonkeyEngine SDK is based on the NetBeans Platform framework, you can learn about certain jMonkeyEngine SDK features by reading the corresponding NetBeans IDE tutorials (in the "see also links").
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/wiki-map.xml b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/wiki-map.xml
index 4bbf1160d..e0d3596f9 100644
--- a/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/wiki-map.xml
+++ b/sdk/jme3-core/javahelp/com/jme3/gde/core/docs/wiki-map.xml
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sdk/jme3-core/javahelp/wiki_help.properties b/sdk/jme3-core/javahelp/wiki_help.properties
index 45dd34379..ee9f78c1f 100644
--- a/sdk/jme3-core/javahelp/wiki_help.properties
+++ b/sdk/jme3-core/javahelp/wiki_help.properties
@@ -94,6 +94,7 @@ jme3:advanced:nifty_gui_popup_menu,\
jme3:advanced:nifty_gui_projection,\
jme3:advanced:nifty_gui_scenarios,\
jme3:advanced:nifty_gui_xml_layout,\
+jme3:advanced:ogrecompatibility,\
jme3:advanced:open_game_finder,\
jme3:advanced:particle_emitters,\
jme3:advanced:physics,\