Newbie trouble with importing models

Complete beginner here to jME and 3D development. Was going through the tutorials initially before I ran into some issues. I like to do simple changes to make sure I grasp the material as I go along. Upon getting to the HelloAssets tutorial, I wanted to try and import a simple custom model instead of the ninja model from the provided library. This is where all my troubles began.



First, I scoured the net for some free models and picked a small variety, downloaded the latest Blender 2.63a, and installed the OgreXML import/export plugin. Before I go any further, I’ll state that I’ve tried many different versions of the OgreXML import/export plugin, as well as different Blender versions, and none of them seem to export without tossing an error my way. After banging my head on that route for a while, I decided to just try to convert .blend files into .j3o within jME, again to no avail. At first I was beginning to think that it was due to the models themselves, maybe there was something in their design that wasn’t complete or compatible and caused some problem with the attempts to export or convert them. So I tried to get alternative models and test them, only to have the same issues. Going back over the jME site again, frustrated, one page told me to try to click “Import Model”… although it’s disabled (greyed out) and I can’t attempt that. It seems that every method I try seems to have no luck in obtaining a viable model to use. It seems like it should be simple.



My background is mostly in programming as a hobby for years. I’ve plenty of 2D CAD experience, but never branched into 3D. That said, I’ve no experience with Blender whatsoever, so I’m unable to discern any issues in the models I’ve attempted to use. I’ve looked for other threads prior already but none seem to yield a working answer. Right now I just want to get a custom model displayed in the tutorial. Later on I expect to be able to animate eventually, but I can wait until I meet that bridge. Every guide I’ve read seems to require a certain knowledge working with Blender. Even the step by step guide http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Blender+to+Ogre falls short because the menu’s aren’t exactly as written in each step.



So to troubleshoot this:


  • What’s the expected version of Blender to be working with currently?
  • What’s the proper way to install the OgreXML plugin? Is there a specific updated version to download? Or do I install it via “Tools->OgreXML->Install Blender OgreXML”?
  • Could someone point me to a simple Blender model that they’ve successfully exported to OgreXML? This could direct me to get exporting working properly or see if the OgreXML plugin has an issue.
  • Should I skip introducing a custom model until I go through creating my own models from scratch?



    I understand I may be asking a lot as a beginner, but what seems to be simple is causing me a bit of problem.

You can download directly. Newest version supports blender 2.63. The old versions probably works too (usually the stuff that may be wrong in older versions are animation related).



http://code.google.com/p/blender2ogre/



There are no issues I’m aware off.

1 Like

I’ve yet to find a model to export successfully in Blender (or convert in jME) from any of the free online repositories. I found some low poly mannequin models I thought would fit for a quick test but they didn’t work. Eventually started downloading model after model randomly to see if I could land a single successful export to no avail.



If you’re positive the plugin and latest version of Blender are fine, could you point me to a working model or two that should export properly?

Best start looking for answers on this site instead of google. Without any concise description of “fails to import” theres few we can do I’m afraid. To use the model import tool (which is a good way to quickly check models for compatibility) you have to select a proejct to import to. Again, best check the built-in manual (F1 in the SDK as well as the search field top right) and this site and its wiki to get information.

1 Like

A lot of models you will find on the net aren’t game ready. I would first start from the basics and try to export the default cube from blender

1 Like

Also if you import and it works, but the lighting is messed up, you can generate new tangents from the editor. Just open the model in the editor and find the geometry in the explorer and right click. Its a tool there somewhere. Just make sure the mesh has normals and a uv map.

@normen said:
Best start looking for answers on this site instead of google. Without any concise description of "fails to import" theres few we can do I'm afraid. To use the model import tool (which is a good way to quickly check models for compatibility) you have to select a proejct to import to. Again, best check the built-in manual (F1 in the SDK as well as the search field top right) and this site and its wiki to get information.


I've mainly been looking between these forums/documentation and others related to Blender-to-OgreXML.

@wezrule said:
A lot of models you will find on the net aren't game ready. I would first start from the basics and try to export the default cube from blender

@androlo said:
Also if you import and it works, but the lighting is messed up, you can generate new tangents from the editor. Just open the model in the editor and find the geometry in the explorer and right click. Its a tool there somewhere. Just make sure the mesh has normals and a uv map.


From what I gather, the answers to my questions seem to all point me to giving this up until take the time to learn to do it myself. There are too many unknowns for me, I'd rather learn to do it right then go through this headache every time. I've always taught myself learn more as I go by making changes to guides and tutorials and seeing if I can get expected results. So while all the existing material makes it look like jME assets are as simple as "Export to OgreXML, convert/import in jME", it only applies to properly designed resources that fit a set of requirements beforehand. However, that still doesn't even touch on the export plugin errors.

I'll chalk this up to a task better saved for a later date when I learn to use Blender.

