Closed Andrej730 closed 1 year ago
Update 1: I've noticed that winding order in SR is left-handed (clockwise) meaning it expects for all visible faces winding order to be like on the second triangle. And the reason why I have this problem with normals - some of the faces have counter-clockwise order (first triangle).
Looking for a way how to detect that and make winding order for all faces to be clockwise.
Update 2: Found the solution - my modeling program (Blender) is using counter-clockwise winding order for faces and it's keeping it automatically. So the solution is to just reverse it exporting winding order to SR.
This is quite normal to have differences in the coordinate system/winding order between DCC apps and engines and always a pain to deal with.
Any information about how SR parameters (such as normals, position, uv) relate to other software?
Is there any other factors besides normal value in BMS format that affect how normals will work in game? I made custom bms file for tests (attached it here - chinaman_adventurer_face.bms.txt ),
I've used the guidelines described below but it still looks broken in game. I've tried to inverse axes during normal calculation but got the same results.
In-game:
Blender:
What I've learned experimentingis that SR has left-handed coordinate system with Y up. So the formulas to convert parameters to Blender (right-handed coordinate system with Z up) are: 1) Blender Position = SR Postion.xzy Vector(-1, 1, -1) 2) Blender Normal = SR Normal.xzy Vector(-1, 1, -1) 3) Blender UV = (SR UV.x, 1 - SR UV.y)
Maybe we should put it somewhere on the wiki?