Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compute recommended camera position based on playback stroke #1

Open
Daniel-Fan opened this issue Nov 5, 2021 · 2 comments
Open

Compute recommended camera position based on playback stroke #1

Daniel-Fan opened this issue Nov 5, 2021 · 2 comments

Comments

@Daniel-Fan
Copy link
Owner

Working based branch:
https://github.com/Daniel-Fan/open-brush/tree/add-strokeIndicator

ReadMemory

  1. Read the strokes info from memory, then add stroke into a MemoryList https://github.com/Daniel-Fan/open-brush/blob/add-strokeIndicator/Assets/Scripts/Save/SketchWriter.cs#L306
  2. All the stroke is stored in that memoryList
  3. The memoryList will be sorted by the timestamp of initial control point of each stroke. https://github.com/Daniel-Fan/open-brush/blob/add-strokeIndicator/Assets/Scripts/SketchMemoryScript.cs#L906

Workflow for playback

  1. BeginDrawingFromMemory is used to initialize the playback object.
  2. Before passing memoryList into the ScenePlayback, we should have finished the computation of camera position.
  3. After the scene started, we only only to consider the redraw part, see details below
    • In Redraw(which should be used for scale change and zoom in and out), after it is sorted, we will start the ScenePlaybackByTimeLayered or ScenePlaybackByStrokeDistance

Data Structure of Stroke

  1. There is a list in each Stroke called m_ControlPoints which stores the specific position and orientation of each point in this list. https://github.com/Daniel-Fan/open-brush/blob/add-strokeIndicator/Assets/Scripts/StrokeData.cs#L31
  2. structure of control point https://github.com/Daniel-Fan/open-brush/blob/add-strokeIndicator/Assets/Scripts/PointerManager.cs#L70
@andybak
Copy link

andybak commented Nov 5, 2021

I really like this idea. Is there any merit in using the headset position in your heuristic as well? You're capturing that in your branch - I wonder if that might be an interesting hint for camera position.

@Daniel-Fan
Copy link
Owner Author

Daniel-Fan commented Nov 10, 2021

Hi @andybak

Thank you so much for your comments!

Yes, currently we are working on an algorithm that will compute several camera view points which are based on headset position, stroke position and controller position in a certain period of time.

It will help user to keep tracking the latest playback object as well as some context at that time.

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

No branches or pull requests

2 participants