Unity-Technologies / GenericFrameRecorder

This GitHub package is DEPRECATED. Please get the new Unity Recorder from the Asset Store (https://assetstore.unity.com/packages/essentials/unity-recorder-94079) Use the editor builtin Bug Reporter to report issues. You can track and vote for issues on the Issue Tracker (https://issuetracker.unity3d.com)
MIT License
534 stars 66 forks source link

Animation data not being written to .anim files #58

Open lux opened 6 years ago

lux commented 6 years ago
What happened?

Recording seems to complete successfully (no errors, but .anim files contain no curve data). I've tried a bunch of settings, toggling recursive on/off, capturing everything or just transforms, etc.

My goal is actually to record blend shapes on skinned mesh renderers, which I see an option for, but since it's not recording the animation data at all I can't tell if that is working.

Is it reproduceable?

Happens every time.

Released package version / tag?

v0.2.0.27

Unity version, operating system, target platform (standalone windows, mac, iOS, PS4...)?

2017.2.0p4 on Windows (in editor)

Here are some screenshots and animation files that it generated:

screenshot 2018-01-03 10 59 51 screenshot 2018-01-03 11 01 51 screenshot 2018-01-03 11 01 56

Animation files.zip

romainf-unity commented 6 years ago

I'm working on a bug right now, in the GameObjectRecorder, that seems to be linked with this one. I can't say for sure that this bug is fixed yet, but I'm 90% sure it is. I'll have to run some tests in order to be 100% sure ;)

I'll keep you posted!

FairT commented 6 years ago

If it is this bug you're talking : https://issuetracker.unity3d.com/issues/animation-transitions-between-key-frames-are-corrupted-when-modifying-keyframes-of-gameobjectrecorder-animation

You'll be my hero ;-)

romainf-unity commented 6 years ago

Nope :(

It was this one: https://issuetracker.unity3d.com/issues/animation-recorder-error-in-console-when-recording-custom-or-third-party-component

But yours is also in my backlog, don't worry ;)

FairT commented 6 years ago

No problem Romain, you'll do it right after, I can understand... ;-)

(I'm kidding, of course...)

elringus commented 6 years ago

I'm a bit confused now: the issue is marked as fixed in 2018.1, but when attempting to record a custom script (derived from MonoBehaviour), the same error still appears ArgumentException: Cannot marshal SkinnedShapesRecorder to a native Unity::Type!.

I do understand that this project is not directly related to GameObjectRecorder, but maybe @romainf-unity can shed some light on this, please?

I'm also having issues recording the blend shapes of a skinned mesh renderer (#75), and wanted to handle this with a proxy component, which records only the blend shapes, but it doesn't work because of this issue.

Echoframe commented 4 years ago

Hey @Elringus, i'm recording a script to modify blendshpaes by sound with this code, i didn't get any errors to begin with though. This is what the recording part in my code looks like, it's pretty much exacly what is shown/presented on unity3dcollege. Once there are too many blendshapes adressed it begins to lag though.

Unity version 2017.4.28f1

(C#)


public class MusicShapeV2 : MonoBehaviour
{

   [...]
    public AnimationClip clip;
    public bool record = false;
    private GameObjectRecorder m_Recorder;
    private SkinnedMeshRenderer tar;

    void Awake()
    {
        tar = target.GetComponent<SkinnedMeshRenderer>();
    }

    // Use this for initialization
    void Start()
    {
        m_Recorder = new GameObjectRecorder();
        m_Recorder.root = gameObject;
        m_Recorder.BindComponent<SkinnedMeshRenderer>(gameObject, true);
    }

    // Update is called once per frame
    void Update()
    {
       [...]
    }
    void LateUpdate() //recording happens here
    {
        if (clip == null)
            return;

        if (record)
        {
            m_Recorder.TakeSnapshot(Time.deltaTime);
        }
        else if (m_Recorder.isRecording)
        {
            m_Recorder.SaveToClip(clip);
            m_Recorder.ResetRecording();
        }

    }
}

#endif
elringus commented 4 years ago

Thanks for sharing the example! Can't remember if there is any difference from what I've tried, though. Most likely they've just fixed the issue already.