Fixed (FIXED in 1.22.0.1) Some CUAs in the wrong places (1.22.0.0 bug with some Timeline animations)

Cervantes1961

New member
Messages
6
Reactions
1
Points
3
Since the latest update I'm having two problems.

1) Some CUAs are spawning miles away from where they're supposed to be.

2) In a few scenes (but not all) where a models control is moved in AcidBubbles.Timeline (version# doesn't matter), the model goes flying off in some random direction.

No errors appear in the log from this behaviour.

Anybody else having these issues?
 
I think some problems have showed up.
Could you share a couple of examples of scenes to help debugging?
 
I rolled back to 1.21.04 and everything works properly, so my issues are definitely caused by something in 1.22.

Here are a couple of examples:

1) "If she..." by hirohiro


The dildo is supposed to be on the chair, by her right hand. In 1.22 the dildo is behind the chair and to her left. When she uses the dildo it animates in the same position, so it looks like she's fanning her VJ with one hand, while a ghost dildo bounces around in the air behind her.

2) "Call Girl: Special Package" by Slam Thunderhide


Skip the intro and start the "DOOR" sequences. Male will hurtle through Female, and they'll both explode. Female can be recovered. Male can be recovered by turning off his collision, but he'll still be stuck, jittering on the wall like something out of a Sam Raimi film. A tiny number of poses from this var work okay, but most of them cause the male to fly into a wall, and explode if his collision is on.

I can supply more examples if required.

Thank you for looking into this.
 
Not 100% sure this is the same issue, but I send this repro case to @Acid Bubbles which sounds very similar. So far I assume this was a Timeline issue, but I didn't have time to investigate much. I had trouble with an Empty atom animated by Timeline that jumps a couple of meters once the animation starts. That's why my Benchmark scene shows just black...cause the camera is somewhere in the floor/wall. Repro case below rules out the benchmark plugins somehow causing the issue....so either Timeline or VaM.



What's this?
  1. Scene created in VaM 1.20
  2. Using Timeline.280, which should be the current version
  3. Timeline animation on an Empty atom with 3 keyframes
  4. Some UIText atoms to indicate those keyframe positions in the world
  5. Some Sphere atoms do the same, but they are in the subscene (to see if there is any issue there)
  6. Can also be reprod'ed without the VAR package. But I guess it's more convenient handling when sending it to you ;)
Repro steps
  • VaM 1.20
    1. Open scene from VAR
    2. Select "SubScene/Empty"
    3. Play the animation
    4. Note the Empty atom follows the UIText/Spheres
    5. => works
  • VaM 1.22
    1. (same steps as above)
    2. However, note that all the 3 keyframes in the animation have shifted somehow to the left and into the ground o_O

// MacGruber
 
