KatsBits Community

[iOS] iPod Touch/iPhone - image sizes

kat · 4 · 11072

0 Members and 2 Guests are viewing this topic.

Online kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Has any done any development for iPhone or ipod Touch? (not sure about iPad)?. I was just looking at some information about texture sizes and although they don't provide any 'real' data in the basic material available on the Apple site (without signing up it seems) there is mention of the screen DPI which is set to 163 dpi.

Now with my old print design background in mind I understand that to mean that from a bitmaps point of view the physical size of an image gets bigger/smaller depending on its resolution. In other words, if you re-sampled a 256x256@72dpi (H/W in pixels) image from 72dpi ->> 163dpi it gets re-sampled and then re-sized physically to 580x580 pixels - by increasing the dpi you're 'adding' data to the image (relative to its screen size). If you re-sample the apparently same 256x256 other way around going from 163dpi ->> 72dpi, the images gets re-sampled to a much smaller size of 113x113 pixels because you're effectively taking data away.

What I'm trying to figure out is that if you simply port your assets over to iOS does it mean the textures don't necessarily represent power-of-two because of the re-sample required to render material to the 'retina' screen the devices use. Is that right?

[EDIT]Found some stuff on the Apple dev network
Point vs Pixels, supporting high res screens, updating your image resource files, images and memory management. Basically there doesn't appear to be any info on the physical attributes of an image when used for iOS, which is a little odd as the system uses OpenGL.


Online kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
OK. Measurement in iOS4 (and  likely above) has a 2:1, point:pixel ratio so 'one point' (1pt) equals 'two pixels' (2px). It looks like the 'resolution' in terms of the question posed above doesn't matter as such except in relation to there being more 'pixel/point' content onto a screen that's physically the same size on all generation of devices, so older gen devices have an effective display of 320x480 points, whilst the newer ones effective have 640x960 points, both displayed on a screen that's approx 75x50mm physically (active area).

There seems to be a caveat to the above though in that it tends to be applicable to 'generated' graphics and not bitmaps, which it's suggested, should be treated as you would normally when making content. Some key points from other developers are;

  • Follow the power-of-two rule - do NOT use arbitrary size graphics for the same reason you wouldn't for 'normal' game development
  • Apple advise not going above 1024x1024 for individual textures due to memory usage...
  • ... which should be kept to a minimum, under 20-25mb seems to be a common limit
  • Using texture 'sheets' seems the better approach to art work...
  • ... so where ever possible combine similar textures into fewer larger image instead of using lots of smaller individual images (batching?)
  • Main format for images *.tif, *.jpg, *.png, *.bmp (note. JPEG images likely need to be saved NOT using "pregressive compression")
  • Apps do better the smaller they are, keep in mind mobile and limited bandwidth connections and network access
  • Keep unique texture calls to a minimum - re-use, repeat and tile
  • Keep alpha channel usage to a minimum
  • Polycount per view/scene should be under 10k (think Quake3/UT - 5/6k being upper limits which you don't want to be going over too frequently for the polygon budget)

If you developed content/mods when 32k/56k modem/phone line access was the norm, that seems to be the general consensus with regards the 'mindset' (for want of a better way of putting it) developers need for making content for iOS devices.

Some other links to useful info
http://globalmoxie.com/blog/designing-for-iphone4-retina-display.shtml


Offline silicone_milk

  • VIP
  • Full Member
  • *
    • Posts: 172
    • My Portfolio
This is an interesting and good read, Kat. Especially considering I'm looking at getting started with iphone game development.



Online kat

  • Administrator
  • Hero Member
  • *
    • Posts: 2692
    • KatsBits
Yeah, the above is a compilation of what I've been reading whilst doing some research on this from an 'artists' point of view, a good majority of available information I've found relates to programmers and coding rather than art, so I  thought putting this here might be useful to others (like yourself). When/if you do start working post any corrections and/or findings so they get be added to the list.