<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">my experience implementing cesium-like 3DTiles in freewrl</div><div>-Doug Sanden</div><div><br></div><div dir="ltr">RESULTS<div><div><a href="http://dug9.users.sourceforge.net/web3d/tests/tiles/TILES_scene2.mp4">http://dug9.users.sourceforge.net/web3d/tests/tiles/TILES_scene2.mp4</a></div><div><a href="http://dug9.users.sourceforge.net/web3d/tests/tiles/tile_scene2.x3d">http://dug9.users.sourceforge.net/web3d/tests/tiles/tile_scene2.x3d</a></div><div><a href="http://dug9.users.sourceforge.net/web3d/tests/tiles/gen_tiles2.py">http://dug9.users.sourceforge.net/web3d/tests/tiles/gen_tiles2.py</a></div><div>- a 3D grid </div><div>- video shows 'computational viewpoint freezing' aka tile view freeze technique for inspecting frustum culling</div><div><br></div><div><a href="http://dug9.users.sourceforge.net/web3d/tests/tiles/TILES_scene47.mp4">http://dug9.users.sourceforge.net/web3d/tests/tiles/TILES_scene47.mp4</a></div><div><a href="http://dug9.users.sourceforge.net/web3d/tests/tiles/tile_scene47.x3d">http://dug9.users.sourceforge.net/web3d/tests/tiles/tile_scene47.x3d</a></div><div><a href="http://dug9.users.sourceforge.net/web3d/tests/tiles/gen_tiles47.py">http://dug9.users.sourceforge.net/web3d/tests/tiles/gen_tiles47.py</a></div><div>- video shows both screenspace error and frustum culling techniques</div><div><div><br></div><div>REFERENCES</div><div><a href="https://github.com/CesiumGS/3d-tiles">https://github.com/CesiumGS/3d-tiles</a> <br></div><div><p class="MsoNormal"><a href="http://www.lighthouse3d.com/tutorials/view-frustum-culling/">http://www.lighthouse3d.com/tutorials/view-frustum-culling/</a>
</p></div><div><p class="MsoNormal"><a href="https://www.3drotterdam.nl/datasource-data/29e9f348-7325-4be3-a901-bb2da17e0053/tileset.json">https://www.3drotterdam.nl/datasource-data/29e9f348-7325-4be3-a901-bb2da17e0053/tileset.json</a> </p><p class="MsoNormal"> </p></div><div></div></div><div>METHODS</div></div><div>As with the cesium 3DTiles, a decision is made at each node of a tree whether to load a url sub-scene aka content, and/or to render children nodes.</div><div>X3D LOD and GeoLOD have range criteria - the parent node holds ranges and checks to see which to render.</div><div>3DTiles has a slightly more refined method using 3 varieties bounding volume techinques. I implemented OBB oriented bounding box, That helps avoid loading scenery that's away from the field of view - and to unload scenery when the viewpoint pans away.</div><div>And a test of object-space accuracy/precision/geometricError projected into screenspace, to decide whether to load the content of a tile, or to load children tiles </div><div>Bounding volumes need to be supplied explicitly. That's because a range is needed to project the geometric error to screenspace before deciding whether to load. And the boundingVolume center is used for that.</div><div><br></div><div>Difference from LOD, GeoLOD</div><div>- refine {ADD,REPLACE}</div><div>-- children can add to or replace</div><div>- Cesium 3DTile node content is always loaded by url</div><div>- in my implementation, its always an SFNode, so it can be either in-scene content or an Inline (or Transform wrapping an inline).</div><div>- to implement unload for frustum culling of bounding volumes, I put a field on Tile:</div><div>SFBool out showContent</div><div>which can be ROUTEd to Inline.load to load / unload.</div><div><br></div><div>cesium 3DTiles has 2 node types: TileSet and Tile, with TileSet being the root tile. I found I didn't need TileSet (yet) - just a tree of Tiles was sufficient: root_tile can be detected with a stack or static - if stack empty then its the root tile.</div><div><br></div><div>For both cesium and x3d tile, only the content is subject to transforms, not the bounding volumes or geometricErrors which are all in some scene / world space / meters units. </div><div>Tile</div><div>- SFNode content</div><div>- MFFloat contentVolume</div><div>- SFFloat contentError</div><div>- MFNode children</div><div>- MFFloat tileVolume</div><div><br></div><div>Frustum culling - I found it fiddly to implement, and a technique I found helpful for testing was to have a keyboard key to toggle freezing of the 'computational viewpoint' / tile view so I could back away the viewer and see the result of culling.</div><div><br></div><div>NOT DONE:</div><div>- regional bounding volume, spherical bounding volue</div><div>- any geospatial-specific such as use of GeoViewpoint and geospatial region</div><div><br></div><div>Q. do we need a separate node, or can LOD / GeoLOD be fixed?</div><div>- good question. </div><div>Goal: be able to convert cesium 3DTile to x3d and back losslessly</div><div>- load cesium tiles directly - to show for example rotterdam (in references above) in x3d viewer.</div><div><br></div><div><br></div><div><br></div></div></div></div></div></div></div>