Pixel Settings

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
DK
Posts: 2849
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Pixel Settings

Post by DK »

Hi.
Can anyone shed some light on the Moho pixel settings? I am playing with some 8 bit style characters and am getting mixed results on how Moho interprets the width of lines it wants to render. For instance. If I am working with a screen size 640 x 480 and wanted to get a strict 640 x 480 pixel rendering what settings should I use for line widths to get a true pixel filter ? Not sure how pixel size is calculated either? Is it based on the grid settings?

Thanks for any info.
Cheers
D.K
User avatar
Maestral
Posts: 531
Joined: Tue Jan 27, 2009 5:44 pm
Location: Belgrade, Serbia

Re: Pixel Settings

Post by Maestral »

Hi DK,
This page might be a good starting point
User avatar
DK
Posts: 2849
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: Pixel Settings

Post by DK »

Thanks Maestral.
I was actually referring to the Pixel function in Moho. There is a setting in the project settings that allows you to set a pixel size for your renders. I am not sure how this script calculates line width or other things. It seems very trial and error. I found a few settings today that give ok results but nothing that really gives a true pixel rendering. Straight lines become jaggies, line thicknesses differ from one side to another etc.....just would like to know a bit about what's going on so you can design characters that will render in pixel style correctly balanced. Otherwise I can just use paint and a 1 pixel size brush :)

Cheers
D.K
User avatar
hayasidist
Posts: 3492
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Pixel Settings

Post by hayasidist »

Hi DK.

if your project settings are 640*480 then that's exactly what the render will be - whether you've zoomed right in to a tiny vector that's only a 1/1000th of the screen size when at default zoom or whether you've zoomed right out to fit a vector that's 1000 times the screen size at default zoom.

If you're at default zoom then the screen height is 2 moho units top to bottom - so at default zoom 1 pixel = 2/480 moho units.

Stroke width is a bit more tricky. The number in the stroke width box (e.g. 4) is not the number that's actually stored internally - the internals use moho units (and I can't immediately remember exactly the way it converts to "user friendly stroke width number" to moho units). Also, the width is of a "full width" brush so if, e.g., you have a stroke width of 6 and a custom brush that's just a thin line you'll get fewer filled pixels that with the default "none" brush; and, just to make things trickier, the "none" brush is not quite 100% of the nominal thickness either!

Don't forget to turn off Antialiasing in the vector layers!

Imbalance / jaggies will most likely be the render engine decoding that pixel {x,y} is only 45% filled, so not filling it ... but the corresponding pixel "the other side" is 55% filled so it will fill it => one side thicker than the other!




I know that's only half an answer.. hopefully more to come when I dig out the answer to the stroke width <-> pixel logic.
User avatar
DK
Posts: 2849
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: Pixel Settings

Post by DK »

Brilliant Hayasidist! Thanks. Very keen to see what else you discover! :shock:

Cheers
D.K
Post Reply