Page 1 of 1
Models too short in GZDoom?
Posted: Sun Jul 29, 2012 14:19
by Nash
In gl_models.h, line 12, there is this:
Code: Select all
static const float rModelAspectMod = 1 / 1.2f; //.833334f;
... which causes models to be rendered 1.2 shorter than usual. Is there really a need for this?
A 64x64x64 cube exported from 3ds Max (and I suspect most other modeling packages) will actually end up shorter in GZDoom, so to compensate for that, one either has to model something TALLER by a factor of 1.2 (so 64 height becomes 76.8 )... or just model as usual, then after export; compensate for it in MODELDEF by applying a scale value of 1.2 on the Z axis.
Seems counter intuitive to me.
Re: Models too short in GZDoom?
Posted: Sun Jul 29, 2012 17:10
by Enjay
Is it not that models are shown 1:1 "square" but the rest of the world is shown at 1:1.2? So the model isn't too short, the world is too tall? I know you could argue that it amounts to the same thing but I do think that the distinction is important.
A while back, I made a simple 128x128 flat vertical model and used one of the MARBFACE graphics on it. In game, it was shorter than 128 tall walls. Editing MODELDEF to make the model 1:1.2 made the model the same size as the game textures.
I'm not sure that "correcting" this would be any more intuitive. Why? Because if you did then a model that was 64 units tall and wide in the model editor would be getting stretched to an in game 64 tall which is actually 76.8 tall versus its 64 width. At present, the model doesn't change size, the world is oddly proportioned. However, I'd rather have that than my models changing height in the game to match the oddly proportioned world.
More importantly, unless this was optioned, a lot of current mods would suddenly find all their models have suddenly got taller by a factor of 1.2 and may no longer fit in the spaces they were put.

Re: Models too short in GZDoom?
Posted: Sun Jul 29, 2012 17:51
by Nash
A 1:1 64x64x64 cube model looks normal in GZDoomBuilder when placed flush with 64x64x64 geometry but in-game it appears shorter... so yes, I guess the issue is that the world is drawn 1.2 times taller...
Re: Models too short in GZDoom?
Posted: Sun Jul 29, 2012 18:21
by Gez
I don't know anything about the model code, but it looks to me like this is meant to compensate for the vertical stretching. E.g., your 64x64x64 cube gets turned into a 64x64x76.8 cuboid which is then turned back into a 64x64x64 cube because of this.