Accessing Model Components? HOWTO with Blender and exporting to jME

Hi,

I am using blender to model a car and later on I want to load that model into jME2. Like in the Flag-Rush Tutorials I would like to get access to certain parts of my vehicle. And here is my Question:



[glow=yellow,1,1]What do I need to do in blender and what export-format do I need to use for accessing the model's components later on in jME2?[/glow]





In the Flag-Rush Tutorials you can access the wheels of the bike with the following method and I would like to do the same:


        backwheel = ((Node)model).getChild("backwheel");
        frontwheel = ((Node)model).getChild("frontwheel");



If that problem has already been discussed in the forum, please tell me where. I have opened a new thread, because I couldn't find any answer to my problem.

Not sure, but i think this tutorial mentions how to name nested objects:

http://www.jmonkeyengine.com/wiki/doku.php/hottbj_integ_tutorial


In general, the hottbj tutorials are great for blender->jme integration
Xerxes01 said:

Hi,
I am using blender to model a car and later on I want to load that model into jME2. Like in the Flag-Rush Tutorials I would like to get access to certain parts of my vehicle. And here is my Question:

[glow=yellow,1,1]What do I need to do in blender and what export-format do I need to use for accessing the model's components later on in jME2?[/glow]


In the Flag-Rush Tutorials you can access the wheels of the bike with the following method and I would like to do the same:

        backwheel = ((Node)model).getChild("backwheel");
        frontwheel = ((Node)model).getChild("frontwheel");



If that problem has already been discussed in the forum, please tell me where. I have opened a new thread, because I couldn't find any answer to my problem.


I recommend the Node.descendantMatches() methods as a more powerful and type-safe alternative to .getChild().

There are tons of ways to find the "names" of Spatials in your scene.  If you can write 7 lines of Java code, you can write a recursive method and invoke it on your rootNode.  You can use SHIFT+F8 with my Modeler to display a tree that shows the nesting of the Spatials.  SceneMonitor and other utilities have similar functionality.  You can also view model files.  If you use HottBJ you will have very well formed XML and you can look at it with a good XML editor or viewer like vim or Firefox.  For the last, just beware that if your model file is very large (in terms of text files, they often are), your editor/viewer will need to efficiently handle very large files.