Flipping faces in a mesh

Need help testing contributed art or code or having trouble getting your newest additions into game compatible format? Confused by changes to data formats? Reading through source and wondering what the developers were thinking when they wrote something? Need "how-to" style guidance for messing with VS internals? This is probably the right forum.
Post Reply
ace123
Lead Network Developer
Lead Network Developer
Posts: 2560
Joined: Sun Jan 12, 2003 9:13 am
Location: Palo Alto CA
Contact:

Flipping faces in a mesh

Post by ace123 »

I'm working with Jack to get Fendorin's new watson model ingame...

The mesh seems to have a bunch of flipped faces (not flipped normals, but the faces appear from inside out).

I have written simple regexp to flip their order, but about 3% of the triangles are the wrong way around now, so there are holes all over the mesh.

Does anyone know how to take a .obj file like this and make all the tris face the same direction as their neighbors (flipping is easy, but fixing a few bad triangles isn't so easy)?

If anyone is interested, this invalid .obj file (and the associated .wings) is found here:
http://vegastrike.svn.sourceforge.net/v ... _fendorin/


EDIT: Never mind--I fixed it by importing this obj into Wings, inverting twice, exporting as 3ds (in case Wings's obj export is buggy), importing that into blender, and exporting as obj.
bgaskey
Elite Venturer
Elite Venturer
Posts: 718
Joined: Wed Mar 07, 2007 9:05 pm
Location: Rimward of Eden

Post by bgaskey »

I didn't notice a problem if I reexported from wings with triangulation on...but I wasn't looking very carefully. I would have sent that one to jackS, but I haven't had time to convert the textures to dds yet :wink:
Post Reply