Questions about Take Recorder

Hello,

I am evaluating Take Recorder for our product and I have a few questions.

Currently, our UE product makes extensive use of the replay system. We make VR training software and one (major) feature is that experts can record replays of them performing a task and students can download and watch the replays.

We are evaluating options to allow our content creators to edit recordings of experts and obviously, replays are uneditable.

I’ve watched https://www.youtube.com/watch?v=6Yv0YTV3Rzs and am intrigued by the possibilities of using Take Recorder and have a few questions.

  1. Will any Sequence that I record using “Take Recorder” be cookable/playable in a shipping build of the game, or will I encounter limitations/known issues?
  2. So far, using “expose to cinematics” I’ve been able to record simple variable state changes, such as float and bool. Can this be extended to structs/uobjects?
  3. Is there an option for variable tracks to record arrays?
  4. Is there any technique to record events fired by an actor using Take Recorder?
  5. (Assuming sequences produced by Take Recorder work in Shipping Builds) How well does Take Recorder scale? As in, If I have a Replay that perfoms well, and I make a Take Recorder that records all Actors marked with “replicates”, would you expect playing that Sequence to playback at a similar framerate as the Replay, or is there significantly additional overhead that would impact performance?

Best Regards

Hi, thanks for the info along with your questions.

  1. Yep! Any take-recorded sequence ends up as a regular level sequence, and bakes down to keyframes.
  2. Yes, it can.
  3. No, there’s not.
  4. You cannot record the events themselves (just the effects of those effects on actors). However, you could work around this by having the event set up to toggle or set an animatable property and then record that property; you wouldn’t have the direct event data, but you’d know when the event was fired.
  5. Just like with a regular sequence, it depends on the contents. If it’s an exact duplicate, it should play back just fine. Also, note that if you’re playing it back from Sequencer, it’ll use the Sequencer FPS settings.

I hope that helps!

Hi, thanks for your patience on this.

Regarding recording structs: it depends on the type of struct (apologies for the lack of clarity earlier). For example, Vector 4 structs have Expose to Cinematics available (which is what I was thinking of), and they key just as well as other variable types. However, some other structs don’t have that option available in-engine, and would require code changes.

  1. The SetVariable approach you mentioned could work, depending on your use case. If you run into issues after giving it a try, feel free to reach out.
  2. Which sorts of custom tracks did you have in mind?

Yep, it would require source changes and vary a bit depending on the type of struct.

Essentially, if you want to record anything, it needs to be animatable. If you’re looking to animate just a property inside of a struct, then you can mark it with an Interp flag (which is needed on a UProperty to be animatable in Sequencer). As far as recording goes, if those properties are marked as Interp, they’ll automatically be recorded if they change during Take Recording.

Marking something with the Interp flag is dependent on the struct and its structure. For example, the Filmback setting (below) includes the Interp marker, which lets it get animated in Sequencer. This is because every property inside it also has the Interp flag.

/** Controls the filmback of the camera. */ UPROPERTY(Interp, BlueprintSetter = SetFilmback, EditAnywhere, BlueprintReadWrite, Category = "Current Camera Settings") FCameraFilmbackSettings Filmback;As another example, the CameraFocusSettings does not include the Interp flag:

/** Controls the camera's focus. */ UPROPERTY(EditAnywhere, BlueprintSetter = SetFocusSettings, BlueprintReadWrite, Category = "Current Camera Settings") FCameraFocusSettings FocusSettings;…but within that struct, the ManualFocusDistance is marked as Interp, and can be animated/recorded.

`FCameraFocusSettings
{
GENERATED_USTRUCT_BODY()

/** Which method to use to handle camera focus */
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = “Focus Method”)
ECameraFocusMethod FocusMethod;

/** Manually-controlled focus distance (manual focus mode only) */
UPROPERTY(Interp, EditAnywhere, BlueprintReadWrite, Category = “Manual Focus Settings”, meta=(Units=cm))
float ManualFocusDistance;`So, your use case will influence how/where the Interp flag should be added.

If the thing you want to animate is not a generic property, then you’ll have to write a track that animates and evaluates it; If you want to record it, you’ll need to write a track recorder that writes keyframes to that track.

I hope that helps! Please let me know if you need additional support on this topic.

Great! I’ll close this case.

Thank you for the info!

Regarding extending to recording structs, how would you do that? The only information I can find is a singular post by someone saying it can’t be done https://forums.unrealengine.com/t/cant-expose-struct-to-cinematics/884236/2

A couple other questions.

  1. How would I setup something similar to an OnRep function for variables updated by a sequence keyframe. As in, if the sequence stomped the value of a boolean, how would I hookup an OnRep function to fire off so I can call Refresh/Update? I’d prefer to avoid checking on tick. The best technique that I’ve found so far is on the actor to enable “Run Construction Script in Sequencer”, which I’m assuming is expensive.
  2. Is there a simple technique to, without engine changes (or I suppose with if necessary), one extend the Take Recorder to detect/record custom tracks of data on an Actor?

Best Regards

Edit -

Regarding question 1. Apparently there is a super useful feature that if you have a VariableSomeName set to “Expose to Cinematics” and a function called “SetVariableSomeName” then sequencer auto magically calls that function when setting the variable. https://www.youtube.com/watch?v=qt3x64Grlq0 . Unclear how cleanly this will “just work” with sequences made with Take Recorder but I’ll experiment.

Custom Tracks - Admittedly I don’t know, I’m just looking at possibilities. Upon further investigation I suspect making a custom TakeRecorderSource is overkill

Recording Structs - I spent time looking over the source. How would one add additional support for struct variables. Looking at the sourcecode, it appears the correct way to do this is to emulate MovieScenePropertyTrackRecorder.h and make a make a custom IMovieSceneTrackRecorderFactory with matching UMovieSceneTrackRecorder. Does this sound correct or am I barking up the wrong tree? Also, would you expect this to work with launcher UE or will this likely require engine changes at some point?

Best Regards

-- edit

Looks like I’d have to modify the source. Its impossible in editor to mark an arbitrary struct with “Expose to Cinematics”, the visibility function for that checkbox is hardcoded to very specific types FBlueprintVarActionDetails::ExposeToCinematicsVisibility

Thanks, that answers my questions!