Hello to everyone
I have some PointClouds files (.PLY) with no Coordinate reference system associated, my objective is to see/interact with these Point Clouds using CesiumJS on the browser.
I´m dividing these procedure in 3 Main steps :
1º {Convert .PLY to .LAZ}
2º {Generate 3D Tiles with Entwine}
3ª {Serve the tiles with local HTTP Server with CORS Enabled (http://192.168.99.100:8080/tileset.json)}
4ª {Use Client Page to Load 3D Tile susing CesiumJS}
"Convert .PLY to .LAZ"
To do so i have used 2 approachs : First usingCloudCompare (NOT Setting Origin SRS), second using LIDAR (Setting Origin SRS)
“Cloud2Compare Approach” :
**1º **I’ve opened the .PLY file on Cloud2Compare with Global Shift Settings(Max Absolute Coordinate = 10^6, Max Absolute Diagonal = 10^6)
2º Save the File as .LAZ
3º Goto [Step Generate 3D Tiles with Entwine]
“LIDAR Approach” :
1º I’ve opened the .PLY file on LIDAR
2ª Went to “Menu Data Management”->“Projections And Transformations”->“Define Projection”
- Set the Projection as “EPSG:4326”
3º Exported the File as .LAZ
4ª Goto [Step Generate 3D Tiles with Entwine]
Generate 3D Tiles with Entwine
Generation of 3D tiles converting the .PLY data using the following steps:
1º Build ECF (Entwine Tiles) from .PLY
docker run -it -v /entwine:/entwine connormanning/entwine build -c /entwine/source-pclouds/input/ecfBuild.json
``
NOTE: Contents of ecfBuild.json :
{
"absolute":false,
"input": "/entwine/source-pclouds/input/testCloud.laz",
"output": "/entwine/source-pclouds/input/ecf",
"scale": [0.00001, 0.00001, 0.000025],
"reprojection": {
"in" : "EPSG:3763",
"out" : "EPSG:4978"
},
"formats": {
"cesium":{
"tilesetSplit": 8,
"geometricErrorDivisor": 16.0
}
}
}
``
2º Generate Cesium Tile Format :
docker run -it -v /entwine:/entwine connormanning/entwine convert -i /entwine/source-pclouds/input/ecf -o /entwine/source-pclouds/output/cesium --truncate
``
Serve the tiles with local HTTP Server with CORS Enabled
docker run -it -v /entwine/source-pclouds/output/cesium:/var/www -p 8080:8080 connormanning/http-server
``
Use Client Page to Load 3D Tile using CesiumJS
.JS Code i’m using on the client App
//Intended location : Portugal, Pinhão
var cartographic = Cesium.Cartographic.fromDegrees(-7.544, 41.186,0.01); var cartesian = Cesium.Cartographic.toCartesian(cartographic); var transform = Cesium.Transforms.headingPitchRollToFixedFrame(cartesian, new Cesium.HeadingPitchRoll()); var debugTiles = true;
var tileset3D = viewer.scene.primitives.add(new Cesium.Cesium3DTileset({
url : 'http://192.168.99.100:8080/tileset.json', debugWireframe : debugTiles, debugShowBoundingVolume : debugTiles, debugShowContentBoundingVolume : debugTiles, debugShowViewerRequestVolume : debugTiles, modelMatrix: transform, cullWithChildrenBounds : true, cullRequestsWhileMoving : false, foveatedScreenSpaceError : false, debugShowUrl : debugTiles, show: true, //ellipsoid : Cesium.Ellipsoid.UNIT_SPHERE }));
``
PROBLEM(S):
First*:***
Running the code above…
What happens is that i see the bounding Volume Boxes the “wireframes like structure” but inside them there are no points, its empty !
When press F12 on the browser and check Network TAB, i see that the browser gets all *.pnts with a 200 OK when i’m zooming In / Out, as expected.
*Second *:
Another Problem when i Remove /comment the " //modelMatrix: transform" i go to the middle of the Ocean on North Pole and i Dont see any bounding boxes.
When press F12 on the browser and check Network TAB, i see that the browser gets all *.pnts with a 200 OK when i’m zooming In / Out, as expected.
Checking that problem wasn’t related with my .JS code
I’ve tried with tiles avaiable online and it works just fine example : http://cesium.entwine.io/data/st-helens/cesium/tileset.json
I know that theres definetly some problem with my data or the generation of the tiles himselfs.
*- *What are the right steps to generate the 3D Tiles using Entwine ?
**- **Has anyone has already faced the same problems ?
I would really appreciate some answer.
Best Regards,
João Sá