Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I’m a new jmonkey engine developer and I’m beginning to import models. I tried to import simple models and no problems appeared, but when I export some obj models having more than one mesh in the OgreXML format, Blender saves multiple meshes with their own materials (e.g. one mesh for face, another for body etc). Can I export all the meshes in one? I’ve tried to join all the meshes to a major one with blender (face joins body), but when I export the model and then create the Spatial in jme(loading the path of the “merged” mesh), all the meshes that are joined to the major doesn’t have their materials!

I give a more clear example:

I have an .obj model with 3 meshes and I export it. I have :

mesh1.mesh.xml , mesh2.mesh.xml , mesh3.mesh.xml and their materials

mesh1.material, mesh2.material mesh3.material

so I import the folder in Assets/Models/Test and now I have to create something like:

Spatial head = assetManager.loadModel( [path] ); 
Spatial face = assetManager.loadModel( [path] )

one for each mesh and than attach them to a common node. I think there is a way to merge those mesh maintaining their materials! What do you think? Thanks

share|improve this question
add comment

1 Answer 1

you can import this blender model file directly into the jmonkeyengine sdk-- it will convert the blend file to a j3o. when loading the model into jme during runtime, the node or spatial will have the children attached.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.