Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

3DS Max BVH Exporter beta8

RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
01-31-2009 11:49
Question: Why, if the biped simply acts as a convenient control system for moving Abu's armature, does using mb_collapse produce radically different results when using ik targets and planted keys, etc?

I've been playing around with the biped stuff more and more, and am really getting into it, but there are some weapon animations that I've come up with that absolutely require the use of mb_collapse, and I'm too much of a Max noob to understand why that should be.

Anyone have a good explanation for this? If so, I would very much appreciate any input :)



.
_____________________
Pygora Acronym
User
Join date: 20 Feb 2007
Posts: 222
01-31-2009 14:07
How I understand the issue: IK doesn't produce the "proper" rotational information on the joints that drive the armature positon that Abu's script needs to create BVH that mirrors what we see in the view port. Rotation data generated by the IK system is derived working from the end back to the root. BVH assumes rotation offsets based on going from root to end.

Enter mbCollapse. When you run mbCollapse on the armature it "bakes" the rotation information on all the joints by sampling their absolute orientations and creating a key for it each frame. This gives Abu's script the information it needs to produce SL type BVH data.
LV426 Slocombe
Registered User
Join date: 9 Mar 2007
Posts: 23
03-07-2009 21:58
CODE
spinner spnStartframe "Start Frame" pos:[59,36] width:86 height:16 range:[0,100,0] type:#integer scale:1
spinner spnEndframe "End Frame" pos:[61,64] width:84 height:16 range:[0,100,100] type:#integer scale:1


I have attempted to mod my script file to increase the animation range as illustrated above. My code is below:

spinner spnStartframe "Start Frame" pos:[59,36] width:86 height:16 range:[0,698,0] type:#integer scale:1
spinner spnEndframe "End Frame" pos:[61,64] width:84 height:16 range:[0,698,698] type:#integer scale:1

I chose 698 as a random number to try, but the range spinner is not going above 100 and the exported anim is running 100. Help please!
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
03-08-2009 00:24
From: LV426 Slocombe
CODE
spinner spnStartframe "Start Frame" pos:[59,36] width:86 height:16 range:[0,100,0] type:#integer scale:1
spinner spnEndframe "End Frame" pos:[61,64] width:84 height:16 range:[0,100,100] type:#integer scale:1


I have attempted to mod my script file to increase the animation range as illustrated above. My code is below:

spinner spnStartframe "Start Frame" pos:[59,36] width:86 height:16 range:[0,698,0] type:#integer scale:1
spinner spnEndframe "End Frame" pos:[61,64] width:84 height:16 range:[0,698,698] type:#integer scale:1

I chose 698 as a random number to try, but the range spinner is not going above 100 and the exported anim is running 100. Help please!


I'm not sure I understand the problem... Are you saying that you have an animation with more than 100 frames and the exporter's spinners won't go past 100 to cover the full range, or are you saying that you'd like to be able to make the animation have more than 100 frames, and you're trying to use the exporter to change the number of frames?

If it's the first option, I cannot reproduce that. I've exported several animations of more than 100 frames. If it's the second, then it sounds like you might be new to 3ds Max? If that's the case, then you would change the number of frames manually by using the Time Configuration dialog (see ) in the lower-right-hand corner (at least for Max 9).

I personally use the Animation Range script from the Illusion Scripts set of scripts from d3coy, available at http://www.d3coy.com/scripts.htm, since it makes changing the animation range so much more convenient.

If I have completely misunderstood, please clarify and I'll see if I can help.
_____________________
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
03-08-2009 00:30
From: Pygora Acronym
When you run mbCollapse on the armature it "bakes" the rotation information on all the joints by sampling their absolute orientations and creating a key for it each frame. This gives Abu's script the information it needs to produce SL type BVH data.

I've been looking at mb_collapse, and I've already heavily modified Abu's script (I just have to tinker with *everything*), so now I'm wondering if there is a way to modify the script so that it doesn't need mb_collapse. I haven't found the time to really get into that idea and find out if it's feasible or why it may or may not work, but it sounds intriguing to me.

For the most part, I don't need mb_collapse. I usually only need it when I set IK target objects for the hands or feet, which is not something I normally do much.
_____________________
LV426 Slocombe
Registered User
Join date: 9 Mar 2007
Posts: 23
03-08-2009 18:07
Robby, no I'm not new to max ;) But, I am pretty crappy when trying to work with maxscript.

