[experiment] Free-fly camera in CLI + GUI preview (do not merge) - #337
Draft
mohamedtahaguelzim wants to merge 2 commits into
Draft
[experiment] Free-fly camera in CLI + GUI preview (do not merge)#337mohamedtahaguelzim wants to merge 2 commits into
mohamedtahaguelzim wants to merge 2 commits into
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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
Fto toggle fly mode, then:WASDmove,E/Cup/down,ShiftboostFagain to exit; everything else (Space, scroll, etc.) unchangedWhat it touches
StitchPipeline::fly_camera/camera_position/set_camera_position- translate the virtual eye by mutatingscene.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-clipreview: 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.