đī¸Render To Disk
Export sequenced images for HD video, 360 VR, and fulldome format
Last updated
Export sequenced images for HD video, 360 VR, and fulldome format
Last updated
Use this component to render scenes frame-by-frame as sequenced image files to disk with optional encoding to video. This supports single and multi-camera setups including stereoscopic rendering, fulldome, VR 360, and VR 180 (fisheye) formats.
Unity Recorder may also be used for rendering, however Render To Disk provides more features and can output more advanced formats.
Always save your scene before rendering!
Hopefully everything runs smoothly without any issues, however if you push past the limits of your graphics memory or run into other errors that cause Unity to crash, you'll lose any unsaved work. Therefore it is highly recommended to save your work before entering play mode.
When pressing 'Start Render' you'll be prompted to save your scene if it has not been saved yet, however entering play mode directly will bypass this check.
The easiest way to add a rendering setup to your scene is to select one of the camera rig prefabs and drop it into your scene. Place it in the same location as your original camera and disable your original camera to keep as a backup.
Assets/AxonGenesis/Timeflow/Examples/Prefabs/CameraRigs/RenderToDisk
Multiple instances of Render To Disk are allowed in a scene and can be used to setup different renders, however only 1 can be active at a time during play mode.
The Render To Disk game object may be deactivated to disable it but keep it for later use.
Select the object to view its settings in the Inspector.
For common features, please see Menu Bar.
Click to enter play mode and begin rendering. When Auto is enabled, rendering begins immediately upon entering play mode or loading the scene at runtime. If your scene has not been saved, a dialog popup will prompt you with the option of saving before entering play mode.
If Auto is disabled, rendering does not begin in play mode until Start Render is pressed. This may be helpful when troubleshooting or to play a scene up to a particular point before starting the render manually. Otherwise, Auto should be left on.
Auto must be enabled to prepare scenes for the Render Queue, otherwise the scene will not start rendering on its own and will require manually pressing Start Render.
This provides a quick heads up of what will be rendered. Use this to check the output size and destination paths before rendering.
The render output size (in pixels) related directly to the Game View. For a list of common sizes, click the '...' button in the Render To Disk inspector to select one.
You may also enter a new size manually and it will be added to the Game View list of resolutions if it has not already been added.
Any render size may be used and does not have to fit 1:1 onscreen or within the actual Game View window. Rendering maximum size and quality is according to the limits if your graphics card.
If too much demand is put on the GPU, it may cause Unity to crash. When this occurs, you'll need to adjust the output size and/or render settings to find a balance between quality and the limits of your graphics card.
Testing early on and throughout the development of your project will help identify when new issues arise. Use additional diagnostic tools to observe the load on your computer and GPU to find potential memory hogs or other issues.
The filename previews can help spot incorrect naming or paths before starting the render. When rendering multiple ranges, each sequence is listed with its own destination path.
Select one of the following formats. Note that the camera and render options vary with each.
Renders a single camera or whichever camera is active.
When Screen Capture mode is enabled, the output of the Game View is saved using Unity's built-in screenshot method which is preferred. Otherwise, if Screen Capture is off, rendering is accomplished using a render texture.
If Use Active is enabled, the current camera is used. This uses Camera.current with a fallback to Camera.main. Disable this optoin to explicitly set which camera is rendering.
For normal rendering, Screen Capture is recommended, however to render from a specific camera and not necessarily the Game View, disable both Screen Capture and Use Active to assign the render camera directly.
There may be differences in the results produced using screen capture vs render textures, especially when rendering PNG files with alpha channel. Testing may be needed to determine which mode works best for your project. See the Additional Notes below.
Use this mode for rendering 3D stereoscopic images using a separate left and right camera. Select the desired output format whether saving to separate images, or stacking them in a single image.
Typically Top Bottom format is used for wide aspect stereoscopic videos, and Left Right is used for square or narrow aspect ratios. Depending on the output format selected, this option may be forced to a specific layout and the control will appear disabled.
The left and right camera should have identical settings and must be positioned manually to set the interocular distance according to your scene. This determines the spacing between the left and right eye. The larger the spacing, the smaller the scene feels and vice versa.
An interocular distance mimicking human eyes is suggested for a natural feel. Typically this is a value between 50 and 75mm. For this example, 64mm is used which provides an interocular distance in meters of 0.064. This is applied to the left camera only to leave the right camera centered, since most people are right-eye dominant. This allows the right side to be used for standard flatscreen video and maintain centering for titles.
For an example setup, please see:
Assets/AxonGenesis/Timeflow/Examples/Scenes/Rendering/RenderStereoscopic
Renders to fulldome format using cubemap rendering. Each frame, the camera renders 6 times, one for each cardinal direction. These images are then warped and stitched using a specialized shader.
The cubemap must be a render texture with cube dimensions, set to the same resolution as the output size. Additional settings may be configured by selecting the render texture and viewing it in the Inspector.
For maximum render quality, floating space color format is highly recommended. While this does increase computing and memory requirements, it preserves full HDR range for additional processing.
Each side selected in the Cubemap Faces drop down menu is rendered every frame then stitched together to create a seamless spherical render. However, seems may occur with certain render features and should be avoided, covered more below in the Additional Notes.
Rendering cubemaps requires a lot more memory than standard rendering. Be aware that render settings going beyond the limit of your graphics card may result in crashing and will require experimentation to maximize memory usage without crashing.
The shader for used for fulldome rendering has been included with Timeflow under the MIT license provided by Fulldome Camera For Unity. The original source can be found on github, though everything needed is already included and built into Timeflow. Many thanks to Roger SodrÊ for developing this tool and making it available!
Typically fulldome is used when rendering for a dome theater, while fisheye may be used for VR 180 or as a general lens effect. The only difference between the two is orientation, with fulldome intended for an overhead projection, while fisheye is viewing directly ahead.
Determines the maximum angle of the fisheye lens. The default value is 180, meaning that the total field of view is 180 degrees. In a fulldome render, this would make the horizon visible in all directions and is suitable for a domes that are a full hemisphere.
Adjusts the up and down angle of the dome. If rendering unidirectional content (there is no 'front'), tilt can be left at 0. Otherwise use tilt to shift the forward focal point slightly up from the audience perspective for a more comfortable viewing angle from a seated position.
Screen dimensions, orientation, and projection setups vary quite a bit, so unfortunately there is no golden standard. However, most planetariums have theater seating with front facing screens (the dome is tilted forward 10 - 30 degrees). It is suggested to reference other shows when planning your render to get an idea of what it should look like.
This rendering format is based on the fulldome format and shares the same properties. The only difference is that the final projection is forward facing, rather than upward facing. Please see the section above on Fulldome format.
One minor optimization that may often be used with VR 180 format is to turn off rendering for the -Z side of the cubemap, since the area behind the camera is never seen. However, all other sides are required for the full effect and overall this format requires the same resources as fulldome.
Render equirectangular format for VR 360.
Be sure that the left and right cameras used for stereoscopic rendering have matching settings, otherwise anomalies may occur.
Please note that the 360 Stereo Capture option in Player Settings has nothing to do with 360 rendering using Render To Disk. Unless this option is needed in a build, it should be left off.
For more information on 360 rendering and publishing, please see:
When rendering stereoscopic, the output texture must be sized for the final image and therefore may be different than the capture size.
In all formats, an output render texture may be specified for performing additional processing. This field is optional and may be left empty when directly rendering the main camera.
This is an optional setting to use a secondary camera to render additionally over the final output. This could be used to show a heads up display or UI over the render camera, or for additional image processing.
Displaying the Current Time and text elements does not require an overlay camera and instead the UI Canvas may be assigned to the main camera directly. Which setup you use depends on your scene and objectives.
Enable this checkbox to capture the Overlay Camera for final output. This is only used when the overlay camera is not actually in the camera stack (i.e. set to 'Base' mode) and is being used as a secondary pass over the main render. This is used to apply post processing and other screen effects over the final render, covered in more detail below in Fullscreen Post Processing Effects.
The current time, time remaining, and frame numbering can be enabled and assigned to text or other value properties. Typically this is used to display timecode and frame numbers onscreen and included in the final render.
Sets the output path, file type and name.
If enabled, no files are saved when rendering. This is primarily used to troubleshoot rendering issues, going through the rendering procedures but without generating files.
Sets the global scale of time. This could be used to create super slow motion or speed things up. Unless using it for some special purpose, it should be left at 1.
The target FPS (frames per second). This takes precedence over the Timeflow frame rate.
If set to a value different from the Timeflow FPS, a warning is displayed however may be ignored if intentional.
If set to a value greater than 1, files are only saved at those frame intervals, skipping those between. One way this can be used is to render a quick preview of a long sequence to spot check that everything is rendering correctly before committing to a full render.
Supports either JPEG or PNG. For general purpose, the highest quality JPEG setting is recommended. Use PNG format for lossless output and to export an alpha channel, though note that PNG files are significantly larger and require more time to write to disk. Rendering to a fast hard drive is recommended.
Specifies the full destination file path. Please make sure the path is valid and that the destination directory has been created.
You may use one of the following wildcards to define relative paths:
$PROJECT - One directory up from Assets
$ASSETS - The Assets directory
$CUSTOM - A custom path entered in the Timeflow Preferences.
It is strongly advised against rendering into the assets directory, unless you are doing so intentionally and understand that the files will be imported by Unity.
If enabled, the target directory will be opened in the explorer (Finder on macOS) when the render is finished. You may also press the Open Now button to open the folder immediately
Single Range - Renders 1 sequence based from the start to end frame.
Multiple Ranges - Queues multiple sequences each with a different frame range.
Still Frames - In this mode, Render To Disk will wait until you press Render Frame button (in play mode) to capture a single frame to disk.
Sets the file name for output with number padding (leading 0s) to force correct alphabetical order.
Enter the start and end frames to render. Note that the frame numbers are based on the current framerate (FPS) set in Timeflow.
Press the '...' button to set ranges to the full duration or using the Work Area. Use the Goto and Set buttons to manage ranges with the current time in the Timeflow view.
When outputting Multiple Ranges, use this button to automatically generate frame ranges from markers in the Timeflow view. This presents a popup dialog with the option to replace all frame ranges with the new ones generated, or to append the new ranges to the existing list.
If a value is entered, additional frames will be rendered before and after the frame range. This is most often helpful when rendering multiple ranges that you wish to edit together later. Adding handles allows more flexibility in the edit to add cross dissolves or shift cuts forward or backward in time.
Specify the frame number to start numbering with for the files saved on disk, if other than the actual frame number. This might be helpful when rendering multiple ranges or separate segments from a single scene.
If enabled, playback begins at the preroll frame number. This is often required whenever there are simulated effects such as physics or particles to allow enough lead time for them to fully generate. This is only applicable when the starting frame is other than 0. The preroll frame must be before the start frame to have any effect.
As of Timeflow v1.3, video encoding is now supported using ffmpeg. Please see the section on Video Encoding for setup.
Specifies the filename for the output video. Note that the file extension (ex: .mp4) is added automatically and determined by the Video Encoding setting.
Enable this to overwrite any existing files with the same name on disk. This option is on by default. If disabled and the file does exist, ffmpeg will raise an error and abort the encoding, leaving the original file untouched.
If enabled, the filename is set automatically to match the name of the time range entered above. This simply saves time by keeping the name the same as the output sequence.
If enabled, you may select any audio file supported by ffmpeg to encode with the video.
This aligns the start time (in seconds) with the beginning of the scene or Timeflow. Typically this value should be left at 0, unless you wish to queue the audio to start from a later time.
Use this option when rendering out frame ranges to automatically align the audio time. This is useful especially when rendering out a section or multiple ranges from Timeflow.
This field takes a Video Encoding scriptable object to define the specific settings for ffmpeg. Timeflow includes several presets in Assets/AxonGenesis/Timeflow/Settings/VideoEncoding
You may also create your own presets to encode any type of video or format supported by ffmpeg. For more information, see the Video Encoding documentation.
If enabled, the terminal window executing each ffmpeg process will be opened. This is optional and allows you to more easily see the process running, which will be canceled if the window is closed.
This is used primarily for automatically adding metadata for stereoscopic renders. However, you may turn off the Auto checkbox to enter any custom ffmepg flags (including but not limited to metadata).
This displays the full command used for encoding the video. Directly editing this is not allowed, however you may copy the command to run in a terminal window, or to modify further. Press the Refresh button to be sure the command is up to date with any recent changes made to the settings above.
Please refer to the Video Encoding documentation for more information.
Optionally assign a game object that gets deactivated upon starting the render. The main use case for this feature is to hide a group of objects that are only used while editing but that should be hidden in the final render. For example, this might be a preview camera you are only using in edit mode.
When using LOD Groups, it is usually desired while rendering to force all models to their maximum resolution for best quality. Otherwise if this setting is disabled, objects may pop when crossing the LOD thresholds.
When working with very large scenes, LOD may be necessary to manage the complexity of the scene. In such a case, disable this option and make sure that the LOD distances occur at places they are not noticeable or can avoid being seen in the camera view.
This writes a summary and estimated render time every X frames to the Console. Each entry shows the current frame number, the estimated time and frames remaining, the elapsed time in total, the average render time per frame, and the render time of the last frame.
Monitoring the log is helpful to ensure everything is running smoothly. If it stops or the render significantly slows down, it could indicate a problem with the scene and load on the graphics card. This can be caused by groups of objects or certain render features turning on and off at times throughout the animation.
Enable this option if you are encoding to video and don't want to see any of the status messages in the console view.
Enable this to pause rendering at a specific frame number. This may be helpful when troubleshooting a render issue that happens at a particular point. Pausing the render here can help to more closely monitor the render or to inspect the scene at that point.
Be sure to see the Optimizations page for more tips and fixes for specific rendering setups.