Sign in to follow this  
DerpTime

[Programer need] Building tools to help with character Animation

Recommended Posts

DerpTime    1

Solved!
Edit1:
Yeah so after someone sent me this:
http://forums.kleientertainment.com/files/file/583-ktools-cross-platform-modding-tools-for-dont-starve/
And thus this post isnt needed any more.

Thanks and sorry for this long winded post.

Edit2:
After further inspection it looks like this tool will not work un less you have both the anim.bin AND the biuld.bin

This is a problem, since the files animation files do not come with a biuld.

Edit3
So... using the Animation Commandline Tool to root around through the animation file for hints.
I came to the conlustion that the character that was used in the creation of the animation is listed.
Wilson appears to be the one used in most if not all animation.
By placing his biuld.bin and tex file in the folder solves the problem.


Edit4
after extesive testing of the exported rexported animation compared to the original animtion
They dont match. values are a bit off all over.

The problem seems to be is that we dont have a character biuld.bin and tex file that has all of the same layers.

 

 

 

Original post:

I'm going to be honest. I am way out of my league.
1 year of C++ and C# are not going to get me any where fast with out help.

So im asking... begging for help with this task.


The task at hand it to build a beter way to rearrage the z-order of elements in any animation.
And the news is good. The heaviest lifting is already done.
http://forums.kleientertainment.com/files/file/226-animation-commandline-tool/
In 2013 someone started on this path.

The Animation Commandline Tool, decompiles the anim.bin files in to text files.

Now if i wanted to change the order of characters hair, I could.

 

BUT, doing so would be a task that would take you weeks by hand.
You would have to change the order of the hair for each frame in each animation.
Its messing and you would be left with z values in between what they should be.


What I am setting out to do:
Biuld a tool that shows the order each animation in a file and list the parts and lets you re-order them.
Then spit it back out.
So in turn chacaters can have the vanilla Animations with custom layer orders.
Want hair above the face and the head in the z order?
Now you would be able to have hair that hung down in front of the face.
Or
Want a girl with long hair? But need the hair behind the body when faceing forward?
You could do that too.


Now the files look a bit like this.

