Configuring Options
You can customize the recording, playback, and file-saving behavior by adjusting several key options.
1. Recording Options
When calling Start Recording, you can provide a FBloodStainRecordOptions struct to control how the data is captured.
.png)
Recording Group Name: The name of the group to record. If left asNone, it defaults to “BloodStainReplay”.File Name: The name of the file to save. If not specified, a name will be generated based on a timestamp.Tags: Assigns gameplay tags to the recording. This allows you to categorize and later filter replays, for example, byBossFightorPlayerDeath.Sampling Interval: The time in seconds between each recorded frame. A smaller value (e.g., 0.033 for ~30 FPS) results in smoother replays but larger file sizes.Track Attachment Changes: If enabled, the system will record when components are attached or detached from the actor, allowing for dynamic changes like equipping or unequipping weapons.Save Immediately If Group Empty: If true, the recording will be saved to a file as soon as the last actor in the recording group is destroyed or stops recording.
2. Playback Options
When spawning a bloodstain, you can provide a FBloodStainPlaybackOptions struct to customize its playback behavior.
.png)
Playback Rate: Controls the speed of the replay.1.0is normal speed,2.0is double speed, and-1.0plays the replay in reverse.IsLooping: If true, the replay will loop continuously until stopped.Use Ghost Material: If true, the replayed actor will use the specified ghost material instead of its original materials.Group Ghost Material: AUMaterialInterfacethat overrides the actor’s materials during replay, allowing you to apply a custom visual effect.
Applying the Ghost Material: To use the
Use Ghost Materialoption, you must provide a material to theGroup Ghost Materialinput. The plugin includes a sample material namedDefaultGhostMaterial. You can find it by enabling “Show Plugin Content” in the Content Browser’s filter settings.
.png)
When the ghost material is applied, the replay will look like this:
.png)
3. File Save Options
You can configure the file compression and data quantization settings globally from the Bloodstain Subsystem. This allows you to balance file size against data precision. These settings are typically configured once, for example, in your GameMode’s BeginPlay event.
.png)
Compression Method: Determines the algorithm used to compress the final save file.None: No compression. Fastest, but largest file size.Zlib,Gzip,LZ4: Industry-standard compression algorithms.LZ4is generally very fast, whileGzipoften provides higher compression ratios.
Quantization Level: Reduces the precision of floating-point data (like location and rotation) to significantly reduce file size.None: Full precision, largest data size.Standard High: High precision, offering a good balance between quality and size.Standard Medium/Standard Low: Lower precision, resulting in much smaller files at the cost of some accuracy. Ideal for less critical replays or network replication.