jckarter

everyone already knows i'm a dog

the swift programming language is my fault to some degree. mostly here to see dogs, shitpost, fix old computers, and/or talk about math and weird computer programming things. for effortposts check the #longpost pinned tag. asks are open.


email
mailto:joe@duriansoftware.com
discord
jckarter

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.