ANIM4anim{ name idle face_right 0 face_up 0 face_left 0 face_down 1 root wilson framerate 30.000000 frame{  x 10.700500  y -179.524506  w 414.398987  h 377.148987  simple_element{   name LANTERN_OVERLAY   frame 1   layer_name LANTERN_OVERLAY   scale_x 0.948755   scale_y 0.948755   rot 353.623993   tx 105.449997   ty -107.448997   tz -5.000000  }

one file can have several animations
luckly I it doesn't look like the z-orders ever change over the frames for an animation.
but can in diffrent in other animations witch can also be in the same file.
so a blanket aproch to this will not work and the user needs to know wether they are changing animations for Forward, Left and Right, or Backward so they can order accordingly.


The programing help I need is for turning all of that infromation in to data and variables that can be more easly worked with.

That means writing a recursive parsing program then taking in that so it can be worked with in programing.

After thats done, the next step is to give the user feed back on what they are looking at.
As well as buttion to move selected item up or down.

I'm currently working on this my self in c# with visual studio 2013

My aproch is to make a recursive parser that place all the data in lists or arrays.
Once that way displace in a treeview.
Then the user could see the Animations in the txt file as well as show the order of elements below them.
Then some simple "move up" and "mover down" buttons

Once orderd then re biuld the text file.


I'm not sure i can do this on my own. I never was great at programing in class.
And I'm dyslexic, and spell check is not your friend when coding.


But this is the only way i think this problem can be solved, that is unless...

Klei wants to throw us a bone and give us the .Scml spriter files for the animations to work with?

 

Hint hint wink wink.
Please, that would save me a load of time and stress.
Did i mention I was my birthday this past week?
I'm not below begging.

hairlayer.png?raw=1
Help me, help characters with long hair. [by the way that hair below her neck.... those arent boobs.]
or characters that want hair that hangs in front of the eyes.
Alot more thing are posible with re ordering.

Edited by DerpTime

Share this post


Link to post
Share on other sites
Corrosive    163

@DerpTime, I am currently working on a tool to manipulate scml files in ways that Spriter is frustratingly lacking, and more.  It's called Scmlly (pronounced "smelly").  One component of it that I've completed is the ability to parse Klei's build.bin and anim.bin files to generate scml files.  Similar to ktools, only it doesn't restrict you to animations where all of the build symbols are present-- it creates a Spriter project with all of the animation's elements. It also preserves folder/layer data from the animation, and I made adjustments to scml.exe to be able to interpret that data.
 
Apart from the GUI, which uses the cross-platform wxWidgets library, everything is in Lua as I felt that would be the most comfortable for people.  Even wxWidgets uses wxLua though, so all of that code is in Lua as well for those that want to tweak it.
 
I'm getting off topic though :razz:  The binary unpacker is created in pure Lua by reading a .bin file one character at a time.  While I hadn't added the ability for the bin unpacker to re-pack animation data back into a binary, that wouldn't be too hard to do. 
 
It would take a bit more work if you were adding/removing/renaming things, but if all you want to do is modify some values in an animation, I could implement that in a custom version for you fairly easily.  That would let you load up an anim.bin, iterate through and tweak the animations as necessary using a lua script, and then save it to binary format when you're done.  And since it's pure Lua you could probably even do it from inside the game's console, though I would highly recommend against that <.<.
 
 
For anyone interested in the full Scmlly program, here's a screenshot of it's current status.  It's still very early in the development process. (note that 0.4a refers to the non-GUI scmlly library which is mostly completed.  The GUI is more along the lines of 0.1a ;))
 
c5xMZmUl.png

Share this post


Link to post
Share on other sites
MindFreeze    0

@DerpTime, I am currently working on a tool to manipulate scml files in ways that Spriter is frustratingly lacking, and more.  It's called Scmlly (pronounced "smelly").  One component of it that I've completed is the ability to parse Klei's build.bin and anim.bin files to generate scml files. 

...

I could implement that in a custom version for you fairly easily.  That would let you load up an anim.bin, iterate through and tweak the animations as necessary using a lua script, and then save it to binary format when you're done.

 

@member=Corrosive

I was wondering if i could maybe get that build too cuz I'm faceing the same issue with z-order.

if thats not too much to ask.

Share this post


Link to post
Share on other sites
MindFreeze    0

@member=Corrosive

I was wondering if i could maybe get that build too cuz I'm faceing the same issue with z-order.

if thats not too much to ask.

 

@Corrosive

sorry new to posting on forums and cant seem to edit last post so i'll mention here so u get a notice.

Share this post


Link to post
Share on other sites
DerpTime    1

@DerpTime, I am currently working on a tool to manipulate scml files in ways that Spriter is frustratingly lacking, and more.  It's called Scmlly (pronounced "smelly").  One component of it that I've completed is the ability to parse Klei's build.bin and anim.bin files to generate scml files.  Similar to ktools, only it doesn't restrict you to animations where all of the build symbols are present-- it creates a Spriter project with all of the animation's elements. It also preserves folder/layer data from the animation, and I made adjustments to scml.exe to be able to interpret that data.

 

Apart from the GUI, which uses the cross-platform wxWidgets library, everything is in Lua as I felt that would be the most comfortable for people.  Even wxWidgets uses wxLua though, so all of that code is in Lua as well for those that want to tweak it.

 

I'm getting off topic though :razz:  The binary unpacker is created in pure Lua by reading a .bin file one character at a time.  While I hadn't added the ability for the bin unpacker to re-pack animation data back into a binary, that wouldn't be too hard to do. 

 

It would take a bit more work if you were adding/removing/renaming things, but if all you want to do is modify some values in an animation, I could implement that in a custom version for you fairly easily.  That would let you load up an anim.bin, iterate through and tweak the animations as necessary using a lua script, and then save it to binary format when you're done.  And since it's pure Lua you could probably even do it from inside the game's console, though I would highly recommend against that <.<.

 

 

For anyone interested in the full Scmlly program, here's a screenshot of it's current status.  It's still very early in the development process. (note that 0.4a refers to the non-GUI scmlly library which is mostly completed.  The GUI is more along the lines of 0.1a ;))

 

c5xMZmUl.png

 

I would love to give it a try when your ready for testers.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this