September 24, 2009

Texture Compression Artifacts

We are developing mainly for the iPhone/iPod touch, which use PVRTC texture compression. With the massive textures we use, we really need compression. The ground alone use 16 512x512 and 12 256x256 textures. On top of that, there are some 5 1024x1024 textures for the buildings and trees.

Unfortunately, line art (wich is basically what our ground textures are) gives pretty bad compression artifacts with PVRTC. Especially the borders of textures gets messed up, as you can see in the screenshot below.

There is clearly visible seam just behind the car, and another right after the house. You can also see some pink/green noise, particularly where the shadows of the trees fall on the road.

Without the compression, the ground looks absolutely smooth with crisp edges and no seams. I tried running the game without compression, but even with 16 bit textures, the game just wouldn't run smoothly.

It turns out the texture compression tool shipped with the SDK has a few options not accessible from inside Unity. I'd really like to play around with those, but it doesn't seem like there's any straight-forward way to actually use them anyway. Oh, well.

I guess we could get rid of the seams if we didn't use the last few pixels close to the texture border. We will probably try that in the final release. Right now, there are other, higher priority issues (like some actual gameplay) we need to deal with.

No comments:

Post a Comment

Games, design and programming for web and handheld devices.