I'm working on an isometric game. I have the 3D pre-rendered sprites for directions per state (walking/running, etc.) per frame. Now I need to know where a particular character stands on the ground to have it synchronized. But this "ground contact point" (GCP) changes from frame to frame, and is basically (slightly) different for every combination. At this moment I have some rough average, but sprite wiggles a bit during animation. It's rendered correctly (1024x768), but cropping of the frames even though it correctly removes empty borders, it also removes the "offset" information, which is no longer there. So I basically need to remove empty borders while taking into account all the frames in all the animations. So the character in the sprite animation is still stabilized, but unneeded space is removed.


Figure A     Figure B     Figure C

Is there any software that does it, or is there some technique to do it?

  • 1
    \$\begingroup\$ Ideally this would be handled in the 3D animations before export. Making the contact point always at the same height in the rendered sprite. This would mean moving the root bone down if the legs were retracted. Or maybe I'm not understanding the question. \$\endgroup\$ – MichaelHouse Dec 28 '13 at 15:36
  • \$\begingroup\$ Thanks for the interesting input, at the moment I'm using Poser to render it. I'm not sure if rendering it with fixed bone is possible, but I will check it out. Yet, I'm still using crop afterwards. You gave me the idea that maybe another options would be also feasible. Somehow detect position of the root bone, and then convert it to 2D projection. But both ways require quite a change. Isn't there at least some way to help (some technique) me do it in a "post-production"? \$\endgroup\$ – SmartK8 Dec 28 '13 at 15:46
  • \$\begingroup\$ Also it isn't contact point per se. It's more of a central point, or pivotal projection to the ground that personifies the player's position. I'm not even sure what exactly this should be. The height should be solved (maybe) by fixed height, but how to fix x-axis? \$\endgroup\$ – SmartK8 Dec 28 '13 at 15:51
  • \$\begingroup\$ I gave it a thought, and it's probably a center of gravity projected on the ground (in 3D). I'm not familiar with the terms, as I'm working on this for problem for the first time. So excuse me, if I'm not making myself clear. \$\endgroup\$ – SmartK8 Dec 28 '13 at 15:56
  • \$\begingroup\$ Hey Kate, I'm glad you got it worked out. However, asking questions about "which technology to use" are off topic here. Perhaps since your question has changed enough (and there aren't any answers yet), you can rework the entire question to instead ask about techniques for maintaining the offset and trimming the unneeded space. \$\endgroup\$ – MichaelHouse Dec 28 '13 at 17:18

Thanks to Byte56, I was able to realize what causes the loss of information (cropping), and was able to find a solution. I used ImageMagick command:

convert.exe "MyFrame.png" -crop WidthxHeight+HorizontalPadding+VerticalPadding 
            +repage "MyResultFrame.png" 

This command cropped the square of particular size for all the frames/states/directions. And frames are now correctly aligned, and animation is smooth and natural looking.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.