0
\$\begingroup\$

I've had this question since a long time ago and wanted to know the relationship between how an object is viewed through the camera depending on the resolution of the device, the camera's view size and the object scale, so for example:

let's say i have a 100x100 square in the middle of the screen, the camera is looking directly at it and let's say the square takes 10% of a specific screen, if i wanted it to keep that relationship with the screen do i have to change the square size depending on the screen size?, change the camera's width and height? or change the resolution of the game?

in short, how does the resolution and the camera's widht and height affect the scale and proportions of the objects of the screen?

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

The World/Model matrix moves objects from object-space to world-space.
World coordinates have no software-defined min/max values.

The View matrix re-centers the scene on the camera.
It is the anti-world-matrix for the entire scene. Since the camera's View-space location is (0,0), objects are either left/right or down/up, corresponding to -/+ coordinate values but the coordinates are not scaled or normalized.

The Projection matrix defines the viewable frustum.
After projection, the center of the rendertarget becomes (0,0) and coordinate X and Y values are scaled into the range of -1 to +1 (Z is represented differently by different systems).
+1 corresponds to the right and top edges, regardless of texture dimension.
-1 corresponds to the left and bottom edges, regardless of texture dimension.
This is how you define "how much" 3D space to extract and compress into the same set of screen coordinates and where resolution, FOV, and aspect ratio come into play.

http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter04.html
4.1.9 addresses your specific questions regarding devices.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .