Tutorial 7 - HelloAnimation


I’m completely new to jMonkey and will be working with the engine for a summer project.

My problem is that I cannot locate the files “Models/Oto/Oto.mesh.xml” and “Models/Oto/Oto.skeleton.xml” as the exercises of this tutorial require. (Although I know they are part of the test-data library, I do not know how to access the files)

This is probably something very simple but my java skills are a bit wobbly.

Everything works now, I simply didn’t know that you had to add the jMonkeyEngine SDK Nightly update center in the Plugins Settings tab. >_<

Also, I find the the tutorial to be really nice and this is coming from somebody who never touched anything related to graphics before. There are some things which are left to figure out by myself, but even if I can’t figure it out, it simply encourages me to interact with the community.

I’ll be going over most of the documentation and I will try to give constructive feedback. Anyways, I will likely have many more questions as I start working on my project. (an MMO research platform currently running on jMonkey 2 which I’ll transfer to jMonkey 3)

1 Like
  1. select your project, expand it(the plus sign at the left of the name)
  2. right click on the “Libraries” and select “Add Library”
  3. select “jme3-test-data” from the list and click “Add Library”
  4. there is no 4th step, you are done :smiley:

Oh, I knew how to do that.

My problem is that I want to look at the actual structure of the .xml file but I do not know how to open that file specifically.

you can unzip the jme3testdata.jar using 7zip and then you can open “…Models/Oto/Oto.mesh.xml” and “…Models/Oto/Oto.skeleton.xml” using Notepad or any text editing software.

You can read Ogre documentation for understanding the xml file structure.

1 Like


I figure I might as well reuse the same thread:

In Tutorial 8 - HelloPickup, it is stated that we can do the following:

    Create an inventory node to store the detached nodes.
    The inventory node is not attached to the rootNode.
    You can make the inventory visible by attaching the inventory node to the guiNode

But since it is Geometries that are attached to the inventory node, I do not get how attaching the inventory node to the guinode is suppose to make the inventory "visible". In my case, it does nothing.

I could create an overlay text stating the name of the node I just picked, but I don't think that is what the exercise means.

well, there is a-little-insufficient-info if you follow it word by word.

Things will get clearer if you read the Head-Up Display (HUD) Tutorial

You can attach a geometry on GUI node, but you also have to attach a light to make it visible.

1 Like
iamcreasy said:
you can unzip the jme3testdata.jar using 7zip and then you can open “..Models/Oto/Oto.mesh.xml” and “..Models/Oto/Oto.skeleton.xml” using Notepad or any text editing software.

You can read Ogre documentation for understanding the xml file structure.

You can also just Open the Library node of your Application, select the assets you want to copy in the jar file and press Ctrl-C, then go to your Project Assets node and paste them with Ctrl-V.
1 Like

@normen I tried it by right clicking, thought, if it was possible it should have been in the context menu :stuck_out_tongue:

1 Like

You never stop learning ^^

1 Like

Thanks again! This is immensely helpful.

May I suggest the following statements are added to the tutorial:

It is technically possible to attach Quads and 3D Geometries to the HUD. They show up as flat, static GUI elements. Note that if you use a lit Material, you must add a light to the guiNode. Also remember that size units are pixels in the HUD (a 2-wu cube is displayed 2 pixels wide).

When positioning text and images in 2D, the bottom left corner of the screen is (0f,0f), and the top right corner is at (settings.getWidth(),settings.getHeight()).

I’ll continue using this thread if I have further questions.

You can do this edit by yourself by clicking of the wiki menu at the top of a page, then click “Edit this page”. :stuck_out_tongue:

I am waiting for someone editing the GUI pages for Nifty 1.3 :cry:

Another question! Concerning Tutorial 9 - Hello Collision

The wiki and the tutorial state that we should use the camera flyCam for a first person view.

But in this tutorial, the only time we touch flyCam is when we set the speed : flyCam.setMoveSpeed(100f);

But, the camera that we actually modify in the simpleUpdate loop is the regular cam: cam.setLocation(player.getPhysicsLocation());

How come? Shoudn’t we modify the position of flyCam? Because right now, changing the move speed of flyCam doesn’t change anything at runtime.

Maybe I simply don’t quite get the distinction between cam and flyCam. Which camera reflects what we actually see on screen?

EDIT: From what I now get, the flyCam is simply a set of controls for the general cam. I still don’t get the utility of the setMoveSpeed function in the given context.

missingno said:
EDIT: From what I now get, the flyCam is simply a set of controls for the general cam. I still don't get the utility of the setMoveSpeed function in the given context.

That's it, flyCam is not really a camera, it's a camera controller. The real camera is the cam object initialized for you in the SimpleApplication.

the setMoveSpeed, just set how fast the flyam will move the camera when you press the move keys.

Maybe it has no effect here because, the location of the cam is overrided in the testCase update by the physic location of the player.

Another question! Concerning Tutorial 11 – Hello Audio

It appears the given code does not work with the current engine.

The statement: audio_gun = new AudioNode(audioRenderer, assetManager, “Sound/Effects/Gun.wav”); is not recognize as a valid constructor.

Also, the method “.play()” is used in the code but does not exist in the AudioNode object. (I went to the AudioNode source code and couldn’t find the method)

Any simple fix to these problems?

it works for me, but I have jme3 updated to the latest svn, try updating…

on another note:

also, it triggers an assert (the second time I press LMB)

[java]assert src.getStatus() == Status.Stopped || src.getChannel() == -1;[/java]

Caused by: java.lang.AssertionError
at com.jme3.audio.lwjgl.LwjglAudioRenderer.playSource(LwjglAudioRenderer.java:843)
at com.jme3.audio.AudioNode.play(AudioNode.java:164)
at org.jme3.tests.HelloAudio2$1.play_aroundBody4(HelloAudio2.java:165)
at org.jme3.tests.HelloAudio2$1$AjcClosure5.run(HelloAudio2.java:1)
at org.aspectj.ExceptionsHandling.ThrowWrapper.ajc$around$org_aspectj_ExceptionsHandling_ThrowWrapper$1$495fa4ebproceed(ThrowWrapper.aj:1)
at org.aspectj.ExceptionsHandling.ThrowWrapper.ajc$around$org_aspectj_ExceptionsHandling_ThrowWrapper$1$495fa4eb(ThrowWrapper.aj:281)
... 11 more

EDIT: regarding your next post(below this one) I don't know, I don't use JMP, I use eclipse xD I leave someone else to reply that one

I’ve been trying to fix this problem, but without the .play() method, I do not know how to generate continuous sound.

Also, and pardon my inexperience, but how do you update to the latest SVN? I only know how to use the “check for updates” tool and the jMonkeyPlatform tells me that it is up-to-date.

Also, could anyone tell me what the “nightly builds” are and what is their utility?

Anyone? Tutorial 11 is the only one with a non-compiling source code.

maybe try removing the “audioRenderer,” first parameter from the AudioNode constructor? that is, if you couldn’t update

also use play_Source() instead of play()

or maybe this post can help you update to latest nightly build? http://hub.jmonkeyengine.org/groups/general-2/forum/topic/jme3test-not-working/#post-126609