Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Bug Virtual Camera App recorded Animation Clip not working

Discussion in 'Virtual Production' started by SimonRess, Feb 3, 2023.

  1. SimonRess

    SimonRess

    Joined:
    May 26, 2022
    Posts:
    4
    Heya!
    I've done a recording with the Virtual Camera app, however when I try to actually use the animation clip, it doesn't apply to any other object or camera in my scene at all.
    The animation clip definitely has data on it, but once I apply it in my timeline, nothing happens anymore. Any help appreciated!
    upload_2023-2-3_17-55-14.png

    here it shows there are definitely curves on the animation clip. I can see the animation well when using the Preview function of the Take Recorder, but it won't work outside of the Take Recorders context on any of my cameras and vcams.
    upload_2023-2-3_17-57-33.png

    i'm really confused of this. Any other recorded timeline clip done by hand on the vcam works just fine (aka there is an Animator on the virtual camera), so i'm not sure what else I could check to find the error.
     
  2. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    What I personally do in these cases is first is to quickly double check the properties the animation clip is animating (double click to open the Animation window, look at the propertynames on the left), but the most common problem I have seen is two things trying to control the same Animator - one wins, the others lose. E.g. if you mute the animation track, can you move the CM camera? If it wont move, then something else is controlling its animator.
     
    SimonRess likes this.
  3. SimonRess

    SimonRess

    Joined:
    May 26, 2022
    Posts:
    4
    Thanks for the input!! I've isolated the animation clip in a new project now to check if it's really the animators fighting over each other, but it still won't animate the camera unfortunately, even though the Animator shows its progress bar filling up.
    I'm suspicious that the Camera that the animation is on, needs the Virtual Camera Actor attached to it because it appears in yellow when it isnt. upload_2023-2-8_12-53-27.png
    But even when attaching the Virtual Camera Actor component to the camera, and the yellow font turns normal white again, it won't actually move like when i do it in the take playback ;o;

    My suspicion is that i fundamentally misunderstand how these recorded clips are to be handled after recording.
     
  4. akent99

    akent99

    Joined:
    Jan 14, 2018
    Posts:
    588
    Technical details (which might not help you resolve it). The animation clip property names (shown in yellow) shows that properties that the animation clip is modifying. An animation clip basically changes property values over time on your behalf - that is all they do. So "Main Camera - Virtual Camera Actor Position..." etc means its trying to modify that property of the main camera. So the main camera has to have an Animator component on it, and the animation clip will send it those property and values to say "update yourself with these values now". Any lines that are yellow, it means it cannot find the component and property of that component to change. So adding the components so its all white will be necessary for the animation clip to make sense - it will then modify those properties of those components.

    But... it still depends on what those components do. E.g. if other live recording stuff is trying to manage those components properties and the Animator is trying to update them as well, then things would conflict. I don't know what the clip *should* look like, or how to use it in the appropriate way etc.

    For example, if you have a Cinemachine virtual camera it may also be trying to control the position of the main camera.

    What you can do is use the inspector to look at the main camera properties while the animation clip is playing. Are the numbers changing? If you stop the clip, can you manually change the same properties? If not, there is a conflict going on (if you cannot change the values manually, then the Animator will probably fail too.)
     
    SimonRess likes this.
  5. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Clips recorded using the companion app will only work on the VirtualCameraActor component. The actor has a driver (physical Camera or Cinemachine) that will update the final camera properties. Make sure you reference a camera actor in the animation track.
    Cheers!
     
    SimonRess likes this.
  6. SimonRess

    SimonRess

    Joined:
    May 26, 2022
    Posts:
    4
    Thanks so much akent!! This gives me a really good overview on everything, i've actually had a priority conflict going on like you described. I needed to add a "virtual camera actor" component and create a new animation track for the camera without interference of the Cinemachine Brain!

    That was indeed part of the problem, i just tried applying the clips on cameras without the component attached. Thank you Sergi!!
     
  7. Sergi_Valls

    Sergi_Valls

    Unity Technologies

    Joined:
    Dec 2, 2016
    Posts:
    212
    Thanks for posting, as then we learn how we can improve the product.
     
    SimonRess likes this.
  8. kiraravenheart

    kiraravenheart

    Joined:
    Feb 9, 2021
    Posts:
    2
    So sorry to necro this thread, I tried following what has been said here but I feel like I'm still missing or misunderstanding something;;

    If it's not too much to ask/If you still remember, can you maybe walk me through what you did? Did you get this to work?
    The way I understood and did it, I made a new CM vcam, put a Virtual Camera Actor component on it, made a new animation track referencing that vcam, and put the animation clip recorded from the iPhone app into that track.
    If I have other CM vcams on the scene, should I also include that new vcam on that Cinemachine Brain track? Whether or not I do, I can't see the animation play (which is projected onto a canvas).