Skip to content

Commit ee25222

Browse files
committed
updating readme
1 parent a7c607c commit ee25222

File tree

5 files changed

+71
-18
lines changed

5 files changed

+71
-18
lines changed

README.md

Lines changed: 71 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,100 @@
11
# Frame Recorder
22
### Brief
3-
The *Frame Recorder* is a project that facilitates recording of Unity artifacts from Unity. The framework does not define what can be recorded, but defines a standard way of how to define and setup a recorder and takes care of aspects common to all recorders (time managenent, Timeline integration, record windows, etc).
3+
The *Frame Recorder* is a project that facilitates recording of Unity artifacts from Unity. The framework does not define what can be recorded, but defines a standard way of how to implement and setup a recorder and takes care of aspects common to all recorders (time managenent, Timeline integration, record windows, etc).
44

5-
Extensibility is a prim concideration and since not all use cases can be thought of in advance, whenever relevant, the frameworks base classes strive to always offer an easy way to override the default beahviour of the system. where recorder types are detected at run time and made available to the recording framework dynamically. This is accomplished through inheritance and class attributes.
5+
Extensibility is a prim concideration and since not all use cases can be thought of in advance, whenever relevant, the framework's base classes strive to offer an easy way to override the default beahviour of the system.
66

7-
Another key consideration is UX, by defining a standard pattern and basic classes, lets the framework treat all recorders equally and display them consistently. This allows for a generic “recorder window” that is provided and takes care of configuring and starting a “recording session” from edit mode.
7+
Recorder types are detected at run time and made available to the recording framework dynamically.
88

9-
Code reusability and easy of use for developers is also a prime consideration. As much as possible, modularization in a Lego mentality is promoted so that work done for one specific recorder, say MP4 recording, can be reused by an other type of recorder, say PNG or WAV recorders.
9+
A key consideration is peoviding a uniform UX. By defining a standard pattern and basic classes, the framework can treat all recorders equally and display them consistently. This allows for a generic “recorder window” that is provided and takes care of configuring and starting a “recording session” from edit mode.
1010

11-
Of note is the control of flow of time: is variable frame rate requested or fixed? This impacts all recorders that record more than one frame’s worth of data and so is taken care of by the framework.
12-
And last but not least, is the ensuring that at any point a custom recorder can override any standard behaviour of the service to allow full flexibility and not constrain what can be recorded or how.
11+
Code reusability and easy of use for developers is also a prime consideration. As much as possible, modularization in a Lego mentality is promoted so that work done for one specific recorder, say MP4 recording, can be reused by an other type of recorder, say PNG or WAV recorders.
1312

1413
### Current limitations
15-
..* Recorders are Player standalone friendly, but not the editors.
16-
..* Framerate is set at the Recorder level which makes for potential conflict when multiple recorders are active simultaneously.
14+
* Recorders are Player standalone friendly, but not the editors.
15+
* Framerate is set at the Recorder level which makes for potential conflict when multiple recorders are active simultaneously.
16+
17+
1718

1819
## Triggering a Recording
1920

2021
### Through the Editor's Record window
2122

2223
1. Select a type of recording and open the recorder window
23-
![](docs/images/recorder-menu.png)
24+
25+
![](GenericFrameRecorder/docs/images/recorder-menu.png)
2426
2. Edit the recorders settings
25-
![](docs/images/RecorderWindow.png)
27+
28+
![](GenericFrameRecorder/docs/images/RecorderWindow.png)
29+
2630
3. Click "Start Recording" to lauch recording.
2731

2832
Note that this can be done from edit mode and from game mode...
29-
a
33+
3034
### From a timeline track
3135
1. Create a timeline asset and add it to the scene.
3236
2. Add a "Frame Recorder track" to the timeline.
3337
3. Add a "Frame Recorder clip" to the track.
3438
4. Select the newly added slip
35-
![](docs/images/TimelineTrack.png)
39+
![](GenericFrameRecorder/docs/images/TimelineTrack.png)
3640
5. Edit the clip's settings
37-
![](docs/images/RecorderClip.png)
41+
![](GenericFrameRecorder/docs/images/RecorderClip.png)
3842
6. Enter play mode and trigger the timeline through behaviours...
3943

4044
## Design
4145

