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

Project map imagery onto reality meshes #6214

Open
pmconne opened this issue Nov 20, 2023 · 9 comments
Open

Project map imagery onto reality meshes #6214

pmconne opened this issue Nov 20, 2023 · 9 comments
Assignees
Labels

Comments

@pmconne
Copy link
Member

pmconne commented Nov 20, 2023

Is your feature request related to a problem? Please describe.

Some scenes include reality meshes representing portions of the earth's surface. Currently, map layer imagery is only draped onto the global terrain/ellipsoid, not onto reality meshes. Unlike the global terrain, these reality meshes usually have their own baked-in texture imagery too.

Describe the solution you'd like

Provide a way for a reality mesh to specify that it should be treated as terrain, with map layer imagery draped onto it. Allow it to optionally specify that the base layer (e.g. Bing map imagery) should not be applied to it.

Describe alternatives you've considered

None.

Additional context

Global terrain uses the same shaders as reality meshes, just sampling the textures differently.

A "treat as terrain" flag could also be useful when the reality mesh represents a large area of the earth's surface, to help the display system reduce precision issues caused by excessively-expanded frustum planes. On the other hand, we might want to avoid conflating that flag with a narrower "drape map imagery on me" flag.

Consider whether we may one day need to support projecting map imagery onto point clouds and design the API accordingly.

@alarkbentley
Copy link
Contributor

@danieliborra @markschlosseratbentley Any status update / estimates on development for this?

@danieliborra
Copy link
Contributor

We're currently working on this issue (In progress) and it is high in our priority.
No estimates yet.

@markschlosseratbentley
Copy link
Contributor

@alarkbentley As we work on this, it would be very helpful to have a testcase that represents the scenarios you expect to encounter. Basically: a reality model + map layer to project onto it. Do you have anything you can provide us?

cc @MarcNeely @danieliborra

@alarkbentley
Copy link
Contributor

@markschlosseratbentley

Here is an example from iTwin Experience QA.
Select "Groups & Layers" -> "Reality Mesh" and it will try to render a reality mesh with a WMS map layer on-top.
See video.

https://qa-itwinexperience.bentley.com/dcd5e824-d9fe-40db-961f-83fd5ae95484/map?featureFlagOnCsv=should-ocp-use3dtiles&sceneid=db54b083-e71e-43f3-8b4c-d10c5df9059c

maplayer_on_realitymesh_241113.mp4

Expected:
Image

@markschlosseratbentley
Copy link
Contributor

@alarkbentley Thank you! I'm searching through Chrome dev-tools' network tab, trying to find the sources of this data, but not having much luck.

Could you tell us where we can locally download the reality model itself? Or a URL directly to it?

Could you also direct us to a URL of the map layer we would be able to attach in our own app?

Basically, we want to 1) load the reality data in itwinjs-core display-test-app 2) attach the map layer
so we can test our projection development.

@MarcNeely
Copy link
Contributor

I have a command implemented in DTA which can flag the reality mesh so that it drapes the background map onto it. The flag can be turned on or off at will. We need to think about and implement some real API for it though as it currently uses some internal classes to accomplish it.

@markschlosseratbentley markschlosseratbentley removed their assignment Nov 18, 2024
@alarkbentley
Copy link
Contributor

@markschlosseratbentley sorry for the late answer, missed you replied.

So local copies of this data will be a bit tricky as the data is dynamically generated on request by our backend (original files are not 3dtiles/wms). I assume we don't have a easy way to export this @mborjesson-bentley ?

But the setup is very simple, a RealityMesh with a WMS draped on same location. Do we not have existing examples of this in iTwin.js sandbox or somewhere?

@MarcNeely your update sounds promising! Any screenshot or demo?

@markschlosseratbentley
Copy link
Contributor

But the setup is very simple, a RealityMesh with a WMS draped on same location. Do we not have existing examples of this in iTwin.js sandbox or somewhere?

The challenge for this use case is getting a reality dataset and a map layer that share the same location.

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

No branches or pull requests

6 participants