3ds max or maya with jmonkey troubles

Hello everyone I am new here. I have just begun using jmonkey 3 like a month ago. I read most of the docs available which were very helpful in terms of programming!



The problem I am having here is the use of 3ds max or maya with jmonkeyengine (in particular 3ds max). I want to get models with animation into the engine, but can’t seem to figure out how. I have searched google for the past 3 days and spent countless hours looking for an answer i have not yet found so I turn to you guys. I’ll describe everything i encountered incase someone else stumbles on this with the same problems.



Basically I understand jmonkey’s main support for 3d modeling goes out to blender. Blender has the OgreXML exporter plugin which can export the model, materials, and animation in the correct xml format. Also, Jmonkeyplatform comes with an available install for OgreXML under the tools dropdown.



This is everything I have learned and tried with getting 3ds max to work with jmonkey

-you can export a 3ds file and import it into blender, then export as mesh.xml… the problem with this is that .3ds does not support animation.

-you can export to .obj and put it directly into the engine… but again .obj does not support animation

-there is also another format .dae COLLADA. I read that it saves model and animation. The problem I encountered with this format was that when I tried to import it into blender, if I used COLLADA 1.3.1, no model would get imported… and if I used COLLADA 1.4, it would give me some kind of script error.

-another thing I tried was to get the ogremax exporter for 3ds max ( http://www.ogremax.com/downloads ). The problem with this was that i would create a .mesh ( actually for some reason files were saved with 2 periods such as test…mesh ) file instead of a .mesh.xml. I then found the OgreCommandLineTools ( http://www.ogre3d.org/download/tools ), which contains with OgreXmlConverter in the package. I ran the exe from command promt, and put the file in the same directory as the exe. I used this command to run it: OgreXMLConverter ogretest.mesh and here is the output: basically it didn’t work



[java]



C:OgreCommandLineTools>OgreXMLConverter ogretest.mesh



– OPTIONS –

source file = ogretest.mesh

destination file = ogretest.mesh.xml

log file = OgreXMLConverter.log

interactive mode = false

lod levels = none (or use existing)

Generate edge lists = 1

Generate tangents = 0

semantic = TANGENT

parity = 0

split mirror = 0

split rotated = 0

Reorganise vertex buffers = 1

Optimise animations = 1

– END OPTIONS –



Creating resource group General

Creating resource group Internal

Creating resource group Autodetect

Registering ResourceManager for type Mesh

Registering ResourceManager for type Material

Registering ResourceManager for type Skeleton

Exception caught: Cannot find serializer implementation for current version [Mes

hSerializer_v1.41]Unregistering ResourceManager for type Skeleton

Unregistering ResourceManager for type Material

Unregistering ResourceManager for type Mesh



[/java]


  • I also read people talking about using .FBX format (which saves the model and animations) but Blender originally can’t import it and I couldn’t find any importer plugins for it.





    Please help guys because the only choice I have so far is to model in 3ds max and animate in blender. Also if there is an easier way to import models with animation from maya, please let me know.



    btw, i used 3ds max 2010 and blender 2.49b

So it fails? That’s rather strange, maybe the version you’re using is outdated?

I just got everything so everything should be new, except for my python… I think I installed 2.6 so that it would work with the latest version of blender.



I think I have found a solution. I’m testing it out right now to see if everything works like it should. Ill post it as soon as I get everything to work.

jMP supports direct conversion and importing of .mesh files (latest nightly).

In 3dsmax go in orgre exportet to secen settings (or similar) there check export xml and uncheck export binary (and while you are at it you may want to check generate tangent binominals for the light shaders)

normen said:
jMP supports direct conversion and importing of .mesh files (latest nightly).


wow wish I knew that before haha, thanks for the info!

EmpirePhoenix said:
In 3dsmax go in orgre exportet to secen settings (or similar) there check export xml and uncheck export binary (and while you are at it you may want to check generate tangent binominals for the light shaders)


Are you talking about the ogremax exporter?



Here is what my SOLUTION is:

-You actually have to get the ogre3d source ( http://www.ogre3d.org/download/source )

-go to the ogre source folder and go into the "Tools" folder. You should see another folder called "3dsmaxExport".

-in "3dsmaxExport" continue onto the folder "MaxscriptExport". There will be an "install" readme, but I will write out what i did anyway.

-In the scripts folder, you should see the folders "ogre" and "startup". Throw them into the the 3ds max's scripts folder.

-next take the IPhysique_3dsmaxX.gup file from the plugins and throw that into 3ds max's plugins folder. So if you have 3ds max 9, throw the "IPhysique_3dsmax9.gup" file. I have 3ds max 2010 and I used "IPhysique_3dsmax9.gup" since that was the latest one.

-open Open your 3DSMAX and run MAXScript. (choose MAXScript/Run Script...)

-Go to folder 3DSMAXscriptsorgemacros and run "ogreToolbar.mcr"

-After you run the "ogreToolbar.mcr" there is nothing appears on screen yet.
You just need to go to /Customize/Customize User Interface...
Choose Ogre Tools from Category.

-next under the keyboard tab, I assigned it to number pad 1 since this was one of the few keys unassigned... You can set it to whatever you want.

-now just save it

-press the key you assigned and you should get a whole panel with options for export YAY!

yes I talk about ogremax

Hi all,



I’m introducing in jMonkey world, and here is my first unsolved problem:



I need to load an object made in 3d max 2009 (11Mb + 26 textures), so I exported it to “.obj + .mtl” and then to .mesh.xml with ogre scripts, but jmonkey does not load correctly.

Spatial village= assetManager.loadModel(“Models/village/v26.mesh.xml”);



I exported directly .max to .mesh.xml, but the result is the same.



Is it a question of size? because there’s no problem with a simple object (for example, a cube with 6 textures)



I’m using the ogremax exporter (http://www.ogre3d.org/download/source > Tools > 3dsmaxExport > MaxscriptExport) and follow the instructions (just like yura said), but it doesn’t work.



It’s not the appropiate script? Do I have use another?



I tried it too by other way: to export .max to .mesh, but i don’t know how to read .mesh from jmonkey, and i don’t know how can i transform .mesh to .mesh.xml



Anyone can helps me?

Can you upload the model somewhere ? maybee we will find out what the problem is

What is the issue exactly? Does the model display incorrectly? Also, you said you exported to OBJ, does that have the issue as well?

Please upload the mesh.xml, skeleton.xml (if available) and .material files for the model with the issue.

alexom said:
Hi all,

I'm introducing in jMonkey world, and here is my first unsolved problem:

I need to load an object made in 3d max 2009 (11Mb + 26 textures), so I exported it to ".obj + .mtl" and then to .mesh.xml with ogre scripts, but jmonkey does not load correctly.
Spatial village= assetManager.loadModel("Models/village/v26.mesh.xml");

I exported directly .max to .mesh.xml, but the result is the same.

Is it a question of size? because there's no problem with a simple object (for example, a cube with 6 textures)

I'm using the ogremax exporter (http://www.ogre3d.org/download/source > Tools > 3dsmaxExport > MaxscriptExport) and follow the instructions (just like yura said), but it doesn't work.

It's not the appropiate script? Do I have use another?

I tried it too by other way: to export .max to .mesh, but i don't know how to read .mesh from jmonkey, and i don't know how can i transform .mesh to .mesh.xml

Anyone can helps me?


alexom, just a little side note... if you were using my way, you don't have to export to .obj to get a .mesh.xml file. If your exporter is working, you should be able to directly export to .mesh.xml.

and about the model loading problem I think I might have the same one. What exactly happens when you try to load it? Does it just completely not load or does it load but looks strange or wrong scale?

Thanks for your prompt responds! I fixed the problem thanks to that. I was preparing a file to upload and tested it another time more, and it worked!



I write how I load the file, maybe helps someone:

I load the 26.max file in 3dStudio and export it to 26.obj (+26.mtl) (really, i have to export to .obj) Important: when import to obj, select the check “import like a single mesh”, because when i run the script (to transform to mesh.xml), it select the mesh of the complete .obj.

If i don’t do this (“import like a single mesh”), when the script only select the mesh of a part of the .obj file (for example, the first object is called Box01)



Then I import the 26.obj file and run the script , and once it finish the export, I have directly the 26.mesh.xml and 26.material files.



Now, I can load these files in jMonkey (with their correspondig textures, they appears in 26.material), and it works.



Well, I don’t know if it’s the correct way, but it works for me.



Thanks to all