【GLTF】自定义天空盒扩展 NJ_skybox

  1. 1. 贡献者
  2. 2. 状态
  3. 3. 依赖
  4. 4. 概述
  5. 5. glTF 结构更新
    1. 5.1. 实例
  6. 6. 已知实现

这个扩展为 GlTF 场景增加天空盒定义,主要是为 NothingJs 网站实现的。

贡献者

状态

草案

依赖

依赖 glTF 2.0 定义

概述

此扩展为 glTF 2.0 场景定义了一个天空盒扩展。一共有三种类型:

  • background: 背景图片
  • cube: 天空盒
  • sphericalHarmonic: 辐照度计算天空盒

glTF 结构更新

实例

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
"images" : [
{
"uri": "right_0.hdr",
"mimeType": "image/vnd.radiance"
},
{
"uri": "left_0.hdr",
"mimeType": "image/vnd.radiance"
},
{
"uri": "top_0.hdr",
"mimeType": "image/vnd.radiance"
},
{
"uri": "bottom_0.hdr",
"mimeType": "image/vnd.radiance"
},
{
"uri": "front_0.hdr",
"mimeType": "image/vnd.radiance"
},
{
"uri": "back_0.hdr",
"mimeType": "image/vnd.radiance"
}
],
"scenes": [
{
"extensions": {
"NJ_skybox": {
"skybox": 0
}
}
}
],
"extensions": {
"NJ_skybox": {
"skyboxs": [
{
"type": "background",
"data": [ 0 ]
},
{
"type": "cube",
"data": [ 0, 1, 2, 3, 4, 5 ]
},
{
"type": "sphericalHarmonic",
"data": [
1.0, 1.0, 0.0,
0.2, 0.0, 0.2,
0.0, 0.3, 0.3,
0.4, 0.0, 0.4,
0.5, 0.5, 0.0,
0.6, 0.0, 0.6,
0.0, 0.7, 0.7,
0.8, 0.0, 0.8,
0.9, 0.9, 0.0
]
}
]
}
},
"extensionsUsed": [
"NJ_skybox"
]

已知实现

欢迎访问博客地址:https://www.zhoyq.com