Profile Picture

Python Challenge For My Good Peeps

Posted By Rampa 4 Months Ago
Rated 5 stars based on 1 vote.
Author
Message
Rampa
Rampa
Posted 4 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)

Group: Forum Members
Last Active: 4 hours ago
Posts: 7.7K, Visits: 49.5K
So when we combine motions to build up our scenes, we often need to remove the front half of a clip and realign the remainder to the previous clip. The align to bodypart tools are quite good at this, but the resulting clip will have a significant jump away from the pivot. This is often not an issue, but sometimes can be problematic for adding and blending additional clips. So my proposal is to create a Python script that can realign the pivot to the previous pivot. It does not need to worry about anything else, because the body part alignment can be used to fine tune.


And if someone wants a bonus round, then a way to automate my "mix-down" with a Python script would be awesome! Smile


The reason we might want to do a mix down as I did in the video, instead of just merging the clips, is that it re-records everything in the timeline into a new clip. So keys and pivot are included. Smile
mtakerkart
mtakerkart
Posted 4 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (13.0K reputation)Distinguished Member (13.0K reputation)Distinguished Member (13.0K reputation)Distinguished Member (13.0K reputation)Distinguished Member (13.0K reputation)Distinguished Member (13.0K reputation)Distinguished Member (13.0K reputation)Distinguished Member (13.0K reputation)Distinguished Member (13.0K reputation)

Group: Forum Members
Last Active: Yesterday
Posts: 2.8K, Visits: 24.2K
GO RAMPA!!!

It will be very usefull for my pipeline to mix my own mocap with mocap from contentstore.
Rampa
Rampa
Posted 4 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)

Group: Forum Members
Last Active: 4 hours ago
Posts: 7.7K, Visits: 49.5K
mtakerkart (6/5/2021)
GO RAMPA!!!

It will be very usefull for my pipeline to mix my own mocap with mocap from contentstore.

I have zero Python skills, so I cannot do it myself. The full mix-down is the ideal, because it records whatever is in the timeline into a new, perfectly tracked clip. It's pretty easy to do manually, as long as you stop it in time to not record over any following clips.
Kelleytoons
Kelleytoons
Posted 4 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)Distinguished Member (29.5K reputation)

Group: Forum Members
Last Active: Last Week
Posts: 8.4K, Visits: 19.2K
Perhaps Mr. G could repurpose some of his code from here:

https://forum.reallusion.com/459858/XMirror-Invert-Clip-Script?PageIndex=1

(I am SO not into coding nowadays.  I can't even get a simple edit of the Terrain thingee to work.  Sigh).




Alienware Aurora R12, Win 10, i9-119000KF, 3.5GHz CPU, 128GB RAM, RTX 3090 (24GB), Samsung 960 Pro 4TB M-2 SSD, TB+ Disk space
Mike "ex-genius" Kelley
4u2ges
4u2ges
Posted 4 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)

Group: Forum Members
Last Active: 2 days ago
Posts: 3.6K, Visits: 13.4K
That be great for someone to make the routine. Specially it should not be that hard. But I really do not have time to dig into it now.
And there are more experienced python users here who might want to assist.

I am dealing with it in every other project. The way I workaround is rather simple:

After I cut the clip, I do not use transform to get it into position.
Yes, aligning tool is great, but I sure like to have the pivot to be on the character at all times.
So.. I simply save the cut out clip, then delete it and reapply. Then do the motions blending.
But the automation would have been nice to have.

Regarding a mix-down. I might be missing the point, but don't we have a merge clips function introduced at some point?
Works fine for me.




Edited
4 Months Ago by 4u2ges
Rampa
Rampa
Posted 4 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)

Group: Forum Members
Last Active: 4 hours ago
Posts: 7.7K, Visits: 49.5K
4u2ges (6/5/2021)
Regarding a mix-down. I might be missing the point, but don't we have a merge clips function introduced at some point?
Works fine for me.

We do have the merge, but it does not record in the new root tracking or keys like saving or "mixing" does.

Edit. To clarify, saving does not do the tracking part. It's when you load the saved clip that the tracking is added if the motion settings are checked. Or when the "mix" is recorded.
Edited
4 Months Ago by Rampa
4u2ges
4u2ges
Posted 4 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)

Group: Forum Members
Last Active: 2 days ago
Posts: 3.6K, Visits: 13.4K
Yeah, I see.




4u2ges
4u2ges
Posted 4 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)

Group: Forum Members
Last Active: 2 days ago
Posts: 3.6K, Visits: 13.4K
So OK. We've had a discussion before about it. Lets clarify. The tracking is a MotionRoot bone position. It always saved with the clip.
But when you reapply the clip and depending on animation settings, it either leave this bone values alone.. or it does recalculate it based on current avatar position.

So basically all that needs to be done is to recalculate a single bone called MotionRoot on the fly. Very basic math.

And you can verify that by opening Curve Editor. MotionRoot is the very first bone.




Edited
4 Months Ago by 4u2ges
Rampa
Rampa
Posted 4 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)Distinguished Member (31.3K reputation)

Group: Forum Members
Last Active: 4 hours ago
Posts: 7.7K, Visits: 49.5K
It would be cool if it was another collect clip option. Like select the region in blue and record directly back to the timeline to replace the region. It was the having to save and reload the motion that I was trying to get around with the mix-down idea.

I was just reminded of it yesterday when I was trying to fix someone's unusual motion clip issue.
4u2ges
4u2ges
Posted 4 Months Ago
View Quick Profile
Distinguished Member

Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)Distinguished Member (13.1K reputation)

Group: Forum Members
Last Active: 2 days ago
Posts: 3.6K, Visits: 13.4K
Well Rampa, what can I say... You are much closer to the RL, than I am.
There are so many things needs to be improved about animation in particular (and everything else in general).
Based on your daily experience dealing with those issues... can you just give them a little push? TongueSmileWink








Reading This Topic