mapbox-gl-js icon indicating copy to clipboard operation
mapbox-gl-js copied to clipboard

visualizing a geo-referenced 3d model using threejs

Open boraerden opened this issue 4 years ago • 2 comments

I am having issues visualizing a geo-referenced 3d model using a threejs custom layer. Hoping someone can lend a helping hand :)

I created a dummy .obj file that contains 6 vertices (outlining an island in Paris and creating an extruded shape) in EPSG:32631 WGS 84 / UTM zone 31N.

Here is a similar dummy .obj file closer to world origin for debugging purposes.

The desired outcome is something like this: desired outcome

But in effect, nothing is showing up at that location.

I created a codepen for ease of debugging.

Any help would be appreciated!

Originally posted by @boraerden in https://github.com/mapbox/mapbox-gl-js/issues/10392#issuecomment-1011504940

boraerden avatar Jan 18 '22 22:01 boraerden

does this issue resolved?

renjithraj2005 avatar Jun 27 '24 11:06 renjithraj2005

The OBJLoader works with maplibre gl js by simply replacing the GLTFLoader with the OBJLoader (and also making changes to simply add the object and the 'scene' attribute from GLTF specification). I couldn't resolve this myself in the codepen but maybe this stackoverflow will help demystify how the threejs and objloader module is being provided.

this also might be a versioning mismatching from the CDNs in the codepen.

jph6366 avatar Mar 19 '25 16:03 jph6366