Frequently Asked Questions

Q. What is jME?

A. jME (jMonkey Engine) is a high performance scene graph based OpenGL graphics API. See the homepage for a complete description.

Q. I wanna make a cool game, but I have no clue: How do I get started?

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...

Q. Why do I get GL errors when I run programs using jME?

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.

Q. I don't get it. I created an account, logged in, but it won't let me into CVS. What's wrong?

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.

Q. What is a scene graph?

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.

Q. I can't turn off lighting on part of my scene!

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.

Q. I can't seem to set the color of my scene objects. Why is that?

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.

Q. I can't seem to set the MaterialState of my object. The object is just white! Why?

A. Similar to above (color not working), MaterialState requires that lighting be used. Add a LightState to your scene.

Q. When using Render to Texture, I get a lot of artifacts on the edges of the generated texture.

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.

Q. I just got an error telling me it can't find my properties.cfg file. What does this mean?

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.

Q. It's broken! All I get is this error: "java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path"

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.

Q. How do I use these Quaternion things? And do they allow me to position items so they are "looking at" other things?

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.

Q. What does <some term> mean?

A. See our Terms List for a list of definitions.

Q. There's something wrong with the texture I set for my scene object. It's look messed up or like it's using another texture from the scene. What's going wrong?

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

Q. My programs and the website demos and tests seems to run fine, however after running for a few seconds they unexpectedly quit.

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.

Q. Why is my JMECanvas flickering when it repaints?

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'.

Q. My menus appear to be drawn behind the JMECanvas

A. Call JPopupMenu.setDefaultLightWeightPopupEnabled(false); before creating any swing components.

Q. Where is the origin of the Scene ?

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).

Q. Why are the X and Z co-ordinates reversed ?

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));

Q. Where is the origin for Ortho (GUI Rendering) ?

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

Q. Where is the origin for textures ?

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.

Q. Why is the texture for the MultiFaceBox divided into 8 squares ?

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

Q. What does the error "no lwjgl in java.library.path" mean ?

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!


/var/www/wiki/data/pages/the_faq.txt · Last modified: 2009/12/07 18:43 by attila  
Recent changes · Show pagesource · Login

Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki

subscribe to jME latest jme headlines


site design by bleedcrimson designs © 2008