Edge Split failure

Hey monkeys,

I have a blender model (v 2.67) with the edge split modifier.
I want to convert it to .j3o and use it ingame.

When the edge split modifier is not applied, it isn’t applied ingame as well. Everything is rendererd smooth, I obviously don’t want that.
But when I apply the edge split modifier, I get a weird behavior of the faces:

When I view the normals in blender, they are right…

Do you have an idea whats causing it?
If you need any code or info, just ask.
Thanks in advance.

Could it be that the affected faces are n-gons?

If so, you could solve it by dissolving the useless vertices (x->dissolve).

thanks for the suggestions, but that can’t be it.
We tried it with the usual model (consisting of quads) and
then with a triangulated version. Same problem.

if you would upload the affected part of the mesh I will take a quick look at the geometry.

roger that

the bug appears on more places in the mesh; everywhere where the edge split modifier is added.
I uploaded the part you see in the screen here:
Download

It doesnt seem to be a normal problem. When the imported blend is turned upside down, you cant see the
missing faces. The number of vertices and faces in the JME Scene
editor also seems to be the same as in blender. Maybe a bug in the importer? Hopefully someone else can help you.

Note: normals only affect lighting direction and not whether a surface is drawn or not.

And what about culling? if the normal faces into the opposite direction of the cam, then the face isnt drawed?

@m41q you import it through the blender importer?
If so, could you try to import it as an obj, or as an orgre mesh.xml?
it’d rule out a model problem and would point to an importer problem.

@umask007 said: And what about culling? if the normal faces into the opposite direction of the cam, then the face isnt drawed?

Normals are ONLY for lighting. For example, if you used Unshaded.j3md as your material then the normals are never used at all.

Vertex winding controls which direction a triangle is “facing” for back face culling. Your normals can point any direction you want them to.

@nehon said: @m41q you import it through the blender importer? If so, could you try to import it as an obj, or as an orgre mesh.xml? it'd rule out a model problem and would point to an importer problem.

ok, it’s definitely an importer problem.
I took the model version with edge split applied, converted it to .obj and viewed that in jME; works perfectly.

But this isn’t a real solution yet since .obj isn’t able to use skeletal animation.

@m41q said: But this isn't a real solution yet since .obj isn't able to use skeletal animation.
Ogre does. and you may have to use it anyway since the blender importer doesn't fully support bone animations (no kinematic constraint is supported)
@nehon said: Ogre does. and you may have to use it anyway since the blender importer doesn't fully support bone animations (no kinematic constraint is supported)

Well…
We have used ogre xmls for some time now, but we need multiple animation channels in one model.
When we tried exporting the .blend to ogre, the only animation we got was called “my_animation”

We got the multiple animation channels to work with converted .blend files, so we figured it would be best to simply use .j3o files.

Do you think I should open a new thread about properly converting a model with mutliple animations to ogre?
But the importer would still be (partially) broken…

you need to put your animations in the NLA track editor

@m41q said: We have used ogre xmls for some time now, but we need multiple animation channels in one model. When we tried exporting the .blend to ogre, the only animation we got was called "my_animation"
You have to convert your animations to NLA tracks, there are several posts on the forum where it's covered, and I think the wiki page about blender explains it. try this one http://hub.jmonkeyengine.org/forum/topic/imported-model-animation-control-problem/
@nehon said: You have to convert your animations to NLA tracks, there are several posts on the forum where it's covered, and I think the wiki page about blender explains it. try this one http://hub.jmonkeyengine.org/forum/topic/imported-model-animation-control-problem/

Ok, I think this will take care of my problem.
Thank you for your efforts.
But after all… it’d still neat to have a working .blend –> .j3o conversion. :wink:

I don’t know who to talk to, but someone needs to notify the author of the converter of this bug.

And maybe it’d be good to add a better explanation somewhere in the wiki than
'Also don’t forget about NLA editor and set off envelopes to make animations work! ’

@m41q said: But after all... it'd still neat to have a working .blend --> .j3o conversion. ;) I don't know who to talk to, but someone needs to notify the author of the converter of this bug.
Definitely @Kaelthas ? :D

@nehon thanks for mentioning me. I was away the last week and I would definitely miss these posts :wink:

@m41q the importer does not support the split edge modifier for now. So I guess you’ll need to apply it if you want to see the results on the jme scene.
I downloaded the model you posted and I couldn’t spot the issue. The mesh looked fine to me.
Make sure you use nightly updates in your jMonkeyPlatform. It should have the most fresh bugfixes for the importer.

And you can upload the full model where you can see the problem so I can check it there and find what is wrong :wink:

2 Likes
@Kaelthas said: I downloaded the model you posted and I couldn't spot the issue. The mesh looked fine to me. Make sure you use nightly updates in your jMonkeyPlatform. It should have the most fresh bugfixes for the importer.

Oh man, that actually WAS the issue.
I thought my version of the SDK was ‘current’, since I just updated it a couple weeks ago,
but apparently the updates are quite fast :slight_smile:

thanks!

1 Like

No problem :slight_smile:
I am happy it works fine now :wink:

1 Like