Unity ML-Agents Toolkit VideoRecorder Plugin
Перейти к файлу
Chris Elion fd8ed4a98a
Merge pull request #3 from Unity-Technologies/handle-academy-singlton
handle academy as singleton, add note on deprecation
2020-01-27 13:49:54 -08:00
Assets handle academy as singleton, add note on deprecation 2020-01-27 13:27:49 -08:00
Images Add image 2019-01-05 20:23:03 +01:00
Packages Remove all the files that won't be included in the unity package 2019-01-05 15:44:01 +01:00
ProjectSettings Ready for packaging 2019-01-05 17:34:35 +01:00
.gitignore Add image 2019-01-05 20:23:03 +01:00
LICENSE Create LICENSE 2019-01-05 17:42:33 +01:00
README.md handle academy as singleton, add note on deprecation 2020-01-27 13:27:49 -08:00
VideoRecorder.unitypackage Change RecordVideos folder to VideoRecorder 2019-01-05 19:52:15 +01:00

README.md

NOTE

This repo is deprecated and may not work with newer versions of ML Agents. The most recent change will be compatible with v0.14.0.

ML-Agents VideoRecorder plugin

This is a plugin for Unity's MLAgents framework that allows to record videos of a scene at a given frequency.

It can be used to :

  • Understand how the behavior of your agents evolves over time.
  • Debug problems that can happen when the environment has been running for a long time.
  • Send a video to a friend to brag that your agents are better than them at a video game.

This repository is based of the FrameCapturer plugin, it should work on Windows and Mac. To use it on Linux you will need to compile your own version of the plugin. At the moment the video recorder is not compatible with the new Scriptable Render Pipeline

How to use

  1. Import this package to your project: VideoRecorder.unitypackage

  2. Add a recording camera to your scene, you can either:

    • Create a new camera and add the VideoRecorder script to it
    • Use the menu (GameObject -> Create Recording Camera), this will clone the main camera in your scene and add the script
  3. Configure the VideoRecorder:

    Video Recorder Settings

    • Output Directory: Where the videos will be saved, it can be either an absolute path or a relative path.
    • Duration Unit: The measurement unit for the interval and the duration, either seconds or academy steps.
    • Interval: The time we want to wait between each video recording. If the interval is 600 seconds, a new video will start being recorded every 10 minutes.
    • Duration: The length of each individual video. Can't be larger than the interval.
    • Record in realtime: If you check this and you use a time scale different than 1, the videoRecorder will change the timescale back to 1 while it is recording and then back to the original value the rest of the time. This way your video will show your game at the normal speed, not the accelerated speed during training. Note that this will slow down training speed while the video is recording.
    • Resolution: Resolution of the video, can be higher than the resolution of the game window.
    • Capture Audio: Should the video contain audio as well?
    • Verbose: Log when a recording starts and ends.
  4. Run your scene ! (At the moment the recording will also happen during inference and in the editor)