I could really use some guidance as this has kinda stunted my progress.
I will try to explain as simple as possible:
I have a camera in my unity scene 2019.1.9f1, the camera is animated using the timeline, but there is also a script that runs on play mode that adds some additional camera shake motion…
My goal would be to parent a game object, new camera, or whatever to the camera that is animated and essentially bake the transform data so that every ‘frame’ in my case 30 fps or 60 fps would have a key frame
I have a few reasons for this:
Removes the script that is needed to add camera shake
Export the camera into After Effects
I need the transform data to be baked to every frame because I want to eliminate any animation interpolation going from unity to after effects.
Have you looked at the Unity Recorder? It can capture the motion of an object to an animation clip. If that doesn’t work there is also a game object recorder API.
I have been trying to use the unity recorder. In theory it sounds like exactly what I want to do, but I’m not having much luck getting baked keyframe data from a moving object in play mode.
I am gonna comb through the documentation once more and verify my steps. If I am still having no luck, I’ll create a quick video to showcase
Alright I have taken a deep dive into this and still have problems, I have been following this documentation
A few things to note about the scene:
I have a game object that is acting as a group and I have an animation clip attached to drive the transforms of position and rotation.
Inside the game object, I have placed my camera where I have added a script on the camera to add additional positional changes to simulate hand held camera shake
I have parented an empty game object under the camera which in theory should give me the exact position for the camera + root game object in step 1.
Following the documentation, does give me an animation file, but when I create a new game object and attach that animation clip to the game object, No animation is present and it doesn’t follow the camera from steps 1-2.
When I look at the animation clip that was baked out, it looks l like it gathered a key frame at the beginning and end, but the values are exactly the same under positional values.
Essentially what I need is every frame to have ‘world space’ transform key frame data and that isn’t happening.
I helped out on the Unity Discord and quickly wrote a solution with the recorder api that seems to have solved the issue.
But that video’s a really good description of a problem that might exist with the recorder.
Not sure if it’s the compressor being aggressive, or if it’s some incompatibility with the systems in play. It looks like a bug worth looking into.