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

Feature Request: Unify default camera positions, keep camera position on changing renderers #192

Open
hybridherbst opened this issue Aug 26, 2020 · 1 comment

Comments

@hybridherbst
Copy link

We use switching between renderers as a means to compare color correctness etc. between render engines.

Would be great if switching between them would be more seamless, ideally trying to keep

  • background color
  • skybox
  • camera position
  • camera rotation
  • field of view
  • camera behaviour (speed of rotation)

as close as possible.
(currently switching render engines does a complete reload)

@emackey
Copy link
Member

emackey commented Aug 27, 2020

Currently the skybox on/off setting is already preserved like this. (Except for Cesium, which uses a procedural skybox)

Preserving the camera location is much more tricky, as each engine has its own ideas about how the camera works and what UI controls are hooked up to it. For example, Filament leaves camera control entirely up to the app developer, and this app doesn't even have a panning control hooked up to it. Cesium's panning requires the SHIFT key, and doesn't change the center of rotation with the pan.

I think one solution here could be to develop an engine-agnostic helper class for tracking user inputs and positioning a virtual camera in response to those inputs. Then each of the rendering engines would have their own input UI processing turned off (somehow) and instead would always get camera position from the new agnostic helper, each frame. One would need to work out how to get camera position from the helper into each of the engines' own camera systems. I wonder if something like the ThreeJS OrbitControls could be used to drive non-ThreeJS cameras?

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

2 participants