bigianb / bgda-explorer

Code written to try and figure out the data files used in Baldur's Gate Dark Alliance for the PS2
10 stars 6 forks source link

Inverted faces #3

Closed nexuz6 closed 9 years ago

nexuz6 commented 9 years ago

Hey!

I noticed that when i export a object and import it to blender (also unreal engine 4) some faces (surfaces) gets inverted.

So the models contain "holes" on a couple of places where the texture is displayed inside out. If i flip the face it fills the hole.

Am I making any sense? :)

Dwarf 1-dwarf

Select faces that are inside out 2-selected faces

Flipped faces 3-flipped faces

bigianb commented 9 years ago

That's right. The routine that the game uses in the PS2 does not do backface culling and so the models have no consistent winding order. I have thought about using the normal information to detect the outward pointing face of each triangle and setting the winding order as such, but never got the time. I'm not even sure it will work as I think some of the models assume double sided triangles. In something like blender you need to disable back-face culling to view the model properly.

nexuz6 commented 9 years ago

Thanks for that quick response!