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

Add support for rendering 3d models #3996

Closed
lucaswoj opened this issue Jan 17, 2017 · 18 comments
Closed

Add support for rendering 3d models #3996

lucaswoj opened this issue Jan 17, 2017 · 18 comments
Labels
cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) feature 🍏

Comments

@lucaswoj
Copy link
Contributor

lucaswoj commented Jan 17, 2017

Continued from mapbox/DEPRECATED-mapbox-gl#17

We are adding support for simple extrusions. For buildings, there are some complex and high-profile landmarks that can't be rendered accurately with simple extrusion:

eiffel-tower
Haiii, Eiffel Tower.

For these features, it seems like we would want to include 3D models. How would/could this work? How much of a lift is this?

/cc @lbud @ajashton @mapbox/gl

cc @mourner @tmcw @jfirebaugh

@mapbox mapbox locked and limited conversation to collaborators Jan 17, 2017
@1ec5 1ec5 added the cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) label Jan 17, 2017
@mapbox mapbox unlocked this conversation Aug 18, 2017
@allthesignals
Copy link
Contributor

My team is interested in learning more about the status of this feature - we are also in a place where simple extrusions will not work, and we have a wealth of 3d model data that we think would fit better inside our MapboxGL stack. Any chance there's direct access to the scene interface? Is a pathway for this related to #6456? Thanks!

@lbud
Copy link
Contributor

lbud commented May 29, 2018

Any chance there's direct access to the scene interface? Is a pathway for this related to #6456?

Exactly @allthesignals, custom layers (#6456) will be the soonest you'll be able to accomplish this, and that feature will likely land ~this summer — native Mapbox GL support for 3D models isn't on our short- or medium-term roadmap at this time.

@allthesignals
Copy link
Contributor

Thanks, @lbud - I'll keep an eye on this PR here: #6124

@andrewharvey
Copy link
Collaborator

Over on the PR I posted some example code which helps place 3D models at given long, lats

#7039 (comment)

selection_999 017

@allthesignals
Copy link
Contributor

Fabulous - thanks @andrewharvey!

@andrewharvey
Copy link
Collaborator

andrewharvey commented Feb 12, 2019

I'll close this ticket given custom layers #7039 supports adding 3D models to a Mapbox GL JS map.

An official example will be followed up in #7330

3D terrain mesh is at #1489

@femski
Copy link

femski commented Apr 12, 2019

How can we use custom layer to display 3D terrain (by extruding raster DEM heights or something similar)? I had hoped for an example of that. But it seems its not possible at this time, correct ?

@Daandeve
Copy link

Is it possible to move the 3d object without re-importing the 3d model?

@andrewharvey
Copy link
Collaborator

Is it possible to move the 3d object without re-importing the 3d model?

@Daandeve Using the example at https://docs.mapbox.com/mapbox-gl-js/example/add-3d-model/, the render method is called each frame and it refers to the modelTransfom object. So if you update your the modelTransform object to a new location, the model will move on the next frame.

@andrewharvey
Copy link
Collaborator

How can we use custom layer to display 3D terrain (by extruding raster DEM heights or something similar)? I had hoped for an example of that. But it seems its not possible at this time, correct ?

@femski It is possible to build that yourself at the moment, I have implemented it, in a similar way to https://blog.mapbox.com/bringing-3d-terrain-to-the-browser-with-three-js-410068138357?, but I don't have the code to share as it's wrapped up in a whole application.

However you can see at https://blog.mapbox.com/taking-our-maps-to-the-next-dimension-dbeee37a7c4c Mapbox is working on adding this as an out of the box feature.

@Daandeve
Copy link

@andrewharvey Do you have a example?
I'am new to both mapbox and three.js. :)

@andrewharvey
Copy link
Collaborator

@andrewharvey Do you have a example?

@Daandeve sorry I don't.

@Daandeve
Copy link

Okay thanks!
I got it working.

@come25136
Copy link

come25136 commented Feb 10, 2020

@andrewharvey Hello,
Is there an example of adding multiple models to one custom layer and changing their coordinates?

I tried it myself, but I couldn't implement it well. :(

@jbixon13
Copy link

@Daandeve would you be able to share your approach?

@bvitlas
Copy link

bvitlas commented Feb 15, 2020

I'm also very curious to add multiple gltf or .obj models to the map in a single custom layer. Can anyone give an example code.

@gtk2k
Copy link

gtk2k commented Nov 29, 2022

@andrewharvey
Please. Please also post an example of adding multiple 3D models to one custom layer.

@linsmeyer
Copy link

My team is interested in learning more about the status of this feature - we are also in a place where simple extrusions will not work, and we have a wealth of 3d model data that we think would fit better inside our MapboxGL stack. Any chance there's direct access to the scene interface? Is a pathway for this related to #6456? Thanks!

Hi, maybe i help you because my experiency is very large around this. You feel free tô call me +55349967019714

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cross-platform 📺 Requires coordination with Mapbox GL Native (style specification, rendering tests, etc.) feature 🍏
Projects
None yet
Development

No branches or pull requests