Game Development Community

150X150 animated sprite seems to have bounds issues, not rendering properly

by Will O-Reagan · in Torque X 2D · 10/22/2010 (9:31 pm) · 5 replies

The right hand side of this animated sprite seems to be getting a bleed in from the next sprite over... is this a known issue?

About the author

I have a degree in dramatic art, and literature, from UC Santa Barbara. I've worked for a few studios, also at Animax Ent in 2008, and some smaller studios. Currently studying Computer Science at CSU Channel Islands.


#1
10/23/2010 (5:53 am)
It's the same issue tile maps have. Partly due to interpolation, partly due to pixel boundaries.

It may be better for you to use a key image map(with fuchsia as your key color...this way your bleed in is transparent) instead of a cell map or add transparency between the sprite and the edge of the cell(may have to increase cell size, so may be a no go).
#2
10/23/2010 (6:30 am)
Thanks for the suggestions. I'm sure that will work just fine, still I'll try a few other things too maybe.
#3
10/23/2010 (11:40 pm)
You can run the same fixes as the tilemap, but I usually find it better to just do what I suggested earlier:)
#4
10/26/2010 (10:36 pm)
If I am understanding you correctly, make sure you include a 1 pixel transparent border around each *frame* in your animation. This means there should be two blank pixels separating individual frames. What happens is that your image gets bilinear filtered by the SimpleMaterial shader. The one pixel boundary on each frame prevents your image from bleeding over into the next frame.
#5
10/26/2010 (10:45 pm)
That makes sense, this is the solution we ended up going with too. It was a very simple fix, only required a few art pieces to be fudged around. Thanks for the tips guys.