@ -180,8 +180,12 @@ A sound engineer can create a custom <code>com.jme3.audio.Environment</cod
<p>
<p>
You can find more info about OpenAL and its advanced features here: <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.pdf"><paramname="text"value="<html><u>OpenAL 1.1 Specification</u></html>"><paramname="textColor"value="blue"></object>
You can find more info about OpenAL and its advanced features here: <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.pdf"><paramname="text"value="<html><u>OpenAL 1.1 Specification</u></html>"><paramname="textColor"value="blue"></object>
The physics update happens in parallel to rendering, after the users changes have been made in the update() call. This way the loop logic is still maintained: the user can set and change values in physics and scenegraph objects before render() and physicsUpdate() are called in parallel. More physics spaces can simply be added by using multiple bulletAppStates.
The physics update happens in parallel to rendering, after the users changes have been made in the update() call. This way the loop logic is still maintained: the user can set and change values in physics and scenegraph objects before render() and physicsUpdate() are called in parallel. More physics spaces can simply be added by using multiple bulletAppStates.
@ -523,9 +523,14 @@ removeCollideWithGroup(COLLISION_GROUP_01)</td><td>Collision Groups are integer
</li>
</li>
</ul>
</ul>
<ul>
<ul>
<li><div> For large static meshes like shooter levels or terrain its best to divide the mesh into multiple physics objects to allow the less CPU intense broadphase to filter out most collision items.</div>
<li><div> For large static meshes like shooter levels or terrain it is best to divide the scene model into multiple physics objects, with each its own CollisionShape. A huge city level should not be one huge mesh (model) of pavement and streets and buildings. Instead, you make individual models for buildings, for pieces of pavement, for pieces of streets, etc. Position them next to one another to form the whole city, and give each piece its own optimal CollisionShape. E.g. streets can use a fast PlaneCollisionShape if you keep them separate for buildings. Breaking the level into manageable pieces helps the engine improve performance: The less CPU-intensive <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://en.wikipedia.org/wiki/Sweep_and_prune"><paramname="text"value="<html><u>broadphase</u></html>"><paramname="textColor"value="blue"></object> can now filter out parts of the scene that are behind you or out of reach, and it only calculates the details of collisions for parts that are actually close to the action.</div>
@ -165,6 +165,13 @@ getObjectB() </td><td> The two participants in the collision. You cannot kno
Note that after the collision method has been called the object is not valid anymore so you should copy any data you want to keep into local variables.
Note that after the collision method has been called the object is not valid anymore so you should copy any data you want to keep into local variables.
@ -203,6 +203,14 @@ Read the <a href="/com/jme3/gde/core/docs/jme3/advanced/physics#responding_to_a_
If you experience weird behaviour in a ragdoll – such as exploding into pieces and then reassembling – check your collision shapes. Verify you did not position the limbs too close to one another when assmebling the ragdoll. You typically see physical nodes being ejected when their collision shapes intersect, which puts physics in an impossible state.
If you experience weird behaviour in a ragdoll – such as exploding into pieces and then reassembling – check your collision shapes. Verify you did not position the limbs too close to one another when assmebling the ragdoll. You typically see physical nodes being ejected when their collision shapes intersect, which puts physics in an impossible state.
@ -326,6 +326,12 @@ This example shows a very simple but functional vehicle. For a game you would im
<p>
<p>
For a more advanced example, look at <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/bullet/TestFancyCar.java"><paramname="text"value="<html><u>TestFancyCar.java</u></html>"><paramname="textColor"value="blue"></object>.
For a more advanced example, look at <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/test/jme3test/bullet/TestFancyCar.java"><paramname="text"value="<html><u>TestFancyCar.java</u></html>"><paramname="textColor"value="blue"></object>.
@ -373,11 +373,9 @@ You have learned that your 3D scene is a scene graph made up of Spatials: Visibl
<p>
<p>
Since standard shapes like spheres and boxes get old fast, continue with the next chapter where you learn to <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_asset.html">load assets, such as 3-D models</a>.
Since standard shapes like spheres and boxes get old fast, continue with the next chapter where you learn to <ahref="/com/jme3/gde/core/docs/jme3/beginner/hello_asset.html">load assets, such as 3-D models</a>.
@ -30,7 +30,7 @@ Set the boolean in the AppSettings contructor to true if you want to keep the de
</p>
</p>
<p>
<p>
<p><div>Use <code>app.setShowSettings(false);</code> in the <code>main()</code>method to hide the default settings window (default splash screen) at startup.
<p><div>Use <code>app.setShowSettings(true);</code>to present the user with a splashscreen and display settings dialog when starting the game, or<code>app.setShowSettings(false);</code>to hide the custom splashscreen. Set this boolean before calling <code>app.start()</code> on the SimpleApplication.
</div></p>
</div></p>
</p>
</p>
@ -40,15 +40,11 @@ Set the boolean in the AppSettings contructor to true if you want to keep the de
<td>setBitsPerPixel(8)</td><td>Set color depth. <br/>
<td>setBitsPerPixel(8)</td><td>Set color depth. <br/>
@ -78,20 +74,46 @@ Depending on your graphic card, you may be able to set multisampling to higher v
<td>setVSync(true)</td><td>Set vertical syncing to true to time the frame buffer to coincide with the refresh interval of the screen: Prevents page tearing, but slower; recommened for release. <br/>
<td>setVSync(true)</td><td>Set vertical syncing to true to time the frame buffer to coincide with the refresh interval of the screen: Prevents page tearing, but slower; recommened for release. <br/>
Set to false to deactivate vertical syncing (faster, but possible page tearing artifacts); can be deactivated during development.</td><td>false</td>
Set to false to deactivate vertical syncing (faster, but possible page tearing artifacts); can be deactivated during development.</td><td>false</td>
</tr>
</tr>
</table></div>
<!-- EDIT1 TABLE [1372-3122] --><div><table>
<tr>
<tr>
<td>useInput(false)</td><td>Respond to user input by mouse and keyboard. Can be deactivated for use cases where you only display a 3D scene on the canvas without any interaction.</td><td>true</td>
<td>setUseInput(false)</td><td>Respond to user input by mouse and keyboard. Can be deactivated for use cases where you only display a 3D scene on the canvas without any interaction.</td><td>true</td>
</tr>
</tr>
<tr>
<tr>
<td>setSettingsDialogImage("/path/in/assets.png")</td><td>A custom image to display when the settings dialog is shown.</td><td>"/com/jme3/app/Monkey.png"</td>
<td>setStereo3D(true)</td><td>Enable 3D stereo. This feature requires hardware support from the GPU driver. See <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://en.wikipedia.org/wiki/Quad_buffering"><paramname="text"value="<html><u>Quard Buffering</u></html>"><paramname="textColor"value="blue"></object>.</td><td>false</td>
<td>setTitle("My Game")</td><td>This string will be visible in the titlebar, unless the window is fullscreen.</td><td>"jMonkey Engine 3.0"</td>
<td>setTitle("My Game")</td><td>This string will be visible in the titlebar, unless the window is fullscreen.</td><td>"jMonkey Engine 3.0"</td>
</tr>
</tr>
<tr>
<td>setIcons(new BufferedImage[]{ <br/>
ImageIO.read(new File("")), …});</td><td>This specifies the little application icon in the titlebar of the application. You should specify the icon in various sizes (256,128,32,16) to look good on each <acronymtitle="Operating System">OS</acronym>. Note: This is not the application icon on the desktop.</td><td>null</td>
</tr>
<tr>
<td>setSettingsDialogImage("/path/to/splash.png")</td><td>A custom splashscreen image in the assets directory which is displayed when the settings dialog is shown.</td><td>"/com/jme3/app/Monkey.png"</td>
</tr>
</table></div>
</table></div>
<!-- EDIT1 TABLE [1235-3587] -->
<!-- EDIT4 TABLE [3755-4402] -->
</div>
</div>
<h2><a>Saving and Loading Settings</a></h2>
<h2><a>Saving and Loading Settings</a></h2>
@ -102,13 +124,35 @@ Set to false to deactivate vertical syncing (faster, but possible page tearing a
An AppSettings object also supports the following methods:
An AppSettings object also supports the following methods:
</p>
</p>
<ul>
<ul>
<li><div> Use <code>settings.save(outstream)</code> to save your settings via standard java.io serialization.</div>
<li><div> Use <code>settings.save("unique_key")</code> to save your settings via standard java.io serialization.</div>
</li>
</li>
<li><div> Use <code>settings.load(instream)</code> to load your settings.</div>
<li><div> Use <code>settings.load("unique_key")</code> to load your settings.</div>
</li>
</li>
<li><div> Use <code>settings2.copyFrom(settings)</code> to copy a settings object.</div>
<li><div> Use <code>settings2.copyFrom(settings)</code> to copy a settings object.</div>
</li>
</li>
</ul>
</ul>
<p>
Usage:
</p>
<p>
Provide the unique name of your jME3 application as the String argument. For example <code>com.foo.MyCoolGame3</code>.
<li><div> On Mac <acronymtitle="Operating System">OS</acronym> X, the preferences are saved as <acronymtitle="Extensible Markup Language">XML</acronym> file under: <br/>
<form><div><inputtype="hidden"name="do"value="login"/><inputtype="hidden"name="sectok"value="7d161247981f30874b548fa70ae2c4dc"/><inputtype="submit"value="Login"class="button"title="Login"/></div></form><form><div><inputtype="hidden"name="do"value="index"/><inputtype="submit"value="Sitemap"class="button"accesskey="x"title="Sitemap [X]"/></div></form><a><inputtype="button"class="button"value="Back to top"onclick="window.scrollTo(0, 0)"title="Back to top"/></a>
<form><div><inputtype="hidden"name="do"value="login"/><inputtype="hidden"name="sectok"value="accf77e7e66593d3a3e1cc89491ccde3"/><inputtype="submit"value="Login"class="button"title="Login"/></div></form><form><div><inputtype="hidden"name="do"value="index"/><inputtype="submit"value="Sitemap"class="button"accesskey="x"title="Sitemap [X]"/></div></form><a><inputtype="button"class="button"value="Back to top"onclick="window.scrollTo(0, 0)"title="Back to top"/></a>
</div>
</div>
<div></div>
<div></div>
</div-->
</div-->
@ -353,7 +353,7 @@ You've followed a link to a topic that doesn't exist yet. If permissio
@ -172,12 +172,7 @@ The com.jme3.app.SimpleApplication class extends the generic com.jme3.app.Applic
<p>
<p>
<p><div>By default, a SimpleApplication also displays statistics (such as frames per second) on the screen, using the com.jme3.app.StatsView class. You hide the statistics HUD from the screen by calling <code>setDisplayFps(false); setDisplayStatView(false);</code> inside the <code>simpleInitApp()</code> method. The displays contain valuable information during the development and debugging phase. At the latest, you remove these displays for the release.
Additional to the functionality that Application brings, SimpleApplication offers the following methods and fields that can be used, for example, inside the <code>simpleInitApp()</code> method:
</div></p>
</p>
<p>
Additional to the functionality that Application brings, SimpleApplication offers:
</p>
</p>
<div><table>
<div><table>
@ -197,35 +192,44 @@ getGuiNode()</td><td>Attach flat <acronym title="Graphical User Interface">GUI</
getFlyByCamera()</td><td>The default first-person fly-by camera control. This default camera control lets you navigate the 3D scene using the preconfigured WASD and arrow keys and the mouse.</td>
getFlyByCamera()</td><td>The default first-person fly-by camera control. This default camera control lets you navigate the 3D scene using the preconfigured WASD and arrow keys and the mouse.</td>
</tr>
</tr>
</table></div>
</table></div>
<!-- EDIT4 TABLE [6236-6779] --><div><table>
<!-- EDIT4 TABLE [5889-6432] --><div><table>
<tr>
<tr>
<th>SimpleApplication Method</th><th>Purpose</th>
<th>SimpleApplication Method</th><th>Purpose</th>
</tr>
</tr>
<tr>
<tr>
<td>loadStatsView()</td><td>Call this method to print live statistic information to the screen, such as current frames-per-second and triangles/vertices counts. You use this info typically only during development or debugging.</td>
<td>loadStatsView();</td><td>Call this method to print live statistic information to the screen, such as current frames-per-second and triangles/vertices counts. You use this info typically only during development or debugging.</td>
</tr>
<tr>
<td>loadFPSText();</td><td>Call this method to print the current framerate (frames per second) to the screen.</td>
</tr>
</tr>
<tr>
<tr>
<td>loadFPSText()</td><td>Call this method to print the current framerate (frames per second) to the screen.</td>
<td>setDisplayFps(false);</td><td>A default SimpleApplication displays the framerate (frames per second) on the screen. You can choose to deactivate the FPS display using this command.</td>
</tr>
</tr>
<tr>
<tr>
<td>setShowSettings(true)</td><td>Whether the user should be presented with a splashscreen and display settings dialog when starting the game. Set this boolean before calling start() on the SimpleApplication.</td>
<td>setDisplayStatView(false);</td><td>A default SimpleApplication displays mesh statistics on the screen using the com.jme3.app.StatsView class. The information is valuable during the development and debugging phase, but for the release, you should hide the statistics HUD.</td>
<td>simpleInitApp()</td><td>Override this method to initialize the game scene. Here you load and create objects, attach Spatials to the rootNode, and bring everything in its starts position. See also <ahref="/com/jme3/gde/core/docs/jme3/advanced/application_states.html">Application States</a> for best practies.</td>
<td>public void simpleInitApp()</td><td>Override this method to initialize the game scene. Here you load and create objects, attach Spatials to the rootNode, and bring everything in its starts position. See also <ahref="/com/jme3/gde/core/docs/jme3/advanced/application_states.html">Application States</a> for best practices.</td>
</tr>
</tr>
<tr>
<tr>
<td>simpleUpdate(float tpf)</td><td>Override this method to have access to the <ahref="/com/jme3/gde/core/docs/jme3/advanced/update_loop.html">update loop</a>. Use this loop to poll the current game state and respond to changes, or to let the game mechanics generate encounters and initiate state changes. Use tpd (time per frame) as a factor to time events. For more info on how to hook into the <ahref="/com/jme3/gde/core/docs/jme3/advanced/update_loop.html">update loop</a>, see <ahref="/com/jme3/gde/core/docs/jme3/advanced/application_states.html">Application States</a> and <ahref="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html">Custom Controls</a>. </td>
<td>public void simpleUpdate(float tpf)</td><td>Override this method to have access to the <ahref="/com/jme3/gde/core/docs/jme3/advanced/update_loop.html">update loop</a>. Use this loop to poll the current game state and respond to changes, or to let the game mechanics generate encounters and initiate state changes. Use tpf (time per frame) as a factor to time events. For more info on how to hook into the <ahref="/com/jme3/gde/core/docs/jme3/advanced/update_loop.html">update loop</a>, see <ahref="/com/jme3/gde/core/docs/jme3/advanced/application_states.html">Application States</a> and <ahref="/com/jme3/gde/core/docs/jme3/advanced/custom_controls.html">Custom Controls</a>. </td>
</tr>
</tr>
<tr>
<tr>
<td>simpleRender()</td><td><strong>Optional:</strong> Override this method to implement <em>advanced</em> modifications of the frameBuffer and scene graph.</td>
<td>public void simpleRender(RenderManager rm)</td><td><strong>Optional:</strong> Override this method to implement <em>advanced</em> modifications of the frameBuffer and scene graph.</td>
</tr>
</tr>
</table></div>
</table></div>
<!-- EDIT6 TABLE [7332-8197] -->
<!-- EDIT6 TABLE [7228-8146] -->
<p>
<p><div>Use <code>app.setShowSettings(true);</code> to present the user with a splashscreen and display settings dialog when starting the game, or <code>app.setShowSettings(false);</code> to hide the custom splashscreen. Set this boolean before calling <code>app.start()</code> on the SimpleApplication.
</div></p>
</p>
</div>
</div>
<h2><a>Default Input Mappings</a></h2>
<h2><a>Default Input Mappings</a></h2>
@ -250,7 +254,7 @@ The following default navigational input actions are mapped by the default <code
<td>KEY_M</td><td>Prints memory usage stats the out stream.</td>
<td>KEY_M</td><td>Prints memory usage stats the out stream.</td>
</tr>
</tr>
</table></div>
</table></div>
<!-- EDIT7 TABLE [8469-8660] -->
<!-- EDIT7 TABLE [8705-8896] -->
<p>
<p>
As long as useInput() is true, the default Flyby Cam is active. Then the following so-called "WASD" inputs are additionally available:
As long as useInput() is true, the default Flyby Cam is active. Then the following so-called "WASD" inputs are additionally available:
@ -300,7 +304,7 @@ As long as useInput() is true, the default Flyby Cam is active. Then the followi
<td>Rotate drag</td><td>Hold left mouse button and move</td>
<td>Rotate drag</td><td>Hold left mouse button and move</td>
Before you start, make certain you are familiar with the following concepts and terminology.
Before you start, make certain you are familiar with the following concepts and terminology.
</p>
</p>
</div>
</div>
@ -24,7 +24,6 @@ Before you start, make certain you are familiar with the following concepts and
<p>
<p>
<strong>OpenAL</strong> is the Open Audio Library, a platform-independent 3D audio <acronymtitle="Application Programming Interface">API</acronym>.
<strong>OpenAL</strong> is the Open Audio Library, a platform-independent 3D audio <acronymtitle="Application Programming Interface">API</acronym>.
</p>
</p>
</div>
</div>
@ -33,6 +32,7 @@ Before you start, make certain you are familiar with the following concepts and
<div>
<div>
<p>
<p>
The <strong>jME Context</strong> makes settings, renderer, timer, input and event listeners, display system, accessible to a JME game.
The <strong>jME Context</strong> makes settings, renderer, timer, input and event listeners, display system, accessible to a JME game.
</p>
</p>
<ul>
<ul>
@ -59,10 +59,13 @@ The <strong>jME Context</strong> makes settings, renderer, timer, input and even
<div>
<div>
<p>
<p>
Coordinates represent a location in a coordinate system, relative to the origin (0,0,0). m. In 3D space, you need to specify three coordinate values to locate a point: x,y,z.
Coordinates represent a location in a coordinate system, relative to the origin (0,0,0). m. In 3D space, you need to specify three coordinate values to locate a point: x,y,z.
As opposed to a vector (which looks similar), a coordinate does not have a "direction".
As opposed to a vector (which looks similar), a coordinate does not have a "direction".
A vector has a length and a direction. It is used like an arrow pointing at a point in 3D space. A vector starts at the origin (0,0,0), and ends at the target coordinate (x,y,z). Backwards directions are expressed with negative values.
A vector has a length and a direction. It is used like an arrow pointing at a point in 3D space. A vector starts at the origin (0,0,0), and ends at the target coordinate (x,y,z). Backwards directions are expressed with negative values.
Code sample: <code>Vector3f v = new Vector3f( 17 , -4 , 0 );</code>
Code sample: <code>Vector3f v = new Vector3f( 17 , -4 , 0 );</code>
</p>
</p>
</div>
</div>
@ -93,6 +96,7 @@ Code sample: <code>Vector3f v = new Vector3f( 17 , -4 , 0 );</code>
<div>
<div>
<p>
<p>
A <em>unit vector</em> is a basic vector with a length of 1 world unit. Since its length is fixed (and it thus can only point at one location anyway), the only interesting thing about this vector is its direction.
A <em>unit vector</em> is a basic vector with a length of 1 world unit. Since its length is fixed (and it thus can only point at one location anyway), the only interesting thing about this vector is its direction.
</p>
</p>
<ul>
<ul>
@ -106,16 +110,23 @@ A <em>unit vector</em> is a basic vector with a length of 1 world unit. Since it
</li>
</li>
</ul>
</ul>
<p>
Negate the vegator to change its direction, e.g. (-1, 0, 0) = left.
</p>
</div>
</div>
<h3><a>Normalized Vectors</a></h3>
<h3><a>Normalized Vectors</a></h3>
<div>
<div>
<p>
<p>
A <em>normalized vector</em> is a custom <em>unit vector</em>. A normalized vector is not the same as a <em>(surface) normal vector</em>.
A <em>normalized vector</em> is a custom <em>unit vector</em>. A normalized vector is not the same as a <em>(surface) normal vector</em>.
When you normalize a vector, it still has the same direction, but you lose the information where the vector originally pointed.
When you normalize a vector, it still has the same direction, but you lose the information where the vector originally pointed.
For instance, you normalize vectors before calculating angles.
</p>
<p>
<strong>Example:</strong> You normalize vectors before calculating angles.
</p>
</p>
</div>
</div>
@ -124,9 +135,9 @@ For instance, you normalize vectors before calculating angles.
<div>
<div>
<p>
<p>
A surface normal is a vector that is perpendicular to a plane.
A surface normal is a vector that is perpendicular to a plane.
You calculate the Surface Normal by calculating the cross product.
You calculate the Surface Normal by calculating the cross product.
</p>
</p>
</div>
</div>
@ -135,12 +146,15 @@ You calculate the Surface Normal by calculating the cross product.
<div>
<div>
<p>
<p>
The cross product is a calculation that you use to find a perpendicular vector (an orthogonal, a "right angle" at 90°).
The cross product is a calculation that you use to find a perpendicular vector (an orthogonal, a "right angle" at 90°).
In 3D space, speaking of an orthogonal only makes sense with respect to a plane. You need two vectors to uniquely define a plane. The cross product of the two vectors, <code>v1 × v2</code>, is a new vector that is perpendicular to this plane. A vector perpendicular to a plane is a called <em>Surface Normal</em>.
In 3D space, speaking of an orthogonal only makes sense with respect to a plane. You need two vectors to uniquely define a plane. The cross product of the two vectors, <code>v1 × v2</code>, is a new vector that is perpendicular to this plane. A vector perpendicular to a plane is a called <em>Surface Normal</em>.
Example: The x unit vector and the y unit vector together define the x/y plane. The vector perpendicular to them is the z axis. JME can calculate that this equation is true: <br/>
<strong>Example:</strong> The x unit vector and the y unit vector together define the x/y plane. The vector perpendicular to them is the z axis. JME can calculate that this equation is true: <br/>
Most visible objects in a 3D scene are made up of polygon meshes – characters, terrains, buildings, etc. A mesh is a grid-like structure that represents a complex shape. The advantage of a mesh is that it is mathematically simple enough to render in real time, and detailed enough to be recognizable.
Most visible objects in a 3D scene are made up of polygon meshes – characters, terrains, buildings, etc. A mesh is a grid-like structure that represents a complex shape. The advantage of a mesh is that it is mathematically simple enough to render in real time, and detailed enough to be recognizable.
</p>
<p>
Every shape is reduced to a number of connected polygons, usually triangles; even round surfaces such as spheres are reduced to a grid of triangles. The polygons' corner points are called vertices. Every vertex is positioned at a coordinate, all vertices together describe the outline of the shape.
Every shape is reduced to a number of connected polygons, usually triangles; even round surfaces such as spheres are reduced to a grid of triangles. The polygons' corner points are called vertices. Every vertex is positioned at a coordinate, all vertices together describe the outline of the shape.
You create 3D meshes in tools called mesh editors, e.g in Blender.
</p>
<ahref="/com/jme3/gde/core/docs/jme3/math.html">Learn more about 3D maths here.</a>
<p>
You create 3D meshes in tools called mesh editors, e.g in Blender. The jMonkeyEngine can load finished meshes (=models) and arrange them to scenes, but it cannot edit the mesh itself.
</p>
<p>
<ahref="/com/jme3/gde/core/docs/jme3/math.html">Learn more about 3D maths here.</a>
</p>
</p>
</div>
</div>
@ -163,8 +189,8 @@ You create 3D meshes in tools called mesh editors, e.g in Blender.
<div>
<div>
<p>
<p>
What we call "color" is merely part of an object's light reflection. The onlooker's brain uses shading and reflecting properties to infer an object's shape and material. Factors like these make all the difference between chalk vs milk, skin vs paper, water vs plastic, etc! (<objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.shaders.org/ifw2_textures/whatsin10.htm"><paramname="text"value="<html><u>External examples</u></html>"><paramname="textColor"value="blue"></object>)
What we call "color" is merely part of an object's light reflection. The onlooker's brain uses shading and reflecting properties to infer an object's shape and material. Factors like these make all the difference between chalk vs milk, skin vs paper, water vs plastic, etc! (<objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.shaders.org/ifw2_textures/whatsin10.htm"><paramname="text"value="<html><u>External examples</u></html>"><paramname="textColor"value="blue"></object>)
</p>
</p>
</div>
</div>
@ -252,7 +278,6 @@ Set the Specular color to ColorRGBA.Black to switch off shininess.</div>
<p>
<p>
<imgsrc="/wiki/lib/exe/fetch.php">
<imgsrc="/wiki/lib/exe/fetch.php">
</p>
</p>
</div>
</div>
@ -261,9 +286,9 @@ Set the Specular color to ColorRGBA.Black to switch off shininess.</div>
<div>
<div>
<p>
<p>
Textures are part of Materials. In the simplest case, an object could have just one texture, the Color Map, loaded from one image file. When you think back of old computer games you'll remember this looks quite plain.
Textures are part of Materials. In the simplest case, an object could have just one texture, the Color Map, loaded from one image file. When you think back of old computer games you'll remember this looks quite plain.
The more information you (the game designer) provide additionally to the Color Map, the higher the degree of detail and realism. Whether you want photo-realistic rendering or "toon" rendering (Cel Shading), everything depends on the quality of your materials and texture maps. Modern 3D graphics use several layers of information to describe one material, each layer is a Texture Map.
The more information you (the game designer) provide additionally to the Color Map, the higher the degree of detail and realism. Whether you want photo-realistic rendering or "toon" rendering (Cel Shading), everything depends on the quality of your materials and texture maps. Modern 3D graphics use several layers of information to describe one material, each layer is a Texture Map.
</p>
</p>
</div>
</div>
@ -380,10 +405,16 @@ A seamless texture is an image file that has been designed so that it can be use
<div>
<div>
<p>
<p>
<imgsrc="/wiki/lib/exe/fetch.php">
<imgsrc="/wiki/lib/exe/fetch.php">
Creating a texture for a cube is easy – but what about a character with a face and extremities? For more complex objects, you design the texture in the same ways as a sewing pattern: One image file contains the outline of the front, back, and side of the object, next to one another. Specific areas of the flat texture (UV coordinates) map onto certain areas of your 3D model (XYZ coordinates), hence the name UV map.
</p>
Getting the seams and mappings right is crucial: You will have to use a graphic tool like Blender to create UV Maps. It's worth the while to learn this, UV mapped models look a lot more professional.
<p>
Creating a texture for a cube is easy – but what about a character with a face and extremities? For more complex objects, you design the texture in the same ways as a sewing pattern: One image file contains the outline of the front, back, and side of the object, next to one another. Specific areas of the flat texture (UV coordinates) map onto certain areas of your 3D model (XYZ coordinates), hence the name UV map. Using UV Maps, models can have a different texture on each side.
</p>
<p>
Getting the seams and mappings right is crucial: You must use a graphic tool like Blender to create UV Maps and store the coordinates. It's worth the while to learn this, UV mapped models look a lot more professional.
</p>
</p>
</div>
</div>
@ -392,10 +423,13 @@ Getting the seams and mappings right is crucial: You will have to use a graphic
<div>
<div>
<p>
<p>
<imgsrc="/wiki/lib/exe/fetch.php">
<imgsrc="/wiki/lib/exe/fetch.php">
</p>
<p>
Environment Maps are used to create the impression of reflections and refractions. You create a Cube Map to represent your environment, similar to a skybox. (Sphere Maps are possible, but often look too distorted.) You give the Cube Map a set of images showing a "360° view" of the completed scene. The renderer uses this as base to texture the reflective surface.
Environment Maps are used to create the impression of reflections and refractions. You create a Cube Map to represent your environment, similar to a skybox. (Sphere Maps are possible, but often look too distorted.) You give the Cube Map a set of images showing a "360° view" of the completed scene. The renderer uses this as base to texture the reflective surface.
Of course these reflections are static and not "real", e.g. the player will not see his avatar's face reflected, etc… But they cause the desired "glass/mirror/water" effect, and are fast enough to render in real usecases, it's better than nothing.
Of course these reflections are static and not "real", e.g. the player will not see his avatar's face reflected, etc… But they cause the desired "glass/mirror/water" effect, and are fast enough to render in real usecases, it's better than nothing.
</p>
</p>
</div>
</div>
@ -404,8 +438,8 @@ Of course these reflections are static and not "real", e.g. the player
<div>
<div>
<p>
<p>
You provide the texture in two or three resolutions to be stored in one file (MIP = "multum in parvo" = "many in one"). Depending on how close (or far) the camera is, the engine automatically renders a more (or less) detailed texture for the object. Thus objects look smooth from close up, but don't waste resources with unspottable details when far away. Good for everything, but requires more time to create and more space to store textures.
You provide the texture in two or three resolutions to be stored in one file (MIP = "multum in parvo" = "many in one"). Depending on how close (or far) the camera is, the engine automatically renders a more (or less) detailed texture for the object. Thus objects look smooth from close up, but don't waste resources with unspottable details when far away. Good for everything, but requires more time to create and more space to store textures.
</p>
</p>
</div>
</div>
@ -414,10 +448,16 @@ You provide the texture in two or three resolutions to be stored in one file (MI
<div>
<div>
<p>
<p>
A procedural texture is generated from repeating one small image, plus some pseudo-random, gradient variations (Perlin noise). Procedural textures look more natural than static rectangular textures, for instance, they look less distorted on spheres. On big meshes, their repetitiveness is much less noticable than tiled seamless textures. Procedural textures are ideal for irregular large-area textures like grass, soil, rock, rust, and walls. See also: <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://jmonkeyengine.org/wiki/doku.php/jme3:jmonkeyplatform:neotexture"><paramname="text"value="<html><u>jMonkeyPlatform NeoTexture plugin</u></html>"><paramname="textColor"value="blue"></object>
A procedural texture is generated from repeating one small image, plus some pseudo-random, gradient variations (Perlin noise). Procedural textures look more natural than static rectangular textures, for instance, they look less distorted on spheres. On big meshes, their repetitiveness is much less noticable than tiled seamless textures. Procedural textures are ideal for irregular large-area textures like grass, soil, rock, rust, and walls. See also: <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://jmonkeyengine.org/wiki/doku.php/jme3:jmonkeyplatform:neotexture"><paramname="text"value="<html><u>jMonkeyPlatform NeoTexture plugin</u></html>"><paramname="textColor"value="blue"></object>
</p>
<p>
<imgsrc="/wiki/lib/exe/fetch.php">
<imgsrc="/wiki/lib/exe/fetch.php">
See also: <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.blender.org/education-help/tutorials/materials/"><paramname="text"value="<html><u>Creating Materials in Blender</u></html>"><paramname="textColor"value="blue"></object>, <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Every_Material_Known_to_Man"><paramname="text"value="<html><u>Blender: Every Material Known to Man</u></html>"><paramname="textColor"value="blue"></object>
</p>
<p>
See also: <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.blender.org/education-help/tutorials/materials/"><paramname="text"value="<html><u>Creating Materials in Blender</u></html>"><paramname="textColor"value="blue"></object>, <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Every_Material_Known_to_Man"><paramname="text"value="<html><u>Blender: Every Material Known to Man</u></html>"><paramname="textColor"value="blue"></object>
</p>
</p>
</div>
</div>
@ -426,9 +466,9 @@ See also: <object classid="java:org.netbeans.modules.javahelp.BrowserDisplayer">
<div>
<div>
<p>
<p>
In 3D games, Skeletal Animation is used for animated characters, but in principle the skeleton approach can be extended to any 3D mesh (for example, an opening crate's hinge can be considered a joint).
In 3D games, Skeletal Animation is used for animated characters, but in principle the skeleton approach can be extended to any 3D mesh (for example, an opening crate's hinge can be considered a joint).
Unless you animate a 3D cartoon, realism of animated characters is generally a problem: Movement can look alien-like mechanical or broken, the character appears hollow, or as if floating. Professional game designers invest a lot of effort to make characters animate in a natural way (including motion capturing).
Unless you animate a 3D cartoon, realism of animated characters is generally a problem: Movement can look alien-like mechanical or broken, the character appears hollow, or as if floating. Professional game designers invest a lot of effort to make characters animate in a natural way (including motion capturing).
</p>
</p>
</div>
</div>
@ -437,8 +477,15 @@ Unless you animate a 3D cartoon, realism of animated characters is generally a p
<div>
<div>
<p>
<p>
<imgsrc="/wiki/lib/exe/fetch.php">
<imgsrc="/wiki/lib/exe/fetch.php">
</p>
<p>
An animated character has an armature: An internal skeleton (Bones) and an external surface (Skin). The Skin is the visible outside of the character and it includes clothing. The Bones are not visible and are used to interpolate (calculate) the morphing steps of the skin.
An animated character has an armature: An internal skeleton (Bones) and an external surface (Skin). The Skin is the visible outside of the character and it includes clothing. The Bones are not visible and are used to interpolate (calculate) the morphing steps of the skin.
</p>
<p>
JME3, the game engine, only loads and plays your recorded animations. You must use a tool (such as Blender) to set up (rig, skin, and animate) a character.
JME3, the game engine, only loads and plays your recorded animations. You must use a tool (such as Blender) to set up (rig, skin, and animate) a character.
</p>
</p>
<ol>
<ol>
@ -494,7 +541,6 @@ E.g. when the thigh bone moves, the leg is fully affected, the hips joints less
<p>
<p>
In the JME3 application, you register animated models to the Animation Controller. The controller object gives you access to the available animation sequences. The controller has several channels, each channels can run one animation sequence at a time. To run several sequences, you create several channels, and run them in parallel.
In the JME3 application, you register animated models to the Animation Controller. The controller object gives you access to the available animation sequences. The controller has several channels, each channels can run one animation sequence at a time. To run several sequences, you create several channels, and run them in parallel.
</p>
</p>
</div>
</div>
@ -514,8 +560,8 @@ Non-player (computer-controlled) characters (NPCs) are only fun in a game if the
The domain of artificial intelligence deals, among other things, with:
The domain of artificial intelligence deals, among other things, with:
</p>
</p>
<ul>
<ul>
<li><div><strong>Knowledge</strong> – An agent only "knows" what it can"see and hear", this implies that information can be hidden from it (to keep the game fair). You can let some agents share knowledge and let others find out by themselves. <br/>
<li><div><strong>Knowledge</strong> – Knowledge is about the data to which the agent has access to base its decisions on. Realistic agents only "know" what they"see and hear", this implies that information can be hidden from them (to keep the game fair). You can let some agents share information and others need to find out by themselves. <br/>
Example: All guards with two-way radios know the player's position within 60 sec, while other guards don't know anything yet.</div>
Example: After tripping the wire, all guards with two-way radios start moving towards the player's position within 60 sec, while minor guards don't suspect anything yet.</div>
</li>
</li>
<li><div><strong>Goal Planning</strong> – Planning is about how the agent <em>takes action</em>. Each game agent has the priority to achieve a specific goal, to reach a future state. You split the agent's goal into subgoals, then the agent chooses from available tactics and strategies, and prioritizes them. The agent keeps testing whether the current state is closer to the (sub)goal. If unsuccessful, the agent changes the tactics/strategy and tries again. <br/>
<li><div><strong>Goal Planning</strong> – Planning is about how the agent <em>takes action</em>. Each game agent has the priority to achieve a specific goal, to reach a future state. You split the agent's goal into subgoals, then the agent chooses from available tactics and strategies, and prioritizes them. The agent keeps testing whether the current state is closer to the (sub)goal. If unsuccessful, the agent changes the tactics/strategy and tries again. <br/>
Example: An agent searches the best path to reach the player base in a changing environment; an agent chases the player with the goal of eliminating him; an agent hides from the player with the goal of murdering a VIP. </div>
Example: An agent searches the best path to reach the player base in a changing environment; an agent chases the player with the goal of eliminating him; an agent hides from the player with the goal of murdering a VIP. </div>
@ -8,7 +8,7 @@ JMonkeyPlatform imports models from your project and stores them in the assets f
</p>
</p>
<p>
<p>
Presently, <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.blender.org/"><paramname="text"value="<html><u>Blender 3D</u></html>"><paramname="textColor"value="blue"></object> is the preferred modelling tool for jME3 as it is also Open-Source Software and an exporter for OgreXML files exists. Note that the OgreXML exporter is not yet compatible with Blender 2.5alpha!
Presently, <objectclassid="java:org.netbeans.modules.javahelp.BrowserDisplayer"><paramname="content"value="http://www.blender.org/"><paramname="text"value="<html><u>Blender 3D</u></html>"><paramname="textColor"value="blue"></object> is the preferred modelling tool for jME3 as it is also Open-Source Software and an exporter for OgreXML files exists. Note that the OgreXML exporter is not compatible with Blender 2.49 or before!