Warzone2100 / WMIT

Warzone Model Import Tool - for use with Warzone 2100
GNU General Public License v3.0
16 stars 11 forks source link

Inverted normals #22

Closed MaNGusT- closed 3 years ago

MaNGusT- commented 3 years ago

pieNormals_test6.zip

Testing: to exclude effect of broken shaders, you need to NOT specify a normal map for a testing model.

1) BUG If open a model without vertex normals (pie2 or pie3) and don't use normal map, WMIT calculates and shows face normals as inverted. 1

2) BUG If open a model with vertex normals(OBJ) and don't use normal map, WMIT inverts normals and shows them inverted. 2

3) BUG If open an OBJ model with vertex normals and then save it to PIE3 with vertex normals, then WMIT saves inverted normals. 3

4) NOT A BUG If open PIE3 with inverted normals that were previously saved, then WMIT still shows them inverted.

P.S. When it will be fixed, I will need to fix shaders and re-export models that use vertex normals in ARmod.

inodlite commented 3 years ago

In latest dev build, with 4.0 light and shader, I can not reproduce BUG 2 (which is probably the origin for all those bugs). I opened OBJ and added same diffuse and spec map and it looked OK and was also OK after saving and reloading as PIE3 with normals.

MaNGusT- commented 3 years ago

Yeah, in latest dev build with integrated light I see that only when I use external shader button, normals get -хyz values in viewport. But no matter do I use external shader or internal shader, normals will be exported with -xyz values.

inodlite commented 3 years ago

Should be fine after #28...