Skip to content

Add Record/Playback nodes for recording Track type#57

Draft
shamilatesoglu wants to merge 27 commits into
nodos-1.3from
nodos-1.3-track-recorder
Draft

Add Record/Playback nodes for recording Track type#57
shamilatesoglu wants to merge 27 commits into
nodos-1.3from
nodos-1.3-track-recorder

Conversation

@shamilatesoglu
Copy link
Copy Markdown
Member

No description provided.

@shamilatesoglu shamilatesoglu changed the title Nodos 1.3 track recorder Add Record/Playback nodes for recording Track type Apr 9, 2026
shamilatesoglu and others added 9 commits April 14, 2026 15:31
New node that records camera tracking data per frame and exports
COLMAP-format files (cameras.txt + images.txt).

- RecordTrackCOLMAP.cpp: Node implementation with Record/Stop/Save/Clear/
  Open Folder functions. Captures position, rotation, FOV, sensor size,
  and lens distortion each frame. Exports OPENCV camera model intrinsics
  and world-to-camera extrinsics.
- RecordTrackCOLMAP.nosdef: Node definition with Track input/output,
  output directory, image resolution, euler order, record toggle, and
  frame count pins.
- Track.fbs: Added EulerOrder enum (ZYX, XYZ, YXZ, YZX, ZXY, XZY) for
  configurable euler angle rotation order in COLMAP export.
- TrackMain.cpp: Registered RecordTrackCOLMAP in TrackNode enum and
  ExportNodeFunctions switch.
- Track.noscfg: Bumped plugin version to 1.10.0, added nosdef entry.

Review fixes applied:
- Pin buffer size looked up by name instead of hardcoded index
- Null checks on Track flatbuffer fields to prevent crashes
- Euler convention matches MakeRotation (eulerAngleZYX with sign negation)
- Float output precision set to 12 digits for camera parameters
- macOS support added to Open Folder

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

# Conflicts:
#	Subsystems/nosTrackSubsystem/Config/Track.fbs
New PlaybackTrackCOLMAP node loads cameras.txt + images.txt and outputs
Track data. Two modes via PlaybackMode enum:
- Sequential: Play/Stop auto-advance frames each execution
- Manual: frame index input pin controls which frame to output
Pins and functions are orphaned based on mode.

Also:
- Added PlaybackMode enum to Track.fbs
- Renamed Record node pins to InTrack/OutTrack with "Track" display name
- Renamed Playback frame pins to InFrameIndex/OutFrameIndex
- Replaced nosEngine.SetPinValueByName with NodeContext::SetPinValue

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… frame index only

Also fix frames not loading on node creation by always loading when InputDirectory
or EulerOrder changes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Migrate COLMAP nodes from the removed plugin-local EulerOrder enum to
the existing nos.sys.track.CoordinateSystem enum. Also fix nos.track
namespace references to nos.sys.track after upstream merge.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shamilatesoglu shamilatesoglu force-pushed the nodos-1.3-track-recorder branch from 11ff5eb to 8b13957 Compare April 14, 2026 12:31
shamilatesoglu and others added 18 commits April 28, 2026 14:08
WriteFiles() is now invoked from StopRecording() so cameras.txt and
images.txt are written the moment recording ends. The Save function
remains available for re-exporting the buffered frames on demand.
CopyFrom went straight from BeginPop to Copy, so the GPU copy used the
stale default-sized output pin descriptor as its destination. Mirror the
single BoundedQueue path (CommonCopyFrom) and MultiRingBuffer by calling
BeginCopyFrom and writing the slot resource's descriptor onto the output
pin first. The ring resources themselves are still (re)allocated from
the input descriptor in OnPathStart — this only fixes the output-side
descriptor propagation.
Recording is now driven by the Record pin alone; the dedicated
Record/Stop/Save/Clear/OpenFolder functions are removed. Stop is
debounced via a new MinOffFrames property so brief glitches in the
upstream signal (e.g. SDI bit flips on a camera-derived recording
flag) don't end a take prematurely. Buffer is auto-cleared on stop.

RecordedFrame is widened to capture Zoom, Focus, RenderRatio,
NodalOffset, CenterShift, and DistortionScale from the incoming
Track. PlaybackTrackCOLMAP gains a paired ExtrasEntry sidecar so
the same fields can be replayed.
Drop the duplicated ChannelViewerFormats enum and retype the Format pin
to nos.mediaio.ColorSpace, matching how the rest of the codebase
(GetLumaCoeffs, ColorSpaceMatrix, AJA/DeckLink IO, CasWithColorSpace)
already names this concept.

The two enums disagreed on index ordering (Rec_601=0 vs REC709=0), so
the luma coeffs array is reordered to match the new mapping. A
MigrateNode hook rewrites legacy pin type_name and remaps the saved
enum literal Rec_601/Rec_709/Rec_2020 -> REC601/REC709/REC2020 so
existing graphs keep their selected color space.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Introduce nosMath's first flatbuffer custom type (Math.fbs) and wire
the plugin through nos_generate_flatbuffers so future nodes can share
strongly-typed inputs/outputs. Adds two conversion nodes between Euler
angles and quaternions, registered alongside the existing math nodes.
Capture TimingInfo.FixedStepTiming.DeltaSeconds during ExecuteNode and
write it as the first non-comment line of the timecode sidecar (0 if
the recording wasn't taken in fixed-step mode). Lets downstream tooling
know the per-frame interval without having to derive it from timecodes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant