Garux / netradiant-custom

The open-source, cross-platform level editor for id Tech based games.
https://garux.github.io/NRC/
Other
300 stars 52 forks source link

Models with .obj rotated on map open #91

Closed decldev closed 2 years ago

decldev commented 2 years ago

Some are fixed into right direction with angles 0 0 -90, some require angles 0 135 -90, etc. What's the cause and how to have them properly aligned on load?

This does not happen with other forks of netradiant that I tried.

Garux commented 2 years ago

log:

    * picomodel::obj: load as popular 'Y = Up, -Z = Forward' format

means 95% of newly inserted models do not require extra rotation, like they do in other forks. So it's incompatible improvement, there is no option to be compatible with radiants' loader and incompatible with everything else. Moreover this is a alignment, coming from assimp lib for all of the formats (they all are rotated to +Z then to be alright in quake world basis).

decldev commented 2 years ago

Oh, that's a bummer in a way then. I enjoyed the added features of this fork.

ensiform commented 2 years ago

Couldn't you have a _key of some kind to instruct NRC/q3map2 to behave old way when it's detected in that entity keys?

Garux commented 2 years ago

Sounds like best option, if wishing such backwards compatibility badly. However it doesn't worth introducing all the required crap; there is no entity in model loading code; editor would need observer to update views on key change; models are instances, so one extra transform would be required in angle(s) key handling code; also there are different spots, requiring models, like model2 for lighting and entity models, latter would need some way to flag the hack too. I think it's better to fix obj loader in radiants instead, Gtk even had such PR. image