Polygons flipped the wrong way

Started by zammbi, March 04, 2010, 10:59:16 AM

Previous topic - Next topic

zammbi

I'm currently loading a 3ds landscape and it seems to have flipped the polygons(water is on top of the hills). I have never seen this problem before.
When I load it in blender it appears correctly. I don't know what's causing this, maybe some silly error on my part.

Anyone else get the same issue? http://www.2shared.com/file/11834275/23195093/Models.html

EgonOlsen



zammbi

Well seems I can solve the problem giving a negative number:

Object3D[] objs = Loader.load3DS(Main.class.getResource("/Models/"),"3ds2.3ds", -400);

EgonOlsen

So...is this actually rotated compared to the original or is just the y-axis flipped?

zammbi

The polygons are flipped on the wrong side.

Usually I flip the model (X axis) by -PI/2 but this one I had to flip by PI/2 so I could see something.

Which yeah in a way the y-axis has been flipped.

EgonOlsen

No idea then. Maybe there is some transformation stored in the file that jPCT's loader ignores. There are such things in 3DS, which is why the loader fails on some files. Maybe this is one of them. Try to convert it into OBJ-format and see if that helps.
If it doesn't, try to do something like:


mesh.getRotationMatrix().set(1,1,-1);
mesh.rotateMesh();
mesh.getRotationMatrix().setIdentity();


to flip y.