3dTile技术研究-小结

上篇:3dTile技术研究-概念详述(10)Instanced 3D Model

1.背景

又看了一遍cesium的3D Tiles格式规范,看的过程中简单记录知识点,进行简单总结。由于总结记录的是“只言片语”,详细内容还请参考博主关于3dTiles的文章。

如需要看详细的文章,请参考博主的3dTiles系列文章(文章末尾有链接)。

2. LOD技术的研究

1、Cesium官方,包括子章节
https://github.com/CesiumGS/3d-tiles
2、3DTile 的geometricError含义
https://blog.csdn.net/Rsoftwaretest/article/details/106740269
3、八叉树场景管理
https://www.cnblogs.com/chesterlee/articles/2014344.html
https://blog.csdn.net/nin_cool/article/details/84839675

4、知乎文章等

2. 理解

1、3d tile是开放的规范,有开源的实现;
2、是异构的,可以将多种类型的3d地理空间内容转换为3d tile,并组合成一个数据集;
3、designed for 3d,
引入3d图形学领域的技术,并基于gltf构建;----(重点);快速流式传输、精确渲染的空间层次结构、平衡了从全局到建筑内部任何规模的性能和视觉质量。
Bringing techniques from the field of 3D graphics and built on glTF, 3D Tiles defines a spatial hierarchy for fast streaming and precision rendering, balancing performance and visual quality at any scale from global to building interiors.
备注:需要了解数据的上下游,更好的设计数据规范,为了方便使用;
4、保留元数据,方便快速的交互(选择、查询、过滤等);
备注:保留元数据可能对于增量更新也很重要;
5、需要使用“Cesium ion”工具将其他格式转换为3d tile参考;

6、a tile content contains a Feature Table and a Batch Table;
7、The content references a set of features, such as 3D models representing buildings or trees, or points in a point cloud. Each feature has position and appearance properties stored in the tile's Feature Table, and additional application-specific properties stored in the Batch Table. A client may choose to select features at runtime and retrieve their properties for visualization or analysis.
8、Tiles are organized in a tree which incorporates the concept of Hierarchical Level of Detail (HLOD) for optimal rendering of spatial data. Each tile has a bounding volume, an object defining a spatial extent completely enclosing its content. The tree has spatial coherence; the content for child tiles are completely inside the parent's bounding volume.

