Jump to content

Export only part of a sprite?


Nailez

Recommended Posts

I was wondering if it is possible to export only part of a sprite that is animated?

As an example imagine a square and a circle above it. the animation has the circle fall to the ground and as it falls it covers the square. Then we export to png and we get only the visible part of the square in the animation without the circle.

It's hard to explain what I mean but imagine trying to animate a sword on a characters back. You draw the entire sword but during the animation only a little part of the sword is visible. Since the player is customizable I don't want to export the sword sprite with the player. And I couldn't simply put the sword behind the player in game because the sword has a strap which is in front of the player.

Any thoughts on how I would go about doing this?

Thanks

Link to comment
Share on other sites

You could create a Character map (if you're using Spriter Pro) to hide specific sprites, or swap them with other sprites, and that would be reflected in your export of PNG's.

You can also choose to designate custom cropping coordinates while exporting as seen in this screen-grab.

custom_rect_export.jpg

You can then type in numbers for the top left and bottom right pixel coordinates for the cropping to occur.

cheers,

Mike at BrashMonkey

Link to comment
Share on other sites

The custom cropping coordinates method is very good for sprites which are cut off straight and clean but not for sprites which are cut off by a circle.

I have attached a spriter project file with everything you need to see what I want to do.

In the project file there is a square and a circle that drops in front of it. I would like to export the animation as a png without the circle. But retain the circles animation data against the square so parts of the square would not be visible.

Here is a picture of what I get:

post-17112-1415983423801_thumb.png

Here is a picture of what I want:

post-17112-14159834239373_thumb.png

The second picture without the circle I had to modify each frame in photoshop. This method takes up a lot of time. If it was possible to do that in Spriter is basically what I am asking.

Also I am using Spriter Pro B8_1.

Thanks

SpriterTest.zip

Link to comment
Share on other sites

You could use a dummy image in place of the "circle" which has the same alpha channel, but all one, solid, unique color (i.e. one which appears nowhere else in the animation; "magic pink" – #FF00FF – is a popular choice) and then use a (semi)automated process to erase it from the exported animation; i.e. a "color replacer" tool in PS (I don't use it, so I don't know if it has one or what it's called) or ImageMagick. Essentially, you'd be using a form of chroma-keying.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...