stosb

wearer of programming socks

  • she/her

mid 20s | bisexual | programmer | european


profile pic: a picrew by Shirazu Yomi
picrew.me/en/image_maker/207297
i use arch btw
xenia the linux fox -> 🦊🏳️‍⚧️
the moon
🌙

cura
@cura

Have you ever made some custom graphics for Doom, like a wall texture, a sprite, or a weapon, and found out that it's weirdly stretched in the game? Doom originally ran in a mode where pixels were not square - instead they were slightly taller and wide - and the game's graphics were made with that in mind. A 5:6 ratio, or 20% taller to be exact. So when authoring your own art for Doom mods, you often gotta keep that in mind too. It would be very useful if say, Krita, could show you your textures in Doom's aspect ratio as you're working on them to make sure they look good! Thankfully @Eriis and I have figured out how to do it so you don't have to!

Currently there's no "real" option in the UI to display stretched pixels, but we can do that anyway! We can ask Krita to show a "print size" preview of our art, but we'll trick it into showing a different aspect ratio, in a bit hacky way. Here's how:

  1. Rename your .kra file to a .zip file (that's right, Krita files are just zips).
  2. Edit the "maindoc.xml" file. Early on there's a line that starts with <IMAGE. On that line, you'll find y-res="[some number]" and x-res="[somenumber]" - change them to y-res="100" and x-res="120". Save the file.
  3. Change your .zip back into a .kra!

Now, in Krita, if you select View > View Print Size, or press the tiny tiny button in the very bottom right of the program, it'll display your file with Doom's aspect ratio. Now it's easy to see how it'll look!

If you have some already made sketch/drawing/render, and you want to scale it to Doom's aspect ratio, simply scale it vertically by 20%!

Bonus: drawing/selecting squares and circles that look right in Doom

If you wanna make a shape that will look square/circular in Doom, you gotta draw a slightly squished rectangle/ellipse. To do it exactly right in Krita, simply in the Tool Options of your drawing/selection tool set the Ratio to 1.2, and lock it. Easy!


You must log in to comment.