Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411276 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 12:25:44 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsBasis - 2d Skeletal Animation Tool
Pages: 1 [2] 3 4
Print
Author Topic: Basis - 2d Skeletal Animation Tool  (Read 14472 times)
Scott
Level 2
**


View Profile WWW
« Reply #20 on: July 27, 2012, 08:18:43 AM »

I've never used it before, but assuming one can texture map an arbitrary quad in flash (right?), it would just take converting the reference c++ library to flash. It is a single file with just a few hundred lines of code, and should be easy to convert to any language or framework if you know it (and c++) reasonably well.

Also the file format will be openly available, even though one could deduce it from the code.
Logged

Scott
Level 2
**


View Profile WWW
« Reply #21 on: September 11, 2012, 12:54:02 AM »

It's insane just how much time one can spend polishing an application - whether it is a game or a tool. So, the last few weeks have been spent (amid general family, God, and life things naturally) doing just that. I have quite the all-done list of bug fixes and polish (we need a sparkly emoticon), as well as some optimizations where needed.

The todo list for releasing a more public alpha is down to the last 10 items Tears of Joy (including 2 bugs) so it's very, very close.

Future things once this gets out the door, in no particular order:
- IK
- Multiple image texture sources (right now all textures must be on 1 sheet)
- Frame-by-frame animation (need to think this out a bit more to integrate nicely into the current workflow)
- Export/import stuff (export image frames, import/export Spriter's scml, etc)
- Event triggering
- Hit box/sphere/hull support and animation
- Attach objects to each other
- Other surprises!
- (This is a completely free software by the way)

Almost a year and a half in the making. I'm excited.  Cheesy
« Last Edit: September 11, 2012, 01:00:13 AM by achild » Logged

Scott
Level 2
**


View Profile WWW
« Reply #22 on: September 12, 2012, 05:17:18 AM »

Okay I have a question that I would love to get feedback on if anyone would mind:

If you've worked with something like this before, when does z-order matter for you?
1) Do you basically just set it once, globally, and you're good after that?
2) Do you need it to be changeable? And if so - under what situations?

It's not a matter of implementation, so much as it is of workflow and fitting in the tool at the right place.

The only case I can think for changing z order mid-animation is if it is spinning along the x or y axis to fake some 3d-ness. It seems that would actually be a very rare thing to want though, even for a character that can turn left or right. What is your experience?
Logged

Scott
Level 2
**


View Profile WWW
« Reply #23 on: November 09, 2012, 08:26:55 AM »

Wow I feel as if I'm working on my very own hobby vaporware!~

Seriously though, here is the latest update to prove it is not:
- ADDED - x64 support
- ADDED - Unicode support
- ADDED - Multiple improvements to SKE file format
- ADDED - Skin rigging - you can move bones/pins in skin mode without changing sprite placement
- ADDED - Drawing optimizations
- ADDED - UI improvements
- ADDED - Calibrated texture scaling

Currently working on:
- Drag a skin to the workspace to automatically create a bone and attach it to it
- IK

It turns out IK is more important than I thought for artists. One wants to move an entity into place, not rotate a bunch of bone until they get it right. Currently, you can freely move a pin by ctrl+drag, but this also changes the length of the bone it is connected to. One artist kept resorting to this to place body parts and it just ended up scaling the skins in and out. Eek!

The other "duh" issue we ran into was that you would create a bone, then try to skin it. The skin's scale would be based on the bone size, always. You could then adjust, but you never knew what the actual size of the skin was supposed to be, relative to the other skins. In fixing this, we also address how to determine a texture-pixel's scale relative to world units.
Logged

Scott
Level 2
**


View Profile WWW
« Reply #24 on: November 09, 2012, 08:34:55 AM »

I am not a good artist but here is my flamingo in a bite animation. (Looks nicer in motion - I suppose it is time jump on the bandwagon and learn how to record videos and upload them to youtube!)


Logged

Scott
Level 2
**


View Profile WWW
« Reply #25 on: November 15, 2012, 08:59:39 AM »

FINISHED: Dragging a skin to the workspace creates a bone and attaches the skin to it, using uniform scaling
WIP: IK

I can't believe how easy IK is!!!!! I never really spent much time looking into it and just assumed it would be a huge pain, but well worth it. It turns out to be so easy. After creating a new source file and header to match, ready to fill it with hundreds of lines of code, a working implementation popped out 30 some odd lines later - including comments, blank lines, and includes!

Excuse my excitement. I'm just ... excited.

Seriously though, the main algorithm is like 6 lines of code in a loop.

For those interested, my first attempt involved a brute force approach, testing every angle for each bone, resulting in an n-dimensional array to analyze and determine the best solution. Even optimized using an n-dimensional pyramid, it was usable but could be flaky at times. The main problem was that even with just 16 initial angles to test, once you hit more than 7 or 8 bones you have to analyze tons and tons of memory. Working with an n-dimensional array easily got complex.

My second attempt uses a CCD based algorithm. It works very well. The only times this one really flakes out on me is when both the pin being moved and target are at or very-very close to a joint somewhere in the chain of bones. This makes sense because the angle formed here can be very big even though the distance is minute.

Will test at least 1 other algorithm as well, and then Stickimator will need the ability to easily lock an arbitrary number of pins in place, and we will have a very nice system indeed!

If you've always wanted to add IK to your engine/game/whatever, but have been putting it off, give it a shot! You may be pleased with the results!
Logged

Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #26 on: November 15, 2012, 02:36:34 PM »

