mapbox-gl-native
mapbox-gl-native copied to clipboard
When it will support 3D model?
When it will support 3D GLTF or other formats in mapbox android sdk
Android versions: Device models: Mapbox SDK versions:
This is something we are thinking about exposing an API around though atm can't give you a concrete eta. The formats are still TBD but ideally it would be an open format. We will follow up with more concrete issues in the near future, closing this issue as answered for now.
@tobrun Is there anywhere where we can vote to prioritise that feature? We are using mapbox and will need 3d map annotations very soon.
Both Android and iOS version.
@noway Thx, This task is very important
@noway @nicolae1992
mapbox-gl-js demo https://bl.ocks.org/ryanbaumann/b9725e79b5b1742d92ada00ddbf5c3d3 uses Three.js for loading GLTF model. We don't plan to include GLTF model loader to mapbox code - hopefully you were able to find a loader to use. Please notify if following similar approach (custom layer e.g. https://github.com/mapbox/mapbox-gl-js/pull/7977 and https://bl.ocks.org/ryanbaumann/b9725e79b5b1742d92ada00ddbf5c3d3) doesn't work for you.
@astojilj this link is js, but needed for Android SDK
@astojilj this link is js, but needed for Android SDK
Yes, mapbox-gl-js demo is useful to explain the approach: similarly, you'd need to load GLTF model using loader of your choice and use custom layer approach, as mentioned in https://github.com/mapbox/mapbox-gl-native/issues/14494#issuecomment-525216947
@astojilj I'm using mapbox for react native, so ideally I need the 3d model layer support in react-native-mapbox-gl/maps
package. I assume it would be something along the lined of
<MapboxGL.MapView>
<MapboxGL.ThreeDLayer shape={shape} meshes={meshes}>
</MapboxGL.ThreeDLayer>
</MapboxGL.MapView>
or something similar. I don't think I have capacity to build that feature out for react-native-mapbox-gl/maps
package by my own. I heard that you guys are not supporting this package, so it might be on @nitaliano to port this to RN world. A fully figured out and documented Android/iOS support though is a good first step. I'm not sure if your mapbox-gl-js example would work for mapbox-sdk-ios
/mapbox-sdk-android
as it is?
@astojilj this link is js, but needed for Android SDK
Yes, mapbox-gl-js demo is useful to explain the approach: similarly, you'd need to load GLTF model using loader of your choice and use custom layer approach, as mentioned in #14494 (comment)
Hi, I have found a java loader to load GLTF model. But now I need the documentation of custom layer approach for android SDK. I couldn't find how to custom layer with android, so is there any documentation about this?
@tobrun Has there been an update on 3D objects in android yet? We're trying to put 3D cars on our map and have successfuly achieved it through the web gl but not on android or iOS
Can this be reopened?
cc @chloekraw
Hi folks, thanks for all your interest in this feature. Support for 3D objects is something we are exploring; there's no timeline for its release. We'll keep you posted.
Hi folks, thanks for all your interest in this feature. Support for 3D objects is something we are exploring; there's no timeline for its release. We'll keep you posted.
Hey @chloekraw not to be rude but this is the exact same answer we've heard over a year ago. Is there any updates on this? There are a lot of benefits and uses this feature can bring and we really need this for our app. Are there any work arounds that may accomplish this?
Thanks
@chloekraw @nicolae1992 @NickLambert95
I have finished loading 3d model with mapbox gl native, implement a custom layer that loads the 3D model, referencing the assimp library.
@NickLambert95 You could check out my comment:
https://github.com/mapbox/mapbox-gl-native/issues/13157#issuecomment-608253844
@chloekraw @nicolae1992 @NickLambert95
I have finished loading 3d model with mapbox gl native, implement a custom layer that loads the 3D model, referencing the assimp library.
@NickLambert95 You could check out my comment:
Hey @leedejun how exactly did you do this? Can I see your code that you edited? Thanks
Hi @leedejun, Could you please share the code you wrote to achieve 3D object layers for iOS and Android? We need the same feature and there's no update for any official support for more than a year. Any help appreciated. Thank you!
@janweigel He never got back to me either but it appears he made this in React Native (which is the web version of mapbox)
@janweigel He never got back to me either but it appears he made this in React Native (which is the web version of mapbox)
React Native does not use the web version of mapbox afaik
@patrickkempff Maybe not react native then. The mapbox GL version (which works on web) allows you to add GLTF files as 3D models. There isn't a workaround I'm aware of for iOS and Android
If I get the post of @leedejun correctly then he modified the c++ code to add that feature to the native android and ios version and not the gl js version of mapbox. That's exactly what I'm looking for.
@janweigel Yeah I desperately need that function too. Let me know if he ever gets back to you and I'll do the same for you
Hi, @patrickkempff @NickLambert95 @janweigel
I understand your problem, I solved it. I achieved it by modifying the custom layer of mapbox gl native in Mac, linux, android, windows, and used the Assimp library.
But I can't share my code, I wish share my code after I leave the current company. I would like share my method with you. the method detail:
- The Assimp is able to read the model files;
- Add a function for Convert latitude and longitude to Opengl coordinates, Rang: [-1.0,1.0] ;
- Implement mapbox custom layer to draw 3d model.
Hi @leedejun, Thanks for sharing that info. I'll see if I can implement the native part for a custom layer myself.
It would be even better if this would be part of the official mapbox native code.
Hi @janweigel @leedejun Thanks for the information. It would be helpful if anyone share the snippet for, custom layer to draw 3d model using mapbox native code.
Thanks in advance
It'd be even more useful if the code was shared with Mapbox, so @chloekraw can implement this officially
Anyone have an update on this topic? Any solutions? @janweigel @fabdrol @patrickkempff @tobrun @luckkyzhou @leedejun @chloekraw
Also requesting 3D model support on iOS and Android.
@NickLambert95 and @Cal-um We switched to Unity using the Mapbox Unity SDK, as it wasn't possible to wait for those features.
@janweigel Oh I see. Out of curiosity does Mapbox Unity come with the same navigation features? As in, could I build a full fledge app with the navigation SDK and directions API in it? I looked this up before but couldn't find any information as to whether Unity supported it
that's a good shout. Probably better for my use case as well. Just need to learn unity 😂