Page 6 of 11
Posted: Mon Jun 30, 2008 2:50 pm
by mkelley
Vern,
One thing I can tell you -- I *never* type in any bone rotation values. I've always rotated bones by hand.
But, more than that, I never rotate bones on frame 0. I simply create them there by drawing them out -- if they aren't where I want them I delete them and start again. Quite frankly it never occurred to me to rotate them in the process of building a skeleton (duh!).
So I don't know how my bone values could be an issue here unless it just means that during creation this can happen -- but you are welcome to look at any of my rigs (bad as they are) to see.
Posted: Mon Jun 30, 2008 4:15 pm
by heyvern
I think I did it! I really think I did it!
Mkelly, please download this version. It is v 0.1d and the text file produced is 0.14:
http://www.lowrestv.com/anime_studio/sc ... n_v01d.zip
Please note, I have not updated this in the first thread. This is a different zip file. Once I get this one perfect I will update that one.
Here's the scoop though on some issues about what is happening.
The script now checks the bones on frame 0 of both files and properly adjusts all the key frames. But what is going to happen is that the first key frame will appear differently then from the saved file. All other keys will have identical rotations.
This is will cause those bones not to spin but they may appear rotated oddly. I have not taken into account "flipped" rigs yet as you described. I think I will need two actual files of yours to test this. I am going to try and "guesss" what you are doing and see if I can get that option in. For now this is a straight forward import that doesn't allow for mirror image rigs, rigs that are flipped left to right for 3/4 views.
p.s. Genete the GENIUS has come up with a much better solution. I will have to work on using his solution because it requires extensive changes to both scripts and the exported files. In the mean time test out this version to see if it works.
-vern
Posted: Mon Jun 30, 2008 10:41 pm
by DK
H Vern.
Just wondering....Is it safe to start creating and saving out animation files using this script as is?
EDIT: Ahh...I see this question answered in your last post. (Do you forsee future versions of the script being unable to read files created by earlier vesions?)
Cheers
D.K
Posted: Tue Jul 01, 2008 1:55 am
by heyvern
Short answer: Yes, it is safe to save your files with the new version above or the one in the main link. I don't plan on changing the file format any more. I don't see any need for it because of the simplicty and the fact it has everything in it.
--------
Long answer:
At this point the last two versions are fine to save with. No changes have been made to the file format and I don't see any need to make any more except for version number changes.
Only the very first one would have been missing data if you saved starting at frame 1 instead of 0. Each version since that had all the data needed, I've only been changing the script that writes the file and added a version number to the text file.
So far everything works with the original data format and I will make sure it will continue to work until i decide to "weed out" the older versions once the final script has been locked down, or I need to make major changes. I don't see the need for that in the immediate future.
The file format is as simple as it can be. One line for the bone attribute (ie; AnimAngle) and the next line is the value. So simple. Why change it?
I have Genete's brilliant suggestion added in as sort of a separate function. I will upload that one soon but it basically works the same. If I look for the version number I can use that small bit of code or the original for any files saved now earlier or in the future.
Eventually I can phase out the old code... or not. It's just code. It's not like checking bags at the airport.
Basically what Genete suggested was to "normalize" the angle values based on frame 0 before they are written to the file. When the script reads the file back in to any file it will be reading the normalized values independent of frame 0 and applying them based on the new files frame 0 values.
It works really well and also allows for the option of "adding" the angles. It "adds" the rotations to the base rotation on frame 0. This would be an option as a check box since it might not be wanted in all situations. You may want the "original" saved values to be used.
I'm really thrilled with this. It's really taking shape. I hope to hear from Mkelly soon to verify the change worked in his situation. I have a feeling those "flipped" or reversed bones will require a bit more work. It's not exactly something I had planned for. I usually flip the layer if I want a character to turn the other way. I just don't know how feasible it will be.
---------
DK, can you send me another one of your saved files? I need to check line enders. Line enders are going to be the next issue to resolve so the files can be saved.
Each platform has different returns. I have to make sure I take that into account when READING the file. I wish the idiots who designed the dang computers in the first place would have PICKED ONE FREAKING TYPE OF LINE ENDER! What a bunch of idiots. It would be like if I went to Europe and couldn't plug in my hair dryer or... uh... never mind. Bad example. I have no hair.
-vern
Posted: Tue Jul 01, 2008 2:58 am
by chucky
I'm glad it's all coming together, enthusiasm for this script is off the scale, this thread has been like a boiling piranha pool.
I like your comment about that last line of code and power points Vern, funny stuff. Although it begs the suggestion , wasn't it a European that invented electricity?

Posted: Tue Jul 01, 2008 3:07 am
by DK
Hi Vern.
Here's a "RUN" cycle. When loaded you have to select all keys and set them to smooth...then select the last keyframes on the timeline and set them to cycle. It would be great if you could import cycled frames.
http://www.wienertoonz.com/RUN.zip
Cheers
D.K
Posted: Tue Jul 01, 2008 7:26 am
by heyvern
DK wrote:It would be great if you could import cycled frames.
Thanks! Yes, key frame interpolation is next on my list. The code is there from the original Macton script but it isn't getting loaded. Macton had text to that effect so i need to see what the cause of the trouble is. Might be a simple fix... might not.
-vern
Posted: Tue Jul 01, 2008 7:37 am
by heyvern
DK,
You may want to download the script zip from the first post or the last one I posted on this page.
Not a big deal, but the one you are using doesn't have the version number. So it's a few versions behind.
-vern
Posted: Tue Jul 01, 2008 3:40 pm
by DK
Hi Vern.
Could you please download the RUN file again to see if it's the current version? I was sure I installed it before i created that file.
Cheers
D.K
Posted: Tue Jul 01, 2008 4:00 pm
by heyvern
I actually did that before I posted.
I will check again to be sure.
Yes, the version up now is the one that rights the version number to the file format.
-vern
Posted: Tue Jul 01, 2008 4:06 pm
by heyvern
I will be taking a break from this for the next few days. I have a big project to work on.
Still trying to figure out that line break problem. Almost got it fixed. For now sharing files across platforms (mac to win) probably won't work.
-vern
Posted: Tue Jul 01, 2008 4:58 pm
by heyvern
WOOOOOHOOOOOOO!!!!!
I did it I did it I did it!!!
Finally! Perfect crossplatform support for sharing files.
DK, I loaded that walk cycle PERFECTLY into my own test skeleton (it's a total mess to all the weird things I did to it for testing).
I have to go now and have dinner with my aged parents at the old folks home... well... it's their home... they are old folks... so....
Later tonight I will upload a new version.
Next up is key frame interpolation. The cycle key is going to be a pain. I never thought of that. The other keys should be easy, a single number tagged onto the end of the key value but the cycle key has frames... I'll figure it out.
-vern
Posted: Tue Jul 01, 2008 5:10 pm
by DK
Well done Vern....one step closer to sharing bone actions on the forum
D.K
Posted: Tue Jul 01, 2008 5:46 pm
by heyvern
I just updated the link in the first post with the new version.
http://www.lowrestv.com/anime_studio/sc ... on_v02.zip
-vern
Posted: Tue Jul 01, 2008 5:48 pm
by DK
Hi Vern. Is it possible to share a couple of actions to test with this version?
EDIT: Reason for asking: I have a slightly altered version of the original bone rig that I would love to test outwith other peoples actions.
Cheers
D.K