The problem I have: the end frame spinner won't go above 100 even though I have modded the script so the end frame spinner should max out at 698. However it doesn't :(.

After the script is modded should the spinner range actually go to the desired value, or will the exporter now export more than 100 frames if I set the range in my time config regardless of what the spinner says?
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
03-08-2009 20:15
From: LV426 Slocombe
Robby, no I'm not new to max ;) But, I am pretty crappy when trying to work with maxscript.

Sorry for the misunderstanding :)

From: LV426 Slocombe
The problem I have: the end frame spinner won't go above 100 even though I have modded the script so the end frame spinner should max out at 698. However it doesn't :(.

After the script is modded should the spinner range actually go to the desired value, or will the exporter now export more than 100 frames if I set the range in my time config regardless of what the spinner says?


Here's what I have for my end frame spinner:
From: someone
spinner spnEndframe "" pos:[80,64] width:56 height:16 range:[animationrange.start,animationrange.end,animationrange.end] type:#integer scale:1


It successfully exports 200+ frame animations.
_____________________
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
03-08-2009 20:18
Stoopid forums with their stoopid arbitrary spaces and broken bbcode and..... I wish LL would just fix this crap.

If you want to see my version of Abu's exporter which does export more than 100 frames, you can get it here: http://www.daikonforge.com/downloads/sl-export.mcr
_____________________
RobbyRacoon Olmstead
Red warrior is hungry!
Join date: 20 Sep 2006
Posts: 1,821
03-08-2009 20:35
Okay, got a new question... I prefer using the biped-driven version, but the biped does not allow forearm twist, and twisting the hand too much results in candy-wrapper collapsing of the avatar mesh at the wrist. How can I wire Abu's armature so that I can still drive it with a biped but have rotating forearms? I tried using twist links but that either doesn't work at all or I'm doing it wrong :(

Anyone have any suggestions? I really don't want to switch to using a custom rig if I can help it.

[EDIT] Okay, here's something by Rick Stirling that looks like it will do the trick:

http://www.rsart.co.uk/2008/06/18/maxscript-wiring-function-for-rolltwist-bones/

Works beautifully so far :)



.
_____________________
Onta Zane
Registered User
Join date: 13 Jul 2009
Posts: 1
09-10-2009 16:12
To Pygora Acronym-

I really like the biped. I've already attached the female character over biped so you can really see how it looks. I would love to increase the power of the right by adding knee and elbow constraints much like you did the feet and hands... I cannot seem to find a tutorial on how to modify this. Care to point me in the right directions?
Pygora Acronym
User
Join date: 20 Feb 2007
Posts: 222
09-11-2009 21:03
Hi Onta. I'm glad you like the biped setup. You should share your addition of the avatar mesh if you can. I hoped SL Max users would add their improvements when I shared my additions to Abu's creation. There is certainly a lot of room for it.

Unfortunately, the ability to add knee and elbow targets to the Biped is not an option. Biped doesn't have this ability naively, and since it is a "black box" setup inside Max you cannot even add this option to the existing system by resorting to Maxscripting or constraints. This is why you cannot find tutorials on the subject.

This doesn't mean it's not possible to do. You will just have to resort to the typical 3ds Max technique of working around the barrier with a kludge. The direction I would take if I wanted to have the option of knee and elbow targets is by adding systems to give open control on top of the Biped closed control systems.

I haven't been on the forums for a loooong time, so I don't know if it's still accessible, but take a look at the Pyg Rig if you can. I made it with knee and elbow targets. These are set up using standard IK and setting shapes as the IK swivel target similar to the hand and feet targets for the SL Biped. If you unhide all the layers and dig around you will also find a system for switching between between the Inverse Kinematics system and a Forward Kinematics system.

In theory there is nothing stopping you from making a similar system that layers IK with a swivel target for the knees and elbows on top of Biped. That's the direction I would go in to get knee and elbow constraints with Biped. There should be plenty of information on how to set up these types of controls on the net. It is a rigging standard regardless of the 3d application it is done in. Once you have the theory, its just a matter of rolling up your sleeves and building your own.

However, if I were building a system around Abu's armature today, it would probably not use Biped or bones. Lumonix has given free access to their Puppetshop rig http://www.lumonix.net/puppetshop.html which offers Biped ease of setup with bones type flexibility. Puppetshop automatically incorporates built-in leg, hand, knee and elbow targets with a more open and flexible architecture than the Biped system. It can also directly output BVH data. Not the Poser formatted stuff that SL calls BVH though, so you would still have to convert it with something like BVHacker http://davedub.co.uk/bvhacker/

