3D Tiles not rendering, help!

865 views
Skip to first unread message

abhub...@gmail.com

unread,
Jan 20, 2017, 9:15:47 AM1/20/17
to cesium-dev
Hello,

I'm trying to achieve a way to use 3D tiles and Cesium to render very large 3D models. These models have geo-references embedded into them, and each model uses the UK standard of geo-projection/referencing, not the WGS84 standard.


Display issue
--------------
While I've tried to achieve this I've had no luck, as the tiles I've created simply don't render/aren't visible on screen. Also when I've tried to display them as a single model, in their .GLTF or .GLB formats, they also don't show up, yet they are downloaded. I've tried to transform the tiles and models, and have had no luck.


Conversion issue
----------------
When I try to convert the models from .DAE to .GLTF using COLLADATOGLTF an error appears: WARNING: Invalid perspective camera. At least yfov must be provided. Defaulting yfov to 1. I've checked the model and both yfov, and xfov are provided, as well as the aspect ratio and more...


Help
----
Any advice or guidance you could give me, as to why the tiles and models would be much appreciated.

Sean Lilley

unread,
Jan 20, 2017, 10:23:15 PM1/20/17
to cesium-dev
I'm not familiar with that projection system so its hard for me to say if that's the cause of the issue. Can you post the tileset you are using? 

Adam Bower

unread,
Jan 22, 2017, 12:37:37 PM1/22/17
to cesiu...@googlegroups.com
Hey, Sean thanks for the reply. 



