Search In
• More options...
Find results that contain...
Find results in...

Doom Engine Vertical Stretch Formula

Recommended Posts

The Doom engine stretches everything on screen vertically. What i'm looking for is some kind of percentage that it is stretched.

I need to make some kind of formula to figure out how much stretch (or vertical squish rather) I need for my 3d Models so i don't have to eyeball it every time I'm putting in a new model.

I have squash/stretch control over "depth, height, width". So "1, 1, 1" will end up looking stretched because the doom (and any source port) engine is vertically challenged and to fix this I would do something close to "1, 0.8, 1". Simple, but i'm not mathemagical so the moment I need to change the depth or width I have to spend a painful amount of time eyeballing it to find an approximate height that looks right.

Is there a formula out there for this already?

Not a formula or a proper answer, but this might be of some slight use to you

The Doom engine originally displayed 16:10 content (320 / 200) on a 4:3 display. Try .833333 for your height scale.

Or 1.2 if you're moving the other direction.

Here are some examples. You make a 10x10 graphic and then ask the Doom engine to display that. It does so dutifully but while transforming the internal 16:10 logical framebuffer into a 4:3 display. The vertical scale-up is a factor of 1.2 so you end up displaying what looks like 10x12 instead. 10 x 1.2 == 12.

So now, we want to pre-correct for this so that, say, a round circle actually looks round and not like an oval. The number Bloodshedder gave was the inverse of 1.2 (0.8333...)

10 x 0.8333.... = 8.3333... - so your graphic will need to be 10x8 to come out looking close to round. Getting it exact in this case is impossible since you can't have a third of a pixel.

Ok so if i need to change the overall scale and keep the ratio, how do I figure the vertical squish/stretch

For example, if i needed to squish the width and depth to 0.52 (.52, .?, .52), how would I figure the vertical squish? Sorry, i'm mathematically challenged.

Since you're using models, I figure you're using an advanced port. You might be able to specify the vertical scaling to apply to the actor, which will then compensate aspect ratio correction. I know it's possible in GZDoom; I'm not familiar enough to tell you about Doomsday/Risen3D, but if it's not possible already I'm sure it could be requested from the developers.

I am talking about scaling the actor within the Doomsday Engine. Sorry, I neglected to mention that.

The formula i'm trying to come up with (or have other people come up with rather) is one i would use to scale my models within the Doomsday Engine Definitions.

I didn't include that info because it is more of a math question than anything else.

```.52       x
---- = -------
1     0.83333
```
Solve for x (cross multiply)

Excellent! Thank you.