If it makes you feel any better I’ve had trouble getting the import to work properly a few times too. It does seem to be a bit sensitive/fiddly.

@lokanu said:
From what I gather, the answers to my questions seem to all point me to giving this up until take the time to learn to do it myself.

You gotta see it this way: If you just took some code with some api you would not expect it to work in your code either, it has to have the right api exposed to work in your system. Same with models. What you need is a properly setup game-ready model and the wiki explains what that means. From then its a breeze opening a model in blender and seeing if its a game compatible model or not, adapt it if necessary and then import it in the engine. Always just see model import as the import of a mesh and its UV coordinates and maybe assigning textures to different map types, everything else is just too special as 3d editors are not made for live rendering and allow many more options not suitable for games. So yes, you have to know what all this means (mesh, polys, uv maps etc. etc.), theres no way around that.
@androlo said:
You can download directly. Newest version supports blender 2.63. [..]
There are no issues I'm aware off.

What version is that exactly? In the downloads or via svn? I'd like to integrate a script in the SDK that definitely works (I think the current one worked for 2.5x but had issues with exporting textures in 2.6x).
@normen said:
What version is that exactly? In the downloads or via svn? I'd like to integrate a script in the SDK that definitely works (I think the current one worked for 2.5x but had issues with exporting textures in 2.6x).


He linked to 0.5.5 version of the plugin in his post. These are the versions I found while I was trying to troubleshoot my issue:

- 0.5.5
- 0.5.7 preview1 (from this thread)

From what I can gather, it seems this page suggests that Blender 2.49b is the latest stable version and work is being done for exporter plugins for 2.5 and later, however the content in it is a year old and Blender has since moved up to 2.63a as of this post. I haven't been able to find a clear cut answer as to which Blender and Blender2Ogre plugin are considered the most recent/stable. Although what I've found has led me to believe that 0.5.5 is the most recent stable plugin, and any 0.5.6/0.5.7 versions are simply previews of WIP for later update.

I'm not exactly sure which version jME installs if you install it via the menu (Tools->OgreXML->Install Blender OgreXML), so for now I'm assuming 0.5.5 from the above link is the suggested version.

Hi @normen:

blender2ogre 0.5.5 and 0.5.6-preview8 work fine with blender 2.62.

blender2ogre 0.5.7-preview1 works fine with blender2.63a.



Hi @lokanu:

Check this thread Importing animations from blender 2.62 using ogre xml: things to check if you are getting problems

2 Likes
@H said:
blender2ogre 0.5.5 and 0.5.6-preview8 work fine with blender 2.62.
blender2ogre 0.5.7-preview1 works fine with blender2.63a.

Thanks!
@H said:...
Hi @lokanu:
Check this thread Importing animations from blender 2.62 using ogre xml: things to check if you are getting problems


I looked over it and other similar guides but I currently don't have time to brush up on learning Blender's UI and going over them more thoroughly. I was just hoping to find a plain model to import w/o any hassle. I didn't even care about mesh/animations/etc yet, just something besides the models provided in the jME library. It's just a hurdle that I'm saving for later.
@lokanu said:
I looked over it and other similar guides but I currently don't have time to brush up on learning Blender's UI and going over them more thoroughly.

:brainsout: ..the time you spent writing this post would have been another chance to read up on the topic of models..

I fixed the issue with the blender2ogre exporter and the submeshnames in SVN

Hi @lokanu: Take a look on blendswap. This site has a lot of models (I suggest to check this site in the thread that I mention in my previous post 8)).

@normen said:
:brainsout: ..the time you spent writing this post would have been another chance to read up on the topic of models..

It seems you didn't read the post of mine you quoted.
@lokanu said:
I looked over it and other similar guides but I currently don’t have time to brush up on learning Blender’s UI and going over them more thoroughly... It's just a hurdle that I'm saving for later.

I did read up on the topic of models, and found it was going to be much more time consuming to both learn Blender and how to touch up the models into working condition. It was best saved for later when I could devote more attention to it. I am a newbie after all!
@H said:
Hi @lokanu: Take a look on blendswap. This site has a lot of models (I suggest to check this site in the thread that I mention in my previous post 8)).

Blendswap was one of the sites I was trying to use models from, it just turns out that the free models online are "as is" and won't likely work in jME w/o a little TLC. I did find it a great site though for stock models though.
@lokanu said:
It seems you didn't read the post of mine you quoted.

Yes I did, you said you don't have time so I suggested spending it purposeful.

Try:



Free 3D models - Free OBJ models



they are .obj files but I have found that for the most part a lot can go directly into the jme.



What I have found to work best is to set up the ogrexmlexporter. Load whatever model I need into blender and make sure the normals are correct. I have also found that a lot of models you find online will have reversed normals so they will not appear correctly when loaded into jme. Then export to .xml format and they work perfectly in jme.