I hope this helps give you some ideas. I wish I could say send me an IM in world, but unfortunately I do not get on the SL grid regularly any more. I just happened to get on today and see this! I will try to check back and see if you have any questions, but I am not a regular here either, so no promises. Good luck!
Rock Vacirca
riches to rags
Join date: 18 Oct 2006
Posts: 1,093
09-12-2009 13:46
I don't suppose, that there is a BVH Importer for 3DSMax, is there?

Rock
Pygora Acronym
User
Join date: 20 Feb 2007
Posts: 222
09-14-2009 06:55
Biped takes BVH. Puppetshop does too. I'm talking actual BVH though, not the Poser/SL formatted stuff. Mainly it's the joint names that are different between them and will error if you load SL BVH on. I don't think there's an option to re-target joints either, but I could be wrong about that. BVH is just a text file though, so I suppose you could whip up a script to go through and convert the SL BVH joint names to the proper format, or just do it by hand.
Markus Waverider
Registered User
Join date: 24 Nov 2009
Posts: 4
;(
11-24-2009 14:06
Hi! I took this stuff and tried out. It doesnt work correctly for me. I collapsed bones with collapse script that you pointed and exported bvh. Ok to this point it works. Strange thing is that i exported only t pose for whole 100 frames but in bvh i got different values for each frame!

Wow!
Here is start of motion (a chunk) but you may observe that values grow with each frame :@

Why is that? Am I missing something?

//Ready to betatest//
Markus

MOTION
Frames: 102
Frame Time: 0.0333333
0.000000 41.000000 0.410646 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
-180.0 -3.50687 -180.0 -180.0 -180.0 -270.0 -180.0 -193.184 -180.0 -179.342 -180.0 -270.0 -450.0 -180.0 0.000491774 -359.47 -360.0 -0.000245887 -360.0 -360.652 9.00781e-006 -359.348 -360.0 90.0002 -450.0 -360.0 180.0 -360.53 -360.0 0.000245887 -360.0 -539.348 0.0 -540.652 -360.0 0.801328 1.89495 -539.646 -444.128 181.712 -539.912 -447.06 198.409 -271.957 -622.11 1.81255 -538.023 -270.064 1.7117 -539.912 -267.06 18.4268 -91.9561 -457.872
2.73208e-005 -536.493 -2.73208e-005 3.01826e-007 -360.0 -89.9997 -0.000109283 -346.816 -0.000245887 0.65822 -360.0 -90.0 -270.0 -360.0 180.001 -359.47 -360.0 360.0 -360.0 -360.652 360.0 -359.348 -360.0 450.0 -450.0 -360.0 540.0 -360.53 -360.0 360.0 -360.0 -539.348 360.0 -540.652 -360.0 360.801 361.895 -539.646 -444.128 541.712 -539.912 -447.06 558.409 -271.957 -622.11 361.813 -538.023 -270.064 361.712 -539.912 -267.06 378.427 -91.9561 -457.872
360.0 -536.493 -2.73208e-005 360.0 -360.0 -89.9997 360.0 -346.816 -0.000245887 360.658 -360.0 -90.0 -270.0 -360.0 540.0 -359.47 -360.0 720.0 -360.0 -360.652 720.0 -359.348 -360.0 810.0 -450.0 -360.0 900.0 -360.53 -360.0 720.0 -360.0 -539.348 720.0 -540.652 -360.0 720.801 721.895 -539.646 -444.128 901.712 -539.912 -447.06 918.409 -271.957 -622.11 721.813 -538.023 -270.064 721.712 -539.912 -267.06 738.427 -91.9561 -457.872
720.0 -536.493 -2.73208e-005 720.0 -360.0 -89.9997 720.0 -346.816 -0.000245887 720.658 -360.0 -90.0 -270.0 -360.0 900.001 -359.47 -360.0 1080.0 -360.0 -360.652 1080.0 -359.348 -360.0 1170.0 -450.0 -360.0 1260.0 -360.53 -360.0 1080.0 -360.0 -539.348 1080.0 -540.652 -360.0 1080.8 1081.9 -539.646 -444.128 1261.71 -539.912 -447.06 1278.41 -271.957 -622.11 1081.81 -538.023 -270.064 1081.71 -539.912 -267.06 1098.43 -91.9561 -457.872
1080.0 -536.493 -2.73208e-005 1080.0 -360.0 -89.9997 1080.0 -346.816 -0.000245887 1080.66 -360.0 -90.0 -270.0 -360.0 1260.0 -359.47 -360.0 1440.0 -360.0 -360.652 1440.0 -359.348 -360.0 1530.0 -450.0 -360.0 1620.0 -360.53 -360.0 1440.0 -360.0 -539.348 1440.0 -540.652 -360.0 1440.8 1441.9 -539.646 -444.128 1621.71 -539.912 -447.06 1638.41 -271.957 -622.11 1441.81 -538.023 -270.064 1441.71 -539.912 -267.06 1458.43 -91.9561 -457.872
Pygora Acronym
User
Join date: 20 Feb 2007
Posts: 222
11-25-2009 09:39
I would need more to go on, like how exactly it isn't working, (I expect the T pose, but I get... 1) nothing! 2) the F pose! 3) my computer starts on fire!) or the actual file.

The BVH output is just a symptom of the problem, and I'm not smart enough to peer at that stuff and deduce the solution.
Markus Waverider
Registered User
Join date: 24 Nov 2009
Posts: 4
11-25-2009 11:28
Well...
I just set start with t pose for export test, could be any pose i think i do not move anything thru 100 frames but it spits those crazy numbers in result. Like there is some movement going on but its not :)

