PrincessGod / objTo3d-tiles

Convert obj model file to 3d tiles
https://princessgod.github.io/objTo3d-tiles
Apache License 2.0
777 stars 232 forks source link

extra explanation on customTilesetOptions.json #18

Closed ohadmanor closed 6 years ago

ohadmanor commented 6 years ago

Hi, can you add help to the missing parameters?

thanks

{ "longitude": -1.31968, // Tile origin's(models' point (0,0,0)) longitude in radian. "latitude": 0.698874, // Tile origin's latitude in radian. "transHeight": 0.0, // Tile origin's height in meters. "minHeight": 0.0, // ?? units?? "maxHeight": 40.0, // ?? units?? "tileWidth": 200.0, // ?? units?? "tileHeight": 200.0, // ?? units?? "geometricError": 200.0, // ?? units?? "region": true, // Using region bounding volume. "box": false, // Using box bounding volume. "sphere": false // Using sphere bounding volume. }

PrincessGod commented 6 years ago

@ohadmanor Hi.

Actually these values not vary easy to use for everyone. So I am not put it in README. But I can explain it if you need.

minHeight, maxHeight, tileWidth, tileHeight is manually specify the tile size, each parameter is in meters. And by default I will compute tile size by your model bounding box, so it not necessary to specify.

geometricError determine if the tile show or not by a screen-space range. The easy way to understand is if it bigger then will show when closer, if it small then will show when far, if it is 0 will be always show no mater camera close or far away. So I guess the unit is pixel?

For more information about geometricError can be find in 3d tiles spec;

ohadmanor commented 6 years ago

Hi,

thank you for the answer,

I try to change the tile size parameters but the "transform" stay the same.

I think that the tile accuracy depending on the tile size, I don't now if it is a tile size calculation.

can you help my to fine the correct function and put the tile size manually?

thanks

Ohad

PrincessGod commented 6 years ago

@ohadmanor Hi.

I don't know what you want, but about the calculation you can read 3d tiles spec, also about the config json file's calculation in this file.

Hope that can help you, BW.

ohadmanor commented 6 years ago

Hi,

I'm trying to solve the position deviation of the tile, the center is accurate but when you move to the edge it go bigger and bigger.

from the code I can understand that the "transform" calculation error comes from the function: var tileTransform = wgs84Transform(longitude, latitude, transHeight);

where can I find the calculation?

thanks

Ohad