Geodan/i3dm.export

A few questions (potential issues)

Closed this issue · 6 comments

Firstly, this is a great bit of code, really useful! The overall performance is really impressive and we really want to make use of it.

I have a few questions and potential issues i have found when using it:

  1. Mabox3dTiles.js File

In the readme, it mentions this tool should be used in combination with mapbox-3dtiles repo: https://github.com/Geodan/mapbox-3dtiles.

However, i have noticed on the mapbox-3tiles repo readme, it says it does not support the use of i3dm tiles yet.
I have noticed in the i3dm.export repo, the mapbox3dtiles.js is revision '120' where as the mapbox3dtiles.js in the mapbox-3dtiles repo is revision '129'. Therefore im guessing the revision '129' is more up to date however doesn't support i3dm tiles yet. I also guess you had to make specific changes to the file to get it working with i3dm tiles for the i3dm.export repo.

Im trying to work out which is the most up to date version that will work with i3dm tiles?

  1. Small number of instances not creating a tile

If i attempt to create a tile set with just one instance, it will not create any tiles inside the tileset.json. Therefore if i want to show just one or 2 models it doesn't work. Is this intended? I am happy to try look into this if it is a bug?

image

  1. Resizing the page

If i resize the browser the move around the map, the models no longer stay in the correct place. This may be fixed with the newer revisions of the mapbox3dtiles.js but I'm having the i3dm compatibility issue as mentioned earlier with newer versions.

  1. Sometimes the tiles don't load back into view

Sometimes when im zooming in and out, the 3d models will just disappear and not return. This is when i have a dense number of models in an area like such. You can see the yellow box should be completely full of 3d models:

image

I don't think i could reproduce the issue in the demo's you made.

  1. Models not showing correctly

This issue may be more related to the an issue with the model i am using, then the code.
Any ideas why this bus is not correctly rendered (I understand why it is vertical, that's not a problem), but its faces don't seem to show correctly. Seems to look fine in threebox. No worries if not.

image

Thanks very much.

bertt commented

Hi, quick answer can you try with develop branch of mapbox-3tiles?

Hi thanks for your reply.

I tried this already, here are my findings.

I thought the best place to start would be the i3dm.html and i3dm.js demo on the mapbox-3dTile Dev branch:

I tried running it and it didnt work, so i added my tileset that works from the i3dm.export repo:

image

I was getting the same error before and after i made this change using dev branch on mapbox-3dTiles:
image

Seems like the tile style is undefined or something. Here is the mapTileLayer object when using dev branch on mapbox-3dtiles. Seems like it could not find the tile although its pointing to a valid tile source:

image

For comparison, this is tileset part of the mapTileLayer Object when i use the i3dm.export repo:

image

Any ideas would be great, thanks!

I did see, that in some of the demos on the dev branch, they are added like this so i also tired it like this. It never even makes the network requests for the i3dm tiles:

image

The tile does seems to appear in the Mapbox3dTileLayer object, with no console errors, but doesn't render the objects on the screen:
image

Yes, that sample uses the older mapbox3dtiles.js file as it has "revision 120" within the code which I know works - I am trying to use the more up to date version in the MapBox3dTiles Repo if possible which has a revision of 129 if its possible.

Thanks.

bertt commented

It seems the code needed for creating a 3D Tile layer in MapBox is changed

from:

let tileslayerTree = new Mapbox3DTiles.Mapbox3DTilesLayer( { 
                    id: 'tree', 
                    url: 'tileset.json'
                } );

to:

const layer = new Mapbox3DTiles.Mapbox3DTilesLayer({
                id: 'tree',
                tilesets: [
                    {
                        id: 'tree',
                        url: 'tileset.json'
                    }
                ]
            });

We should update our samples.