Did you made any animation and exported it right? I mean RIGhT ;)

below VV is snip of bvh tpose exported from Poser (which obviously works fine in SL ;), notice that offsets in "head part" << HIERARCHY are different from Abu script... stil can't figure why...?


file used: Abus_Anim_Template08_bip.max with Max 9.0
selected only geometry named same as hierarchy, movement of bip bones: hand rise
on export:

see files attached


There seems to have been a slight problem with the SL Forums database.


ok i post it when storm is gone ;)







HIERARCHY
ROOT hip
{
OFFSET 0.00 0.00 0.00
CHANNELS 6 Xposition Yposition Zposition Xrotation Zrotation Yrotation
JOINT abdomen
{
OFFSET 0.000000 3.402643 0.000000
CHANNELS 3 Xrotation Zrotation Yrotation
JOINT chest
{
OFFSET 0.000000 8.438564 -0.680529
CHANNELS 3 Xrotation Zrotation Yrotation
JOINT neck
{
OFFSET 0.000000 10.207942 -0.272212
CHANNELS 3 Xrotation Zrotation Yrotation
JOINT head
{
OFFSET 0.000000 3.130431 0.000000
CHANNELS 3 Xrotation Zrotation Yrotation
End Site
{
OFFSET 0.000000 3.130435 0.000000
}
}
}
JOINT lCollar
{
OFFSET 3.538753 6.669187 -0.816635
CHANNELS 3 Yrotation Zrotation Xrotation
JOINT lShldr
{
OFFSET 3.130435 0.000000 0.000000
CHANNELS 3 Zrotation Yrotation Xrotation
JOINT lForeArm
{
OFFSET 10.207940 0.000000 0.000000
CHANNELS 3 Yrotation Zrotation Xrotation
JOINT lHand
{
OFFSET 8.302459 0.000000 0.000000
CHANNELS 3 Zrotation Yrotation Xrotation
End Site
{
OFFSET 4.083176 0.000000 0.000000
}
}
}
}
}
JOINT rCollar
{
OFFSET -3.538753 6.669187 -0.816635
CHANNELS 3 Yrotation Zrotation Xrotation
JOINT rShldr
{
OFFSET -3.130435 0.000000 0.000000
CHANNELS 3 Zrotation Yrotation Xrotation
JOINT rForeArm
{
OFFSET -10.207940 0.000000 0.000000
CHANNELS 3 Yrotation Zrotation Xrotation
JOINT rHand
{
OFFSET -8.302459 0.000000 0.000000
CHANNELS 3 Zrotation Yrotation Xrotation
End Site
{
OFFSET -4.083176 0.000000 0.000000
}
}
}
}
}
}
}
JOINT lThigh
{
OFFSET 5.308129 -1.633274 1.361059
CHANNELS 3 Xrotation Zrotation Yrotation
JOINT lShin
{
OFFSET -2.041588 -20.007561 0.000000
CHANNELS 3 Xrotation Zrotation Yrotation
JOINT lFoot
{
OFFSET 0.000000 -19.190928 -1.224953
CHANNELS 3 Xrotation Yrotation Zrotation
End Site
{
OFFSET 0.000000 -2.449905 4.627600
}
}
}
}
JOINT rThigh
{
OFFSET -5.308129 -1.633274 1.361059
CHANNELS 3 Xrotation Zrotation Yrotation
JOINT rShin
{
OFFSET 2.041588 -20.007561 0.000000
CHANNELS 3 Xrotation Zrotation Yrotation
JOINT rFoot
{
OFFSET 0.000000 -19.190928 -1.224953
CHANNELS 3 Xrotation Yrotation Zrotation
End Site
{
OFFSET 0.000000 -2.449905 4.627600
}
}
}
}
}
MOTION
Frames: 30
Frame Time: 0.033333
0.000000 46.480629 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.029297 0.000000 0.017597 -0.022761 0.011234 0.175736 -0.012596 0.015438 0.000000 -0.029297 0.000000 0.013111 0.026146 -0.001663 0.175314 0.011328 0.005975
0.000000 46.480629 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.029297 0.000000 0.017597 -0.022761 0.011234 0.175736 -0.012596 0.015438 0.000000 -0.029297 0.000000 0.013111 0.026146 -0.001663 0.175314 0.011328 0.005975
0.000000 46.480629 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.029297 0.000000 0.017597 -0.022761 0.011234 0.175736 -0.012596 0.015438 0.000000 -0.029297 0.000000 0.013111 0.026146 -0.001663 0.175314 0.011328 0.005975
Markus Waverider
Registered User
Join date: 24 Nov 2009
Posts: 4
Ok
11-26-2009 12:34
I checked all !Z and it exports bvh fine now. Pff ;) yeeeee!!! even without collapse script :)

Cool Cool Cool!!!!!!


I checked it with SL, works same (i import to poser to test before sl)


Thank you Abu Nasu!!!!

I will spread the word about you!
Pygora Acronym
User
Join date: 20 Feb 2007
Posts: 222
11-29-2009 18:50
Well, I'm glad it worked out for you. I still don't get what the issue was other than you saw some numbers change when you thought they should not.

And yes, I've made animations and uploaded it into Second Life. Do you think I would make the Pyg Rig and Biped add-ons for Abu's armature and not animate with them? The mind boggles :P
Abu Nasu
Code Monkey
Join date: 17 Jun 2006
Posts: 476
11-30-2009 22:02
Just want to clarify one little thing.

If you use FK, then it should work without collapsing or baking the rotations.

However, once you start getting fancy with IK and other solver rig tricks, then collapsing/baking is needed.
Ryder Davi
Registered User
Join date: 13 Apr 2009
Posts: 2
Hang man pose
12-02-2009 01:52
ok I am sorry if this is out of topic but I am trying to find a static pose for a man (or woman) hanging at the end of a noose
I am not a pose maker and I tried to use Qavimator but am making some weird things.
Is there anyone out there that can tell me how to do it or maybe they have what I need?
Pygora Acronym
User
Join date: 20 Feb 2007
Posts: 222
12-13-2009 17:44
I'm not sure of what you are asking for. It sounds like you could be asking for something better suited to the 'Products Wanted' or that is covered in one of the stickies at the top of this forum. But that's just my impressions, I am often wrong.

If there is something specific to Abu's BVH exporter, or even animating in 3ds Max in general, then this is the correct thread, but clarification is needed. Otherwise I would suggest that you start a new thread to get the best possible chance of your question being answered.
shea Neox
Registered User
Join date: 6 Jan 2010
Posts: 2
Working great but...
01-15-2010 10:10
I've created an animation with the biped rig and it works great! Many thanks! Only problem is my AV pops about a meter above the object it is sitting on after the animation runs...

Any ideas? SitTarget variables don't seem to stick. I've zeroed out the eases on import, baked trajectories and tried as many options as I could. Any thoughts appreciated.

-Shea
shea Neox
Registered User
Join date: 6 Jan 2010
Posts: 2
01-19-2010 17:56
Was using the Beta version, orientation has changed with the new script (Second Life-BVHExporter1a.zip) but the offset problem just after the animation remains.

I suspect the problem is the animation starts in a standing position and ends laying down (coffin position), so the offset of the root node as it lowers is suddenly restored after the animation sequence...

Hope someone catches this ancient thread and fixes my head.

-S
1 2 3