Hey! I've seen the report but I won't be able to look at it until the 6th (probably) to help identify the cause, sorry about that :( Timeline animates relative to the root joint (the default Transform parent of the FreeControllerV3 gameobject), so maybe the position of that fixed transform on some of the atoms were moved in the update? Just a wild guess though.
 
Last edited:
I can explain what was changed and hopefully that will give some context. I made some changes In order to make "local" movement/rotation work on the new Move tab shown here:

1677522335698.png


What did I change?

When an atom is re-parented to another atom and after scene or preset load the following function is called to zero out the reParentObject transform, but this preserves the (world) positions and (world) rotations of the controls and objects that usually sit below this transform.

C#:
    protected void ZeroReParentObjectTransform() {
        if (reParentObject != null && !doNotZeroReParentObject) {
            List<Vector3> savePosition = new List<Vector3>();
            List<Quaternion> saveRotation = new List<Quaternion>();
            foreach (Transform child in reParentObject) {
                savePosition.Add(child.position);
                saveRotation.Add(child.rotation);
            }
            reParentObject.localPosition = Vector3.zero;
            reParentObject.localRotation = Quaternion.identity;
            int ind = 0;
            foreach (Transform child in reParentObject) {
                child.position = savePosition[ind];
                child.rotation = saveRotation[ind];
                ind++;
            }
        }
    }

Before this change, the reParent transform could have a non-zero offset from the object it was getting re-parented into. Now it zeroes these out and moves the children so they stay in same world position/rotation, but fixes the parent relative position/rotation. That allows the Parent Atom Relative movement system to work.

Based on AcidBubbles reply
Timeline animates relative to the root joint (the default Transform parent of the FreeControllerV3 gameobject)
, Timeline must be storing the positions of the control and object that sit under reParent transform relative to the reParent transform. Here is how every atom is normally set up in the hierarchy:

1677522713737.png


If Timeline is storing location of the control Transform relative to reParentObject, than yes that could be broken here. I tested quite a few scenes with Timeline and all worked fine for me. But reParentObject is normally zero-ed out relative to the atom transform, so I can see in most cases it would be fine. What can happen, however, is if the atom is re-parented to another atom, moved around and animated in parent state, or if that atom is parented back to original and animated, the reParentObject could then be greatly offset from the original zeroed transform and the position/rotation that Timeline is storing is incorrect relative to the (real) parent. It would be relative to the odd location of reParentObject. This is what has changed. I did not realize Timeline was animating relative to the reParentObject. What I *think* needs to happen to fix Timeline is for it to animate relative to what reParentObject is parented to instead. Staring in 1.22 reParentObject is always going to get zeroed out relative to what it is parented to. This allow control and object to have "true" local coordinates.

I'm not sure how to fix this on my side without backing out my change to allow parent atom relative (local) movement to work properly.

Note that new animations made using Timeline will work fine. It is only existing ones that were depending on a non-zeroed reParentObject transform that will be broken.

Also note any new Timeline animations made since the 1.22 release could break back the other way if I back the change out since reParentObject might no longer be zeroed.
 
Last edited:
Since AcidBubbles won't be able to look at this for a while, I think I have come up with a possible fix. I can revert the behavior back to no longer zero out the reParentObject transform and change the Parent Atom Relative to be relative to the parent's parent (reParentObject parent). In that way all existing scenes will still work correctly and the new functionality of Parent Atom Relative movement can also work. The reParentObject position/rotation could still be very strange and has no meaning, which means the Timeline "local" position/rotations that are stored also don't have any meaning since "local" can be undefined after changing atom parenting. But I would prefer not to break old scenes than have things working the "right" way.
 
Since AcidBubbles won't be able to look at this for a while, I think I have come up with a possible fix. I can revert the behavior back to no longer zero out the reParentObject transform and change the Parent Atom Relative to be relative to the parent's parent (reParentObject parent). In that way all existing scenes will still work correctly and the new functionality of Parent Atom Relative movement can also work. The reParentObject position/rotation could still be very strange and has no meaning, which means the Timeline "local" position/rotations that are stored also don't have any meaning since "local" can be undefined after changing atom parenting. But I would prefer not to break old scenes than have things working the "right" way.
Thank you! :)
 
Yeah this is certainly fixable in Timeline, but it would also require "migrating" values, and anyone who doesn't update Timeline (or keep older versions) would silently start having those issue :( I didn't see the problem myself when I checked my own test scenes.

I do think the decision I made early to rely on "whatever the parent is" might be too fragile, and I'm sorry about that. A better option would have been to do things relative to the root control instead (which can also break but there's no magic here!)

One possibility would be to add a "version" in the JSON scene, and on load, if the JSON doesn't have that version flag, set the non-zero value. That would make all older scenes work, and would also solve the problem for new ones since Timeline won't be aware of the difference. At least that's my best idea at the moment, even though it would require another 1.x release anyway :|

Otherwise the best I can do is release something asap (next week, I cannot do better than that) but I have no way to "warn" users that they should update (and even if they do update, anyone with a scene that "locked" the plugin versions would be out of luck)
 
It's ok I think I already have it fixed. I should have done a bit more testing. I definitely did not want to break the most popular plugin. :) I do have an issue testing Timeline in Unity Editor as it won't load correctly for some reason. It is some oddity with how c# runtime load works in editor vs runtime that affects certain plugins like yours.

For the fix I basically just made it so my local adjustments ignore the reParentObject 'middle' transform if that is the parent and pretend the parent of that is the real parent for the purpose of the Move tab. I only made the zero out change to reParentObject for the purpose of allowing that new Move tab feature to work correctly. Note for controls that are not parented to reParentObject (like all Person controls) is just uses the control parent, not the atom reParentObject transform.

It may be desirable to truly have reParentObject zeroed out, but not at the risk of breaking things. It gives your Timeline local coordinates more meaning if the reParentObject was zeroed. If you change parent atoms of an atom after it is animated, however, it would then animate relative to that new parent instead of the adjusted reParentObject. I don't know if that would be desirable or not. As it is currently, reParentObject just gets re-parented (hence the name) but stays in same world position, and then your local animation is still in same overall world coordinates after the re-parenting.

I should have the release out today or tomorrow with this fix and a couple of other ones.
 
So I basically understood NONE of that, but what I did understand was, " I should have the release out today or tomorrow with this fix and a couple of other ones."

Thank you so much for fixing this issue. I'm glad I won't have to roll my versions back and forth like a politician swapping lies depending on what special interest group (s)he's talking to.
 
Back
Top Bottom