Biped - Mixer (MaxScript - SDK - C#)

Biped - Mixer (MaxScript - SDK - C#)

MehdiZangenehBar
Advocate Advocate
1,598 Views
12 Replies
Message 1 of 13

Biped - Mixer (MaxScript - SDK - C#)

MehdiZangenehBar
Advocate
Advocate

When I load an animation in to the mixer, I have couple of problems.

1)  (biped has no animation ) When I load the first animation. it will transform to where the animation was saved. is it possible to bring it back to the started transform?

 

2) When I load second animation, the antire animation moves to the origin, will (start from origin)

 

3) At mixdown phase, if any part of the biped dons't have any keyframe at zero frame, mixer will add unwanted keyframe for each frame.

0 Likes
1,599 Views
12 Replies
Replies (12)
Message 2 of 13

denisT.MaxDoctor
Advisor
Advisor

provide MXS code and a sample scene (scene setup) to help reproduce the problem.

0 Likes
Message 3 of 13

MehdiZangenehBar
Advocate
Advocate

Please find the attached max file and script that shows the problem.

0 Likes
Message 4 of 13

denisT.MaxDoctor
Advisor
Advisor

The In-Place problem seems to be solved by updating Mixer:

(
	bip_001_controller.mixerMode = off
	bip_001_controller.mixerMode = on
)

 

There may be a better solution, but the idea is the same - update Mixer somehow.

Message 5 of 13

MehdiZangenehBar
Advocate
Advocate
  1. Or we can expose some missed invalidate functions from the SDK. As my coding pipeline is C#, this problem dosn't have high priority. 
0 Likes
Message 6 of 13

denisT.MaxDoctor
Advisor
Advisor

Set initial position for the biped character we can in MoveAllMode, for example:

(
	bip_001_controller.moveAllMode = on
	in coordsys world 
	(
		rotate bip_001 (eulerangles 0 0 45)
		move bip_001 [-40,40,0]
	)
	bip_001_controller.moveAllMode = off
)	

 

 

0 Likes
Message 7 of 13

denisT.MaxDoctor
Advisor
Advisor

@MehdiZangenehBar wrote:
  1. Or we can expose some missed invalidate functions from the SDK. As my coding pipeline is C#, this problem dosn't have high priority. 

I don't see any "mixer validation" methods in the SDK... maybe there is some ... 

 

I tried "UpdateDisplay", and it doesn't help in our case.

0 Likes
Message 8 of 13

denisT.MaxDoctor
Advisor
Advisor

IMXtrack::ComputeTransClips() doesn't work for the solving "In-Place" issue

0 Likes
Message 9 of 13

denisT.MaxDoctor
Advisor
Advisor

@denisT.MaxDoctor wrote:

IMXtrack::ComputeTransClips() doesn't work for the solving "In-Place" issue


IMixer::InvalidateRawMix() does do the job! 

Message 10 of 13

MehdiZangenehBar
Advocate
Advocate
Calling ComputeTransClips is nessecary when you need to get clip's data.
0 Likes
Message 11 of 13

MehdiZangenehBar
Advocate
Advocate

Yes we can move it in moveallmode, but the problem is how we can align it correctly.

in our case, can you save position and rotation of the biped 001 and then bring it back to the initial position and (rotation)?

0 Likes
Message 12 of 13

MehdiZangenehBar
Advocate
Advocate

After so many fail attempt to align biped to the the initial place, I just realized there is some roles to do that:
- Biped COM should be selected.
- Horizontal and Vertical track for the move and Turn track for rotate should be activated.
So my function looks like this:

 

 

 

 

        void Begin_MoveAllMode(IIBipMaster iBipDriver)
        {
            IINode com_node = iBipDriver.GetNode(13, 0);
            core_interface.SelectNode(com_node, true);
            iBipDriver.TrackSelection = 7;
            iBipDriver.BeginModes(BMODE_MOVEALL, 1);
        }

        void End_MoveAllMode(IIBipMaster iBipDriver)
        {
            iBipDriver.EndModes(BMODE_MOVEALL, 1);
        }

 

 

 

 

 

0 Likes
Message 13 of 13

MehdiZangenehBar
Advocate
Advocate

any idea?

0 Likes