Skip to content

Latest commit

 

History

History
95 lines (68 loc) · 3.78 KB

FeatureCachingRenderResults.md

File metadata and controls

95 lines (68 loc) · 3.78 KB

Caching Render Results

  1. Quick Start
  2. FrameMarker
  3. RenderCachePlayableAsset

Quick Start

From an empty scene, do the following:

  1. Create an animation in Timeline, for example: by referring to Creating Keyframed Animation in Timeline tutorial.

  2. Open the Timeline window and add a RenderCacheTrack.

    AddRenderCacheTrack

  3. Right click on the RenderCacheTrack and click Add Render Cache Playable Asset

    AddRenderCachePlayableAsset

  4. Adjust the length of the RenderCachePlayableAsset according to the length of the animation.

  5. Create a GameObject and add CameraRenderCapturer component.

  6. Drag and drop the GameObject to the object property of the RenderCacheTrack.

    AssignRenderCapturer

  7. Select the RenderCachePlayableAsset and click Update Render Cache in the inspector.

FrameMarker

Each frame has a FrameMarker, which can be used to skip capturing the image for that particular frame, and to lock the frame in order to prevent it from being overwritten.

FrameMarker

Right clicking on a FrameMarker will bring up a popup menu.

  • Copy: unused
  • Paste: unused
  • Duplicate: unused
  • Delete: unused
  • Lock and Edit
    Lock the frame and open the image using the assigned image application.
    The default shortcut is Alt + E and can be configured via the ShortCuts Manager.

Refer to FrameMarkers for more details.

RenderCachePlayableAsset

RenderCachePlayableAsset is a type of PlayableAsset which is used for caching render results to image files for playback by StreamingImageSequencePlayableAsset.

RenderCachePlayableAsset works together with RenderCapturer components, which execute the actual capturing process and decide what gets rendered into image files. Currently, StreamingImageSequence provides:

  1. CameraRenderCapturer component.
    Caches the render result of a Camera component.
  2. BaseRenderCapturer class.
    An extensible abstract class, which is used to customize the capturing process.

We can view or modify the following properties through the inspector.

RenderCachePlayableAsset

  • Resolution (Read Only)
    The resolution of the output images. Modify the size of the Game window to change this property.
  • Cache Output folder
    Where the cached render results are stored.
  • Output Format
    The format of the output images.
  • Show Frame Markers
    FrameMarkers are used to customize which frames to capture.
  • Lock Frames
    Turn the FrameMarkers's edit mode to lock mode in order to prevent certain frames from being rewritten, which is useful to maintain custom manipulation to previous cached images.
    RenderCache_LockFrames
  • Background Colors.
    • In Game window (Update)
      The background color of the Game window when updating RenderCache.
    • In Timeline Window
      The background color of the preview images in the Timeline window.
  • Update Render Cache
    Render and cache the results as images.
    If Capture All Frames is unchecked, then the capturing will only be performed for the specified frames.