Jump to content

Need help with sprite sheets


sinspaw

Recommended Posts

So here's my problem.

I have this model with two animations. I'm exporting these animations via the built-in spritesheet creator. It works well with the exception of a big issue.

The walk animation has the character always in the same centered position in the entirety of the walk. The blast animation however, has the character changing positions and so the body becomes off-center.

Take the position of the head on the Blast animation. It's slightly to the left of the center compared to the Walk animation. This is very problematic for the type of work I'll be doing.

Basically what I need is for the center of the body to ALWAYS be in the same position, regardless of what the body is doing. I've centered the character in the same position for both animations inside Spriter, but the program totally ignores that and changes the "center" of the character in the Blast animation.

I've tried to solve this problem with the Texture Packer program, but it doesn't solve it because Spriter still exports the frames with a change in body position.

 

How can I solve this issue? If it's solvable at all.

 

Thanks in advance.

Blast_test.png

Walk_test.png

Link to comment
Share on other sites

Typically what you'd want to do is adjust the hotspot for each animation manually so that you don't need massively padded frames in your Sprite-sheet, wasting memory and drawing time.

By default Spriter finds the closest trim per animation.. This way, if your character does not take up large horizontal space in an animation (like walking) it does not pad the walking animation with tons of extra horizontal blank space.  This, of course, causes each animations frames widths (and/or heights) to be different sizes.

There is a "solution", which is to change the default "source rectangle" setting from "trim rect to animation" to instead use "trim rect to entity".  But Like I said, this will be very wasteful, though this is apparently what you want.

Why can't you hand tweak the position of the hotspot per animation after importing into your game engine?

Also, are you using a language or authoring system which does not yet support loading and playing back the actual Spriter files in the game?

cheers.

 

Link to comment
Share on other sites

Trim rect to entity doesn't appear to me, only "custom". Is that what you meant?

I've tried custom, but I don't understand how it works, since it asks for Left, Top, Right, and Bottom and I honestly don't understand what to do with those values, maybe I'm just being stupid.

 

I can tweak the position of he hotspot per animation, but that will be a monumentally big task, since I will have literally hundreds of spritesheets of 9x6 images on a 8192x8192 type of texture. This essencially means I have to tweak literally hundreds of pictures to manually match the original one. I'd rather waste some memory and have the pivot exactly where I want it with a bit more of alpha pixels than wasting all that time tweaking.

I'm using UE4 blueprints system. It doesn't support Spriter files. I'll be importing the textures and slicing them up there, and customizing every sprite for a specific source dimension from the texture is incredibly time consuming. Also, yes I do know that it's not ideal to work this way, but it's how it's going to be :P

So is it "custom" or am I missing something with that "trim rect to entity"?

 

Thank you very much for the help.

Link to comment
Share on other sites

PS, the custom rectangle feature would also work if you're careful. The trick is the top left bottom and right settings refer to pixel coordinates based on the cross-hair zero-zero point of your animation.. If you had a centered animation and you wanted to export 32x32 pixel frames your settings would be:

top= -16

left=-16

bottom=16

right=16 

 

Link to comment
Share on other sites

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...