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

Multiple Viewports #5214

Open
bagnell opened this issue Apr 17, 2017 · 11 comments
Open

Multiple Viewports #5214

bagnell opened this issue Apr 17, 2017 · 11 comments

Comments

@bagnell
Copy link
Contributor

bagnell commented Apr 17, 2017

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)
@bagnell
Copy link
Contributor Author

bagnell commented Apr 17, 2017

We have an overlay pass. Do we want to execute those on the entire canvas or each viewport? It's only used for the shadow map debug views and ViewportQuad which isn't used anywhere. Can we remove it?

Where do we put the credits by default?

@pjcozzi pjcozzi mentioned this issue Apr 18, 2017
53 tasks
@pjcozzi
Copy link
Contributor

pjcozzi commented Apr 18, 2017

CC #3001

@bagnell
Copy link
Contributor Author

bagnell commented Apr 18, 2017

Having different scene modes will be possible with the first option. Would it be possible with the second?

Are we maintaining backwards compatibility? It would be difficult with the first option, probably easy for the second option.

@bagnell
Copy link
Contributor Author

bagnell commented Apr 18, 2017

All of the widgets created by Viewer are constructed with a Scene. Which viewport should they use? If there is more than one viewport, should we disable them by default? Should we require explicit creation with a scene/viewport reference?

@yoyomule
Copy link

What is the current progress?

@pjcozzi
Copy link
Contributor

pjcozzi commented Jul 29, 2017

@yoyomule there is initial work in the viewports branch; however, it requires pretty significant changes to the core rendering engine so we couldn't justify the effort at the time. We'll revisit, but the timeline is TBA. You are welcome to pick up this work sooner if you are interested, see CONTRIBUTING.md.

@lilleyse
Copy link
Contributor

lilleyse commented Nov 21, 2017

@pjcozzi
Copy link
Contributor

pjcozzi commented Sep 9, 2018

Partial support added in #6958.

@OmarShehata
Copy link
Contributor

Requested again on the forum: https://groups.google.com/d/msg/cesium-dev/SUqz4UGrSMA/F-l1ZuRTBwAJ

There is a common need for monitoring system:
Users want to see more then one screen at the same time and each screen show a map in 3D or 2D and display diffrent images.
For example,the first shows satellite images in 3D ,the second shows road map in 2D, .....
They expect the multiple screens show the same data and synchronized.
The data maybe come from server or mouse ploting.

@DoubleYellowEgg
Copy link

What is the current progress?
Is there no follow-up to this question?

@ggetz
Copy link
Contributor

ggetz commented Oct 14, 2024

Here's a use case on the forum where a user would like to use one DataSourceCollection (i.e. list of entities) across multple views: https://community.cesium.com/t/shareddatasources/35455/3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants