Frame Bundler
A node responsible for collecting incoming photosensor samples corresponding to a full lidar sweep and packaging them out into a sensor frame.
Description
The Frame Bundler node accumulates photosensor samples coming from the RawData input into a structured buffer on the GPU, until the expected number of samples per frame has been reached. At that point, it outputs the structured buffer with the accumulated samples for a full frame.
The frame size, that is, the number of photosensor samples to accumulate, is determined by multiplying the SamplesPerTrigger and TriggersPerFrame inputs.
The Frame Bundler node also reorders the samples if necessary, so that they appear in elevation order for 3d lidars, instead of firing order. For 3d lidars, the SamplesPerTrigger input is used to determine the number of lasers.
The Reset signal can be used to drop all samples accumulated in the current structured buffer and start accumulating again from the start of the buffer.
Inputs
Name | Type | Description |
---|---|---|
RawData | StructuredBuffer<PhotosensorRawData> |
A buffer containing the photosensor samples. |
TriggersPerFrame | uint |
The number of triggers per frame. For lidars, corresponds to the horizontal frame size. Must be greater than 0. |
SamplesPerTrigger | uint |
The number of samples per trigger. For lidars, corresponds to the vertical frame size. Must be greater than 0. |
Reset | Signal |
A signal to reset the current accumulator state. Use Reset when changing TriggersPerFrame or SamplesPerTrigger. |
InTranscode | CustomPassContext |
The graphic context into which to queue transcoding commands. |
Outputs
Name | Type | Description |
---|---|---|
Frame | StructuredBuffer<PhotosensorRawData> |
A buffer containing one full sweep from the lidar. |
OutTranscode | CustomPassContext |
The graphic context after queuing the transcoding commands. |
Execution
Asynchronous. Executes when InTranscode or Reset changes.
Notes
For better performance, the node keeps internally a circular list of three structured buffers. While one buffer is being sent as output, the next one in the list is being filled with incoming samples.
All structured buffers are allocated on first use. If either SamplesPerTrigger or TriggersPerFrame changes during execution, you must send a Reset signal to reallocate the buffers.
The Frame Bundler node can only output a single buffer per execution. If too many samples are sent to the node in a single execution and more than one full frame is completed, the last frame is sent to the output and a warning message is sent to the console.