ObjToJme losing verts?

I’m loading Obj files using ObjToJme and for some reason the loaded

Node has less verts than defined in the Obj file. The number of dropped verts is usually less than 10 depending on the model I use.

Any thoughts?

It’s posible in the Obj specifications to have an Obj define file more vertex coordinates than it uses. Unused vertex coordinates are ignored by the converter

How can I tell when I open my .obj file which ones are not being used?

I need to find a workaround for this because I am loading several morphs of the same model as .obj files and then building a Keyframe for each.

Although all the .obj files have the same amount of vertices , some are randomly being dropped making it impossible to use them as KeyFrames because the vert counts are not the same.


For the keyframes to work you’ll also have to be sure that all the models have the same number of triangles or morphing won’t work. How are you doing your morphs?

I’m pretty sure the triangles are loaded fully, i’ll have to double check that tonight.

This is how I am doing my morph:

I have my model animated in 3dsmax, I use another app to export each frame as .obj. Then with ObjtoJme I load the first .obj, create a KeyFrameController and set the morph mesh. Then I extract only the verts from the other .obj files and add them as KeyFrames.

very interesting.

I as going to pass someone of this forum how other people made a c++ routine for it with objs…dunno if exactly morphing, probably the word was interpolation. I suppose for same purpose (do a better than md2/md3 solution for a c++ engine)

Is just that haven’t give it to th eguy here (I think was Renanse) as they are waiting to release a bunch of code previous to pass me the routine…

But I may mail him to ask for the routine already, as I think he told he wouldn’t mind much giving it to me previously…

I think doing so is really much better than using md2 or md3 and their ugly problems…

Also have more freedom to edit an isolated keyframe in any program, and do fantastic face expresions and other morphs (allways u don’t change the vertex count/order! which you surely wont)

I am actually just using the some of the .obj files as keyframes i’m not

loading all of them. The interpolation is done by the Controller.

It may not be the converter loosing the vertexes but your exporter. Are you sure they are exported with the same number? Post links to two .obj files you think should have the same number and I’ll take a look.

I’ll check this out tonight and post my models

I found a solution.

If i load my obj files in Milkshape and use the "model cleaner" on them

they have the right amount of vertices when loaded into JME.

If anyone knows of a way for me to script Milkshape to run the cleaner on a directory full of obj files let me know.

Thanks all.

There’s probably an optimization in the obj converter I could do with that, to clean it up manually. Would be tricky, but it’s there to do…

I don’t know how to write milkshape scripts or plugins so sorry, can’t help there. Shouldn’t be too hard though… they have sample plugin code on their webpage.