Agisoft Metashape
Agisoft Metashape => Bug Reports => Topic started by: jetdog6 on January 10, 2018, 04:54:06 AM
-
Hi,
I'm working on showing off some of our work with Cesium.js on our website, but the tileset I've exported from my dense point cloud in 1.4.0 of agisoft doesn't work in Ceisum. I sent my tileset generated with agisoft to someone in the Cesium community who is more experienced than I am to make sure I wasn't just doing something wrong. He responded as follows:
Now that https://github.com/AnalyticalGraphicsInc/cesium/pull/6088 is merged it's a lot easier to see tileset errors.
The one that's popping up repeatedly is:
Error: start offset of Float32Array should be a multiple of 4
Looking at the file more closely I see that one of the feature table properties is not byte aligned correctly:
"NORMAL":{"byteOffset":22695}
While it's just an implementation note right now, the spec states that properties should be byte aligned to their data type, so the byteOffset needs to be a multiple of 4. We plan on making this a requirement before 3D Tiles 1.0 is ready.
https://github.com/AnalyticalGraphicsInc/3d-tiles/tree/master/TileFormats/FeatureTable#implementation-notes
https://github.com/AnalyticalGraphicsInc/3d-tiles/issues/225
You may need to contact Agisoft about this bug in their exporter.
This thread on Cesium's forum can be found here: https://groups.google.com/forum/#!searchin/cesium-dev/george$20nicholas%7Csort:date/cesium-dev/HiykPzLDwyw/fAPrxVDmCwAJ
-
Hello jetdog6,
Thank you for reporting.
We'll try to fix the issue and send you the intermediate version for testing.
-
Hi,
did you find a solution? I tried with Agisoft 1.4.1 to export dense cloud as Cesium 3D Tiles and got same error
"A 3D tile failed to load: http://localhost:8000/static/Cesium/models/Cesium_Export_big/Data/c02.pnts?v=0.0
Error: start offset of Float32Array should be a multiple of 4"
Is there any other way to export a point cloud as Cesium 3D Tiles?
-
Hello htrzski,
This issue should be solved in the latest 1.4.1 release, so please make sure that you are exporting Cesium tiles from the latest version. If the problem persists in the version 1.4.1, please send the problematic export result to support@agisoft.com for the further investigation.
-
can you tell me correct workflow for cesium?
densecloud > export to cesium zip
or
densecloud > mesh > texture > collada/kmz > cesium ion
or
densecloud > mesh > tile3d > collada/kmz > cesium(zip)
i'm very confusing about right steps
thank you
-
Hello barrubba,
Metashape supports Dense Cloud and Tiled Model export to Cesium 3D Tiles format.
Export -> Dense Cloud / Tiled Model -> Cesium 3D Tiles.
-
ok, but texture? created in ion from densecloud??
-
Hello barrubba,
Exporting Cesium tiles from the dense cloud will contain the dense cloud only, from the tiled model - textured mesh blocks.
-
ok..i've not fully understoof.. If i want a cesium textured model, i need to texture it in photoscan and then export mesh textured in 3d tile format?
what about coordinates? i export in wgs but in cesium no model seen..even if i set manually coordinates of model..maybe scale problem?
thank you
-
Hello barrubba,
If you need to have a textured model, then you should generate tiled model using Build Tiled Model option in the Workflow menu and then export using Export Tiled Model option from the File menu.
Tiled model generation can be completed basing on depth maps, dense cloud or solid mesh, however, the texture will be rebuilt in any case for the LOD pyramid, according to the input resolution value.
-
good..a things totally new for me.."basing on depth maps, dense cloud or solid mesh"..the result its the same?
and a problem with collada exported..and opened in 3dsmax and cesium ion..seems like a line mesh..seems like a collapse of all vertex to a single coordinate along z
-
I have a problem with exporting point cloud to cesium 3d tile
I tried to do it with the following command and same but without reprojection. my initial coordiante system is 31255
chunk.exportPoints( "PointCloud-repr.zip", projection=Metashape.CoordinateSystem("EPSG::4978"), format= Metashape.PointsFormatCesium, blockw=0.05, blockh=0.05)
what do I wrong?
thx for help!
-
Hello barrubba,
If you are opening the model exported in WGS84 coordinate system (XY in degrees and Z in meters) in the application that doesn't support geographic coordinates, it will treat all XYZ values as the same scale units.
Hello htrzski,
What happens when you run this code? Does the application closes unexpectedly?
-
Hello Alexey,
export runs without any problem. After that I try to load it locally in Cesium and I don't see anything - my browser loads thousends of elements where each of them is called tileset.json?v=0.0 and is 352B size but my point cloud it's still invisible.
Do you have any ideas?
-
Hello htrzski,
According to your code line, you are splitting the cloud into blocks of 5x5 cm size:
blockw=0.05, blockh=0.05,
-
If I skip this part it works exactly the same.
-
Hello htrzski,
Which Cesium viewer you are using? Does it display the exported results properly or whether there are any error messages?
-
Hi Alexey,
I'm using Cesium 1.45 from the workshop github repository - https://github.com/AnalyticalGraphicsInc/cesium-workshop
I get just 3 errors related to missing tokens to Cesium ion (wordTerrain model, imagery), but nothing related to my point cloud.
Also I tried Cesium export through GUI and the result is the same as through command line - non stop loading objects called tileset.json?v=0.0 and no point cloud displayed
I exported point cloud to las and converted it with entwine and this way I can see it.