objects inside out

Blitz3D Forums/Blitz3D Beginners Area/objects inside out

ryan scott(Posted 2005) [#1]
i built a level in max, export using pipeline, and it works fine.

i added 2 objects to it, exported, and when they were brought into my game, those 2 objects appear to be inside out. this happens when i'm close, when i'm far, makes no difference.

can anyone explain why this happens and how to fix?

there doesn't appear to be anything all that special about the objects, they were just created in max then merged into the level, then exported.

:/


Baystep Productions(Posted 2005) [#2]
I get the same problem with Milkshape. No one answered why.


jfk EO-11110(Posted 2005) [#3]
In max you may use the modifier "Normal" and check the "Unify Normals" checkbox. No idea about Milkshape, but whenthe problem is permanent, you may A) flip the mesh in the modeler before you export it or B) use FlipMesh in Blitz3D.

Something people often confuse with this is: when they load a FPS weapon and stick it near the camera, they set its entityOrder to be in front of everything else to prevent the gun from dipping into walls etc. When they used LoadAnimMesh to load the gun mesh, some children/surfaces of the gun may look flipped, insideout.
The Problem here is entityorder with Loadanimmesh. I'd suggest to scale the gun very small and parent it close to the camera, so it's within the camera/player collision radius and doesn't need EntityOrder for the mentioned purpose.


ryan scott(Posted 2005) [#4]
PCD GUY:

found a workaround.

EntityFX model,16 ; makes all objects 2 sided.

makes it so that every face has texture on both sides, if i understand correctly. That did fix it for me.

I don't know if this causes things to run more slowly? So I'm going to do the suggestion that jfk EO-11110 gave.


octothorpe(Posted 2005) [#5]
Yes, it'll double your triangle count.

Although it would be better if you fixed the problem with your model files, another code-side solution is to use FlipMesh().


ryan scott(Posted 2005) [#6]
i don't mind code-side

but is there a way to detect the problem in code or only by eye?


octothorpe(Posted 2005) [#7]
Probably not worth the effort, but: (a) find a triangle on the outside of the mesh and (b) check to see if its vertices are arranged clockwise or counter-clockwise (facing the centre of the mesh.) Some (probably well known) vector math would solve the latter problem, but the former might be tricky.


Baystep Productions(Posted 2005) [#8]
JFk might be right, it's everything Im doing, loading animmesh with entity order.