Comercial blender file imports with inverted normals on some meshes. HELP!

I have purchased some comercial models done in blender. When I render them in blender everything is fine. When I try to import them into JME some of the meshes in the models have inverted normals. Has anyone come across this issue? I can provide you with an example blender file if anyone can help.

Try this

Providing a screenshot of your model in both blender and jme can be very useful to debug problem.

Also, by what method are you importing them? .blend directly? Or exported through ogre or the new fancy xbuff?

If you have the time, xbuff is probably worth taking a look at. There is a way to have a live view of what the export will look like in JME… but so far I think it’s also the most compatible format since it was specifically designed with our problem in mind. (Written by a fellow monkey.)

Yup you are correct. The modeler got LAZY and did not make sure all the meshes had normals facing the outside. Sucks for me but at least I know how to fix it now. I never use blender. I am more of a Maya or 3ds max guy but flipping normals in blender is pretty easy. I assume that I can just hit “A” to select everything and then in edit more just recalculate correct?

Yes, but in rare cases it might not always flip all the normal in correct side so you may need to flip them manually.

Regarding Xbuf

I am using Xbuf for a few moths now. It works really well. Make sure to try it. There was no case of failure on importing model using xbuf for me until now.
It also support importing of “Custom Properties” on models which being imported as “UserData” on spatial in jme.

We should start officially advising people to use xbuf. :wink:

OK call me a noob and out of date but how do I go about using xbuff? Any reference URLs?

Actually i think a few peoples here using xbuf and most of the guys yet sticking to Ogre.

Please ask if you encountered with any problem.

Two more things:
If the normals arent completely off then there is the Option to just flip them. IF the failure is geometry based thats pretty easy.

Also the latest sdk can preview and convert xbuf Files. The only problematic thing is that xbuf defines an asset directory (renderer settings) and that should be your projects assets or else we will miss the textures during import

It has been fixed long a go.

In blender

You can set your asset folder path, and if you put your model (.blend) under that directory it will remap relative texture path without exporting them again when exporting to xbuf.

Well your post is simply what I wanted to point out. You can’t only convert the model to xbuf since xbuf doesn’t store the textures directly.

I only wanted to tell this before the confusion starts since blender and j3o both have packed textures.

I usually export to .obj for static models and use “Triangulate Faces” during the export in Blender, than convert it in the SDK or in our mod editor to a .j3o. I want to keep the model clean and textures are added with material later.

I use .blend for animated models, and then convert in the SDK to a .j3o. I only use bone animations, root bone and model using location, scale, rotation 0,0,0. And then bake the pose animation. All animations are stored within the file.

I had a look at xbuf a couple of months ago, but I think that it was some dependencies that I didn’t want to use directly in the game.

It used to have its own animation code but I’m pretty sure that’s not true anymore. Last I heard you could make an xbuff that could load in JME with no custom dependencies required. Maybe one of those guys can confirm.