Drawing with correct aspect ratio

This forum is for artists to post their music and graphics or discuss artistic matters that could be used in Uzebox games.
Post Reply
User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Drawing with correct aspect ratio

Post by Jubatian » Thu Oct 29, 2015 8:34 pm

I wonder what you use for creating graphics for Uzebox games. I mean how you ensure that you draw with the correct aspect ratio.

For myself I just found an I think acceptable solution. Gimp alone didn't seem to work since it can't zoom with uneven aspect ratio. But I found a screen magnifier, actually probably the simplest one, "xzoom". It supports whole number zooms only, but it is possible to set the horizontal and vertical zooms individually (press 'w' or 'h', then '+' or '-' to add or subtract from the zoom level of width or height). To make this approach useful, Gimp supports having multiple views of the same image, so it is possible to drop an original size view on some spare screen region to apply xzoom on.

For my Mode 74 (and any 7 cycles per pixel mode) it is simple: X zoom = 3, Y zoom = 2 produces proper aspect ratio. For a 6 cycles per pixel mode, X zoom = 4, Y zoom = 3 or X zoom = 5, Y zoom = 4 is about right (the latter being closer to the truth).

Of course it is not perfect, it lags with the update, but still real-time enough to make it a lot more convenient to see how the thing will look like when rendered by Uzebox. Anything better?

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Drawing with correct aspect ratio

Post by Jubatian » Fri Nov 13, 2015 10:18 am

Eh, I found it can be done in Gimp itself, a whole lot easier!

An example of drawing for 7 cycles per pixel is here (uploaded on imgur), Gimp properly scaling the 1,5:1 aspect ratio. Great! I also plan on creating stuff for the BitBox console keeping portability in mind, using a 360x360 3:2 display, also having 1,5:1 aspect ratio (why so? This is a resolution also possible with plain VGA, a ModeX variant: letterboxed 360x400, so it is possible to have an IBM PC port later, and due to the 360 pixels height it also fits snugly in contemporary 720p or 1080p formats).

How to do it?

You can set the monitor's DPI in Preferences / Display if necessary, it has to be set up proper for your monitor for this to work. Then on the image, two settings. First, tick out View / Dot for Dot, which disables exact pixel mapping. The image will now likely show in different size, slightly blurred as Gimp scales it to appear at physical size, determined from the monitor's DPI setting, and the image's print resolution. The next is to change the image's print resolution, which is accessible at Image / Print size. To obtain non-rectangular pixels, you need to calculate these proper fitting your preferences. The monitor's DPI is usually rectangular (same horizontal DPI like vertical), so here for example to get 1,5:1 aspect ratio for 7cy / pixel, you would have to divide the vertical resolution by 1,5 to get the horizontal resolution, for example having 48:72 X:Y DPI.

Of course any aspect ratio can be achieved here, for 6cy / pixel, you need to divide by 1,28, for 5cy / pixel, by 1,07 (if you really want to keep it right, practically this is negligible).

The experiments on the screenshot above are for a role playing game using Mode 74, all the larger images fitting in RAM (using a C64 multicolor style mode with 18 bytes / 8x8 tile).

User avatar
D3thAdd3r
Posts: 2422
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Drawing with correct aspect ratio

Post by D3thAdd3r » Sat Nov 14, 2015 12:38 am

This is useful information. If you got a chance, it could be a nice thing to post on the wiki somewhere so it is available for someone looking for it in the future. There is a lot of good tidbits floating on the forum that haven't made it to the wiki which is a shame and re-inventing wheels is never fun.

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Drawing with correct aspect ratio

Post by Jubatian » Mon Nov 16, 2015 7:51 pm

OK, I will do that later. For now I rounded up a general article on the matter on my site:

http://www.jubatian.com/articles/using- ... s-in-gimp/

What do you think about this? Transforming to be more Uzebox-specific of course for the Uzebox wiki. It might take some days though, depends on how well the net access here cooperates (it was a pain to finish that up on my site, even moving the computer to a spot where usually the signal is more stable... well, there is a reason I post such complex stuff rarely, needs many uploads and big frustration).

User avatar
D3thAdd3r
Posts: 2422
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Drawing with correct aspect ratio

Post by D3thAdd3r » Mon Nov 16, 2015 11:28 pm

The article is very thorough and seems to be the authority on all pixel aspect graphics so I think it is excellent. Even wording in a link somewhere on the wiki is good too since the info is still rounded up for someone looking.

Out of curiosity what is the weakest link in your internet setup, the wifi? Maybe a cheap and strategically placed repeater would save you much time in that case.

User avatar
uze6666
Site Admin
Posts: 4449
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Drawing with correct aspect ratio

Post by uze6666 » Tue Nov 17, 2015 3:32 am

Pretty good writeup, I like it. I see you have an artistic side too. :P

User avatar
Jubatian
Posts: 1355
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Drawing with correct aspect ratio

Post by Jubatian » Mon Nov 23, 2015 6:52 pm

Settling in the kitchen, thanks to some clean weather I got a Wiki article up on the matter. Hope it is OK.

By the way my strategically placed repeater would most likely be duct-taped on the kitchen's ceiling, at least that's about where the reception is the cleanest... The landlord wouldn't like that. Neither I if it had similar reliaility issues with it like the computer (frequently wifi drops off while the driver still thinks it is connected, so I have a script pinging a Google name server once in 4 secs to realize it dropped off and reconnect automatically... hovever occasionally even that happens that I have ping, but no http).

User avatar
uze6666
Site Admin
Posts: 4449
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Drawing with correct aspect ratio

Post by uze6666 » Wed Nov 25, 2015 4:41 am

All good for me. I tend to always forget about the aspect ratios and waste time trying to figure out so this will come handy. Photoshop also has an aspect ratio feature but more easy to use. In my case I'd have to key in simply 0.75 for Uzebox/6cycles.

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests