Biped method for separate tracks group for toes

Biped method for separate tracks group for toes

andres.hernandezB63FL
Advocate Advocate
2,019 Views
15 Replies
Message 1 of 16

Biped method for separate tracks group for toes

andres.hernandezB63FL
Advocate
Advocate

Hi!
I was checking the documentation and I found the Separate Tracks Group methods for Biped. It says that the <biped_ctrl>.sepLegsTracks should work for toes, foot and calf but it doesn't, especially since there is a different checkbox in the interface for Toes. 
I'm working on an script and I need particularly the Toes separate track to be active so I was wondering if someone knows if this is a missing feature from MaxScript or if there is any workaround. 
Thanks a lot!

0 Likes
2,020 Views
15 Replies
Replies (15)
Message 2 of 16

denisT.MaxDoctor
Advisor
Advisor

 


@andres.hernandezB63FL wrote:

I was checking the documentation and I found the Separate Tracks Group methods for Biped. It says that the <biped_ctrl>.sepLegsTracks should work for toes, foot and calf but it doesn't

It works for me... Maybe you expect something different?

0 Likes
Message 3 of 16

andres.hernandezB63FL
Advocate
Advocate

Hi Denis,

So when you use sepLegsTracks it disables/enables the toes checkbox for you? In my case it only disables/enables the legs. Same happens with the sepArmsTrack, it says that it should work for the whole arm hierarchy even fingers but, fingers are in a different checkbox and it doesn't change them here. Could you show me how you're modifying it please? 

Thank you! 

 

0 Likes
Message 4 of 16

denisT.MaxDoctor
Advisor
Advisor

@andres.hernandezB63FL wrote:

So when you use sepLegsTracks it disables/enables the toes checkbox for you? In my case it only disables/enables the legs. Same happens with the sepArmsTrack, it says that it should work for the whole arm hierarchy even fingers but, fingers are in a different checkbox and it doesn't change them here. 

 


What "check boxes" are you talking about? 

 

0 Likes
Message 5 of 16

andres.hernandezB63FL
Advocate
Advocate

Hi Denis, 
Sorry, I guess I should have elaborated further. 
In Biped we have this rollout:

andreshernandezB63FL_0-1689603887632.png

As you can see there are 9 checkboxes against 7 methods in the docs. If you turn on the 7 by code Fingers and Toes will be untouched. In the docs it says that Legs and Arms include Fingers and Toes but it doesn't seems to be the case.  

0 Likes
Message 6 of 16

denisT.MaxDoctor
Advisor
Advisor

OK.

The situation is as follows... The Biped SDK has methods for separating individual tracks (IBipMaster::SeparateTracks(int id, BOOL separate)), which in the case of LEG include, for example, thigh, calf, foot and toes. Separation states are reflected in the "Separate FK Tracks" checkbox list.

Using the MXS Biped (sepLegsTracks) method, you separate all four leg tracks, but this is displayed as only the "Legs" checkbox is checked. (The same situation for Arms.)

So, it seems that MXS does not have an interface to separate only the "Toes" track (meaning separating the toes and foot). There is a possibility to do it with SDK, or use the UIAccessor (or Win32) for a direct UI elements setting/getting.

 

 

  

 

Message 7 of 16

denisT.MaxDoctor
Advisor
Advisor

Frankly, I'm not sure if it would work right at all if you separated only toes and foot, but left combined thigh, calf and foot tracks.
Probably to avoid confusing the user with this feature, this functionality was not exposed for MXS.

0 Likes
Message 8 of 16

andres.hernandezB63FL
Advocate
Advocate

Thank you Denis. I'm trying to activate those because I'm creating an script to turn Biped tick frames to whole frames because the re-scale time is not respecting whole frames but using $.controller.keys[i].time = frame I'm getting closer, however if the tracks are not separated, when the frames overlaps it breaks completely (some limbs end up with position values over 1000000000) so I was trying to activate everything (all the checkboxes) before I move the frames which avoids the issue but if I only use those methods available it doesn't work. 

0 Likes
Message 9 of 16

denisT.MaxDoctor
Advisor
Advisor

@andres.hernandezB63FL wrote:

I'm trying to activate those because I'm creating an script to turn Biped tick frames to whole frames because the re-scale time is not respecting whole frames but using $.controller.keys[i].time = frame I'm getting closer, however if the tracks are not separated, when the frames overlaps it breaks completely (some limbs end up with position values over 1000000000) so I was trying to activate everything (all the checkboxes) before I move the frames which avoids the issue but if I only use those methods available it doesn't work. 


As I understand it, you are trying to rescale time of biped (animation) controllers and want all keys to be rounded to the nearest whole frame number. Is that correct?

0 Likes
Message 10 of 16

denisT.MaxDoctor
Advisor
Advisor

Rescaling Biped animation time can be a challenging task. It doesn't follow the usual rules for MAX controllers and requires working with the BIPED SDK.
The algorithms involved in this process are not accessible to regular users. However, I can tell you that separating Biped FK tracks may not be a solution. In fact, it can make things more complicated.
Interestingly enough, your initial idea of using the Time Configuration Dialog and Re-scale Time is actually the best approach for solving this task with the Biped case.
If I had only MaxScript capabilities at my disposal, that's probably how I would try it to do.

Message 11 of 16

denisT.MaxDoctor
Advisor
Advisor

Certainly, there can be certain specificities, such as Motion Captured animation where keys are typically set per frame. But that's a different matter.

0 Likes
Message 12 of 16

andres.hernandezB63FL
Advocate
Advocate

Hi Denis, 
The re-scale for know has been the best solution. At first I was trying to access to timeline selection range but it doesn't seems to be exposed either, and it was perfect because that one doesn't leave tick frames but only whole frames.
Yes, exactly I've been trying to move the keys to make them all round but it has been a pain. In some cases it doesn't move the keys, doesn't matter if I'm using biped.movekeys or assigning directly the time to the frame, and I noticed that is related to those septracks. With biped.movekeys in those critical cases it moves 1 frame and then it doesn't move further until, for example, I move the frame by hand, it starts to working back. I'm starting to think that something is seriously broken with Biped keys.

0 Likes
Message 13 of 16

denisT.MaxDoctor
Advisor
Advisor

well... I have delved deeper into this problem and here is what we have:

1. Only Time Configuration -> Re-scale Time gives a safe and reliable result for scaling the Biped control time.

2. This operation is not undoable and there is no safe way to make it undoable.

3. Re-scale Time has to have generally non-rounded frame time for some keys

4. You can make them round, but this can lead to overlapping keys, which requiring a key reduction, which you can't correctly resolve, since you don't have full control over the biped animation.


So, the solution can be as follows:

1. Scale time using the built-in "Re-scale Time" feature

2. Save the BIP file of the specified interval

3. Load the BIP file back.

This will make rounded keys and keep all biped animation features (IK/FK, anchors, etc.) as safe and accurate as possible.

Message 14 of 16

andres.hernandezB63FL
Advocate
Advocate

Hi Denis,
Thank you for digging into this issue even further. 
I reported already that about the undo not working and of course this issue with the keys. 
The overlap is something that I would expect but there are 2 problems:
1. If I use the time = time method, when the limbs are moving from sliding to free and it has to overlap it will break, which it should because if you do this by hand there is no problem. When I mean break is that it takes the limb to something around 1000000000+ in pos.
2. If I use the moveKeys it doesn't cause that issue even if the frames overlap, however dealing with float precision to get to the exact round frame is quite problematic. 
I was able to do something that kinda works but in some cases with the Biped node, if there is any overlap on vertical keys it will throw an error. 

I tried the method you suggested but I think it will only work if you bake every frame with the "A Keyframe per Frame" option, but since I need to maintain the animation editable this is not and option. If disable that box it will bring the animation identical with non round frames 😞

andreshernandezB63FL_0-1689788267758.png

Thanks a lot for running those tests, I really appreciate the time you dedicated to this

0 Likes
Message 15 of 16

denisT.MaxDoctor
Advisor
Advisor

@andres.hernandezB63FL wrote:

I tried the method you suggested but I think it will only work if you bake every frame with the "A Keyframe per Frame" option, but since I need to maintain the animation editable this is not and option.


The built-in Biped rig is definitely not the right choice for doing hand-made animation.

It has made sense to me for a long time to use Biped animation only in "key-per-frame" mode. All other functionality can only be used for modification in "layers", e.g.

(IMHO)

 

0 Likes
Message 16 of 16

andres.hernandezB63FL
Advocate
Advocate

Hi Denis, 
Yes, I'm not a fan of using Biped for animation either but that's how it works here. Thank you for your help. 

0 Likes