Question about image sizes
MarpCark
Member Posts: 121
Hey guys! Just a few questions about image sizes that im still not sure about:
-Does the image size HAVE to be divisible by 4 for optimum resolution quality? Or can it just be any size, just as long as it is double the size it will be as an actor in the game for Retina display? (e.g.. 191x191 into 382x382)
-If i make my image 200x200 (so 100x100 in game) then decide i want my actor in the game to be 80x80 instead, do i have to go and edit the image file into 160x160? Or can i just leave it as 200x200?
Cheers
Comments
Resolution isn't really a qualitative measurement, the reason divisible by 4 images are recommended is not to improve or make optimal the resolution of an image, it's to avoid pixels sitting on sub-pixel positions.
But do images sizes have to be divisible by 4 ? Not necessarily, although it depends on a few factors, where the actor is placed (on a whole or sub-pixel value) whether the actor is moving or not, what kind of images you have and so on. For example if your image is rotating, even very very slowly, then the divisible by 4 recommendation is irrelevant.
Image assets need to be double the size of the actor they are being applied to - except for iPhone6+ GameSalad projects where the assets need to be triple the size of the actor they are being applied to.
You can leave it as 200 x 200, but there will be a small quality loss when the image is interpolated (usually seen as a slight blurring/aliasing) - so ideally you would resize your image file - but again this is all dependent on your particular game/image, and this is assuming the interpolation method used to resize your image (for example Photoshop) is any better than, for example, OpenGL (which would be what is doing the real time resizing on an iPad).
If you have a soft cloud image on a 200 x 200 pixel actor flying across the screen at 500 pixels per second then it's really not going to make much difference whether the image is divisible by 4 or even 2, in fact people aren't even going to notice if the image is only 100 x 100 pixels (rather than the recommended 400 x 400 pixels) . . . but on the other hand if you have a circular black graphic logo on a white background, sat in the corner of your scene layout, static and unmoving, then you would probably notice even a small drop in resolution or odd pixel dimensions. But then all you have to do is to slowly rotate this logo and all bets are off again, once moving most of these recommendations are moot, certainly the divisible by 4 recommendation, and a lot of the elements in games are often moving.
And of course if you completely ignore the divisible by 4 rule - you can still have optimal image fidelity by simply moving your image to the correct location for its pixel count.
Example.
40 x 40 image sat at 100, 100 = perfect image fidelity.
41 x 41 image sat at 100, 100 = compromised image fidelity.
40 x 40 image sat at 100.5, 100.5 = compromised image fidelity.
41 x 41 image sat at 100.5, 100.5 = perfect image fidelity.
@Socks ok thanks mate, im pretty sure i understand most of what you're saying. Seems like just as i feel like im starting to understand this whole game development thing, theres always something round the corner that has me like 0_0. But thanks for explaining everything to me, definitely cleared up a bunch of stuff thats been clogging my head.
One last question though: Because im soon going to be uploading my website (a free resource website) im going to be uploading graphics there as well that people can download. Is there a recommended size for these? Ive heard that 400x400 is like the default size to upload in.
To be fair all this imaging stuff isn't particular to game development, it's just imaging in general, all the same issues apply to something like - for example - After Effects or even web development, issues of resolution and placement are particular to digital imaging rather than game development. If you import an oddly dimensioned image into After Effects you will see the very same issues you would do if you were to import an oddly dimensioned image into GameSalad.
Well, obviously a 400 x 400 pixel image would be no good for a mountain scene to be used as a background on a Retina iPad (2048 x 1536) or a tall/thin lamppost (let's say 60 x 640) . . . . a 400 x 400 pixel image is ideal for something that is 400 x 400 pixels ! . . . . but will obviously be wrong for anything that isn't 400 x 400 pixels.