How long is a pixel?

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

How long is a pixel?

Post by Genete »

I've searchig in the forum about a question I have no answer yet.
I know that grid unit are pixels. So if you have a 800x600 project preferences and have 10 in the grid unit box, you will obtain 80x40 sqaures fiting your project area.
My question is: what is the correspondence between the size of the project and its coordinates values. In other words how much is a pixel in coordinates values?
For instance I have 100x100 pixels in project preferences If I put a grid of 10 pixels It have a length of 0.02. So the height of your project becomes exactly to a size of 2 in coordinates values. It will happen for any combination of x and y dimension of the project. It will always fit to a size of 2 in vertical dimension (speaking in AS coordinates values).
This value of 2 is due to the default values of the camera projection
Z= 1.7321 and ZOOM=60

The only reference I've found about it is in the manual when it talks about particle layers:
Velocity - the speed that particles start at (a value of 2 will cause a particle to cross the entire screen vertically in one second)
So the relationship between pixels and coordinates depends on zoom and z position of the camera.

Can anyone give a formula to obtain the length of a pixel based on the z and zoom values?

I've also found this thread that confirms that the length of a pixel depends on the zoom and Z value, but I have "some" problems with 4x4 transformation matrixes... :roll:

Thanks
Genete
HassleHead
Posts: 59
Joined: Sat Jan 06, 2007 12:37 am
Location: NYC
Contact:

Post by HassleHead »

What's the "grid unit box?" My understanding (which may be very wrong) is this: AS is vector based so the drawings are independent of resolution and will scale to the resolution you choose. The number of pixels you choose in the "project settings" effects the number of pixels in the ouput image or video. Similarly, the size of a pixel is dependent on the dimension at which you play your files. You can play 100x100 pixels in a space 5x5 inches or 10x10 inches and then the size of the pixel varies while the absolute number remains the same. Again that's just my understanding. I suspect this doesn't answer your question.
User avatar
Lost Marble
Site Admin
Posts: 2356
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Post by Lost Marble »

How big one "unit" in Anime Studio appears does depend on zoom level, camera position, layer position etc. It's kind of like asking how big will my thumb be if I take a picture of it. Well, how far away is the camera, what lens is attached, how big will you print it, etc?

If you create a new document and you haven't changed any camera settings or moved the layer in 3D, then 0, 0 is the center of the blue rectangle (the blue rectangle represents what you will see in the final output). The X axis is to the right, and the Y axis is up. One unit up would put you at 0, 1, and this would correspond to the top edge of the blue rectangle (again, assuming you haven't moved the camera or the layer).

0, 1 will always put you at the top of the blue rectangle, regardless of the pixel dimensions of your project. This is why you can change the resolution at any time without screwing up your whole project.

So if your project is 320x240, then the distance from 0, 0 to 0, 1 will be 120 pixels (half the height of the rendered project). If your project is 800x600 then the distance from 0, 0 to 0, 1 will be 300 pixels.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

Thankyou Mike for the response you have been so kind on take interest in my question and I apreciate it, but I have to remark something.

Let's call "z" to the zoom value and "Z" to the z position of the camera.
Let's call "G" to the grid value in the input box (the length of the grid in pixels).
Let's call "g" to the grid size in coordinates values for the original zoom and Z values.
Let's call "H" to the heigth of the project in pixels.
Let's call "L" the value of the height of the project in coordinates values.

L=function(z,Z)

g=L*G/H

Then for the initial values of "Z" and "z" we have:
if z=60 and Z= 1.7321 then L=2
and g=2*G/H

My question is:
For a given H, and z, how can I set a Z value to obtain for example a value of g=0.1*G?.
So, what is the formula for the "function" of L from z and Z?

Thanks for the interest.
Regards
Genete
User avatar
slowtiger
Posts: 6257
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

ah, that's math, and we don't do math, we're animators *g*.

Seriously: I do sketches on paper or in AS and adjust whatever is needed by eye.
Post Reply