Page 1 of 1

[fixed]MD2s appear mirrored in GZDoom

Posted: Sun Jan 15, 2006 21:39
by Nash
This is very annoying and I hope it is fixable.

Models are always mirrored when they are imported into GZDoom.

It's not just the model - even the skin is mirorred so it's hard to fix for me.

The problem is - they appear correct in the 3-d model editors I've used (Anim8or, qME, Q2 Modeller).

When brought into GZDoom, not only the geometry is mirrored - even the skin itself.

Check out this test model. I even bothered to take the trouble to setup this ZIP so all you have to do is drag and drop fridgetest1.zip into GZDoom.exe and ]summon fridge1.

Nevermind about the model angle being incosistent with the actual sprite. The fact of the matter is that everything is mirrored. :/

Try load the model into any model editor. When you are looking directly in front of the fridge, the door is supposed to be to the left of the screen.

Posted: Sun Jan 15, 2006 22:00
by Nash
To confirm this, I downloaded the big tree model from the thread http://forum.drdteam.org/viewtopic.php?t=987, fixed the frame name and loaded it into GZDoom.

Took a screenshot of the big tree while running GZDoom, then loaded the MD2 into qME and Q2modeller and compared it to the screenshot. It sure is mirrored alright.

Then exported the MD2 as .3DS using both qME and Q2modeller. And imported the .3DS into various modelling software besides the two I mentioned. They all appear normal - the screenshot I took in GZDoom appears mirrored.

Posted: Sun Jan 15, 2006 22:32
by Graf Zahl
I took the coordinate setup code directly from Doomsday. Apparently Doomsday uses an inverted coordinate system. But this explains why I've been having problems with one particular model in Silent Steel that never occupied the correct spot no matter how I rotated it.

Posted: Sun Jan 15, 2006 22:33
by Nash
Please fix please fix! It's driving me insane. :/

Posted: Mon Jan 16, 2006 0:43
by Nash
Not to pressure you or anything, but I really need this fixed soon, otherwise I can't really continue working on my project...

Posted: Mon Jan 16, 2006 19:27
by Nash
Maybe you should move this into the bugs section as I think it really is a bug.

I didn't post it there at first because I thought I did something wrong with the models. That clearly isn't the case now...

Posted: Mon Jan 16, 2006 20:28
by Graf Zahl
I'd rather move it to the 'closed bugs' section.

Posted: Mon Jan 16, 2006 20:36
by DaniJ
Apparently Doomsday uses an inverted coordinate system.
Indeed it does. It simplifies things as we don't need to constantly convert between coordinate spaces all the time (world uses the same inverted space).
I took the coordinate setup code directly from Doomsday.
That'll teach ya to lift code without checking it fits your preconceived ideas of how it works [/poking_fun]
I'll let you off though as you're new to models :|

Posted: Mon Jan 16, 2006 20:38
by Nash
YAY! Graf r0x0rz my s0x0rz now make a new release, because I've wasted enough time already!
DaniJ wrote: That'll teach ya to lift code without checking it fits your preconceived ideas of how it works
Very funny!

Posted: Mon Jan 16, 2006 20:43
by Graf Zahl
DaniJ wrote:Indeed it does. It simplifies things as we don't need to constantly convert between coordinate spaces all the time (world uses the same inverted space).
How true! ;) Changing that is something I've been thinking about for some time - and I'd prefer to eliminate the coordinate scaling factor between game and renderer coordinates as well. There's really no need for it as a proper translation matrix will do it as well.

Posted: Mon Jan 16, 2006 20:44
by Graf Zahl
Nash wrote:YAY! Graf r0x0rz my s0x0rz now make a new release, because I've wasted enough time already!

I won't have any time until Friday.

Posted: Tue Jan 17, 2006 23:57
by Graf Zahl
I just finished converting the renderer coordinate system so one map unit is one renderer unit and the orientation in the renderer is the same as in the map. I should have done that long ago as this was a constant source for strange errors. And now the Silent Steel models are finally in the exact position they are supposed to!