TestMilkJmeWrite problem

Hi,



I wanted to know if it is possible that I include the run.ms3d file in my game and let the user control any part of the body of this model provided in this ms3d file ?

If yes, please guide me as to how could I do it and what all I need to learn before I am able to do it.



Also, In the sample provided to convert milkshape files to jme, I replaced the run.ms3d file with a sample file provided in Milkshape 3D.

It is a simple stick figure without any animation. When the program was run, the model failed to load, and the following error was generated : (Please let me know how to rectify this)





16 Jan, 2008 11:19:43 PM jmetest.TestChooser start

INFO: Composing Test list…

16 Jan, 2008 11:19:44 PM jmetest.TestChooser find

INFO: Searching for Demo classes in "jmetest".

16 Jan, 2008 11:19:47 PM com.jme.scene.Node <init>

INFO: Node created.

16 Jan, 2008 11:20:28 PM com.jme.app.BaseGame start

INFO: Application started.

16 Jan, 2008 11:20:28 PM com.jme.system.PropertiesIO <init>

INFO: PropertiesIO created

16 Jan, 2008 11:20:28 PM com.jme.system.PropertiesIO load

INFO: Read properties

16 Jan, 2008 11:20:28 PM com.jme.app.BaseSimpleGame initSystem

INFO: jME version 1.0

16 Jan, 2008 11:20:28 PM com.jme.input.joystick.DummyJoystickInput <init>

INFO: Joystick support is disabled

16 Jan, 2008 11:20:28 PM com.jme.system.lwjgl.LWJGLDisplaySystem <init>

INFO: LWJGL Display System created.

16 Jan, 2008 11:20:30 PM com.jme.renderer.lwjgl.LWJGLRenderer <init>

INFO: LWJGLRenderer created. W:  640H: 480

16 Jan, 2008 11:20:31 PM com.jme.app.BaseSimpleGame initSystem

INFO: Running on: vga

Driver version: null

NVIDIA Corporation - GeForce Go 7400/PCI/SSE2 - 2.1.0

16 Jan, 2008 11:20:31 PM com.jme.renderer.AbstractCamera <init>

INFO: Camera created.

16 Jan, 2008 11:20:31 PM com.jme.util.lwjgl.LWJGLTimer <init>

INFO: Timer resolution: 1000 ticks per second

16 Jan, 2008 11:20:31 PM com.jme.scene.Node <init>

INFO: Node created.

16 Jan, 2008 11:20:31 PM com.jme.scene.Node <init>

INFO: Node created.

16 Jan, 2008 11:20:31 PM com.jme.scene.Node attachChild

INFO: Child (FPS label) attached to this node (FPS node)

16 Jan, 2008 11:20:31 PM com.jme.scene.Node <init>

INFO: Node created.

16 Jan, 2008 11:20:32 PM com.jme.scene.Node <init>

INFO: Node created.

16 Jan, 2008 11:20:32 PM class jmetest.renderer.loader.TestMilkJmeWrite start()

SEVERE: Exception in game loop

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

        at java.util.ArrayList.RangeCheck(ArrayList.java:547)

        at java.util.ArrayList.get(ArrayList.java:322)

        at com.jmex.model.animation.JointController.processController(Unknown Source)

        at com.jmex.model.animation.JointController.read(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.readObject(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.resolveIDs(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.readSavableArray(Unknown Source)

        at com.jme.util.export.binary.BinaryInputCapsule.readSavableArrayList(Unknown Source)

        at com.jme.scene.Spatial.read(Unknown Source)

        at com.jme.scene.Node.read(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.readObject(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.load(Unknown Source)

        at com.jme.util.export.binary.BinaryImporter.load(Unknown Source)

        at jmetest.renderer.loader.TestMilkJmeWrite.simpleInitGame(Unknown Source)

        at com.jme.app.BaseSimpleGame.initGame(Unknown Source)

        at com.jme.app.BaseGame.start(Unknown Source)

        at jmetest.renderer.loader.TestMilkJmeWrite.main(Unknown Source)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at jmetest.TestChooser.start(Unknown Source)

        at jmetest.TestChooser.main(Unknown Source)

16 Jan, 2008 11:20:32 PM com.jme.app.BaseSimpleGame cleanup

INFO: Cleaning up resources.

16 Jan, 2008 11:20:32 PM class jmetest.TestChooser start(args)

SEVERE: Exception

java.lang.reflect.InvocationTargetException

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

        at java.lang.reflect.Method.invoke(Method.java:597)

        at jmetest.TestChooser.start(Unknown Source)

        at jmetest.TestChooser.main(Unknown Source)

Caused by: java.lang.NullPointerException

        at com.jme.renderer.lwjgl.LWJGLRenderer.cleanup(Unknown Source)

        at com.jme.app.BaseSimpleGame.cleanup(Unknown Source)

        at com.jme.app.BaseGame.start(Unknown Source)

        at jmetest.renderer.loader.TestMilkJmeWrite.main(Unknown Source)

        … 6 more





Thank you

MilkShape to Jme



I had the same problem and I saw that the problem is in the joins because if I take out the joins in my model it can be loaded without problems, but then the joins generate the problem.



Somebody knows how resolve this??



The problem could be the version of MilkShape or what??

Check if you have any rogue vertices which are not assigned to bones.

If you have bones at all, then all vertices must be assigned to a bone.

If I put an animation, the problem is solved, so maybe to import a model we need at least 2 frames (of animation).



is this true??

yes it does also seem to crash if you do have bones but don't have keyframes.