Equal camera size and design resolution
by Per Ellefsen · in Torque Game Builder · 08/06/2008 (12:38 pm) · 5 replies
Since I'm doing pixel graphics any scaling or blurring is unwanted and therefore I'd like to make the camera size the same size as the design resolution. However, after scaling down the resolution to 640x480 I'm having a hard time doing this. Math is not my strong point but I though that since 800 divided by 640 gives 1.25, I could just divide the camera size by the same amount (1.25) and be set. This, though, gives a camera size that is actually smaller than the new design resolution. What am I doing wrong? Is there a function to equal the camera size with the design resolution?
#2
08/06/2008 (1:23 pm)
That's what I thought too, after reading the tutorial, but the end result when I do this is that the graphics appear scaled down (as if the camera has been zoomed out), only covering a small part of the screen.
#3
08/06/2008 (1:30 pm)
Maybe I need to scale the graphics to fit the new camera size?
#4
08/06/2008 (1:50 pm)
If you change the camera/design resolution if will not affect the size of all your objects in the scene. So yes, if you make your camera a huge area, everything will appear small within it, until you resize them all to appear the correct relative size.
#5
-What I didn't understand was that there is no set relationship between a world unit and a pixel unit.
Thank you to you both.
08/06/2008 (2:17 pm)
Yes, that did it. Since the ratio between the camera size and the resolution size was now 1:1, each graphical object had to share the same ratio. In other words, a graphical object that is 32x32 pixels had to be scaled to 32x32 world units to be displayed correctly.-What I didn't understand was that there is no set relationship between a world unit and a pixel unit.
Thank you to you both.
Torque 3D Owner Eric Armstrong
Bloody Tongue Games