A. jME (jMonkey Engine) is a high performance scene graph based OpenGL graphics API. See the homepage for a complete description.
A.
1) Learn Java.
2) Get to know jME, install the engine and set it up (getting_started)
3) Go through the eight short beginner tutorials in the folder jmephysics/tutorial/ of your installation.
4) Next, go through the Hello World tutorials (learning_jme) for more advanced features.
5) Notice how when you run the jME project, it opens a TestChooser with demos? Look at the demos and determine what you want to do in your game. Then go to the jme/src/jmetest/ directory and have a look at the source code to learn how it's done.
6) Add one small feature at a time, then build and run to see whether it works before you add the next. More...
A. Outdated drivers for you rgraphics card is the main problem that causes GL errors. Try to get an updated driver from your graphics card manufacturer. If you use a notebook, you may have to get it from your notebook manufacturer. For ATI cards such as the Radeon go to http://www.ati.com/. For nvidia cards such as a GeForce FX go to http://www.nvidia.com/. If updating your driver dose not work, feel free to post the problem on the forum.
A. There are actually three log-ins associated with jME. First, the main page log-in. This will allow you to post news if you wish, monitor the page with more features, etc. Second, the forum. This log-in will allow you to see new posts, keep a running record of your posts, etc. Lastly, is dev.java.net, this log-in (not controlled by us) will allow you to get into CVS.
A. A scene graph is a collection of 3d objects arranged in a tree where there is one object acting as a root and other objects are added to it. Additional objects may be added to these objects and so forth. See Scene Graph for a more detailed description.
A. Lights in jME are additive by default, in other words, they are gathered from the current point in the scene down the scene tree towards the root. If an object's parent has a lightstate with 2 lights and an object's grandparent has a lightstate with 1 light, the object will be lit by 3 lights. To change this default behavior, simply change the lightStateMode on the Object. To turn off lighting on the object, set the mode to OFF. See LightState for other options.
A. Is your lighting turned on? The color values are overridden when lighting is used. Therefore, if you must set the color of an object and use lighting, you should set a MaterialState rather than setting the color buffer. With the proper setting of MaterialState, CM_DIFFUSE, you can make use of your vertex colors with lighting.
A. Similar to above (color not working), MaterialState requires that lighting be used. Add a LightState to your scene.
A. On older cards that do not support Direct Render the rendering of the scene to a texture is a one to one ratio, so one pixel rendered to a scene is one pixel of the texture. If you created a texture that is larger than the resolution of the screne, you will get garbage in the areas that fall outside of the screen resolution. Make sure your render texture is smaller or equal to the screen resolution.
A. This actually isn't an error at all, just a warning. Although it does display a stacktrace from an exception (this will be removed in future versions), it is not a serious problem. It is simply jME letting you know that it could not find the properties file (which contains information about resolution), and it will create a new one. Just ignore it and move on.
A. You must point the JVM to the native library for LWJGL. On Windows this is LWJGL.dll, Linux LWJGL.so, Mac OS X LWJGL.jnilib. There are a number of ways to “point” the JVM here. First, put the native library in a system directory, add the lib's current directory to the PATH variable, or use the -Djava.library.path=[PATH TO LIB] JVM flag.
A. This topic requires its own page: To get the basic idea read about rotation, advanced details will be covered under Quaternion and Controlling Nodes.
A. See our Terms List for a list of definitions.
A. After setting a TextureState for a scene object (or any other RenderState), you must call updateRenderState() for the object. SimpleGame calls this method for you after you've initialized your scene (and only for object attached to rootNode), but in all other cases you'll have to call this yourself. See this guide
A. There is a bug in some versions of Sun's JDK/JRE related to JNI that prevents programs like jME from running correctly. This is confirmed for versions 1.4.2_06 and 1.4.2_07. Upgrading to the latest version of your prefered JDK or JRE should solve the problem.
A. This is due to a conflict between the DirectX rendering in Swing and the OpenGL rendering. The solution is to set the JVM flag '-Dsun.draw2d.noddraw=true'.
A. Call JPopupMenu.setDefaultLightWeightPopupEnabled(false); before creating any swing components.
A. Assuming you rotate the camera to point towards Negative Z.
The camera is on the origin the co-ordinate system will be as follows:
| Axis | Increases as things move |
|---|---|
| X | To the right. |
| Y | Up. |
| Z | Towards you |
Hence to see an object you will need to put it at negative Z
e.g.: (0, 0, -10).
A. You need to turn the camera round 180 degrees:
cam.setAxes(new Vector3f(-1f, 0, 0), new Vector3f(0, 1, 0), new Vector3f(0, 0, -1f));
A. The bottom left corner of the screen is the origin.
| Co-ordinate | Location |
|---|---|
| ( 0, 0) | Bottom Left |
| (screen_width, 0) | Bottom Right |
| ( 0, screen_height) | Top Left |
| (screen_width, screen_height) | Top Right |
A. The origin is in the bottom left, however textures co-ordinates are measured from (0,0) - (1,1)
| Co-ordinate | Location |
|---|---|
| (0, 0) | Bottom Left |
| (1, 0) | Bottom Right |
| (0, 1) | Top Left |
| (1, 1) | Top Right |
Note: The top right corner is always (1, 1) regardless of the size of the texture.
A. The height and width of a texture should be a power of 2 (4,8,16,32, …).
This is only possible, if the texture is divided into 8 equal squares, however only the first 6 are used to render the MultiFaceBox
A. This means that you haven't set up the path for the native libraries that accompany the jar files for lwjgl. See here for more details - no lwjgl in java.library.path
Got a new question? Hop on over to the forums and post it!