This looks interesting.  What sort of data does it output?
Logged

Currently developing dot sneak - a minimalist stealth game
Scott
Level 2
**


View Profile WWW
« Reply #27 on: November 15, 2012, 08:26:49 PM »

This looks interesting.  What sort of data does it output?
Uses an open binary format for data, keeping all texture sources externally referenced. The plan is to have reference libs/plugins in different languages/frameworks. Definitely looking for anyone interested in implementing this in their language or framework of choice once it is a bit more mature, or really, to even experiment with it now if they'd like.

It will also support a plugin system - at the very least for file format import/export. I intend to write one for SCML (an XML based format) as an example, so others can write custom export/import plugins if they wish.

Also it will include export per-frame to PNGs in a variety of ways with some sensible options.
Logged

Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #28 on: November 16, 2012, 02:56:19 PM »

Well, what is the idea here-- that it generates animation data, and you load up the various images that make up your figures, then you can just animate them according to the data given when you have, say, 'make player A do this thing'?  I'm a bit confused what one does with this.
Logged

Currently developing dot sneak - a minimalist stealth game
Scott
Level 2
**


View Profile WWW
« Reply #29 on: November 16, 2012, 06:57:37 PM »

Pretty much. It generates animation data. Basically there are 2 ways it can output animation data:

1) Frame by frame sprites, usable as you would in any other sprite-based solution.
2) Natively - interpolating pin animation data (basically 2d bones). It maps various textures/skins to the bones, and your character is animated through this hierarchy.

#2 is especially nice (this method is used in more and more games these days) because you get so much more freedom. You can blend 2 different animations together. You can make one part of the body do one thing, and another part do another. You can even procedurally generate animation data blended with the recorded data (Inverse-kinematic, rigid body physics, whatever).

You can animate whole characters, objects, or even your whole world/level this way.

When I set out to start this project, gee, almost 2 years ago, there was absolutely no mature tool that I could find to do this - even though in many 2d game studios it had become the norm. Anyway, Stickimator has recently really started to come together so I have been putting more time into it (it was nearly abandoned for a while).

You might compare it to Spriter, if you've heard of it. They are very, very similar.
Logged

Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #30 on: November 19, 2012, 06:50:37 PM »

I'll look forward to the finished thing when it's out then. ^_^

I'm working in HTML5 for the foreseeable future, I could really see bone-based 2D animation being helpful, with the limited toolkit that Canvas offers -- it could be a big saving in bandwidth and resources over sprite sheets.
Logged

Currently developing dot sneak - a minimalist stealth game
Scott
Level 2
**


View Profile WWW
« Reply #31 on: December 06, 2012, 01:43:25 AM »

So, after my initial excitement of getting IK working and some days more work, adding other features blew it up from 30-some to over 500 LoC. And that was after using a 3rd different algorithm, 2 structural redesigns, and lots of R&D.

I also made the bones prettier. They are implicit, since everything is called a "pin" in this software, and eventually there will be other types of connections between pins besides straightforward bones (which are skinable btw). Visualization of bones will probably end up customizable as well (triangle, diamond, or plain line).

Anyway, check it out!
Logged

Lynx
Level 5
*****


Upstart Feline Miscreant


View Profile WWW
« Reply #32 on: December 06, 2012, 03:31:05 PM »

Looks awesome!  I'm guessing there's a meaning behind each stick having a fat end and a pointy end?
Logged

Currently developing dot sneak - a minimalist stealth game
Scott
Level 2
**


View Profile WWW
« Reply #33 on: December 06, 2012, 03:51:12 PM »

Looks awesome!  I'm guessing there's a meaning behind each stick having a fat end and a pointy end?
Simply shows parent/child relationship. The arrow points to the child. It matters less with the IK solution, where any pin(s) can be locked and any pin can be moved.

It matters more with Forward Kinematics (IK off) where bone parenting really comes into play when setting a pose for your entity. In this case children always rotate around the parent.
Logged

ZeroExEffEff
Level 0
**


View Profile
« Reply #34 on: December 07, 2012, 01:53:57 PM »

Can you (or will you be able to) make spritesheets with it?
Logged
Scott
Level 2
**


View Profile WWW
« Reply #35 on: December 07, 2012, 08:54:45 PM »

Exporting sprite sheets is planned.  Wink
Logged

yuotta
Level 0
**


View Profile
« Reply #36 on: December 16, 2012, 03:57:16 PM »

What are you developing this program with? What language, what software?
Logged
Scott
Level 2
**


View Profile WWW
« Reply #37 on: December 16, 2012, 08:01:14 PM »

What are you developing this program with? What language, what software?
It's just C++ Smiley
Logged

Scott
Level 2
**


View Profile WWW
« Reply #38 on: April 12, 2013, 07:42:21 PM »

Finally! We're in full motion on this thing, after over 2 years of development, and a couple other developers starting and releasing similar products in that period of time. However, I think there are still some unsolved problems which we shall address.

Also, it has been renamed "Basis" for Bone and Sprite Integration System. I have a lofty goal of knocking out a major feature per night for the next 7 nights prior to our imminent first real public release.

Night 1:


(notice the automatic detection of textures on this next one?)

Logged

Scott
Level 2
**


View Profile WWW
« Reply #39 on: April 17, 2013, 06:27:42 AM »

Render to sprite (export)
So, is there anything missing here someone will be sad about? Comments in general?


Logged

Pages: 1 [2] 3 4
Print
Jump to:  

Theme orange-lt created by panic