x


2D object resolution

I'm new to Unity and am tinkering with the graphics. I'm trying to make 2D objects by putting textures on planes and aiming the camera (in orthographic mode, of course) at their faces, but I can't seem to get the resolution of the objects quite right. I want each pixel in the texture to take up exactly one pixel on screen when the game is playing.

How do I set things to force this to happen?

more ▼

asked Dec 11 '09 at 09:55 AM

DGM gravatar image

DGM
21 1 1 2

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

As Jaap mentions SpriteManager is a good package and in particular SpriteManager2 has a Pixel Perfect option - http://www.anbsoft.com/middleware/sm2/

more ▼

answered Dec 11 '09 at 02:52 PM

ibyte gravatar image

ibyte
544 12 18 27

Yes but won't pixel perfect screw up the alignment of any textures if the resolution changes?

Nov 23 '10 at 08:34 AM Jack

Anslem, pixel perfect means just that. You need to supply the proper texture for each resolution. If you don't use pixel perfect then your subject to scaling.

Jan 12 '11 at 04:09 AM ibyte
(comments are locked)
10|3000 characters needed characters left

It's difficult to get it exactly right, part because OpenGL handles the way texture pixels are mapped to screen pixels a bit different. Possibly a good point to start is:

SpriteManager

more ▼

answered Dec 11 '09 at 10:42 AM

Jaap Kreijkamp gravatar image

Jaap Kreijkamp
6.4k 20 26 70

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1039
x492

asked: Dec 11 '09 at 09:55 AM

Seen: 1676 times

Last Updated: Dec 11 '09 at 02:12 PM