42-
### Conceptual blocks
46+
### Conceptual blocks breakdown
4347
The Recording framework is composed of three conceptual groups:
44-
![](docs/images/ConceptualBlocks.PNG)
45-
* Recorders: the part that takes data feeds (Inputs) and transform them into whatever format they want (Image input -> mp4 file). They do NOT deal with gathering the data from Unity: that is the Inputs task. Every recorder is broken down into three peices: Recorder, Settings and Settings Editor.
46-
* Inputs: specizalied classes that know how to gather a given type of data from unity and how to pre-package that data in a way that is ready from consumption by the Recorders. Like recorders, Inputs are borken down into three parts: Input, Setttings and Settings Editor.
47-
* Support: holds the FrameRecorder's logic, UI, timeline integration and services.
48+
49+
![](GenericFrameRecorder/docs/images/ConceptualBlocks.PNG)
50+
* **Recorders**: the part that takes data feeds (Inputs) and transform them into whatever format they want (Image input -> mp4 file). They do NOT deal with gathering the data from Unity: that is the Inputs task. Every recorder is broken down into three pieces: Recorder, Settings and Settings Editor.
51+
* **Inputs**: specialized classes that know how to gather a given type of data from unity and how to pre-package that data in a way that is ready from consumption by the Recorders. Like recorders, Inputs are borken down into three parts: Input, Setttings and Settings Editor.
52+
* **Support**: holds the FrameRecorder's logic, UI, timeline integration and services.
53+
54+
### Recorders and there Inputs
55+
Here are the classes that make up recorders and their inputs.
56+
57+
![](GenericFrameRecorder/docs/images/Recorders and inputs.PNG)
58+
59+
#### Recorder:
60+
* Base/abstract class of all “recorders”. A recorder being the class that consumes the artifacts coming from the Unity engine and is responsible for transforming/encoding and “storing” them into the final output of a recording event. Examples would be: MP4, WAV, Alembic, Animation clips.
61+
* Instances of this class are temporary and live only for the duration of the actual recording. The data they record comes, normally, from RecorderInput objects (see below).
62+
* A recorder can have [0,n] inputs and is responsible for mixing/transcoding/processing the data coming from its inputs. In the context of audio recording, sources can be seen as audio tracks, where each track is a separate audio source.
63+
* Recorders get notified of when to start recording, when a new frame is being prepared, when a frame is ready to be recorded (at which point the recorder can read the frame’s data from it’s inputs) and when the recording ends.
64+
* Recorders are not responsible for handling/controlling time. That is the responsibility of the underlying recording service.
65+
* Recorders are responsible for creating their inputs and do so based on the specialized RecorderSettings objects that is passed to it on instantiation.
66+
* Recorder classes register themselves with the recorder framework by decorating themselves with the class attribute [FrameRecorder]. Notice that there are no dependencies from the inputs to the recorders and from the recorder's settings to the recorder.
67+
#### RecorderSettings
68+
* Each non-abstract recorder must provide a specialization of this class. This is where the recorders settings (output path, encoding settings, etc) are stored.
69+
* Recorder settings are persited assets (ScritableObject).
70+
* RecorderSettings do not hold the Input settings directly but refer to assets that are the Input settings.
71+
* This base class comes with universal setting fields that apply to all recorders.
72+
* Instances of this class are stored as sub-assets of other assets. The parent asset varies depending on the situation (recorder window vs timeline for example).
73+
* The system does NOT enforce a recorder to use a RecorderInputs. It’s just the prefered way of doing things.
74+
#### RecorderInput
75+
* Base class for all data sources that recorders interact with directly to gather/access the Unity game time artifacts to record.
76+
* The input classes have NO dependency on the recorders or their settings classes. This is important so that they can be reused between recorders.
77+
* Input classes have there own Settings class that is stored as persiste assets.
78+
* A family of Inputs is defined by their input type and output type and that is what determines if a recorder can use a source or not. (If a recorder can only record a RenderTexture but a given source outputs a packed pixel buffer/array, the recorder can’t use it).
79+
* Examples: RenderTextureInput, CameraInput, DisplayInput, GeometryInput, AudioInput.
80+
* Inputs are responsible for gathering the data that the recorders end up recording. For example, say we have a recorder that wants to record the Display:
81+
* The recorder needs to select an Input that listens on the display and outputs a RenderTexture.
82+
* The selected Input is responsible for figuring out how to do that.
83+
* Inputs, just like the recorders, get notified of events like BeginRecording, new frame, etc.
84+
#### RecorderSettingsEditor
85+
#### RecorderInput
86+
#### InputSettings
87+
#### InputSettingsEditor
88+
89+
### The Recorder Editor classes
90+
![](GenericFrameRecorder/docs/images/EditorClasses.PNG)
91+
92+
### Game mode classes
93+
94+
### Timeline integration
95+
96+
### Creating a new type of Recorder
97+
98+
### Creating a new Input
99+
100+

docs/Overview.vsdx

10.7 KB
Binary file not shown.

docs/images/EditorClasses.PNG

27.3 KB
Loading

docs/images/RecorderEngineClasses.PNG

37.2 KB
Loading

docs/images/Recorders and inputs.PNG

31.6 KB
Loading

0 commit comments

Comments
 (0)