Illuminating Sprites with Iffpencil2


Import the sprites back in to your object with t-mog and have a look (View Object)

BEAUTIFUL! Fantastic! Perfect! Well, very nearly, anyway. And we deserve some praise after all of that Sprite fiddling, I think.

You'll notice both Sprite 100 and Sprite 101 are listed in our Drawgroup 100. We gave them both the same X and Y co-ordinates earlier and there they still are: -62,13

You'll also notice that the lights seem to have drifted to the left and down a bit and we'll need to re-position those so they line up properly again but first I'll explain why they are in the wrong place to start with.

The X coordinate is where the left side of the sprite lines up. The Y coordinate is where the bottom of the sprite lines up. Our lights are actually lining up just the way we told them to - right alone with the table.

It just happens that in this case the position we WANT them to be in is very nearly the position they are in (since they are so large). With other designs you may find them wildly out of place. And always toward the bottom left corner.

The large zoom is easy enough to line up but the medium and small zooms can be downright painful to line up. Knowing in what direction they will move you could count pixels while in your paint program but what I've been doing is minimizing everything and right clicking on my desktop. This brings up a menu from which I choose Properties and there I choose the Settings Tab and move my slide my Resolution slider all of the way over to 800 by 600. It can still be a little rough depending on the design of your lights but it's a lot better than trying this at my normal 1280 X 1024.

I highly recommend you doing the same and then changing the zoom on this document so you can still read it.

When you are ready to begin repositioning your lights you'll want to make sure you highlight sprite id 101 and start shifting them over to the right a bit and up a bit.

To save you some aggravation I'll tell you the coordinates for our large zoom.

-59, 9

Looks great doesn't it?  Now move it to the right one and watch the chance it in Hardly anything. That's what can make this part annoying. But look ... the green lights look a little funky and if you look at the left hand pink light you'll notice a shadowy looking bit on it's left hand tip. In game the difference becomes much greater because out lights will be lit up and the background table will not.

Shift the lights back to -59,9 and try going up one. There's an interesting difference.  Play around with it a little bit and try to get a feel for what to look for in the various directions. You'll not be able to see quite as well in medium and small zoom so becoming familiar with what happens helps out.

Move it drastically and you'll see it'll cut into the table itself.  That's a combination of the z buffer and the positioning ... this is why we needed to use the exact same z buffer shades.

Again this is a simple single-sprite-per-zoom object so in this case every adjustment you have to make will be the same for each direction.

All of the large zooms will fit together with the same coordinates: -59,9

For medium you should play around again but the correct coordinates will be -29, 4

And for small the correct position is half again: -14, 2

A word of warning for those larger projects where you might be tempted to stop and check your work as you go along - the XML T-mog made earlier (when you first Exported the sprites) does NOT get updated with these changes we just made. To check your work and continue afterward you MUST export again. If you do not you will need to redo all changes since you Exported original.

OK close Tmog on up and restore your resolution (and the zoom on this document) to a more respectable size.

Continue to next page: Finish up in IffPencil2

Author: Raeven