Unity3DTiles is a Unity based implementation of the 3DTiles open format for streaming and rendering large static models such as those generated by photogrammetry pipelines. The benefit of the 3D Tiles specification is that it allows one generic rendering implementation to support datasets tiled using a number of different data structures such as binary, quad, or oct trees. It also supports sparse data representations so it can adapt well to datasets with variable detail density.
Reference information about the object model and tree traversal algorithm can be found here.
Please note that since initial development completed, the 3d-tiles specification has evolved. The tileset.json schema use is now modestly out of date and should be updated in the near future.
Tile Format Support
Tileset Feature Support
Assets/UnityGLTF folder so that users do not need to build it independently. Some minor modifications to the UnityGLTF package were necessary. The modifications as well as the procedure for updating the package can be found here.This project contains several sample scenes.
MainWeb - Loads a sample tileset with settings tuned for webMainHololens - Similar to MainWeb but tuned for HoloLens. Contains a few HoloLens specific configuration scriptsGenericWeb - Builds a generic web package that can ingest tilesets dynamically from URL parametersSampleModelLoader - Used to test loading different tile formats such as GLTF, GLTB, and B3DMTo import into your own project, simply copy the following folders
To get started, simply add a TilesetBehaviour to an empty game object. You can configure the TilesetBehaviour renderer using the SceneOptions and TilesetOptions objects. The Url parameter is typically an HTTP url but in the examples we have added a script to convert a StreamingAsset relative path to a full path at runtime so that the example assets can be included along with the code.
StandardShader for GLTF assets. This can have dramatic performance impacts on HoloLens. This allows a different shader to be used when instantiation GLTF assets. Also see Unity3DTilesetStyle which provides a flexible way to change style properties such as shaders at runtime on a tile by tile basis.A generic web build configuration is available which reads the tileset to load at runtime based on a URL parameter. Options may also be overridden by URL parameters.
Unity3DTilesWeb for output.The generic web build recognizes the following URL parameters:
Unity3DTilesetOptions.cs).SceneManifest.cs).Unity3DTilesetOptions.cs).Tileset is ignored if Scene is specified.
When combined with Scene, TilesetOptions overrides per-tileset options in the scene manifest, if any.
When running in the Unity editor use the SceneOptions and SceneUrl inspectors instead of the SceneOptions and Scene URL parameters. Also, any tilesets pre-populated in the TilesetOptions list inspector will be loaded at start.
URLs starting with "data://" will be loaded from the Unity StreamingAssets folder.
When running in a web browser (not the Unity editor):
Examples:
http://uri.to/generic/web/deployment/index.html?Tileset=data://SampleTileset/tileset.json
http://uri.to/generic/web/deployment/index.html?Tileset=http://uri.to/tileset.json&TilesetOptions=http://uri.to/tileset_options.json&SceneOptions=http://uri.to/scene_options.json&ExtraParam1=foo&ExtraParam2=bar
http://uri.to/generic/web/deployment/index.html?Tileset=../tileset/tileset.json&TilesetOptions=../tileset/options.json&SceneOptions=../scene_options.json
http://uri.to/generic/web/deployment/index.html?Scene=../scene.json&TilesetOptions=../tileset_options.json&SceneOptions=../scene_options.json
Upon load the generic web build will place the camera at a default position (which can be overriden in the scene options). There will be a heads up display (HUD) with some info in the upper left. Several keyboard and mouse interactions are implemented. The HUD will show a summary of the available actions.
Two navigation modes are included: mouse orbit and mouse fly. The initial navigation mode is orbit. Drag the mouse to rotate the model, and use the mouse wheel to move in and out. Drag the right mouse button to roll the camera. Click on the model and press "c" to change the orbit center. Hit "f" to fit the view to the model, and hit "v" to reset to the default viewpoint.
Hit "n" to switch to fly navigation (and hit "n" again to toggle back to orbit). In fly mode drag the mouse to re-orient the camera. Use the right mouse button to roll the camera. Hit w/s/a/d/q/e to translate fwd/back/left/right/up/down.
When you click on the model the HUD will show info about the clicked tile. You can show the bounding box of the tile and optionally its parent by hitting 'b'. Hit 'x' to show the axes of the tileset. Hit 'i' to hide the tileset, and 'o' to show the last-hidden tileset. You can also use the number keys to hide/show individual tilesets.