Sign in to follow this  
Sollum

Managing different screen resolutions and Mipmaps

Recommended Posts

Good evening,

Been developing new game for Android and want to implement different resolutions right this time.

I was always under the illusion that Mimmap's are the way to go. I mean, they automatically scale to the screen size? But after reading some of the articles, my illusions started to fade away.

It works well in 3D games, or even 2D games, where you can zoom in and out, get closer or further from object. Proper image is applied for better impression.

The article i was reading and the picture i found (http://www.badlogicgames.com/wordpress/wp-content/uploads/2010/12/mipmap.png) claims that mipmaps are supposed to be square of two.

But that's not what i need. Android phone fragmentation does not go from 1024 to 512.

I decided to go with 16:9 aspect ration and have to create as wide texture spectrum as possible in order to fit in.

640
720
854
960
1024
1280
1366
1600
 
From what i understand, i simply must create textures for all these resolutions, create texture atlases for them, and simply load the right image set at the run time.

Am i right or do i miss something with Mipmaps?

Share this post


Link to post
Share on other sites


Am i right or do i miss something with Mipmaps?

You missed something.  That isn't what they are for.

 

3D graphics wrap the texture around the model. When the 3D object is displayed, the mipmap image most closely resembling the right distance is used.  That way a closeup view may have a detailed texture, but a far away view will show a smooth intermediate value rather than sparkling between the lightest and darkest values in the details. For example, th closeup value may be a black and white checkerboard. Without a mipmap, when rendered at a distance the graphics card picks a spot in the texture; it may pick solid black one frame, then pick solid white when the object moves slightly. Since a checkerboard pattern at a distance looks like a solid gray, the mipmap value for a distance will be gray rather than checkerboard, and the graphics card will sample a spot in the gray texture, which looks correct without flickering to black/white.

 

For UI elements you are generally best creating several sets of 2D images. If you cannot find an exact match, take the next biggest image and scale it down.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this