Jump to content
  • Advertisement
Sign in to follow this  
DapperDave

Need help transforming a 2D image

This topic is 2161 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

EDIT: Solved...at the moment

Working on a game in XNA with C#. I posted this in the creator's club forum and didn't get much help so I thought I'd give it a shot here.

For our RPG, we have enemy sprites that spin and fall down when dodging, hit and defeated - like in an old west shooting gallery.

You can check out the effect in this video demonstrating our combat system:

[media]
[/media]

It's a neat effect but there's nothing fancy going on here. This is done simply by manually distorting the original sprite in photoshop and creating an animation. Here is an enemy spritesheet:

Weezler.png

The problem is, it takes a long time to manually create these animations and it's prone to human error.
It would be fantastic if there was a way to code the same effects from the original sprite (in 2D). I looked into it before, but gave up as it seemed too complex for me.

However, faced with how long it takes to do manually, I thought it would be worth a shot to see if anyone can help me out and point me in the right direction to code the effect. Edited by DapperDave

Share this post


Link to post
Share on other sites
Advertisement
Not 100% sure on how you are transforming the image, but it looks like a series of skews. If you can determine the exact operations needed, then it would boil down to one or more transforms, likely done with a transform matrix. For example, see here: http://forums.create...098.aspx#215098

Perhaps this is already your intention, but I suggest considering on providing this functionality as a stand-alone tool, since some (many?) sprites would likely need some artistic touch-up after transformation. If you go this route, you could also consider writing scripts for, say, Gimp - I believe it provides a python scripting interface.

Share this post


Link to post
Share on other sites

Not 100% sure on how you are transforming the image, but it looks like a series of skews. If you can determine the exact operations needed, then it would boil down to one or more transforms, likely done with a transform matrix. For example, see here: http://forums.create...098.aspx#215098

Perhaps this is already your intention, but I suggest considering on providing this functionality as a stand-alone tool, since some (many?) sprites would likely need some artistic touch-up after transformation. If you go this route, you could also consider writing scripts for, say, Gimp - I believe it provides a python scripting interface.


Thanks. You seem to understand what I'm going for, so I'm going to look into your suggestions and report back

Share this post


Link to post
Share on other sites
12 hours later and no luck. I tried everything with "quads" but couldn't get the effect working. I would try GodofOdd's final solution in this thread http://forums.create.msdn.com/forums/t/37143.aspx but I can't make heads or tails of his code.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!