-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Enable immediate mode rendering for custom layer in globe view #12143
Conversation
We have solved this internally in gl-native by providing a helper function that automatically converts any (well defined) model matrix into a one suitable to be used with the globe. In practice this is done by pre-multiplying the given model matrix with a coordinate frame matrix (scale & orientation) that describes tangent plane at the given location on the surface of the globe. Additionally some minor modifications are done for representing translation part of the matrix. This has some benefits as we don't need to expose any implementation details to the application. This also means that users don't need to do anything to support the transition between globe and mercator. |
...although we might want to expose more advanced controls/tools to users as in your POC. Some visualizations such as trajectories might be easier to render directly in pixel coordinates unless the data is defined in mercator projection. |
I think it all depends what we want to do but I am also preparing a different demo and refactor what I have already exposed. |
Hi team, This feature looks very useful. Do you think it is possible to load a 3D model (for instance iss satellite model), by setting up the coordinates and the altitude? Currently I am only able to use mapbox to add 3d model on a flat map, but not in the globe view. |
closing this one since it's already implemented via #12182 |
This is a POC to enable immediate rendering for custom layer when globe view is enabled. We can use this PR as a discussion panel to decide what needs to be exposed and in what way.
Previously a POC for draped rendering of custom layers was introduced in #11996.
globe-custom-layer.mov
cc @astojilj
Launch Checklist
@mapbox/map-design-team
@mapbox/static-apis
if this PR includes style spec API or visual changes@mapbox/gl-native
if this PR includes shader changes or needs a native portmapbox-gl-js
changelog:<changelog></changelog>