Forum

Author Topic: Cesium tiles  (Read 7957 times)

jetdog6

  • Newbie
  • *
  • Posts: 10
    • View Profile
Cesium tiles
« 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:

Quote
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




Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13908
    • View Profile
Re: Cesium tiles
« Reply #1 on: January 11, 2018, 04:02:27 PM »
Hello jetdog6,

Thank you for reporting.

We'll try to fix the issue and send you the intermediate version for testing.
Best regards,
Alexey Pasumansky,
Agisoft LLC

htrzski

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Cesium tiles
« Reply #2 on: February 28, 2018, 11:45:54 AM »
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?
« Last Edit: February 28, 2018, 12:45:18 PM by htrzski »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13908
    • View Profile
Re: Cesium tiles
« Reply #3 on: March 02, 2018, 07:23:57 PM »
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.
Best regards,
Alexey Pasumansky,
Agisoft LLC

barrubba

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Cesium tiles
« Reply #4 on: February 22, 2019, 06:37:20 PM »
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

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13908
    • View Profile
Re: Cesium tiles
« Reply #5 on: February 22, 2019, 07:17:40 PM »
Hello barrubba,

Metashape supports Dense Cloud and Tiled Model export to Cesium 3D Tiles format.

Export -> Dense Cloud / Tiled Model -> Cesium 3D Tiles.
Best regards,
Alexey Pasumansky,
Agisoft LLC

barrubba

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Cesium tiles
« Reply #6 on: February 25, 2019, 11:51:09 AM »
ok, but texture? created in ion from densecloud??

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13908
    • View Profile
Re: Cesium tiles
« Reply #7 on: February 25, 2019, 12:04:15 PM »
Hello barrubba,

Exporting Cesium tiles from the dense cloud will contain the dense cloud only, from the tiled model - textured mesh blocks.
Best regards,
Alexey Pasumansky,
Agisoft LLC

barrubba

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Cesium tiles
« Reply #8 on: February 25, 2019, 12:39:52 PM »
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

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13908
    • View Profile
Re: Cesium tiles
« Reply #9 on: February 25, 2019, 12:46:16 PM »
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.
Best regards,
Alexey Pasumansky,
Agisoft LLC

barrubba

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Cesium tiles
« Reply #10 on: February 26, 2019, 01:15:23 AM »
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
« Last Edit: February 26, 2019, 02:28:59 AM by barrubba »

htrzski

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Cesium tiles
« Reply #11 on: February 27, 2019, 12:41:04 AM »
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!

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13908
    • View Profile
Re: Cesium tiles
« Reply #12 on: February 27, 2019, 12:47:07 PM »
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?

Best regards,
Alexey Pasumansky,
Agisoft LLC

htrzski

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Cesium tiles
« Reply #13 on: February 27, 2019, 02:13:18 PM »
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?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13908
    • View Profile
Re: Cesium tiles
« Reply #14 on: February 27, 2019, 02:32:13 PM »
Hello htrzski,

According to your code line, you are splitting the cloud into blocks of 5x5 cm size:
blockw=0.05, blockh=0.05,

Best regards,
Alexey Pasumansky,
Agisoft LLC