Display Resolved
--------------------------
I used the tileset.json from the TilesetWithDiscreteLOD sample given here (https://github.com/AnalyticalGraphicsInc/3d-tiles-samples/blob/master/tilesets/TilesetWithDiscreteLOD/tileset.json). The only modification I made, was to the size of the bounding volume. However I've now resolved the issue at least in part, as the large 3D model now displays because I've converted the models coordinate system into WGS84 standard via the use of Blender. I've removed all embed geo-references too. It now displays on screen although its above the camera, and well above Cesiums globe. It takes insanely long to load too, as the model is around 250MBs in size.



Tile Generation how to?
------------------------------------
The load times are probably due to incorrect tiling of the large model, so I was wondering if you knew of any generation tools which could tile the model for me? I've looked into the 3D-Tiles-Tools repo (https://github.com/AnalyticalGraphicsInc/3d-tiles-tools). Their generation tool seems to only produce the tilesets for the samples, but there is limited documentation on how to modify it to work with other 3D models.
Any help with either creating my own generation tool, or using the tools given would be greatly appreciated. 


Transform how to?
--------------------------------
Also could you please explain with the transform property within the specification to me, please. As i'm pretty sure I know what it does, but in the specification it said the property is optional however if its removed, I receive a rendering error.... 


Thanks for all the help.


--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/y2wIPat9300/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sean Lilley

unread,
Jan 22, 2017, 8:30:02 PM1/22/17
to cesium-dev
I don't know of any tiling tools offhand, but Blender or other editing software is probably the best bet for now. There may be scripts for this, or you may need to write one yourself.

The 3d-tiles-tools repo will probably not feature a tool like that for a while as we are still doing our own work into splitting massive models. Also the generator tool is more like a tutorial/showcase of features rather than a general purpose utility.

As for the transform - it is a matrix applied to the tile, both to the geometry and bounding volume. Since your model is defined in WGS84 already you won't need to set the transform, but you will need to fix the bounding volume. The bounding volume should fit the geometry as closely as possible. You can use the min/max properties of the gltf's position accessor to derive good center and radius values.

In Cesium I've seen some subtle bugs when bounding volumes are placed at the Earth's center, which is happening when using the bounding volume in the DiscreteLOD example without setting the transform. At some point this should be fixed...
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.

Adam Bower

unread,
Jan 23, 2017, 8:39:53 AM1/23/17
to cesiu...@googlegroups.com
Hey Sean thanks for the reply again,

I'm just curious as to how you calculate the bounding volume within cesium.. I've tried and my model seems to end up in the center of the earth, or somewhere in space, this is the tile set i'm using at the moment. I need it so its geographically positioned on the globe. 

{
  "asset": {
    "version": "0.0"
  },
  "geometricError": 1000,
  "root": {
    
    "boundingVolume": {
      "box": [
        -69.0228, -103.871, 85.3382, 1,
        123.111, 125.915, 100.568, 1, 
        27, 114, 92.5, 1, 
      ]
    },
    
    "geometricError": 100,
    "refine": "replace",
    "content": {
      "url": "LargeGeoModel_01WLA0.b3dm"
    }
    
  }
}

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Sean Lilley

unread,
Jan 23, 2017, 7:28:49 PM1/23/17
to cesium-dev
I'm not completely clear about one thing, is the model geometry already geographically positioned? Or is the model's center close to (0,0,0)? What are the min/max values in the glTF's position accessor?

Adam Bower

unread,
Jan 24, 2017, 1:12:55 AM1/24/17
to cesiu...@googlegroups.com
Hey Sean thanks again for the response, I appreciate all the help.




Transformation issue
---------------------------------
No the model isn't geographically positioned correctly. Without the transform the model is positioned in the centre of the earth I believe, or at least somewhere in space. When I position it using a transform like this   
"transform": [
         1, 0, 0, 0,
         0, 1, 0, 0,
         0, 0, 1, 0,
         3688996.39891547, -172302.06899558,  5182896.08237014,  1
]

Its positioned in the right spot geographically, however its too high above the ground in the clouds, usually above the camera. Also the model is skewed as its seems to slope down, but that could be a simple rotation issue. Therefore I need to lower the model to the ground and rotate the model some how. I think the models centre is probably (0,0,0) but i'm unsure as I didn't create the model, I was only given it to work with.



glTF accessors
-----------------------
As for the glTFs assessors position, there are many of them as its a large model with multiple meshes, so there doesn't seem to be only one position accessor. There's also multiple cameras within the model, and nodes as well which means the glTF file is like 20000+ plus lines long haha. I'll post the meshes and the min/max values so you understand what I mean, there's only six but i've added them all to pastebin as not to spam the post. http://pastebin.com/XRYRP1Av




Thanks again.


To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Adam Bower

unread,
Jan 24, 2017, 9:42:55 AM1/24/17
to cesiu...@googlegroups.com
Hey Sean, 


Side note
----------------
I was wondering if you had any advice on how to split up a single, large model into multiple tiles. The model is of a castle, and I'd like someway to carve it up, so that it doesn't take ages to load/render. Any advice on this would be appreciated.


Many thanks as always.

Sean Lilley

unread,
Jan 24, 2017, 7:40:26 PM1/24/17
to cesium-dev
Thanks for posting the gltf data. At this point I think you may just need to clean up the model a bit so that it is centered properly. Or... you may just need to adjust the transform in such a way that the model is correctly positioned. The Transforms.headingPitchRollToFixedFrame function may be a good place to start for generating a good tile transform.

Cesium.Transforms.headingPitchRollToFixedFrame(Cesium.Cartesian3.fromRadians(longitude, latitude, height), 0.0, 0.0, 0.0);


In terms of splitting up the model, you could try splitting into multiple gltfs, each with one mesh. I don't have any tools to recommend though, but this is the easiest way to do it. You could probably also use Blender to slice the model into a grid but that has its own complications.

Sean Lilley

unread,
Jan 24, 2017, 7:43:47 PM1/24/17
to cesium-dev
Quick correction - I sent you a deprecated version of that function. Use this instead:

Cesium.Transforms.headingPitchRollToFixedFrame(Cesium.Cartesian3.fromRadians(longitude, latitude, height), new Cesium.HeadingPitchRoll(0.0, 0.0, 0.0));

Adam Bower

unread,
Jan 25, 2017, 8:37:23 AM1/25/17
to cesiu...@googlegroups.com
Hey Sean thanks for the response again,



I have another question, in the images of the 3D tile examples, they seem to have visible red bounding boxes around them (http://cesiumjs.org/images/2015/08-10/refinement1.png). I was wounding if this was a feature or style which could be enabled, or weather I have to draw the boxes separately. I understand from the Cesium examples how to draw a box but not how to rotate it, as none of the sandcastle examples seem to cover entity or primitive rotation. 



Thanks again for all the help and support.

To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Sean Lilley

unread,
Jan 25, 2017, 8:47:37 PM1/25/17
to cesium-dev
To see the boxes set tileset.debugShowBoundingVolume = true and/or tileset.debugShowContentBoundingVolume = true.

Adam Bower

unread,
Jan 26, 2017, 7:32:22 AM1/26/17
to cesiu...@googlegroups.com
Hey Sean thanks for the response.


That solution worked, and I was curious as to add styles to the tiles... I've tried: tileset.style = new Cesium.Cesium3DTileStyle("assets/style.json"); With my .json file which looks like: 
  {
      "show" : "true",
      "color" : "color('#ffffff')"
  }


Yet no style has been applied to the tiles. Any help you could give me with this, would be appreciated. 

Many thanks again.


To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Sean Lilley

unread,
Jan 27, 2017, 10:35:55 AM1/27/17
to cesium-dev
By default the style color is multiplied by the model's color. So with a white color you won't see any difference, but you should notice something with #333333 (for example).

If you would like the style's color to replace the model's color, set tileset.colorBlendMode to Cesium.Cesium3DTileColorBlendMode.REPLACE. However you will need to edit the glTF for this to work.

Adam Bower

unread,
Feb 3, 2017, 5:25:02 AM2/3/17
to cesiu...@googlegroups.com
Hey again,


I was wondering weather or not you needed a batch/feature table inside your .B3DM files, in order to style them? As I'd like to be able to select a given tile, and have information about that tile be shown on screen. 


Thanks again for all the help


To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Sean Lilley

unread,
Feb 3, 2017, 7:22:59 PM2/3/17
to cesium-dev
For styling purposes the glTF model will need to include batchIds and the the corresponding batchLength in the tile's header needs to be greater than zero. Right now the engine does support setting tile properties unless the tile has features (batchId vertex attribute in glTF, batchLength >= 1). It sounds like in your case you just want a single feature for the whole tile, but your glTF model is not configured yet.

Roughly the approach for doing this programmatically is here -- this code is still in a pull request on a temporary commit, so be warned.

Once you have that you can create a batch table to store properties. You don't technically need the batch table since properties can be added to features dynamically with feature.setProperty(name, value) (like after picking a feature).

Adam Bower

unread,
Feb 6, 2017, 5:00:40 PM2/6/17
to cesiu...@googlegroups.com
Hey Sean thanks again for getting back to me. 


Due to unforeseen circumstances I've had a hard drive failure. I've recovered most of my files for my Cesium project, but i'm going to reinstall all my dependencies again from scratch.  However when I clone the 3D-Tiles branch from github, and follow the steps here (https://github.com/AnalyticalGraphicsInc/cesium/tree/3d-tiles/Documentation/Contributors/BuildGuide) to build the code base. The only file that appears in the build folder is 'minifyShaders.state' and nothing more. So now when I run my project either get a reference error, or states Cesium isn't defined as I have to reference the source files. 


It should be noted then when I use the option of minifyRelease the gulpfile fails, with an error of  Command failed: npm run requirejs -- --eyJ3cmFwIjp0cnVlLCJ1c2VTdHJpY3QiOnRydWUsIm9wdGltaXplIjoidWdsaWZ5MiIsIm9wdGltaXplQ3NzIjoic3RhbmRhcmQiLCJwcmFnbWFzIjp7ImRlYnVnIjpmYWxzZX0sImJhc2VVcmwiOiJTb3VyY2UiLCJza2lwTW9kdWxlSW5zZXJ0aW9uIjp0cnVlLCJuYW1lIjoiLi4vbm9kZV9tb2R1bGVzL2FsbW9uZC9hbG1vbmQiLCJpbmNsdWRlIjoibWFpbiIsIm91dCI6IkJ1aWxkL2NvbWJpbmVPdXRwdXQvdWdsaWZ5Mi9DZXNpdW0uanMifQ== --silent...


Any help or advice you could give me, in building the 3D tiles branch would be much appreciated. 


Thanks as always.



To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.

Sean Lilley

unread,
Feb 8, 2017, 12:07:41 AM2/8/17
to cesium-dev
Typically all I need to do to build is 'npm run minifyRelease`. That error your getting is very strange.

B

unread,
Jul 5, 2017, 4:05:11 PM7/5/17
to cesium-dev
This build error seems to have happened before. Wondering if this is a known issue?

npm ERR! Failed at the ces...@1.24.0-pnts-updates.16735 requirejs script 'gulp requirejs "--eyJ3cmFwIjp0cnVlLCJ1c2VTdHJpY3QiOnRydWUsIm9wdGltaXplIjoibm9uZSIsIm9wdGltaXplQ3NzIjoic3RhbmRhcmQiLCJwcmFnbWFzIjp7ImRlYnVnIjp0cnVlfSwiYmFzZVVybCI6IlNvdXJjZSIsInNraXBNb2R1bGVJbnNlcnRpb24iOnRydWUsIm5hbWUiOiIuLi9ub2RlX21vZHVsZXMvYWxtb25kL2FsbW9uZCIsImluY2x1ZGUiOiJtYWluIiwib3V0IjoiQnVpbGQvY29tYmluZU91dHB1dC9ub25lL0Nlc2l1bS5qcyJ9" "--silent"'.
npm ERR! This is most likely a problem with the cesium package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp requirejs "--eyJ3cmFwIjp0cnVlLCJ1c2VTdHJpY3QiOnRydWUsIm9wdGltaXplIjoibm9uZSIsIm9wdGltaXplQ3NzIjoic3RhbmRhcmQiLCJwcmFnbWFzIjp7ImRlYnVnIjp0cnVlfSwiYmFzZVVybCI6IlNvdXJjZSIsInNraXBNb2R1bGVJbnNlcnRpb24iOnRydWUsIm5hbWUiOiIuLi9ub2RlX21vZHVsZXMvYWxtb25kL2FsbW9uZCIsImluY2x1ZGUiOiJtYWluIiwib3V0IjoiQnVpbGQvY29tYmluZU91dHB1dC9ub25lL0Nlc2l1bS5qcyJ9" "--silent"

Sean Lilley

unread,
Jul 5, 2017, 8:00:52 PM7/5/17
to cesium-dev
I'm not sure why those particular builds had those errors. Does Cesium not build on master for you?
Reply all
Reply to author
Forward
0 new messages