Vertex Animation exporting from MAX

Moderators: GSH, VSMIT, Red Devil, Commando

User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Vertex Animation exporting from MAX

Post by MrTwosheds »

Ok no problemo.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Vertex Animation exporting from MAX

Post by Nielk1 »

OK, please let me know if the output works as expected. If you are curious, I moved the functions to the top of the script thinking maybe your program wasn't doing 2 passes (one to find functions, one to run global code).
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Vertex Animation exporting from MAX

Post by MrTwosheds »

All the vertex enveloped moved as expected.
In this test all selected enveloped vertex were weighted 100, and those I unselected came out at 0. Those of the mesh that were not enveloped were not listed and not effected.
Seems to be fairly successful.
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Vertex Animation exporting from MAX

Post by MrTwosheds »

It may be unimportant, and seems to work ok, but in the stock xsi animations (and everything else) the last value of a list is usually ended with ;;
Your script ends lists with ;,

233;0.0323474;,
235;0.018893;,
}
maybe should be
233;0.0323474;,
235;0.018893;;
}

Another thing I noticed is that it does more than 6 decimal places
158;0.0156796;,
xsi usually only goes to 6
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Vertex Animation exporting from MAX

Post by Nielk1 »

I can resolve those pretty easily if they cause any issues. If they do not, I will fix them later rather than sooner. The fix for the semicolon is an if check to see if I am on the last iteration of the loop or not and to add the appropriate punctuation and the fix for the decimal points is to find a math rounding function.

IE, I can fix it, just not right this second. If I have to do other fixes I will do my best to remember to fix that part too.
User avatar
jaydenbz2
Thunderbolt
Posts: 128
Joined: Mon Feb 21, 2011 6:19 am

Re: Vertex Animation exporting from MAX

Post by jaydenbz2 »

So, you have finally done it !! ? :D if that is the case...good work, that opens up many more possibilities :) and if you can tie your anim loop code into this with an object such as a tree, imagine that, you could have an animated forest! swaying trees and such.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Vertex Animation exporting from MAX

Post by Nielk1 »

I think my loop animation DLL code was supplanted by stock code now.
Josiah
Sabre
Posts: 213
Joined: Mon Feb 21, 2011 6:45 am
Contact:

Re: Vertex Animation exporting from MAX

Post by Josiah »

jaydenbz2 wrote:So, you have finally done it !! ? :D if that is the case...good work, that opens up many more possibilities :) and if you can tie your anim loop code into this with an object such as a tree, imagine that, you could have an animated forest! swaying trees and such.
HE LIVES!
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Vertex Animation exporting from MAX

Post by MrTwosheds »

Yes it works! and there are odf entry's that allow modders to set up loop animations on many types of objects now. You could do swaying trees...won't be going in that direction myself though.
Col Klink
Sabre
Posts: 368
Joined: Fri Apr 15, 2011 8:24 am
Contact:

Re: Vertex Animation exporting from MAX

Post by Col Klink »

Is there a possibility that this could be useful for GMAX users? That would be awesome. Even if not, you've done well Nielk....
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Vertex Animation exporting from MAX

Post by MrTwosheds »

The Sleer Hunter
Ok this is the first model I have completed using Nielk1's skin script for 3dsMax, Its an Animal.

I made the body mesh in Sculptris, exported to 3dsMax, boned, skinned, UV'ed and animated it there. Textures still a bit rough but it looks ok. Animations don't look quite like they do in Max, they get BZ2-ified Automatically :)
The Silence continues. The War Of Lies has no end.
User avatar
Zax
Attila
Posts: 1388
Joined: Sat Feb 19, 2011 6:56 am

Re: Vertex Animation exporting from MAX

Post by Zax »

How it walk :O
◥▶◀◤ row row, fight the powuh
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Vertex Animation exporting from MAX

Post by Nielk1 »

MrTwosheds wrote:Animations don't look quite like they do in Max, they get BZ2-ified Automatically :)
I am guessing that's the interpolation. Before you make an animation on the bottom by the big KEY button, to the right is a picture of a sin wave, change it to a straight line, the 2nd one from the top.
EDIT: No I checked, like a bastard the TCB Controller ignored this setting. You have to manually, for each and every key of both types for each animated mesh, do what is noted in the below paragraph. Maybe I should write a script to fix that too.

To edit an existing animation you have to select the individual animated part, have the Motion tab selected on the right, and select Position or Scale, and change the Tension to 50 on the key Info for each key-frame. If you don't have that option, you aren't using the required for BZ2 TCB Controller (but frankly, the TCB controller is the worst one to fix this for).

Then just remember that BZ2 runs its animations at half the speed MAX does, so you can set your Time Configuration to 1/2x speed to make it look just like BZ2.

With a successful test I should be able to package it up nicely. All it needs is a toolbar button and proper output (if only that dotnet control I tried before worked for 2Sheds).
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Vertex Animation exporting from MAX

Post by MrTwosheds »

Someone with a later version than 7, needs to test the other script.
Yes I figured out how to alter the tension thing, then didn't bother :)
I don't worry too much about how it looks in Max, as the BZ2-ification pretty much destroys any fine detail anyway.
Bz2 plays most anims at 30 fps, I believe, so I do my timing with keyframe's, some anims play at a variable rate, like walk and run, their rate is controlled by the length of the stride (lfoot and rfoot) and the speed of the unit. The Sleer has its hp_foot's as the last bones on its back legs, I think in future models I will make the hp_foot's separate from the actual leg bones so that I can adjust how the walk runs by tweaking them without altering the animations, its much simpler and will also allow for more real feet off the ground time, you need this to make run look good.
The Silence continues. The War Of Lies has no end.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: Vertex Animation exporting from MAX

Post by Nielk1 »

Posted final script, give it a try!

See first post.

It should work first run and will ask you for a target XSI file to append the envelopes to. Of course, you could also just point it at a new TXT file.
Post Reply