Doom Marine Posted December 12, 2018 (edited) I noticed that the Doom engine renders pixels taller than wide, that is, a 1x1 pixel will look slightly taller than it is wide... a 128x128 cube will look taller than wide. 1. What aspect of the engine rendering causes this? 2. What is the stretch factor? 1.1? 1.05? (I could use screenshots and Photoshop to determine this, but I thought it would be better to ask first) Edited December 12, 2018 by Doom Marine 0 Quote Share this post Link to post
Cherno Posted December 12, 2018 The stretch factor is 1.2. It can be changed in a MAPINFO's map definition with pixelratio = 1. 1 Quote Share this post Link to post
Gez Posted December 12, 2018 Doom was originally meant to be played on 4:3 physical aspect ratio CRT monitors, but used a logical game resolution of 320x200. If you compute, you'll notice that 320x200 is a 8:5 (or 16:10, if you prefer, or even 4:2.5) aspect ratio; while the proper 4:3 aspect ratio for 320-wide is 320x240. What that means is that the monitor (by virtue of being CRT) would simply stretch the image to fit, resulting in tall pixels that are 1.2 times as wide, because 2.5*1.2=3. Modern LCD monitors don't work in the same way as CRT do, so they can't stretch their pixels vertically. (Or horizontally, for that matter.) You're stuck with square pixels. So it's up to the software to emulate the aspect ratio stretching. https://doomwiki.org/wiki/Aspect_ratio As Cherno mentioned, with some ports such as GZDoom you can change that setting if your mod needs it. When high-res stuff is supported, you can also play with the scaling of individual assets (for GZDoom, you'll do that in TEXTURES). 3 Quote Share this post Link to post
Nootrac4571 Posted December 12, 2018 It's worth mentioning that a lot of the graphics for Doom were created with this vertical stretch in mind - monster sprites in particular: when viewed on a modern square pixel monitor they look squat compared to the actual resources they were based on (the physical monster maquettes, the title screen/boxart etc.) Id were aware that they'd be stretched vertically in the game, so digitised them to look correct in the game's actual display mode, not on a square pixel display. 0 Quote Share this post Link to post
Gez Posted December 12, 2018 It's unclear whether it was deliberate or just a consequence of working in 320x200 resolution in their image editing tools too. 0 Quote Share this post Link to post
ukiro Posted December 12, 2018 There are some instances of perfect circles in textures; that is, when rendered stretched. Viewed on square pixel displays they appear squished. So they knew, I’d say. 0 Quote Share this post Link to post
Dark Pulse Posted December 12, 2018 12 minutes ago, Gez said: It's unclear whether it was deliberate or just a consequence of working in 320x200 resolution in their image editing tools too. Pretty sure it was deliberate due to the choice of graphic mode settled upon for the game. The tools doing that too was more of a coincidence I think, but it was at least a happy accident and made it very WYSIWYG. Granted, that really only mattered for sprite editing and cleanup since everything else was on NeXTs. 0 Quote Share this post Link to post
Nootrac4571 Posted December 12, 2018 I'm not an expert on the exact processes Id used to digitise the art, but surely it's unlikely that the video resolution they captured the sprites with and the scanning resolution they used for the box/title art both just happened coincidentally to correct for the 4:5 pixel aspect they were intended to be displayed at? There must have been an awareness of the vertical stretch at the digitisation stage. 0 Quote Share this post Link to post
Gez Posted December 12, 2018 By the way I'll mention that the image and texture viewers in SLADE 3 have an "Aspect Ratio Correction" checkbox that you can tick and untick at your leisure. I suggest putting it on for looking at sprites and wall textures; but off for flats. 1 Quote Share this post Link to post
Dwaze Posted December 12, 2018 (edited) I think both flats and wall patches/textures are not stretched, only sprites are. edit: is wrong Edited December 12, 2018 by Dwaze 0 Quote Share this post Link to post
Gez Posted December 12, 2018 Everything that gets displayed on screen is stretched. Every single pixel. Even flats, technically; but you can see them from different angles so they aren't always stretched in the same direction. Walls are definitely stretched vertically. 1 Quote Share this post Link to post
Loud Silence Posted December 12, 2018 Does anyone know why Doom used 320x200 instead of x240 resolution? 0 Quote Share this post Link to post
Gez Posted December 12, 2018 Performances. 320x240 would mean 20% more pixels to render. 0 Quote Share this post Link to post
Loud Silence Posted December 12, 2018 Then 267x200 would be best choice. Less pixels to render and still 4:3. 0 Quote Share this post Link to post
-TDRR- Posted December 12, 2018 29 minutes ago, Rimantas said: Then 267x200 would be best choice. Less pixels to render and still 4:3. But then it wouldn't look as nice, would it? 0 Quote Share this post Link to post
Dwaze Posted December 12, 2018 54 minutes ago, Gez said: Everything that gets displayed on screen is stretched. Every single pixel. Even flats, technically; but you can see them from different angles so they aren't always stretched in the same direction. Walls are definitely stretched vertically. I just checked and you're correct, I don't know why I was convinced it was. Brain fart sorry! 0 Quote Share this post Link to post
Linguica Posted December 12, 2018 320x200 is a standard DOS resolution used by many games and programs up to and including the DOS-based art program the artists were using. It was normal and unremarkable at the time that it didn't have square pixels, because who cares when it's on an analog CRT that doesn't strictly speaking have "pixels"? 3 Quote Share this post Link to post
kristus Posted December 12, 2018 4 hours ago, ukiro said: There are some instances of perfect circles in textures; that is, when rendered stretched. Viewed on square pixel displays they appear squished. So they knew, I’d say. I remember seeing a photo of Adrian Carmack working on sprites for Doom where he used Deluxe Paint to work the art over with, which also is using 320x200. 0 Quote Share this post Link to post
Nootrac4571 Posted December 13, 2018 Not that I think anyone needs convincing, but I made this, which I think is reasonably interesting and a bit relevant: 4 Quote Share this post Link to post
Revenant100 Posted December 13, 2018 A while back, I made this comparison using the Cyberdemon sprite and original clay model as a reference: This is a particularly apt comparison since the clay model appears to be using the exact same pose and nearly the same angle that the Cyberdemon's CYBRG2 pain frame was digitized from. Ergo, this is a near one-to-one match. The left sprite is scaled up to match the horizontal feet distance of the clay model. The right sprite is equally scaled but also has the 1.2 vertical aspect ratio correction applied. 6 Quote Share this post Link to post
BadLuckBurt Posted December 13, 2018 Saved that picture. If I ever need to explain this 1.2 aspect ratio stuff, this will be the perfect illustration. I also want to own that clay model, it looks so freaking awesome. 0 Quote Share this post Link to post
Gez Posted December 13, 2018 19 hours ago, Nootrac4571 said: 4 hours ago, Revenant100 said: Those are nice. Would either of you object to them being put on the Doom Wiki for the aspect ratio article? 1 Quote Share this post Link to post
Nootrac4571 Posted December 13, 2018 1 minute ago, Gez said: Would either of you object to them being put on the Doom Wiki for the aspect ratio article? Feel free! I'd be proud to contribute. 0 Quote Share this post Link to post
Revenant100 Posted December 13, 2018 You are very welcome to use my image on the wiki, @Gez. 0 Quote Share this post Link to post
Doom Marine Posted December 14, 2018 I tested pixelratio using MAPINFO, and it has no effect in PrBoom+. Does PrBoom+ support pixel ratio changes? 0 Quote Share this post Link to post
komojo Posted December 14, 2018 On 12/12/2018 at 12:52 PM, Rimantas said: Does anyone know why Doom used 320x200 instead of x240 resolution? 320x200 (VGA mode 13h) was the most common 256-color video mode at the time. The explanation I heard is that it's due to the video memory size. 320x240 pixels is 76800 bytes, whereas 320x200 comes out to 64000 which fits within a 64k address space. 0 Quote Share this post Link to post
Edward850 Posted December 14, 2018 (edited) 1 hour ago, Doom Marine said: I tested pixelratio using MAPINFO, and it has no effect in PrBoom+. Does PrBoom+ support pixel ratio changes? No, and PrBoom+ doesn't even support MAPINFO. Changing the pixel ratio is exclusive to GZDoom. Edited December 14, 2018 by Edward850 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.