Skip to content

Multiple Viewports #5214

@bagnell

Description

@bagnell

Allow for multiple viewports/camera views in a single canvas.

  • One SceneManager containing multiple Scenes
    • SceneManager contains all non-view dependent primitives.
      • Primitives updated once and rendered in each viewport
      • Option on each primitive to hide for any number of viewports
    • Each Scene contains a copy of view dependent primitives.
      • Includes Globe
        • All globes search terrain geometry and texture cache before requests
        • All globes have the same terrain and imagery providers?
        • Allow globes to have different terrain and imagery providers?
        • Allow for different celestial bodies? (not implemented)
      • Includes 3D Tilesets
        • All tilesets search a geometry and texture cache before requests
        • Allow different styling?
          • Each tileset will have its own style and batch table
      • Any other primitive where each vertex needs to be multiplied by a view dependent transform on the CPU.
  • One Scene with a list of Viewports that contain a camera and viewport rectangle.
    • Non-view dependent primitives updated and rendered in each viewport.
    • View dependent primitives can keep a command list per-viewport after updating for each camera
      • Can not have different terrain or imagery provider
      • Can not style 3D Tilesets per viewport.

The first option is more flexible but more complex. The second option is simpler but has a couple of constraints.

  • Z-order the viewports. Model after PrimitiveCollection.
  • ScreenSpaceCameraController needs to know which viewport the input originated in.
  • Viewport positioning.
    • Absolute values. App responsible for resizes
    • Custom positioning implementation
    • Position with CSS and hidden divs. Potentially expensive.
  • Screen space passes for each viewport and for the final framebuffer.
  • Allow the same primitive to have a different material in each viewport? (probably not)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions