Where to find models in JmeTests

I am going through the beginner tutorials and in the animation tutorial I am asked to ‘right click your model and click “Edit in SceneComposer"’. The model in question is “Models/Oto/Oto.mesh.xml” but I can’t seem to be able to find this model anywhere in the libraries included with the project.
But I am assuming that it is there somewhere since a file like “Common/MatDefs/Misc/Unshaded.j3md” is found under the core jme library.
In “Project Assets/Models” there is only a “.keep” file so it’s not there.

1 Like

Oh, it was in test-data. But it’s not possible to open the xml file…

1 Like

What happens when you try to open the XML?

1 Like

I think the easiest way is to create a new test project instead of accessing the library.

I dont know if that solves it though, since XML isnt j3o, but what should definitely Work is rightclicking on convert to j3o

1 Like

I moved the files into “Project Assets/Models” and now it’s possible to open it as an xml text file. But the program can’t find those files on the classpath when I try to run it. Doesn’t the assetManager start from the project root and look into all subdirectories?

1 Like

It is starting from the Asset path, so in order to load it you must not prepend assets/ to the path.
In Addition to that you might miss the Textures and other things, i dont remember the Tutorial though, Maybe it needs adjustment

1 Like

You mean from the Asset path in the libraries? How is it then even possible to load a model from the Project Assets?

1 Like

No, whatever is in the Asset Folder both in libraries and in the project Asset path, but you must not have assets in your path String

1 Like

Ok, then “Models/Oto.mesh1.xml” or “Project/Models/Oto.mesh1.xml” should work? Renamed the files to make sure it isn’t picking the one in the library.

1 Like

The First One is correct and the Asset folders get merged, so renaming is good and you dont Need to specify Project assets

1 Like

But I keep getting AssetNotFoundException.

1 Like

This means you have more than one copy of the file so you are probably referencing the wrong file.

Drag all the files from the test-data/oto into a folder of your liking under the assets folder. Eventually you will learn that it should be in a textures folder, where you convert it to a .j3o file and then move the .j3o into the Models folder.

For more info on assets see,
https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_asset.html

1 Like

Next time show some code. It seems like half of this back-and-forth could have been eliminated instantly.

1 Like

Feels like this has gotten off-track. The title might be a bit confusing since I figured out my first question and asked a new question in the same thread… But anyhow, I simply had problems opening the xml file that is included in the jME3-testdata.jar that is in the beginner tutorials. I haven’t written any of my own code. I am just trying to follow the instructions given in the tutorial.

This is the tutorial: https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_animation.html and it says “This line of code will return NULL if the AnimeControl is not in the main node of your model. To check this, right click your model and click “Edit in SceneComposer You can then see the tree for the model.”

Now i found the model in jme-3-test-data/Models/Oto but when I try to edit it in SceneComposer or even open it as an xml file nothing happens because those options are grayed out. So that’s when I copied the files, renamed them ending with the 1 (to make sure the files in jme-3-test-data/Models/Oto don’t open instead) and moved them into Project Assets/Models/. That’s when I get AssetNotFoundException.

I don’t think I am doing anything crazy here since I am just following what works in the tutorials and then when that doesn’t work I do the reasonable thing and put the files in the folder that is meant for these files.

I am sorry if I come off as a douche here but I hope you can see why I am getting frustrated when the answers don’t answer these questions specifically and instead skirt around these issues.

1 Like

The problem is that the tutorial is clear and the model does work. You are doing something wrong.

Select the Oto.mesh.xml file, right click and try converting the model to .j3o and see if you get any errors.

1 Like

This is actually wrong though… It should say select View. Ill run through the tutorial and update it.

1 Like

Ok I have finished the update for
https://jmonkeyengine.github.io/wiki/jme3/beginner/hello_animation.html

I changed this,

control = player.getControl(AnimControl.class);

This line of code will return NULL if the AnimeControl is not in the main node of your model. To check this, right click your model and click “Edit in SceneComposer You can then see the tree for the model. You can then move everything to the main node. You can also access a subnode with the following code.

player.getChild("Subnode").getControl(AnimControl.class);

To this,

This line of code will return NULL if the AnimeControl is not in the main node of your model.

control = player.getControl(AnimControl.class);

To check this, RMB select your model and click “Edit in SceneComposer” if the models file extension is .j3o, or “View” if not. You can then see the tree for the model so you can locate the node the control resides in. You can access the subnode with the following code.

player.getChild("Subnode").getControl(AnimControl.class);
1 Like

Hey, thanks for the answers.
It seems this only happens when I try to open the files from the library because creating a new project and putting the files in the assets folder doesn’t create any problems.
Weird thing is that when I first opened a new project with JME3 Tests I got a Project Assets folder like in a normal project but now when I tried doing it again the same way, there is no Project Assets folder. Then of course it makes sense that you get AssetNotFoundException if that’s not supposed to be there in the project.

1 Like

Looks like some newbie who was annoyed by the fact that he got a “null” when trying to access an AnimControl (a typical beginner error) added these lines, not thinking about the fact that “right-clicking the model” is out of the context of the tutorial. If you use the code. model and setup in the tutorial it works and these lines are not needed.

1 Like

Uhh, AnimeControl, what??

1 Like