Skip to content

[experiment] Free-fly camera in CLI + GUI preview (do not merge) - #337

Draft
mohamedtahaguelzim wants to merge 2 commits into
mainfrom
feat/preview-freefly-camera
Draft

[experiment] Free-fly camera in CLI + GUI preview (do not merge)#337
mohamedtahaguelzim wants to merge 2 commits into
mainfrom
feat/preview-freefly-camera

Conversation

@mohamedtahaguelzim

Copy link
Copy Markdown
Contributor

Experiment - not for merge

A debug/learning view: fly the virtual camera through the 3D stitch scene to see how the panorama is built. The renderer places the two camera images as planes in 3D (SceneGeometry) and views them from a virtual eye; this lets you move that eye around with WASD + mouse instead of the fixed pan/tilt/zoom.

This is intentionally a permanent experimental branch, kept as a Draft so it is not merged. Useful for understanding the geometry, debugging calibration/layout, and onboarding.

Try it

git checkout feat/preview-freefly-camera
cargo build --release -p reco-cli
./target/release/reco preview <left.mp4> <right.mp4> -c <match.json>

No stereo pair handy? Pass the same video twice with any match.json - you still see the two planes in 3D and can fly around them.

In the window: press F to toggle fly mode, then:

  • WASD move, E/C up/down, Shift boost
  • mouse-drag (left or right) to look
  • F again to exit; everything else (Space, scroll, etc.) unchanged

What it touches

  • StitchPipeline::fly_camera / camera_position / set_camera_position - translate the virtual eye by mutating scene.camera_position (read each frame; no render-path change). The eye is blocked from reaching the origin, where the look-toward-origin basis is undefined.
  • reco-cli preview: held-key WASD/E/C + mouse-drag look wired into the winit loop, gated behind the fly-mode toggle so it doesn't clash with the existing calibration hotkeys.

Builds clean (cargo build, clippy -D warnings, fmt --check) on Linux; built and ran on Windows/AMD.

Press F in the preview to toggle free-fly: WASD translates the virtual
camera through the 3D scene, E/C move up/down, Shift boosts, mouse-drag
looks around. Adds StitchPipeline::fly_camera/camera_position/
set_camera_position (mutates scene.camera_position, read each frame);
movement is integrated frame-rate-independent in the winit loop.
For interactive experiments only - not a render path.
Same behaviour as the CLI preview: press F to toggle free-fly, then
WASD/E/C translate the virtual camera through the 3D scene, Shift
boosts, mouse-drag looks. Reuses StitchPipeline::fly_camera; movement
is integrated in the vsync render tick. F now toggles fly mode (F11
keeps toggling fullscreen).
@mohamedtahaguelzim mohamedtahaguelzim changed the title [experiment] Free-fly camera in CLI preview (do not merge) [experiment] Free-fly camera in CLI + GUI preview (do not merge) Jun 6, 2026
@mohamedtahaguelzim mohamedtahaguelzim moved this to In review in Project Backlog Jul 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant