TTimo / GtkRadiant

The open source, cross platform level editor for idtech games
http://icculus.org/gtkradiant/
Other
586 stars 155 forks source link

Wavefront .obj loading rotated 90º (Quake rotation issue) #612

Open jdolan opened 6 years ago

jdolan commented 6 years ago

Quake puts Z up, and Y back. The rest of the world puts Y up, and Z back. A couple years ago, I added hacks to GtkRadiant's Picomodel .obj loader to "fix" this by swapping Y and Z when loading vertices and normals. We have the same hacks in Quetoo itself for .obj loading. It looks like those hacks were lost in backporting NetRadiant's Picomodel implementation.

What games besides Quetoo are using .obj models, and how are they handling this with Radiant? All of our .obj models are currently laying on their side in GtkRadiant. I'd love to get them working again.

screen shot 2018-03-16 at 12 27 46 pm

0bsidian commented 6 years ago

As far as I know, any game utilizing Q3map2 can use .obj models for mapobjects. I don’t think any use .obj out of the box.

jdolan commented 6 years ago

I guess what I'm asking is.. in this case, would the model authors specifically create their models laying on their side like this, so that they look correct in Quake, or does Radiant need the same flipper-dee-flop code that e.g. Quetoo has in it to rotate these models into Quake space? What I'm really asking is, would adding that code to Radiant piss anyone off? ;)

0bsidian commented 6 years ago

I doubt it would be a big deal since I don’t think .obj is very commonly used with GtkRadiant. Perhaps a preferences menu option?

Garux commented 5 years ago

Deal is not small either, as all active map projects would need to rotate their models
Anyhow this is okay price for being able to open most of models correctly out of the box imo
@jdolan where is commit with your hacks? Can't find it Here is my one
https://github.com/Garux/netradiant-custom/commit/034f06f18d4dc3615f4211ab0351ebf81f44e7f5
seem to work well so far

jdolan commented 5 years ago

Dunno. I can't find it anymore.