9、Geometric error表示Tile的几何误差,定义是否被渲染以及被更详细级别的children tiles refined,一般是外接球的直径,叶子结点的Tile的Geometric error
一般为0或者接近于0;
10、SSE 屏幕空间误差,一般需定义一个最大SSE,来结合Tile的Geometric error计算Tile的SSE,假如大于Max allowed SSE,就refined by children tiles;
In a client implementation, geometric error is used with other screen space metrics—e.g., distance from the tile to the camera, screen size, and resolution— to calculate the SSE introduced if this tile is rendered and its children are not. If the introduced SSE exceeds the maximum allowed, then the tile is refined and its children are considered for rendering.
11、Refinement 定义了更详细的children tiles被渲染时,其详细程度较低的parent tile该怎么渲染,允许的Refinement类型为replacement "REPLACE" additive ("ADD").当然也可以混合使用不同的Refinement Type,根节点的Refinement Type是必须定义的,子节点没有定义的话就继承根节点的;
12、其实绿建的LOD更想Refinement Type为ADD的情况;
13、这里的Bounding box实际上是指OBB包围盒,而下面的Bouding Region是指AABB包围盒;
14、A tile's viewerRequestVolume can be used for combining heterogeneous datasets, and can be combined with external tilesets.
15、each tile has an optional transform property.The transform property is a 4x4 affine transformation matrix, stored in column-major order, that transforms from the tile's local coordinate system to the parent tile's coordinate system—or the tileset's coordinate system in the case of the root tile.
16、需要把gltf的根节点设置转换矩阵:Z up to Y up,以符合gltf的标准;当解析gltf数据时又需要以Y up to Z up 转换矩阵对数据进行转换,抵消前述矩阵;
17、The geometricError property is a nonnegative number that defines the error, in meters, introduced if this tile is rendered and its children are not. At runtime, the geometric error is used to compute Screen-Space Error (SSE), the error measured in pixels. The SSE determines if a tile is sufficiently detailed for the current view or if its children should be considered, see Geometric error.
18、The content property is an object that contains metadata about the tile's renderable content. content.uri is a uri that points to the tile's binary content (see Tile format specifications), or another tileset JSON to create a tileset of tileset (see External tilesets).
19、The content.boundingVolume property defines an optional bounding volume similar to the top-level boundingVolume property. But unlike the top-level boundingVolume property, content.boundingVolume is a tightly fit bounding volume enclosing just the tile's content. boundingVolume provides spatial coherence and content.boundingVolume enables tight view frustum culling, excluding from rendering any content not in the volume of what is potentially in view. When it is not defined, the tile's bounding volume is still used for culling (see Grids).
20、The children property is an array of objects that define child tiles. Each child tile's content is fully enclosed by its parent tile's boundingVolume and, generally, a geometricError less than its parent tile's geometricError. For leaf tiles, the length of this array is zero, and children may not be defined. See the Tileset JSON section below.
21、schema文件是定义格式的文件,比如tile.schema.json文件;
22、root is an object that defines the root tile using the tile JSON described in the above section. root.geometricError is not the same as the tileset's top-level geometricError. The tileset's geometricError is used at runtime to determine the SSE at which the tileset's root tile renders; root.geometricError is used at runtime to determine the SSE at which the root tile's children are rendered.
23、3d tile是数据规范,在空间树的结构采用上可以设计自己的适合的树,当然需要参考已有的,当效果和使用性能足够好的时候可以被吸收进3d tile开源规范中;
所谓开源,不是你提供了什么,而是你可以拿进来什么。
24、3D Tiles defines extensions to allow the base specification to have extensibility for new features, as well as extras to allow for application specific metadata.
Extensions allow the base specification to be extended with new features. The optional extensions dictionary property may be added to any 3D Tiles JSON object, which contains the name of the extensions and the extension specific objects. The following example shows a tile object with a hypothetical vendor extension which specifies a separate collision volume.
25、The extras property allows application specific metadata to be added to any 3D Tiles JSON object. The following example shows a tile object with an additional application specific name property.
26、properties: {}、extensions、extensionsUsed、extensionsRequired、extras;
27、A Batched 3D Model tile is a binary blob in little endian.
28、Tile的数据需要几何合并(材质相同的合并到一起);
29、Batched 3D Model:The body section immediately follows the header section, and is composed of three fields: Feature Table, Batch Table, and Binary glTF.
30、binary gltf中有batchId(vertex属于的model(也叫feature)的batchId),可以用作dbId,作为几何和外观材质、属性的索引(外键);
"primitives": [
    {
        "attributes": {
            "_BATCHID": 0
        }
    }
]
31、3D Tiles styles provide concise declarative styling of tileset features. A style defines expressions to evaluate the display of a feature, for example color (RGB and translucency) and show properties, often based on the feature's properties stored in the tile's Batch Table.
32、tileset的空间树结构节点用格子来表示,紧密不浪费空间;格子的尺寸也是要有基本单位(长度)的,方便增量更新和多个tileset合并;
33、大格子由多个基本单位“格子构成”,小格子由较少的基本单位“格子构成”;
34、需要熟悉gltf格式;
35、需要参考样例文件;
36、glTF is not intended to be human-readable, though by virtue of being represented in JSON, it is developer-friendly.
37、版本控制
次要版本中对glTF所做的任何更新都将向后和向前兼容。向后兼容性将确保任何支持加载glTF 2.x资产的客户端实现也将能够加载glTF 2.0资产。前向兼容性将允许仅支持glTF 2.0的客户端实现加载glTF 2.x资产,同时优雅地忽略它不了解的任何新功能。
次要版本更新可以引入新功能,但不会更改任何以前存在的行为。可以在次要版本更新中弃用现有功能,但不会将其删除。
主要版本更新不应与以前的版本兼容。
38、gltf和3d tile的json编码要求一致,Buffer data is little endian,为了简化客户端实现;
39、A Feature Table is used by tile formats like Batched 3D Model (b3dm) where each model is a feature, and Point Cloud (pnts) where each point is a feature.

//  GLTF
1、A bufferView represents a subset of data in a buffer, defined by a byte offset into the buffer specified in the byteOffset property and a total byte length specified by the byteLength property of the buffer view.
When a buffer view contain vertex indices or attributes, they must be its only content, i.e., it's invalid to have more than one kind of data in the same buffer view.
2、Buffers and buffer views do not contain type information. They simply define the raw data for retrieval from the file. Objects within the glTF file (meshes, skins, animations) access buffers or buffer views via accessors.
All large data for meshes, skins, and animations is stored in buffers and retrieved via accessors.
3、byteStride must be defined, when two or more accessors use the same bufferView.
4、For performance and compatibility reasons, each element of a vertex attribute must be aligned to 4-byte boundaries inside bufferView (i.e., accessor.byteOffset and bufferView.byteStride must be multiples of 4).
5、In glTF, meshes are defined as arrays of primitives.
Splitting one mesh into primitives could be useful to limit number of indices per draw call.
6、glTF provides two delivery options that can also be used together:
glTF JSON points to external binary data (geometry, key frames, skins), and images.
glTF JSON embeds base64-encoded binary data, and images inline using data URIs.
For these resources, glTF requires either separate requests or extra space due to base64-encoding. Base64-encoding requires extra processing to decode and increases the file size (by ~33% for encoded resources). While gzip mitigates the file size increase, decompression and decoding still add significant loading time.

To solve this, a container format, Binary glTF is introduced. In Binary glTF, a glTF asset (JSON, .bin, and images) can be stored in a binary blob.
The file extension to be used with Binary glTF is .glb.
7、gltf格式构成图:dictionary-objects.png

 

传送:

3dTile技术研究-开篇

3dTile技术研究-概述

3dTile技术研究-概念详述(1)

3dTile技术研究-概念详述(2)

3dTile技术研究-概念详述(3)

3dTile技术研究-概念详述(4)

3dTile技术研究-概念详述(5)

3dTile技术研究-概念详述(6)

3dTile技术研究-概念详述(7)Batched 3D Model

3dTile技术研究-概念详述(8)Feature Table

3dTile技术研究-概念详述(9)Batch Table

3dTile技术研究-概念详述(10)Instanced 3D Model

 

  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值