sinspaw Posted December 9, 2015 Report Posted December 9, 2015 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. Quote
Mike at BrashMonkey Posted December 9, 2015 Report Posted December 9, 2015 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. Quote
sinspaw Posted December 9, 2015 Author Report Posted December 9, 2015 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 So is it "custom" or am I missing something with that "trim rect to entity"? Thank you very much for the help. Quote
Mike at BrashMonkey Posted December 10, 2015 Report Posted December 10, 2015 Perhaps it's a Spriter Pro only feature. Do you have only the free version of Spriter or Spriter Pro? You seem to be looking in the right spot. Quote
sinspaw Posted December 10, 2015 Author Report Posted December 10, 2015 I have the Spriter Pro on Steam. Quote
sinspaw Posted December 10, 2015 Author Report Posted December 10, 2015 Oh I just checked, it's a "batch export" feature. It works PERFECTLY for what I wanted, I just tested it! Thanks for the help kind man or woman. Really. Quote
Mike at BrashMonkey Posted December 10, 2015 Report Posted December 10, 2015 AH! It only appears as an option if you turn on (check box) the "batch export" option, which exports all animations at once. Quote
Mike at BrashMonkey Posted December 10, 2015 Report Posted December 10, 2015 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 Jens Stjernkvist 1 Quote
sinspaw Posted December 10, 2015 Author Report Posted December 10, 2015 Thanks. I'll give it a try at some point, but this Batch Export feature with the Trim Rect to Entity seems perfect for me to save that sweet production time! Quote
Recommended Posts
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.