User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
 Doomworld Forums > Classic Doom > Doom Editing > Doom Engine Vertical Stretch Formula
Author
 All times are GMT. The time now is 09:56.
NiuHaka
Member

Posts: 593
Registered: 06-10

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?

Dec 24 2013 18:16 #
 || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Eris Falling
Forum Staple

Posts: 3492
Registered: 07-12

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

Dec 24 2013 18:29 #
 || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Bloodshedder
Spellchecker

Posts: 5790
Registered: 03-02

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

Dec 24 2013 18:32 #
 || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Quasar
Moderator

Posts: 6570
Registered: 08-00

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.

Dec 24 2013 18:51 #
 || Blog || PM || Post History || Add Buddy IP || Edit || Quote
NiuHaka
Member

Posts: 593
Registered: 06-10

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.

Dec 24 2013 19:41 #
 || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Gez
Why don't I have a custom title by now?!

Posts: 12532
Registered: 07-07

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.

Dec 24 2013 20:21 #
 || Blog || PM || Post History || Add Buddy IP || Edit || Quote
NiuHaka
Member

Posts: 593
Registered: 06-10

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.

Dec 24 2013 20:28 #
 || Blog || PM || Post History || Add Buddy IP || Edit || Quote
Bloodshedder
Spellchecker

Posts: 5790
Registered: 03-02

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

Dec 25 2013 00:41 #
 || Blog || PM || Post History || Add Buddy IP || Edit || Quote
NiuHaka
Member

Posts: 593
Registered: 06-10

Excellent! Thank you.

Dec 25 2013 04:00 #
 || Blog || PM || Post History || Add Buddy IP || Edit || Quote
 All times are GMT. The time now is 09:56.
 Doomworld Forums > Classic Doom > Doom Editing > Doom Engine Vertical Stretch Formula

Forum Rules:
 You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is OFF vB code is ON Smilies are OFF [IMG] code is ON