liantian commited on
Commit
faac8cb
·
verified ·
1 Parent(s): c1d8432

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. SAGE10k/.DS_Store +0 -0
  3. SAGE10k/README.md +267 -0
  4. SAGE10k/aggregate_scenes.py +244 -0
  5. SAGE10k/json_multi_merged.json +0 -0
  6. SAGE10k/json_multi_split.json +0 -0
  7. SAGE10k/json_single.json +3 -0
  8. SAGE10k/sage10k/.DS_Store +0 -0
  9. SAGE10k/sage10k/README.md +96 -0
  10. SAGE10k/sage10k/assets/object_counts_distribution.png +3 -0
  11. SAGE10k/sage10k/assets/preview_and_stats_v2.png +3 -0
  12. SAGE10k/sage10k/assets/preview_grid.jpg +3 -0
  13. SAGE10k/sage10k/assets/room_types_distribution.png +3 -0
  14. SAGE10k/sage10k/assets/styles_distribution.png +3 -0
  15. SAGE10k/sage10k/assets/teaser.gif +3 -0
  16. SAGE10k/sage10k/fetch_json.log +779 -0
  17. SAGE10k/sage10k/kits/__pycache__/models.cpython-312.pyc +0 -0
  18. SAGE10k/sage10k/kits/__pycache__/utils.cpython-312.pyc +0 -0
  19. SAGE10k/sage10k/kits/examples.sh +16 -0
  20. SAGE10k/sage10k/kits/export_glb.py +65 -0
  21. SAGE10k/sage10k/kits/export_usd.py +18 -0
  22. SAGE10k/sage10k/kits/glb_utils.py +485 -0
  23. SAGE10k/sage10k/kits/isaacsim_utils.py +1146 -0
  24. SAGE10k/sage10k/kits/load_isaacsim_demo.py +31 -0
  25. SAGE10k/sage10k/kits/models.py +102 -0
  26. SAGE10k/sage10k/kits/render_video.py +1606 -0
  27. SAGE10k/sage10k/kits/tex_utils_local.py +2016 -0
  28. SAGE10k/sage10k/kits/utils.py +286 -0
  29. SAGE10k/sage10k/scenes/.DS_Store +0 -0
  30. SAGE10k/sage10k/scenes/20251213_020526_layout_84b703fb/layout_84b703fb.json +0 -0
  31. SAGE10k/sage10k/scenes/20251213_033758_layout_cf6c1dfd/layout_cf6c1dfd.json +2161 -0
  32. SAGE10k/sage10k/scenes/20251213_035441_layout_7ff33042/layout_7ff33042.json +0 -0
  33. SAGE10k/sage10k/scenes/20251213_040122_layout_ce0c7f91/layout_ce0c7f91.json +0 -0
  34. SAGE10k/sage10k/scenes/20251213_042117_layout_5d77e0d9/layout_5d77e0d9.json +0 -0
  35. SAGE10k/sage10k/scenes/20251213_044801_layout_575a4fb6/layout_575a4fb6.json +0 -0
  36. SAGE10k/sage10k/scenes/20251213_044921_layout_4c917bc4/layout_4c917bc4.json +0 -0
  37. SAGE10k/sage10k/scenes/20251213_051113_layout_05646dc7/layout_05646dc7.json +0 -0
  38. SAGE10k/sage10k/scenes/20251213_051404_layout_234eec7a/layout_234eec7a.json +0 -0
  39. SAGE10k/sage10k/scenes/20251213_055339_layout_b4e27201/layout_b4e27201.json +1564 -0
  40. SAGE10k/sage10k/scenes/20251213_055817_layout_ed24dd11/layout_ed24dd11.json +0 -0
  41. SAGE10k/sage10k/scenes/20251213_060314_layout_0b66fd6d/layout_0b66fd6d.json +0 -0
  42. SAGE10k/sage10k/scenes/20251213_060624_layout_c99b7e46/layout_c99b7e46.json +0 -0
  43. SAGE10k/sage10k/scenes/20251213_061146_layout_f705f5b9/layout_f705f5b9.json +0 -0
  44. SAGE10k/sage10k/scenes/20251213_061428_layout_60b4dbe9/layout_60b4dbe9.json +0 -0
  45. SAGE10k/sage10k/scenes/20251213_062834_layout_e4c6d328/layout_e4c6d328.json +1449 -0
  46. SAGE10k/sage10k/scenes/20251213_065329_layout_6ac4858f/layout_6ac4858f.json +0 -0
  47. SAGE10k/sage10k/scenes/20251213_065423_layout_be99fefd/layout_be99fefd.json +0 -0
  48. SAGE10k/sage10k/scenes/20251213_070212_layout_deedb66c/layout_deedb66c.json +1282 -0
  49. SAGE10k/sage10k/scenes/20251213_070419_layout_889a0ed0/layout_889a0ed0.json +0 -0
  50. SAGE10k/sage10k/scenes/20251213_071547_layout_90a11d2d/layout_90a11d2d.json +0 -0
.gitattributes CHANGED
@@ -58,3 +58,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ SAGE10k/json_single.json filter=lfs diff=lfs merge=lfs -text
SAGE10k/.DS_Store ADDED
Binary file (8.2 kB). View file
 
SAGE10k/README.md ADDED
@@ -0,0 +1,267 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SAGE-10k 数据集本地处理说明
2
+
3
+ 原始数据集:[nvidia/SAGE-10k](https://huggingface.co/datasets/nvidia/SAGE-10k)(HuggingFace)
4
+
5
+ ---
6
+
7
+ ## 目录结构
8
+
9
+ ```
10
+ SAGE/
11
+ ├── sage10k/scenes/ # 10,000 个场景目录,每个含 layout_*.json
12
+ ├── json_single.json # 9,987 条单房间场景(573.9 MB)
13
+ ├── json_multi.json # 40 条多房间拆分记录(每条=一个房间)
14
+ ├── json_multi_merged.json # 13 条多房间完整场景(每条=完整场景含 rooms[])
15
+ ├── json_multi_split.json # 同 json_multi.json(兼容别名)
16
+ ├── SAGE-10k_comparison.xlsx # 数据集字段对比表(22列)
17
+ ├── download_json_only.py # 下载脚本(HTTP range reads,不下载 zip)
18
+ ├── aggregate_scenes.py # 聚合脚本(生成上述 json 文件)
19
+ └── make_excel.py # Excel 生成脚本
20
+ ```
21
+
22
+ ---
23
+
24
+ ## 下载方式
25
+
26
+ 利用 HuggingFace HTTP range reads,只拉取每个 zip 里的 JSON(约 150 KB/场景),不将 80 MB zip 写入磁盘:
27
+
28
+ ```bash
29
+ python download_json_only.py --workers 4 # 全量下载
30
+ python download_json_only.py --limit 5 # 先试 5 个
31
+ ```
32
+
33
+ 脚本特性:
34
+ - 可断点续传:已有有效 JSON 的场景自动跳过
35
+ - 原子写入:通过 `.part` 临时文件 + `os.rename` 防止截断文件
36
+ - 速率限制处理:自动检测 HF 429(即使伪装为 `BadZipFile`),触发 120s 全局冷却
37
+
38
+ ---
39
+
40
+ ## 聚合输出
41
+
42
+ ```bash
43
+ python aggregate_scenes.py
44
+ ```
45
+
46
+ | 文件 | 记录数 | 说明 |
47
+ |------|--------|------|
48
+ | `json_single.json` | 9,987 | 单房间场景,每条=一个场景 |
49
+ | `json_multi.json` | 40 | 多房间场景拆分,每条=一个房间 |
50
+ | `json_multi_merged.json` | 13 | 多房间完整场景,rooms 为数组 |
51
+ | `json_multi_split.json` | 40 | 同 json_multi.json(兼容别名) |
52
+
53
+ 场景分布:9,987 单房间 + 13 多房间(2–7 个房间),共 853,428 个 3D 对象。
54
+
55
+ ---
56
+
57
+ ## 坐标系(实测推导,数据集无显式声明)
58
+
59
+ ### 原点与轴向
60
+
61
+ | 轴 | 方向 | 范围 | 单位 |
62
+ |----|------|------|------|
63
+ | **原点** | **单房间**:房间西南角 (0,0,0);**多房间**:房间 position 为全局坐标,含负值(如 {x:-4, y:-5, z:0}) | — | — |
64
+ | **X** | 向东(room.dimensions.width 方向) | 单房间:[0, width] | 米(m) |
65
+ | **Y** | 向北(room.dimensions.length 方向) | 单房间:[0, length] | 米(m) |
66
+ | **Z** | 向上,Z=0 为地面,Z=ceiling_height 为天花板 | [0, ceiling_height] | 米(m) |
67
+
68
+ 惯用手性:右手系(从墙向量和物体朝向推断,数据集未显式声明)。
69
+
70
+ ### position 字段语义
71
+
72
+ `objects[].position{x, y, z}` 表示**物体包围盒底面的中心点**:
73
+ - XY:包围盒底面中心的平面坐标
74
+ - Z:物体底部距地面高度(落地物体 Z ≈ 0)
75
+
76
+ ### rotation 字段语义
77
+
78
+ `objects[].rotation{x, y, z}`,单位:**度(°)**
79
+
80
+ | 分量 | 含义 | 备注 |
81
+ |------|------|------|
82
+ | `rotation.z` | 偏航角(yaw)= 物体朝向 | 典型值 0/90/180/270° |
83
+ | `rotation.x` | 非语义旋转 | 48.4% 对象非零,最大约 ±180° |
84
+ | `rotation.y` | 非语义旋转 | 48.4% 对象非零,最大约 ±90° |
85
+
86
+ rotation.z 基准方向:
87
+ - 0° → 朝 +X(东)
88
+ - 90° → 朝 +Y(北)
89
+ - 180° → 朝 -X(西)
90
+ - 270° → 朝 -Y(南)
91
+
92
+ 全量核验(853,428 对象):413,128 个对象 rotation.x 或 y 非零(占 48.4%),其中 99,777 个幅度超过 ±1.3°(最大 rotation.x ≈ 180°,rotation.y ≈ 90°);非语义旋转,与语义 yaw(rotation.z)无关。
93
+
94
+ ### ⚠️ 单位不一致警告
95
+
96
+ `placement_constraints[len=4]` 结构中的坐标(索引 0 的中心点、索引 2 的脚印多边形)单位为**厘米(cm)**,与 `position` 字段的米(m)不同。
97
+
98
+ ---
99
+
100
+ ## JSON Schema 字段说明
101
+
102
+ ### 顶层字段
103
+
104
+ | 字段 | 类型 | 说明 |
105
+ |------|------|------|
106
+ | `id` | string | 场景 ID(格式:`layout_xxxxxxxx`,如 `layout_84b703fb`) |
107
+ | `rooms` | array | 房间列表(单房间=1个元素) |
108
+ | `building_style` | string | 建筑风格(如 modern, traditional) |
109
+ | `description` | string | 场景文字描述 |
110
+ | `total_area` | number | 总面积(m²) |
111
+
112
+ ### rooms[] 字段
113
+
114
+ | 字段 | 类型 | 说明 |
115
+ |------|------|------|
116
+ | `id` | string | 房间 ID(格式:`room_xxxxxxxx`) |
117
+ | `room_type` | string | 房间类型,227 种(含混合格式,如 `living_room`、`master bedroom`、`restaurant_dining_area`) |
118
+ | `ceiling_height` | number | 天花板高度(m) |
119
+ | `position` | object | 房间位置 {x, y, z};单房间场景均为 {0, 0, 0};多房间场景为全局坐标,含负值(如 {x:-4, y:-5, z:0}) |
120
+ | `dimensions` | object | {width, length, height},单位 m |
121
+ | `walls` | array | 墙线段列表 |
122
+ | `doors` | array | 门列表 |
123
+ | `windows` | array | 窗列表;**全集 10,000 场景均为空数组**(实测 windows 总数 = 0,无任何窗口数据) |
124
+ | `objects` | array | 家具/物体实例列表 |
125
+
126
+ ### walls[] 字段
127
+
128
+ | 字段 | 类型 | 说明 |
129
+ |------|------|------|
130
+ | `id` | string | 墙 ID |
131
+ | `start_point` | object | {x, y, z},单位 m |
132
+ | `end_point` | object | {x, y, z},单位 m |
133
+ | `height` | number | 墙高,单位 m |
134
+ | `thickness` | number | 墙体厚度,单位 m |
135
+ | `material` | string | 墙体材质标识,如 `room_86161fe1_wall` |
136
+
137
+ ### doors[] 字段
138
+
139
+ | 字段 | 类型 | 说明 |
140
+ |------|------|------|
141
+ | `wall_id` | string | 所在墙 ID |
142
+ | `position_on_wall` | number | 归一化位置 [0.0, 1.0] |
143
+ | `width` | number | 宽度(m) |
144
+ | `height` | number | 高度(m) |
145
+ | `door_type` | string | 门类型 |
146
+ | `opens_inward` | bool | 是否向内开 |
147
+ | `opening` | bool | 是否为开口(无实体门) |
148
+
149
+ ### windows[] 字段
150
+
151
+ | 字段 | 类型 | 说明 |
152
+ |------|------|------|
153
+ | `wall_id` | string | 所在墙 ID |
154
+ | `position_on_wall` | number | 归一化位置 [0.0, 1.0] |
155
+ | `width` | number | 宽度(m) |
156
+ | `height` | number | 高度(m) |
157
+
158
+ 注:无 sill_height 字段;**全集 10,000 场景 windows 均为空数组,无任何窗口数据。**
159
+
160
+ ### objects[] 字段
161
+
162
+ | 字段 | 类型 | 说明 |
163
+ |------|------|------|
164
+ | `id` | string | 实例 ID,格式:`{room_id}_{type}_{hash8}` |
165
+ | `type` | string | 物体类型(table/chair/sofa/cabinet/bed 等) |
166
+ | `source_id` | string | TRELLIS 3D 资产 hash(8 位十六进制) |
167
+ | `source` | string | 始终为 `"generation"`(TRELLIS 3D 生成) |
168
+ | `position` | object | {x, y, z},单位 m;**推断**为包围盒底面中心(原始字段无声明) |
169
+ | `rotation` | object | {x, y, z},单位度;Z 轴为 yaw;x/y 非零时**推断**为非语义扰动(原始字段无声明) |
170
+ | `dimensions` | object | {width, length, height},单位 m |
171
+ | `place_id` | string | 放置基准(见下) |
172
+ | `placement_constraints` | array/null | 空间约束(见下) |
173
+
174
+ ---
175
+
176
+ ## placement_constraints 详解
177
+
178
+ ### place_id 三种值
179
+
180
+ | 值 | 频率 | 含义 |
181
+ |----|------|------|
182
+ | `"floor"` | 29% | 物体放置于地面 |
183
+ | `"wall"` | 22% | 物体贴墙放置 |
184
+ | `{instance_id}` | 49% | 物体放置在另一具体家具上方 |
185
+
186
+ ### placement_constraints 三种形态
187
+
188
+ **null(50%,近似)** — 通常对应 place_id 为另一物体的 instance_id(非绝对等式):
189
+ ```json
190
+ null
191
+ ```
192
+
193
+ **len=1(22%,近似)** — 通常为贴墙物体:
194
+ ```json
195
+ [[{"type": "global", "constraint": "edge", "target": "wall"}]]
196
+ ```
197
+
198
+ **len=4(29%,近似)** — 通常为落地物体,⚠️ 此结构中坐标单位为**厘米(cm)**:
199
+ ```json
200
+ [
201
+ [215.3, 180.0],
202
+ 45.0,
203
+ [[0, 0], [80, 0], [80, 60], [0, 60]],
204
+ [{"type": "distance", "constraint": "near", "target": "sofa_abc123"}]
205
+ ]
206
+ ```
207
+
208
+ 索引含义:
209
+ - `[0]`:物体中心点 `[x, y]` 数组,单位**厘米(cm)**
210
+ - `[1]`:物体朝向角,单位度
211
+ - `[2]`:脚印多边形顶点列表(每个顶点为 `[x, y]` 数组),单位**厘米(cm)**
212
+ - `[3]`:约束列表
213
+
214
+ 注:null/len=1/len=4 与 place_id 的对应为统计规律,非绝对规则。
215
+
216
+ ### 约束类型(5种)
217
+
218
+ `global` / `distance` / `alignment` / `direction` / `relative`
219
+
220
+ ### 约束值(15+)
221
+
222
+ `far` / `on_top_of` / `edge` / `near` / `middle` / `close to` / `face to` / `face same as` / `center aligned` / `right of` / `left of` / `in front of` / `side of` / `behind` / `aligned`
223
+
224
+ ### existing- 前缀
225
+
226
+ `target` 字段中以 `existing-` 开头的值(全量共 307,636 处)表示引用当前生成批次中已存在的锚点物体。
227
+
228
+ ---
229
+
230
+ ## 全量核验统计
231
+
232
+ 扫描范围:10,000 场景,853,428 个 objects,解析错误 0
233
+
234
+ | 指标 | 数值 |
235
+ |------|------|
236
+ | 总场景数 | 10,000 |
237
+ | 单房间场景 | 9,987 |
238
+ | 多房间场景 | 13(2–7 个房间) |
239
+ | 总对象数 | 853,428 |
240
+ | 平均对象数/场景 | ~85 |
241
+ | place_id=floor | 29% |
242
+ | place_id=wall | 22% |
243
+ | place_id=instance_id | 49% |
244
+ | constraints=null | 50% |
245
+ | constraints len=1 | 22% |
246
+ | constraints len=4 | 29% |
247
+ | rotation.x/y 非零对象 | 413,128(占 48.4%),其中 99,777 个幅度 > ±1.3°,最大约 180° |
248
+ | existing- 前缀 target | 307,636 处 |
249
+ | source="generation" | 100% |
250
+
251
+ ---
252
+
253
+ ## 聚合文件中未包含的字段
254
+
255
+ 以下字段保留在原始 JSON 中,未进入聚合文件:
256
+
257
+ - `created_from_text`:文本生成指令
258
+ - `policy_analysis`:场景需求清单(含 scene_requirements)
259
+ - `mass`:物理质量参数
260
+ - `pbr_parameters`:PBR 材质参数
261
+ - `walls[].material`:墙体材质标识(全集40,108次,如 `room_86161fe1_wall`)
262
+
263
+ ## 注意事项
264
+
265
+ - **required_furniture_available**:原始 JSON 中不存在此字段,无法直接读取;如需判断,只能从 `policy_analysis.scene_requirements` 与 `objects[].type` 比对推导。
266
+ - **图像条件场景**:原始 JSON 中无 image-conditioned 相关字段,无法从数据结构直接识别此类场景。
267
+ - **room_type 格式不统一**:227 种类型混用下划线(`living_room`)和空格(`master bedroom`),需归一化后才能按类型统计。
SAGE10k/aggregate_scenes.py ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Aggregate SAGE-10k downloaded JSONs into json_single.json and json_multi.json.
3
+
4
+ Single-room scenes -> json_single.json (one record per scene/room)
5
+ Multi-room scenes -> json_multi.json (each room split into its own record,
6
+ tagged with parent scene_id)
7
+
8
+ Each record is normalized to the benchmark schema fields:
9
+ room_type, room_height, room_boundary, doors, windows,
10
+ furniture (list of objects with category/id/asset/position/rotation/size),
11
+ plus nulls for fields SAGE-10k does not provide.
12
+ """
13
+ from __future__ import annotations
14
+
15
+ import json
16
+ import math
17
+ from pathlib import Path
18
+
19
+
20
+ SCENES_DIR = Path("sage10k/scenes")
21
+ OUT_SINGLE = Path("json_single.json") # one record per single-room scene
22
+ OUT_MULTI = Path("json_multi.json") # one record per room from multi-room scenes
23
+ OUT_MULTI_MERGED = Path("json_multi_merged.json") # one record per multi-room scene
24
+ OUT_MULTI_SPLIT = Path("json_multi_split.json") # compatibility alias for OUT_MULTI
25
+
26
+
27
+ def wall_polygon(walls: list[dict]) -> list[dict[str, float]] | None:
28
+ """Return an ordered polygon from all wall endpoints.
29
+
30
+ A wall's ``start_point`` is not guaranteed to be a unique corner: adjacent
31
+ walls often share the same start point, so using starts alone drops a
32
+ corner. We first follow the endpoint adjacency cycle when possible and
33
+ fall back to an angle-sorted outline for malformed/disconnected walls.
34
+ """
35
+ if not walls:
36
+ return None
37
+
38
+ points: dict[tuple[float, float, float], dict[str, float]] = {}
39
+ edges: list[tuple[tuple[float, float, float], tuple[float, float, float]]] = []
40
+
41
+ def add_point(value: object) -> tuple[float, float, float] | None:
42
+ if not isinstance(value, dict):
43
+ return None
44
+ try:
45
+ key = (round(float(value["x"]), 6), round(float(value["y"]), 6), round(float(value.get("z", 0.0)), 6))
46
+ except (KeyError, TypeError, ValueError):
47
+ return None
48
+ points.setdefault(key, {"x": key[0], "y": key[1], "z": key[2]})
49
+ return key
50
+
51
+ for wall in walls:
52
+ start = add_point(wall.get("start_point"))
53
+ end = add_point(wall.get("end_point"))
54
+ if start is not None and end is not None and start != end:
55
+ edges.append((start, end))
56
+
57
+ if len(points) < 3:
58
+ return None
59
+
60
+ adjacency: dict[tuple[float, float, float], set[tuple[float, float, float]]] = {
61
+ key: set() for key in points
62
+ }
63
+ for start, end in edges:
64
+ adjacency[start].add(end)
65
+ adjacency[end].add(start)
66
+
67
+ # A normal room is a single degree-2 cycle. Traversing that graph keeps
68
+ # concave outlines valid and does not depend on the order of walls in JSON.
69
+ if len(edges) >= 3 and all(len(neighbours) == 2 for neighbours in adjacency.values()):
70
+ start = min(points)
71
+ ordered_keys = [start]
72
+ previous = None
73
+ current = start
74
+ for _ in range(len(points) - 1):
75
+ candidates = [key for key in adjacency[current] if key != previous]
76
+ if not candidates:
77
+ break
78
+ next_key = candidates[0]
79
+ if next_key == start:
80
+ break
81
+ ordered_keys.append(next_key)
82
+ previous, current = current, next_key
83
+ if len(ordered_keys) == len(points) and start in adjacency[ordered_keys[-1]]:
84
+ return [points[key] for key in ordered_keys]
85
+
86
+ # Fallback for incomplete/disconnected wall data: return a deterministic
87
+ # outline rather than silently dropping endpoints.
88
+ center_x = sum(key[0] for key in points) / len(points)
89
+ center_y = sum(key[1] for key in points) / len(points)
90
+ ordered_keys = sorted(points, key=lambda key: math.atan2(key[1] - center_y, key[0] - center_x))
91
+ return [points[key] for key in ordered_keys]
92
+
93
+
94
+ def normalize_room(room: dict, scene: dict, scene_id: str, room_index: int) -> dict:
95
+ """Map one SAGE room dict to the benchmark schema."""
96
+ objects = room.get("objects") or []
97
+ furniture = [
98
+ {
99
+ "furniture_category": obj.get("type"),
100
+ "category_mapping": None,
101
+ "furniture_quantity": 1,
102
+ "furniture_instance_id": obj.get("id"),
103
+ "furniture_asset_id": obj.get("source_id"),
104
+ "furniture_position": obj.get("position"),
105
+ "furniture_rotation": obj.get("rotation"),
106
+ "furniture_size": obj.get("dimensions"),
107
+ }
108
+ for obj in objects
109
+ ]
110
+
111
+ num_rooms = len(scene.get("rooms") or [])
112
+ return {
113
+ # identification
114
+ "dataset": "SAGE-10k",
115
+ "scene_id": scene_id,
116
+ "room_index": room_index,
117
+ # room geometry
118
+ "room_type": room.get("room_type"),
119
+ "room_type_source": None,
120
+ "is_splittable": num_rooms > 1,
121
+ "split_basis": "rooms[]" if num_rooms > 1 else None,
122
+ "room_boundary_type": "wall_polygon" if room.get("walls") else None,
123
+ "room_boundary": wall_polygon(room.get("walls") or []),
124
+ "room_height": room.get("ceiling_height"),
125
+ "coordinate_system": None,
126
+ # openings
127
+ "doors": room.get("doors") or [],
128
+ "windows": room.get("windows") or [],
129
+ # furniture
130
+ "required_furniture_available": None,
131
+ "furniture_quantity": len(furniture),
132
+ "furniture": furniture,
133
+ # quality
134
+ "geometry_quality": None,
135
+ # extras kept for reference
136
+ "building_style": scene.get("building_style"),
137
+ "description": scene.get("description"),
138
+ "total_area": scene.get("total_area"),
139
+ }
140
+
141
+
142
+ def normalize_scene_merged(scene: dict, scene_id: str) -> dict:
143
+ """Keep the full multi-room scene as one record, with rooms as an array."""
144
+ rooms = scene.get("rooms") or []
145
+ return {
146
+ "dataset": "SAGE-10k",
147
+ "scene_id": scene_id,
148
+ "room_count": len(rooms),
149
+ "building_style": scene.get("building_style"),
150
+ "description": scene.get("description"),
151
+ "total_area": scene.get("total_area"),
152
+ "rooms": [
153
+ {
154
+ "room_index": idx,
155
+ "room_type": r.get("room_type"),
156
+ "room_type_source": None,
157
+ "split_basis": "rooms[]",
158
+ "room_boundary_type": "wall_polygon" if r.get("walls") else None,
159
+ "room_boundary": wall_polygon(r.get("walls") or []),
160
+ "room_height": r.get("ceiling_height"),
161
+ "coordinate_system": None,
162
+ "doors": r.get("doors") or [],
163
+ "windows": r.get("windows") or [],
164
+ "furniture_quantity": len(r.get("objects") or []),
165
+ "furniture": [
166
+ {
167
+ "furniture_category": obj.get("type"),
168
+ "category_mapping": None,
169
+ "furniture_quantity": 1,
170
+ "furniture_instance_id": obj.get("id"),
171
+ "furniture_asset_id": obj.get("source_id"),
172
+ "furniture_position": obj.get("position"),
173
+ "furniture_rotation": obj.get("rotation"),
174
+ "furniture_size": obj.get("dimensions"),
175
+ }
176
+ for obj in (r.get("objects") or [])
177
+ ],
178
+ "geometry_quality": None,
179
+ }
180
+ for idx, r in enumerate(rooms)
181
+ ],
182
+ }
183
+
184
+
185
+ def process_all(scenes_dir: Path) -> tuple[list[dict], list[dict], list[dict]]:
186
+ single_records: list[dict] = []
187
+ multi_merged_records: list[dict] = []
188
+ multi_split_records: list[dict] = []
189
+ errors = 0
190
+
191
+ all_jsons = sorted(scenes_dir.glob("*/layout_*.json"))
192
+ total = len(all_jsons)
193
+ print(f"Found {total} JSON files in {scenes_dir}", flush=True)
194
+
195
+ for i, path in enumerate(all_jsons, 1):
196
+ if i % 1000 == 0 or i == total:
197
+ print(f" processing {i}/{total} ...", flush=True)
198
+ try:
199
+ scene = json.loads(path.read_bytes())
200
+ except (OSError, json.JSONDecodeError) as exc:
201
+ print(f" SKIP {path.name}: {exc}", flush=True)
202
+ errors += 1
203
+ continue
204
+
205
+ scene_id = scene.get("id") or path.parent.name
206
+ rooms = scene.get("rooms") or []
207
+
208
+ if len(rooms) == 1:
209
+ single_records.append(normalize_room(rooms[0], scene, scene_id, 0))
210
+ else:
211
+ multi_merged_records.append(normalize_scene_merged(scene, scene_id))
212
+ for idx, room in enumerate(rooms):
213
+ multi_split_records.append(normalize_room(room, scene, scene_id, idx))
214
+
215
+ print(f"Errors: {errors}")
216
+ return single_records, multi_merged_records, multi_split_records
217
+
218
+
219
+ def main() -> None:
220
+ single, multi_merged, multi_split = process_all(SCENES_DIR)
221
+
222
+ OUT_SINGLE.write_text(
223
+ json.dumps(single, ensure_ascii=False, indent=2), encoding="utf-8"
224
+ )
225
+ # The public multi-room file follows the requested one-record-per-room
226
+ # convention. Keep the scene-level representation under an explicit name.
227
+ multi_split_json = json.dumps(multi_split, ensure_ascii=False, indent=2)
228
+ OUT_MULTI.write_text(multi_split_json, encoding="utf-8")
229
+ OUT_MULTI_MERGED.write_text(
230
+ json.dumps(multi_merged, ensure_ascii=False, indent=2), encoding="utf-8"
231
+ )
232
+ OUT_MULTI_SPLIT.write_text(
233
+ multi_split_json, encoding="utf-8"
234
+ )
235
+
236
+ print(f"\n{'='*50}")
237
+ print(f"json_single.json -> {len(single):,} records ({OUT_SINGLE.stat().st_size/1e6:.1f} MB) [单房间,每条=一个场景]")
238
+ print(f"json_multi.json -> {len(multi_split):,} records ({OUT_MULTI.stat().st_size/1e6:.1f} MB) [多房间��分,每条=一个房间]")
239
+ print(f"json_multi_merged.json -> {len(multi_merged):,} records ({OUT_MULTI_MERGED.stat().st_size/1e6:.1f} MB) [多房间合并,每条=完整场景]")
240
+ print(f"json_multi_split.json -> {len(multi_split):,} records ({OUT_MULTI_SPLIT.stat().st_size/1e6:.1f} MB) [兼容别名]")
241
+
242
+
243
+ if __name__ == "__main__":
244
+ main()
SAGE10k/json_multi_merged.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/json_multi_split.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/json_single.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70fb8f7c7418023943b90052f1baec5b0f0f55c5be7cc4e9b524efe341c8292b
3
+ size 574637120
SAGE10k/sage10k/.DS_Store ADDED
Binary file (10.2 kB). View file
 
SAGE10k/sage10k/README.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ pretty_name: SAGE-10k
4
+ size_categories:
5
+ - 10K<n<100K
6
+ task_categories:
7
+ - text-to-3d
8
+ language:
9
+ - en
10
+ tags:
11
+ - Scene-Generation
12
+ - Interactive-Scenes
13
+ - Embodied-AI
14
+ - Scene-Understanding
15
+ - Robotics
16
+ ---
17
+
18
+
19
+
20
+ # SAGE-10k
21
+
22
+ <p>
23
+ <strong>SAGE-10k</strong> is a large-scale interactive indoor scene dataset featuring realistic layouts, generated by the agentic-driven pipeline introduced in "SAGE: Scalable Agentic 3D Scene Generation for Embodied AI". The dataset contains <strong>10,000 diverse scenes</strong> spanning 50 room types and styles, along with <strong>565K uniquely generated 3D objects</strong>.
24
+ </p>
25
+ <img src="assets/preview_and_stats_v2.png" alt="Teaser" width=100% >
26
+ <img src="assets/preview_grid.jpg" alt="Teaser" width=100% >
27
+
28
+ ## 🔑 Key Features
29
+ <div class="section">
30
+ <p>SAGE-10k integrates a wide variety of scenes, and particularly, preserves small items for complex layouts, resolves collisions, and further incorporates interactive objects, thus ensures:</p>
31
+ <ul>
32
+ <li>📊 <strong>Large scale</strong>: 10,000 diverse scenes including 565K generated 3D objects by TRELLIS.</li>
33
+ <li>🏠 <strong>Diverse room types and styles</strong>: Covers 50 different room types and interior design styles for broad scene variability.</li>
34
+ <li>🔧 <strong>Simulation-ready</strong>: Scenes are structured for direct use in physics-based simulators and embodied AI environments.</li>
35
+ </ul>
36
+ </div>
37
+
38
+ ### Supported Tasks
39
+ <ul>
40
+ <li> ✅ 3D scene reconstruction
41
+ <li> ✅ 3D scene understanding
42
+ <li> ✅ Embodied navigation & manipulation
43
+ <li> ✅ Vision-language grounding
44
+ </ul>
45
+
46
+ ## 📋 Table of Contents
47
+ - [📊 Dataset Statistics](#-dataset-statistics)
48
+ - [🔑 Key Features](#-key-features)
49
+ - [⚙️ Getting Started](#-getting-started)
50
+ - [Download the Dataset](#download-the-dataset)
51
+ - [Dataset Structure](#dataset-structure)
52
+ - [🧷 Citation](#-citation)
53
+ - [📄 License](#-license)
54
+
55
+
56
+ ## ⚙️ Getting Started
57
+
58
+ ### Download the Dataset
59
+ To download the full dataset, you can use the following code. If you encounter any issues, please refer to the official Hugging Face documentation.
60
+ ```
61
+ huggingface-cli login --token YOUR_HF_TOKEN_HERE
62
+
63
+ huggingface-cli download nvidia/SAGE-10k --repo-type dataset --local-dir SAVE_DIR
64
+ ```
65
+
66
+ ### Dataset Structure
67
+
68
+ ```shell
69
+ SAGE-10k/
70
+ |-- scenes/ # All the generated scenes
71
+ |-- scene_id/ # Each generated scene
72
+ |-- objects/ # Geometry and texture of each generated object
73
+ |-- materials/ # Textures of room walls, door, and floor.
74
+ |-- preview/ # Preview visualization of the room.
75
+ |-- layout_id.json/ # Information of the generated scene.
76
+ ```
77
+
78
+ ### Quick Start
79
+ You can use kits in kits/examples.sh to generate glb, usd files, as well as render video with the generated camera trajectory and load into IsaacSim.
80
+
81
+
82
+ ### Notes
83
+ This dataset is purely agentic-driven generated from SAGE without any manual filtering. The quality of every scene might be varied.
84
+
85
+ ## 🧷 Citation
86
+ ```BibTex
87
+ @article{xia2026sage,
88
+ title={SAGE: Scalable Agentic 3D Scene Generation for Embodied AI},
89
+ author={Xia, Hongchi and Li, Xuan and Li, Zhaoshuo and Ma, Qianli and Xu, Jiashu and Liu, Ming-Yu and Cui, Yin and Lin, Tsung-Yi and Ma, Wei-Chiu and Wang, Shenlong and Song, Shuran and Wei, Fangyin},
90
+ journal={arXiv preprint arXiv:2602.10116},
91
+ year={2026}
92
+ }
93
+ ```
94
+ ## 📄 License
95
+
96
+ This dataset is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). You are free to use, modify, and distribute this dataset for both commercial and non-commercial purposes, provided that proper attribution is given.
SAGE10k/sage10k/assets/object_counts_distribution.png ADDED

Git LFS Details

  • SHA256: 1b71f66f11dee9396c85f6a981be98ca92150d1e625897d97fd19175dd623e2a
  • Pointer size: 131 Bytes
  • Size of remote file: 131 kB
SAGE10k/sage10k/assets/preview_and_stats_v2.png ADDED

Git LFS Details

  • SHA256: e9f39e2b1b718b364c09276ef4012db48180bd10fc818c7f26d43efc635dd431
  • Pointer size: 132 Bytes
  • Size of remote file: 3.47 MB
SAGE10k/sage10k/assets/preview_grid.jpg ADDED

Git LFS Details

  • SHA256: 5ba949a79cf5a0f94d7d33b0cb8df460d96c7dd3e1f8071055e835f96ad82317
  • Pointer size: 132 Bytes
  • Size of remote file: 2.93 MB
SAGE10k/sage10k/assets/room_types_distribution.png ADDED

Git LFS Details

  • SHA256: 6abd5f3eab393ed003ff00be252edfe371263feea56e09163641ea8eb9dabcce
  • Pointer size: 131 Bytes
  • Size of remote file: 365 kB
SAGE10k/sage10k/assets/styles_distribution.png ADDED

Git LFS Details

  • SHA256: 29ec45c54a8aa5e5fb8f4d9977d7102438cb76c92ee877ab7f31e3804b9871ff
  • Pointer size: 131 Bytes
  • Size of remote file: 312 kB
SAGE10k/sage10k/assets/teaser.gif ADDED

Git LFS Details

  • SHA256: 5358491300d4680afe3090974f8e04c7f4d5fe802046feeff2846b73afe1c38c
  • Pointer size: 133 Bytes
  • Size of remote file: 24.7 MB
SAGE10k/sage10k/fetch_json.log ADDED
@@ -0,0 +1,779 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Listing nvidia/SAGE-10k/scenes ...
2
+ 10000 scenes remote, 56 already have JSON, 9944 to process
3
+ output: /Users/slian/Desktop/3D/SAGE/sage10k/scenes workers: 16
4
+
5
+ [25/9944] ok=25 kept=2.9MB 2.3 scenes/s eta 72min
6
+ [50/9944] ok=50 kept=7.0MB 3.2 scenes/s eta 51min
7
+ [75/9944] ok=75 kept=11.2MB 3.4 scenes/s eta 49min
8
+ [100/9944] ok=100 kept=15.7MB 3.6 scenes/s eta 46min
9
+ [125/9944] ok=125 kept=20.0MB 3.7 scenes/s eta 44min
10
+ [150/9944] ok=150 kept=24.7MB 3.7 scenes/s eta 44min
11
+ [175/9944] ok=175 kept=29.5MB 3.9 scenes/s eta 42min
12
+ [200/9944] ok=200 kept=34.1MB 3.8 scenes/s eta 43min
13
+ [225/9944] ok=225 kept=39.3MB 3.9 scenes/s eta 42min
14
+ [250/9944] ok=250 kept=43.8MB 3.8 scenes/s eta 42min
15
+ [275/9944] ok=275 kept=48.0MB 3.9 scenes/s eta 41min
16
+ [300/9944] ok=300 kept=52.0MB 3.9 scenes/s eta 41min
17
+ [325/9944] ok=325 kept=55.7MB 3.9 scenes/s eta 41min
18
+ [350/9944] ok=350 kept=59.5MB 3.9 scenes/s eta 41min
19
+ [375/9944] ok=375 kept=64.3MB 3.8 scenes/s eta 41min
20
+ [400/9944] ok=400 kept=69.1MB 3.8 scenes/s eta 42min
21
+ [425/9944] ok=425 kept=72.8MB 3.8 scenes/s eta 41min
22
+ [450/9944] ok=450 kept=77.1MB 3.9 scenes/s eta 41min
23
+ [475/9944] ok=475 kept=81.6MB 3.8 scenes/s eta 41min
24
+ [500/9944] ok=500 kept=86.6MB 3.9 scenes/s eta 41min
25
+ [525/9944] ok=525 kept=90.4MB 3.8 scenes/s eta 41min
26
+ [550/9944] ok=550 kept=95.3MB 3.9 scenes/s eta 40min
27
+ [575/9944] ok=575 kept=98.9MB 3.8 scenes/s eta 41min
28
+ [600/9944] ok=600 kept=102.6MB 3.9 scenes/s eta 40min
29
+ [625/9944] ok=625 kept=106.6MB 3.9 scenes/s eta 39min
30
+ [650/9944] ok=650 kept=111.1MB 3.9 scenes/s eta 39min
31
+ [675/9944] ok=675 kept=115.6MB 4.0 scenes/s eta 39min
32
+ [700/9944] ok=695 kept=119.0MB 4.0 scenes/s eta 38min
33
+ [725/9944] ok=697 kept=119.4MB 4.2 scenes/s eta 37min
34
+ [750/9944] ok=697 kept=119.4MB 4.3 scenes/s eta 36min
35
+ [775/9944] ok=697 kept=119.4MB 4.4 scenes/s eta 34min
36
+ [800/9944] ok=697 kept=119.4MB 4.6 scenes/s eta 33min
37
+ [825/9944] ok=697 kept=119.4MB 4.7 scenes/s eta 32min
38
+ [850/9944] ok=697 kept=119.4MB 4.8 scenes/s eta 31min
39
+ [875/9944] ok=697 kept=119.4MB 5.0 scenes/s eta 30min
40
+ [900/9944] ok=697 kept=119.4MB 5.1 scenes/s eta 29min
41
+ [925/9944] ok=697 kept=119.4MB 5.2 scenes/s eta 29min
42
+ [950/9944] ok=697 kept=119.4MB 5.4 scenes/s eta 28min
43
+ [975/9944] ok=697 kept=119.4MB 5.5 scenes/s eta 27min
44
+ [1000/9944] ok=697 kept=119.4MB 5.7 scenes/s eta 26min
45
+ [1025/9944] ok=697 kept=119.4MB 5.8 scenes/s eta 26min
46
+ [1050/9944] ok=697 kept=119.4MB 5.9 scenes/s eta 25min
47
+ [1075/9944] ok=697 kept=119.4MB 6.0 scenes/s eta 24min
48
+ [1100/9944] ok=697 kept=119.4MB 6.2 scenes/s eta 24min
49
+ [1125/9944] ok=697 kept=119.4MB 6.3 scenes/s eta 23min
50
+ [1150/9944] ok=697 kept=119.4MB 6.4 scenes/s eta 23min
51
+ [1175/9944] ok=697 kept=119.4MB 6.6 scenes/s eta 22min
52
+ [1200/9944] ok=697 kept=119.4MB 6.7 scenes/s eta 22min
53
+ [1225/9944] ok=697 kept=119.4MB 6.8 scenes/s eta 21min
54
+ [1250/9944] ok=697 kept=119.4MB 7.0 scenes/s eta 21min
55
+ [1275/9944] ok=697 kept=119.4MB 7.1 scenes/s eta 20min
56
+ [1300/9944] ok=697 kept=119.4MB 7.2 scenes/s eta 20min
57
+ [1325/9944] ok=697 kept=119.4MB 7.4 scenes/s eta 19min
58
+ [1350/9944] ok=697 kept=119.4MB 7.5 scenes/s eta 19min
59
+ [1375/9944] ok=697 kept=119.4MB 7.6 scenes/s eta 19min
60
+ [1400/9944] ok=697 kept=119.4MB 7.8 scenes/s eta 18min
61
+ [1425/9944] ok=697 kept=119.4MB 7.9 scenes/s eta 18min
62
+ [1450/9944] ok=697 kept=119.4MB 8.0 scenes/s eta 18min
63
+ [1475/9944] ok=697 kept=119.4MB 8.2 scenes/s eta 17min
64
+ [1500/9944] ok=697 kept=119.4MB 8.3 scenes/s eta 17min
65
+ [1525/9944] ok=697 kept=119.4MB 8.4 scenes/s eta 17min
66
+ [1550/9944] ok=697 kept=119.4MB 8.6 scenes/s eta 16min
67
+ [1575/9944] ok=697 kept=119.4MB 8.7 scenes/s eta 16min
68
+ [1600/9944] ok=697 kept=119.4MB 8.8 scenes/s eta 16min
69
+ [1625/9944] ok=697 kept=119.4MB 8.9 scenes/s eta 16min
70
+ [1650/9944] ok=697 kept=119.4MB 9.1 scenes/s eta 15min
71
+ [1675/9944] ok=697 kept=119.4MB 9.2 scenes/s eta 15min
72
+ [1700/9944] ok=697 kept=119.4MB 9.3 scenes/s eta 15min
73
+ [1725/9944] ok=697 kept=119.4MB 9.5 scenes/s eta 14min
74
+ [1750/9944] ok=697 kept=119.4MB 9.6 scenes/s eta 14min
75
+ [1775/9944] ok=697 kept=119.4MB 9.7 scenes/s eta 14min
76
+ [1800/9944] ok=697 kept=119.4MB 9.8 scenes/s eta 14min
77
+ [1825/9944] ok=697 kept=119.4MB 10.0 scenes/s eta 14min
78
+ [1850/9944] ok=697 kept=119.4MB 10.1 scenes/s eta 13min
79
+ [1875/9944] ok=697 kept=119.4MB 10.2 scenes/s eta 13min
80
+ [1900/9944] ok=697 kept=119.4MB 10.4 scenes/s eta 13min
81
+ [1925/9944] ok=697 kept=119.4MB 10.5 scenes/s eta 13min
82
+ [1950/9944] ok=697 kept=119.4MB 10.6 scenes/s eta 13min
83
+ [1975/9944] ok=697 kept=119.4MB 10.7 scenes/s eta 12min
84
+ [2000/9944] ok=697 kept=119.4MB 10.9 scenes/s eta 12min
85
+ [2025/9944] ok=697 kept=119.4MB 11.0 scenes/s eta 12min
86
+ [2050/9944] ok=697 kept=119.4MB 11.1 scenes/s eta 12min
87
+ [2075/9944] ok=697 kept=119.4MB 11.2 scenes/s eta 12min
88
+ [2100/9944] ok=697 kept=119.4MB 11.4 scenes/s eta 11min
89
+ [2125/9944] ok=697 kept=119.4MB 11.5 scenes/s eta 11min
90
+ [2150/9944] ok=697 kept=119.4MB 11.6 scenes/s eta 11min
91
+ [2175/9944] ok=697 kept=119.4MB 11.7 scenes/s eta 11min
92
+ [2200/9944] ok=697 kept=119.4MB 11.9 scenes/s eta 11min
93
+ [2225/9944] ok=697 kept=119.4MB 12.0 scenes/s eta 11min
94
+ [2250/9944] ok=697 kept=119.4MB 12.1 scenes/s eta 11min
95
+ [2275/9944] ok=697 kept=119.4MB 12.2 scenes/s eta 10min
96
+ [2300/9944] ok=697 kept=119.4MB 12.4 scenes/s eta 10min
97
+ [2325/9944] ok=697 kept=119.4MB 12.5 scenes/s eta 10min
98
+ [2350/9944] ok=697 kept=119.4MB 12.6 scenes/s eta 10min
99
+ [2375/9944] ok=697 kept=119.4MB 12.7 scenes/s eta 10min
100
+ [2400/9944] ok=697 kept=119.4MB 12.8 scenes/s eta 10min
101
+ [2425/9944] ok=697 kept=119.4MB 13.0 scenes/s eta 10min
102
+ [2450/9944] ok=697 kept=119.4MB 13.1 scenes/s eta 10min
103
+ [2475/9944] ok=697 kept=119.4MB 13.2 scenes/s eta 9min
104
+ [2500/9944] ok=697 kept=119.4MB 13.3 scenes/s eta 9min
105
+ [2525/9944] ok=697 kept=119.4MB 13.5 scenes/s eta 9min
106
+ [2550/9944] ok=697 kept=119.4MB 13.6 scenes/s eta 9min
107
+ [2575/9944] ok=697 kept=119.4MB 13.7 scenes/s eta 9min
108
+ [2600/9944] ok=697 kept=119.4MB 13.8 scenes/s eta 9min
109
+ [2625/9944] ok=697 kept=119.4MB 13.9 scenes/s eta 9min
110
+ [2650/9944] ok=697 kept=119.4MB 14.1 scenes/s eta 9min
111
+ [2675/9944] ok=697 kept=119.4MB 14.2 scenes/s eta 9min
112
+ [2700/9944] ok=697 kept=119.4MB 14.3 scenes/s eta 8min
113
+ [2725/9944] ok=697 kept=119.4MB 14.4 scenes/s eta 8min
114
+ [2750/9944] ok=697 kept=119.4MB 14.5 scenes/s eta 8min
115
+ [2775/9944] ok=697 kept=119.4MB 14.7 scenes/s eta 8min
116
+ [2800/9944] ok=697 kept=119.4MB 14.8 scenes/s eta 8min
117
+ [2825/9944] ok=697 kept=119.4MB 14.9 scenes/s eta 8min
118
+ [2850/9944] ok=697 kept=119.4MB 15.0 scenes/s eta 8min
119
+ [2875/9944] ok=697 kept=119.4MB 15.1 scenes/s eta 8min
120
+ [2900/9944] ok=697 kept=119.4MB 15.2 scenes/s eta 8min
121
+ [2925/9944] ok=697 kept=119.4MB 15.4 scenes/s eta 8min
122
+ [2950/9944] ok=697 kept=119.4MB 15.5 scenes/s eta 8min
123
+ [2975/9944] ok=697 kept=119.4MB 15.6 scenes/s eta 7min
124
+ [3000/9944] ok=697 kept=119.4MB 15.7 scenes/s eta 7min
125
+ [3025/9944] ok=697 kept=119.4MB 15.8 scenes/s eta 7min
126
+ [3050/9944] ok=697 kept=119.4MB 16.0 scenes/s eta 7min
127
+ [3075/9944] ok=697 kept=119.4MB 16.1 scenes/s eta 7min
128
+ [3100/9944] ok=697 kept=119.4MB 16.2 scenes/s eta 7min
129
+ [3125/9944] ok=697 kept=119.4MB 16.3 scenes/s eta 7min
130
+ [3150/9944] ok=697 kept=119.4MB 16.4 scenes/s eta 7min
131
+ [3175/9944] ok=697 kept=119.4MB 16.5 scenes/s eta 7min
132
+ [3200/9944] ok=697 kept=119.4MB 16.7 scenes/s eta 7min
133
+ [3225/9944] ok=697 kept=119.4MB 16.8 scenes/s eta 7min
134
+ [3250/9944] ok=697 kept=119.4MB 16.9 scenes/s eta 7min
135
+ [3275/9944] ok=697 kept=119.4MB 17.0 scenes/s eta 7min
136
+ [3300/9944] ok=697 kept=119.4MB 17.1 scenes/s eta 6min
137
+ [3325/9944] ok=697 kept=119.4MB 17.2 scenes/s eta 6min
138
+ [3350/9944] ok=697 kept=119.4MB 17.4 scenes/s eta 6min
139
+ [3375/9944] ok=697 kept=119.4MB 17.5 scenes/s eta 6min
140
+ [3400/9944] ok=697 kept=119.4MB 17.6 scenes/s eta 6min
141
+ [3425/9944] ok=697 kept=119.4MB 17.7 scenes/s eta 6min
142
+ [3450/9944] ok=697 kept=119.4MB 17.8 scenes/s eta 6min
143
+ [3475/9944] ok=697 kept=119.4MB 17.9 scenes/s eta 6min
144
+ [3500/9944] ok=697 kept=119.4MB 18.0 scenes/s eta 6min
145
+ [3525/9944] ok=697 kept=119.4MB 18.2 scenes/s eta 6min
146
+ [3550/9944] ok=697 kept=119.4MB 18.3 scenes/s eta 6min
147
+ [3575/9944] ok=697 kept=119.4MB 18.4 scenes/s eta 6min
148
+ [3600/9944] ok=697 kept=119.4MB 18.5 scenes/s eta 6min
149
+ [3625/9944] ok=697 kept=119.4MB 18.6 scenes/s eta 6min
150
+ [3650/9944] ok=697 kept=119.4MB 18.7 scenes/s eta 6min
151
+ [3675/9944] ok=697 kept=119.4MB 18.8 scenes/s eta 6min
152
+ [3700/9944] ok=697 kept=119.4MB 19.0 scenes/s eta 5min
153
+ [3725/9944] ok=697 kept=119.4MB 19.1 scenes/s eta 5min
154
+ [3750/9944] ok=697 kept=119.4MB 19.2 scenes/s eta 5min
155
+ [3775/9944] ok=697 kept=119.4MB 19.3 scenes/s eta 5min
156
+ [3800/9944] ok=697 kept=119.4MB 19.4 scenes/s eta 5min
157
+ [3825/9944] ok=697 kept=119.4MB 19.5 scenes/s eta 5min
158
+ [3850/9944] ok=697 kept=119.4MB 19.6 scenes/s eta 5min
159
+ [3875/9944] ok=697 kept=119.4MB 19.7 scenes/s eta 5min
160
+ [3900/9944] ok=697 kept=119.4MB 19.8 scenes/s eta 5min
161
+ [3925/9944] ok=697 kept=119.4MB 19.9 scenes/s eta 5min
162
+ [3950/9944] ok=697 kept=119.4MB 20.1 scenes/s eta 5min
163
+ [3975/9944] ok=697 kept=119.4MB 20.2 scenes/s eta 5min
164
+ [4000/9944] ok=697 kept=119.4MB 20.3 scenes/s eta 5min
165
+ [4025/9944] ok=697 kept=119.4MB 20.4 scenes/s eta 5min
166
+ [4050/9944] ok=697 kept=119.4MB 20.5 scenes/s eta 5min
167
+ [4075/9944] ok=697 kept=119.4MB 20.6 scenes/s eta 5min
168
+ [4100/9944] ok=697 kept=119.4MB 20.7 scenes/s eta 5min
169
+ [4125/9944] ok=697 kept=119.4MB 20.8 scenes/s eta 5min
170
+ [4150/9944] ok=697 kept=119.4MB 20.9 scenes/s eta 5min
171
+ [4175/9944] ok=697 kept=119.4MB 21.0 scenes/s eta 5min
172
+ [4200/9944] ok=697 kept=119.4MB 21.1 scenes/s eta 5min
173
+ [4225/9944] ok=697 kept=119.4MB 21.3 scenes/s eta 4min
174
+ [4250/9944] ok=697 kept=119.4MB 21.4 scenes/s eta 4min
175
+ [4275/9944] ok=697 kept=119.4MB 21.5 scenes/s eta 4min
176
+ [4300/9944] ok=697 kept=119.4MB 21.6 scenes/s eta 4min
177
+ [4325/9944] ok=697 kept=119.4MB 21.7 scenes/s eta 4min
178
+ [4350/9944] ok=697 kept=119.4MB 21.8 scenes/s eta 4min
179
+ [4375/9944] ok=697 kept=119.4MB 21.9 scenes/s eta 4min
180
+ [4400/9944] ok=697 kept=119.4MB 22.0 scenes/s eta 4min
181
+ [4425/9944] ok=697 kept=119.4MB 22.1 scenes/s eta 4min
182
+ [4450/9944] ok=697 kept=119.4MB 22.2 scenes/s eta 4min
183
+ [4475/9944] ok=697 kept=119.4MB 22.3 scenes/s eta 4min
184
+ [4500/9944] ok=697 kept=119.4MB 22.4 scenes/s eta 4min
185
+ [4525/9944] ok=697 kept=119.4MB 22.5 scenes/s eta 4min
186
+ [4550/9944] ok=697 kept=119.4MB 22.6 scenes/s eta 4min
187
+ [4575/9944] ok=697 kept=119.4MB 22.7 scenes/s eta 4min
188
+ [4600/9944] ok=697 kept=119.4MB 22.8 scenes/s eta 4min
189
+ [4625/9944] ok=697 kept=119.4MB 23.0 scenes/s eta 4min
190
+ [4650/9944] ok=697 kept=119.4MB 23.1 scenes/s eta 4min
191
+ [4675/9944] ok=697 kept=119.4MB 23.2 scenes/s eta 4min
192
+ [4700/9944] ok=697 kept=119.4MB 23.3 scenes/s eta 4min
193
+ [4725/9944] ok=697 kept=119.4MB 23.4 scenes/s eta 4min
194
+ [4750/9944] ok=697 kept=119.4MB 23.5 scenes/s eta 4min
195
+ [4775/9944] ok=697 kept=119.4MB 23.6 scenes/s eta 4min
196
+ [4800/9944] ok=697 kept=119.4MB 23.7 scenes/s eta 4min
197
+ [4825/9944] ok=697 kept=119.4MB 23.8 scenes/s eta 4min
198
+ [4850/9944] ok=697 kept=119.4MB 23.9 scenes/s eta 4min
199
+ [4875/9944] ok=697 kept=119.4MB 24.0 scenes/s eta 4min
200
+ [4900/9944] ok=697 kept=119.4MB 24.1 scenes/s eta 3min
201
+ [4925/9944] ok=697 kept=119.4MB 24.2 scenes/s eta 3min
202
+ [4950/9944] ok=697 kept=119.4MB 24.3 scenes/s eta 3min
203
+ [4975/9944] ok=697 kept=119.4MB 24.4 scenes/s eta 3min
204
+ [5000/9944] ok=697 kept=119.4MB 24.5 scenes/s eta 3min
205
+ [5025/9944] ok=697 kept=119.4MB 24.6 scenes/s eta 3min
206
+ [5050/9944] ok=697 kept=119.4MB 24.7 scenes/s eta 3min
207
+ [5075/9944] ok=697 kept=119.4MB 24.8 scenes/s eta 3min
208
+ [5100/9944] ok=697 kept=119.4MB 24.9 scenes/s eta 3min
209
+ [5125/9944] ok=697 kept=119.4MB 25.0 scenes/s eta 3min
210
+ [5150/9944] ok=697 kept=119.4MB 25.1 scenes/s eta 3min
211
+ [5175/9944] ok=697 kept=119.4MB 25.2 scenes/s eta 3min
212
+ [5200/9944] ok=697 kept=119.4MB 25.3 scenes/s eta 3min
213
+ [5225/9944] ok=697 kept=119.4MB 25.4 scenes/s eta 3min
214
+ [5250/9944] ok=697 kept=119.4MB 25.5 scenes/s eta 3min
215
+ [5275/9944] ok=697 kept=119.4MB 25.6 scenes/s eta 3min
216
+ [5300/9944] ok=697 kept=119.4MB 25.7 scenes/s eta 3min
217
+ [5325/9944] ok=697 kept=119.4MB 25.8 scenes/s eta 3min
218
+ [5350/9944] ok=697 kept=119.4MB 25.9 scenes/s eta 3min
219
+ [5375/9944] ok=697 kept=119.4MB 26.0 scenes/s eta 3min
220
+ [5400/9944] ok=697 kept=119.4MB 26.1 scenes/s eta 3min
221
+ [5425/9944] ok=697 kept=119.4MB 26.2 scenes/s eta 3min
222
+ [5450/9944] ok=697 kept=119.4MB 26.3 scenes/s eta 3min
223
+ [5475/9944] ok=697 kept=119.4MB 26.4 scenes/s eta 3min
224
+ [5500/9944] ok=701 kept=119.9MB 26.0 scenes/s eta 3min
225
+ [5525/9944] ok=726 kept=123.6MB 25.5 scenes/s eta 3min
226
+ [5550/9944] ok=751 kept=127.5MB 24.9 scenes/s eta 3min
227
+ [5575/9944] ok=776 kept=131.5MB 24.3 scenes/s eta 3min
228
+ [5600/9944] ok=801 kept=135.5MB 23.8 scenes/s eta 3min
229
+ [5625/9944] ok=826 kept=139.1MB 23.4 scenes/s eta 3min
230
+ [5650/9944] ok=851 kept=142.8MB 23.0 scenes/s eta 3min
231
+ [5675/9944] ok=876 kept=147.1MB 22.5 scenes/s eta 3min
232
+ [5700/9944] ok=901 kept=151.1MB 22.2 scenes/s eta 3min
233
+ [5725/9944] ok=926 kept=155.6MB 21.7 scenes/s eta 3min
234
+ [5750/9944] ok=951 kept=160.0MB 21.3 scenes/s eta 3min
235
+ [5775/9944] ok=976 kept=164.8MB 21.0 scenes/s eta 3min
236
+ [5800/9944] ok=1001 kept=169.1MB 20.6 scenes/s eta 3min
237
+ [5825/9944] ok=1026 kept=173.8MB 20.3 scenes/s eta 3min
238
+ [5850/9944] ok=1051 kept=178.3MB 20.0 scenes/s eta 3min
239
+ [5875/9944] ok=1076 kept=182.0MB 19.7 scenes/s eta 3min
240
+ [5900/9944] ok=1101 kept=185.5MB 19.5 scenes/s eta 3min
241
+ [5925/9944] ok=1126 kept=189.2MB 19.2 scenes/s eta 3min
242
+ [5950/9944] ok=1151 kept=193.0MB 18.9 scenes/s eta 4min
243
+ [5975/9944] ok=1176 kept=197.0MB 18.7 scenes/s eta 4min
244
+ [6000/9944] ok=1201 kept=201.6MB 18.5 scenes/s eta 4min
245
+ [6025/9944] ok=1226 kept=205.7MB 18.2 scenes/s eta 4min
246
+ [6050/9944] ok=1251 kept=210.2MB 18.1 scenes/s eta 4min
247
+ [6075/9944] ok=1276 kept=214.4MB 17.7 scenes/s eta 4min
248
+ [6100/9944] ok=1301 kept=218.8MB 17.6 scenes/s eta 4min
249
+ [6125/9944] ok=1326 kept=223.3MB 17.4 scenes/s eta 4min
250
+ [6150/9944] ok=1351 kept=227.5MB 17.2 scenes/s eta 4min
251
+ [6175/9944] ok=1376 kept=231.6MB 17.0 scenes/s eta 4min
252
+ [6200/9944] ok=1401 kept=235.4MB 16.8 scenes/s eta 4min
253
+ [6225/9944] ok=1426 kept=239.8MB 16.7 scenes/s eta 4min
254
+ [6250/9944] ok=1436 kept=241.8MB 16.6 scenes/s eta 4min
255
+ [6275/9944] ok=1437 kept=241.9MB 16.7 scenes/s eta 4min
256
+ [6300/9944] ok=1438 kept=242.1MB 16.7 scenes/s eta 4min
257
+ [6325/9944] ok=1441 kept=242.6MB 16.8 scenes/s eta 4min
258
+ [6350/9944] ok=1442 kept=242.9MB 16.8 scenes/s eta 4min
259
+ [6375/9944] ok=1443 kept=243.1MB 16.9 scenes/s eta 4min
260
+ [6400/9944] ok=1443 kept=243.1MB 16.9 scenes/s eta 3min
261
+ [6425/9944] ok=1443 kept=243.1MB 17.0 scenes/s eta 3min
262
+ [6450/9944] ok=1444 kept=243.2MB 17.0 scenes/s eta 3min
263
+ [6475/9944] ok=1444 kept=243.2MB 17.1 scenes/s eta 3min
264
+ [6500/9944] ok=1444 kept=243.2MB 17.2 scenes/s eta 3min
265
+ [6525/9944] ok=1444 kept=243.2MB 17.2 scenes/s eta 3min
266
+ [6550/9944] ok=1444 kept=243.2MB 17.3 scenes/s eta 3min
267
+ [6575/9944] ok=1444 kept=243.2MB 17.3 scenes/s eta 3min
268
+ [6600/9944] ok=1444 kept=243.2MB 17.4 scenes/s eta 3min
269
+ [6625/9944] ok=1444 kept=243.2MB 17.4 scenes/s eta 3min
270
+ [6650/9944] ok=1444 kept=243.2MB 17.5 scenes/s eta 3min
271
+ [6675/9944] ok=1444 kept=243.2MB 17.6 scenes/s eta 3min
272
+ [6700/9944] ok=1444 kept=243.2MB 17.6 scenes/s eta 3min
273
+ [6725/9944] ok=1444 kept=243.2MB 17.7 scenes/s eta 3min
274
+ [6750/9944] ok=1444 kept=243.2MB 17.7 scenes/s eta 3min
275
+ [6775/9944] ok=1444 kept=243.2MB 17.8 scenes/s eta 3min
276
+ [6800/9944] ok=1444 kept=243.2MB 17.8 scenes/s eta 3min
277
+ [6825/9944] ok=1444 kept=243.2MB 17.9 scenes/s eta 3min
278
+ [6850/9944] ok=1444 kept=243.2MB 18.0 scenes/s eta 3min
279
+ [6875/9944] ok=1444 kept=243.2MB 18.0 scenes/s eta 3min
280
+ [6900/9944] ok=1444 kept=243.2MB 18.1 scenes/s eta 3min
281
+ [6925/9944] ok=1444 kept=243.2MB 18.1 scenes/s eta 3min
282
+ [6950/9944] ok=1444 kept=243.2MB 18.2 scenes/s eta 3min
283
+ [6975/9944] ok=1444 kept=243.2MB 18.2 scenes/s eta 3min
284
+ [7000/9944] ok=1444 kept=243.2MB 18.3 scenes/s eta 3min
285
+ [7025/9944] ok=1444 kept=243.2MB 18.4 scenes/s eta 3min
286
+ [7050/9944] ok=1444 kept=243.2MB 18.4 scenes/s eta 3min
287
+ [7075/9944] ok=1444 kept=243.2MB 18.5 scenes/s eta 3min
288
+ [7100/9944] ok=1444 kept=243.2MB 18.5 scenes/s eta 3min
289
+ [7125/9944] ok=1444 kept=243.2MB 18.6 scenes/s eta 3min
290
+ [7150/9944] ok=1444 kept=243.2MB 18.6 scenes/s eta 2min
291
+ [7175/9944] ok=1444 kept=243.2MB 18.7 scenes/s eta 2min
292
+ [7200/9944] ok=1444 kept=243.2MB 18.8 scenes/s eta 2min
293
+ [7225/9944] ok=1444 kept=243.2MB 18.8 scenes/s eta 2min
294
+ [7250/9944] ok=1444 kept=243.2MB 18.9 scenes/s eta 2min
295
+ [7275/9944] ok=1444 kept=243.2MB 18.9 scenes/s eta 2min
296
+ [7300/9944] ok=1444 kept=243.2MB 19.0 scenes/s eta 2min
297
+ [7325/9944] ok=1444 kept=243.2MB 19.0 scenes/s eta 2min
298
+ [7350/9944] ok=1444 kept=243.2MB 19.1 scenes/s eta 2min
299
+ [7375/9944] ok=1444 kept=243.2MB 19.2 scenes/s eta 2min
300
+ [7400/9944] ok=1444 kept=243.2MB 19.2 scenes/s eta 2min
301
+ [7425/9944] ok=1444 kept=243.2MB 19.3 scenes/s eta 2min
302
+ [7450/9944] ok=1444 kept=243.2MB 19.3 scenes/s eta 2min
303
+ [7475/9944] ok=1444 kept=243.2MB 19.4 scenes/s eta 2min
304
+ [7500/9944] ok=1444 kept=243.2MB 19.4 scenes/s eta 2min
305
+ [7525/9944] ok=1444 kept=243.2MB 19.5 scenes/s eta 2min
306
+ [7550/9944] ok=1444 kept=243.2MB 19.5 scenes/s eta 2min
307
+ [7575/9944] ok=1444 kept=243.2MB 19.6 scenes/s eta 2min
308
+ [7600/9944] ok=1444 kept=243.2MB 19.7 scenes/s eta 2min
309
+ [7625/9944] ok=1444 kept=243.2MB 19.7 scenes/s eta 2min
310
+ [7650/9944] ok=1444 kept=243.2MB 19.8 scenes/s eta 2min
311
+ [7675/9944] ok=1444 kept=243.2MB 19.8 scenes/s eta 2min
312
+ [7700/9944] ok=1444 kept=243.2MB 19.9 scenes/s eta 2min
313
+ [7725/9944] ok=1444 kept=243.2MB 19.9 scenes/s eta 2min
314
+ [7750/9944] ok=1444 kept=243.2MB 20.0 scenes/s eta 2min
315
+ [7775/9944] ok=1444 kept=243.2MB 20.0 scenes/s eta 2min
316
+ [7800/9944] ok=1444 kept=243.2MB 20.1 scenes/s eta 2min
317
+ [7825/9944] ok=1444 kept=243.2MB 20.2 scenes/s eta 2min
318
+ [7850/9944] ok=1444 kept=243.2MB 20.2 scenes/s eta 2min
319
+ [7875/9944] ok=1444 kept=243.2MB 20.3 scenes/s eta 2min
320
+ [7900/9944] ok=1444 kept=243.2MB 20.3 scenes/s eta 2min
321
+ [7925/9944] ok=1444 kept=243.2MB 20.4 scenes/s eta 2min
322
+ [7950/9944] ok=1444 kept=243.2MB 20.4 scenes/s eta 2min
323
+ [7975/9944] ok=1444 kept=243.2MB 20.5 scenes/s eta 2min
324
+ [8000/9944] ok=1444 kept=243.2MB 20.5 scenes/s eta 2min
325
+ [8025/9944] ok=1444 kept=243.2MB 20.6 scenes/s eta 2min
326
+ [8050/9944] ok=1444 kept=243.2MB 20.7 scenes/s eta 2min
327
+ [8075/9944] ok=1444 kept=243.2MB 20.7 scenes/s eta 2min
328
+ [8100/9944] ok=1444 kept=243.2MB 20.8 scenes/s eta 1min
329
+ [8125/9944] ok=1444 kept=243.2MB 20.8 scenes/s eta 1min
330
+ [8150/9944] ok=1444 kept=243.2MB 20.9 scenes/s eta 1min
331
+ [8175/9944] ok=1444 kept=243.2MB 20.9 scenes/s eta 1min
332
+ [8200/9944] ok=1444 kept=243.2MB 21.0 scenes/s eta 1min
333
+ [8225/9944] ok=1444 kept=243.2MB 21.0 scenes/s eta 1min
334
+ [8250/9944] ok=1444 kept=243.2MB 21.1 scenes/s eta 1min
335
+ [8275/9944] ok=1444 kept=243.2MB 21.1 scenes/s eta 1min
336
+ [8300/9944] ok=1444 kept=243.2MB 21.2 scenes/s eta 1min
337
+ [8325/9944] ok=1444 kept=243.2MB 21.3 scenes/s eta 1min
338
+ [8350/9944] ok=1444 kept=243.2MB 21.3 scenes/s eta 1min
339
+ [8375/9944] ok=1444 kept=243.2MB 21.4 scenes/s eta 1min
340
+ [8400/9944] ok=1444 kept=243.2MB 21.4 scenes/s eta 1min
341
+ [8425/9944] ok=1444 kept=243.2MB 21.5 scenes/s eta 1min
342
+ [8450/9944] ok=1444 kept=243.2MB 21.5 scenes/s eta 1min
343
+ [8475/9944] ok=1444 kept=243.2MB 21.6 scenes/s eta 1min
344
+ [8500/9944] ok=1444 kept=243.2MB 21.6 scenes/s eta 1min
345
+ [8525/9944] ok=1444 kept=243.2MB 21.7 scenes/s eta 1min
346
+ [8550/9944] ok=1444 kept=243.2MB 21.8 scenes/s eta 1min
347
+ [8575/9944] ok=1444 kept=243.2MB 21.8 scenes/s eta 1min
348
+ [8600/9944] ok=1444 kept=243.2MB 21.9 scenes/s eta 1min
349
+ [8625/9944] ok=1444 kept=243.2MB 21.9 scenes/s eta 1min
350
+ [8650/9944] ok=1444 kept=243.2MB 22.0 scenes/s eta 1min
351
+ [8675/9944] ok=1444 kept=243.2MB 22.0 scenes/s eta 1min
352
+ [8700/9944] ok=1444 kept=243.2MB 22.1 scenes/s eta 1min
353
+ [8725/9944] ok=1444 kept=243.2MB 22.1 scenes/s eta 1min
354
+ [8750/9944] ok=1444 kept=243.2MB 22.2 scenes/s eta 1min
355
+ [8775/9944] ok=1444 kept=243.2MB 22.2 scenes/s eta 1min
356
+ [8800/9944] ok=1444 kept=243.2MB 22.3 scenes/s eta 1min
357
+ [8825/9944] ok=1444 kept=243.2MB 22.4 scenes/s eta 1min
358
+ [8850/9944] ok=1444 kept=243.2MB 22.4 scenes/s eta 1min
359
+ [8875/9944] ok=1444 kept=243.2MB 22.5 scenes/s eta 1min
360
+ [8900/9944] ok=1444 kept=243.2MB 22.5 scenes/s eta 1min
361
+ [8925/9944] ok=1444 kept=243.2MB 22.6 scenes/s eta 1min
362
+ [8950/9944] ok=1444 kept=243.2MB 22.6 scenes/s eta 1min
363
+ [8975/9944] ok=1444 kept=243.2MB 22.7 scenes/s eta 1min
364
+ [9000/9944] ok=1444 kept=243.2MB 22.7 scenes/s eta 1min
365
+ [9025/9944] ok=1444 kept=243.2MB 22.8 scenes/s eta 1min
366
+ [9050/9944] ok=1444 kept=243.2MB 22.8 scenes/s eta 1min
367
+ [9075/9944] ok=1444 kept=243.2MB 22.9 scenes/s eta 1min
368
+ [9100/9944] ok=1444 kept=243.2MB 22.9 scenes/s eta 1min
369
+ [9125/9944] ok=1444 kept=243.2MB 23.0 scenes/s eta 1min
370
+ [9150/9944] ok=1444 kept=243.2MB 23.0 scenes/s eta 1min
371
+ [9175/9944] ok=1444 kept=243.2MB 23.1 scenes/s eta 1min
372
+ [9200/9944] ok=1444 kept=243.2MB 23.2 scenes/s eta 1min
373
+ [9225/9944] ok=1444 kept=243.2MB 23.2 scenes/s eta 1min
374
+ [9250/9944] ok=1444 kept=243.2MB 23.3 scenes/s eta 0min
375
+ [9275/9944] ok=1444 kept=243.2MB 23.3 scenes/s eta 0min
376
+ [9300/9944] ok=1444 kept=243.2MB 23.4 scenes/s eta 0min
377
+ [9325/9944] ok=1444 kept=243.2MB 23.4 scenes/s eta 0min
378
+ [9350/9944] ok=1444 kept=243.2MB 23.5 scenes/s eta 0min
379
+ [9375/9944] ok=1444 kept=243.2MB 23.5 scenes/s eta 0min
380
+ [9400/9944] ok=1444 kept=243.2MB 23.6 scenes/s eta 0min
381
+ [9425/9944] ok=1444 kept=243.2MB 23.6 scenes/s eta 0min
382
+ [9450/9944] ok=1444 kept=243.2MB 23.7 scenes/s eta 0min
383
+ [9475/9944] ok=1444 kept=243.2MB 23.7 scenes/s eta 0min
384
+ [9500/9944] ok=1444 kept=243.2MB 23.8 scenes/s eta 0min
385
+ [9525/9944] ok=1444 kept=243.2MB 23.8 scenes/s eta 0min
386
+ [9550/9944] ok=1444 kept=243.2MB 23.9 scenes/s eta 0min
387
+ [9575/9944] ok=1444 kept=243.2MB 23.9 scenes/s eta 0min
388
+ [9600/9944] ok=1444 kept=243.2MB 24.0 scenes/s eta 0min
389
+ [9625/9944] ok=1444 kept=243.2MB 24.0 scenes/s eta 0min
390
+ [9650/9944] ok=1444 kept=243.2MB 24.1 scenes/s eta 0min
391
+ [9675/9944] ok=1444 kept=243.2MB 24.2 scenes/s eta 0min
392
+ [9700/9944] ok=1444 kept=243.2MB 24.2 scenes/s eta 0min
393
+ [9725/9944] ok=1444 kept=243.2MB 24.3 scenes/s eta 0min
394
+ [9750/9944] ok=1444 kept=243.2MB 24.3 scenes/s eta 0min
395
+ [9775/9944] ok=1444 kept=243.2MB 24.4 scenes/s eta 0min
396
+ [9800/9944] ok=1444 kept=243.2MB 24.4 scenes/s eta 0min
397
+ [9825/9944] ok=1444 kept=243.2MB 24.5 scenes/s eta 0min
398
+ [9850/9944] ok=1444 kept=243.2MB 24.5 scenes/s eta 0min
399
+ [9875/9944] ok=1444 kept=243.2MB 24.6 scenes/s eta 0min
400
+ [9900/9944] ok=1444 kept=243.2MB 24.6 scenes/s eta 0min
401
+ [9925/9944] ok=1444 kept=243.2MB 24.7 scenes/s eta 0min
402
+ [9944/9944] ok=1444 kept=243.2MB 24.7 scenes/s eta 0min
403
+
404
+ done in 6.7min: ok=1444, no-json=0, corrupt=8500, failed=0
405
+ kept 243.2MB of JSON across 1444 scenes
406
+ Listing nvidia/SAGE-10k/scenes ...
407
+ 10000 scenes remote, 1520 already have JSON, 8480 to process
408
+ output: /Users/slian/Desktop/3D/SAGE/sage10k/scenes workers: 4
409
+
410
+ [25/8480] ok=25 kept=4.8MB 1.2 scenes/s eta 114min
411
+ [50/8480] ok=50 kept=9.6MB 1.3 scenes/s eta 108min
412
+ [75/8480] ok=75 kept=14.4MB 1.3 scenes/s eta 107min
413
+ [100/8480] ok=100 kept=18.8MB 1.3 scenes/s eta 104min
414
+ [125/8480] ok=125 kept=23.3MB 1.4 scenes/s eta 103min
415
+ [150/8480] ok=150 kept=26.5MB 1.4 scenes/s eta 100min
416
+ [175/8480] ok=175 kept=30.1MB 1.4 scenes/s eta 100min
417
+ [200/8480] ok=200 kept=34.8MB 1.4 scenes/s eta 99min
418
+ [225/8480] ok=225 kept=39.6MB 1.4 scenes/s eta 98min
419
+ [250/8480] ok=250 kept=43.7MB 1.4 scenes/s eta 97min
420
+ [275/8480] ok=275 kept=48.0MB 1.4 scenes/s eta 97min
421
+ [300/8480] ok=300 kept=52.2MB 1.4 scenes/s eta 97min
422
+ [325/8480] ok=325 kept=56.9MB 1.4 scenes/s eta 97min
423
+ [350/8480] ok=350 kept=61.1MB 1.4 scenes/s eta 96min
424
+ [375/8480] ok=375 kept=66.0MB 1.4 scenes/s eta 96min
425
+ [400/8480] ok=400 kept=70.8MB 1.4 scenes/s eta 96min
426
+ [425/8480] ok=425 kept=75.3MB 1.4 scenes/s eta 96min
427
+ [450/8480] ok=450 kept=78.1MB 1.4 scenes/s eta 95min
428
+ [475/8480] ok=475 kept=81.8MB 1.4 scenes/s eta 95min
429
+ [500/8480] ok=500 kept=85.6MB 1.4 scenes/s eta 95min
430
+ [525/8480] ok=525 kept=90.8MB 1.4 scenes/s eta 94min
431
+ [550/8480] ok=550 kept=95.6MB 1.4 scenes/s eta 94min
432
+ [575/8480] ok=575 kept=100.6MB 1.4 scenes/s eta 94min
433
+ [600/8480] ok=600 kept=104.6MB 1.4 scenes/s eta 94min
434
+ [625/8480] ok=625 kept=109.6MB 1.4 scenes/s eta 94min
435
+ [650/8480] ok=650 kept=114.1MB 1.4 scenes/s eta 94min
436
+ [675/8480] ok=675 kept=118.5MB 1.4 scenes/s eta 93min
437
+ [700/8480] ok=700 kept=122.7MB 1.4 scenes/s eta 93min
438
+ [725/8480] ok=725 kept=126.7MB 1.4 scenes/s eta 93min
439
+ [750/8480] ok=750 kept=129.5MB 1.4 scenes/s eta 92min
440
+ [775/8480] ok=775 kept=133.7MB 1.4 scenes/s eta 92min
441
+ [800/8480] ok=800 kept=138.0MB 1.4 scenes/s eta 92min
442
+ [825/8480] ok=825 kept=142.9MB 1.4 scenes/s eta 92min
443
+ [850/8480] ok=850 kept=147.1MB 1.4 scenes/s eta 91min
444
+ [875/8480] ok=875 kept=151.7MB 1.4 scenes/s eta 91min
445
+ [900/8480] ok=900 kept=156.4MB 1.4 scenes/s eta 91min
446
+ [925/8480] ok=925 kept=161.0MB 1.4 scenes/s eta 90min
447
+ [950/8480] ok=950 kept=165.1MB 1.4 scenes/s eta 90min
448
+ [975/8480] ok=975 kept=169.6MB 1.4 scenes/s eta 89min
449
+ [1000/8480] ok=1000 kept=174.2MB 1.4 scenes/s eta 89min
450
+ [1025/8480] ok=1025 kept=179.2MB 1.4 scenes/s eta 89min
451
+ [1050/8480] ok=1050 kept=183.5MB 1.4 scenes/s eta 89min
452
+ '(ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')), '(Request ID: d2174ca3-da0d-44a1-b03c-79ce90399e0c)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251217_214057_layout_f4a372e8.zip
453
+ Retrying in 1s [Retry 1/5].
454
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: dd5d5456-54b6-49f2-ad0d-2a81f270721e)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251217_213746_layout_85f4a12f.zip
455
+ Retrying in 1s [Retry 1/5].
456
+ 'HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out.' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251217_213232_layout_6318c118.zip
457
+ Retrying in 1s [Retry 1/5].
458
+ '(ReadTimeoutError("HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: ef978815-6a83-4a46-9e44-09d517e42384)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251217_214410_layout_74635233.zip
459
+ Retrying in 1s [Retry 1/5].
460
+ '(ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')), '(Request ID: 2e0932c2-3d7e-4bf5-a513-b1b6bbc369e9)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251217_213232_layout_6318c118.zip
461
+ Retrying in 2s [Retry 2/5].
462
+ [1075/8480] ok=1075 kept=187.2MB 1.4 scenes/s eta 90min
463
+ [1100/8480] ok=1100 kept=191.1MB 1.4 scenes/s eta 90min
464
+ '(ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')), '(Request ID: bf4cdb98-0a5d-49f1-af1b-d2b02e71bbd4)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251218_002052_layout_22dde523.zip
465
+ Retrying in 1s [Retry 1/5].
466
+ 'HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out.' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251218_002850_layout_60cd26d1.zip
467
+ Retrying in 1s [Retry 1/5].
468
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: 7759f66d-febd-49f5-9edf-cd040d18b7fe)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251218_002506_layout_f5a62b6c.zip
469
+ Retrying in 1s [Retry 1/5].
470
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: ed0c16c4-11e5-4dd7-8245-2925e0339d9a)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251218_002747_layout_06571a8a.zip
471
+ Retrying in 1s [Retry 1/5].
472
+ '(ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')), '(Request ID: 56abfc38-13a1-412a-9d10-3b71d6190199)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251218_002850_layout_60cd26d1.zip
473
+ Retrying in 2s [Retry 2/5].
474
+ [1125/8480] ok=1125 kept=195.1MB 1.4 scenes/s eta 91min
475
+ [1150/8480] ok=1150 kept=199.2MB 1.3 scenes/s eta 91min
476
+ '(ProtocolError('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer')), '(Request ID: aa65d7c3-e378-4539-8ecf-bb720a1088e2)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251218_023046_layout_6a90c9fd.zip
477
+ Retrying in 1s [Retry 1/5].
478
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: babce848-d60c-46e8-bc8f-0377401e004d)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251218_022827_layout_085f6bd9.zip
479
+ Retrying in 1s [Retry 1/5].
480
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: 5631b5fb-9787-4bc1-a9ca-d1af2e1e4e49)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251218_022612_layout_a6fdd763.zip
481
+ Retrying in 1s [Retry 1/5].
482
+ [1175/8480] ok=1174 kept=203.7MB 1.3 scenes/s eta 91min
483
+ [1200/8480] ok=1199 kept=208.2MB 1.3 scenes/s eta 91min
484
+ [1225/8480] ok=1224 kept=213.1MB 1.3 scenes/s eta 91min
485
+ [1250/8480] ok=1249 kept=217.5MB 1.3 scenes/s eta 91min
486
+ [1275/8480] ok=1274 kept=222.3MB 1.3 scenes/s eta 90min
487
+ [1300/8480] ok=1299 kept=226.2MB 1.3 scenes/s eta 90min
488
+ [1325/8480] ok=1324 kept=230.9MB 1.3 scenes/s eta 89min
489
+ [1350/8480] ok=1349 kept=235.4MB 1.3 scenes/s eta 89min
490
+ [1375/8480] ok=1374 kept=239.6MB 1.3 scenes/s eta 89min
491
+ [1400/8480] ok=1399 kept=243.2MB 1.3 scenes/s eta 88min
492
+ [1425/8480] ok=1424 kept=247.0MB 1.3 scenes/s eta 88min
493
+ [1450/8480] ok=1449 kept=251.1MB 1.3 scenes/s eta 87min
494
+ [1475/8480] ok=1474 kept=256.2MB 1.3 scenes/s eta 87min
495
+ [1500/8480] ok=1499 kept=260.5MB 1.3 scenes/s eta 87min
496
+ [1525/8480] ok=1524 kept=264.8MB 1.3 scenes/s eta 86min
497
+ [1550/8480] ok=1549 kept=269.9MB 1.3 scenes/s eta 86min
498
+ [1575/8480] ok=1574 kept=275.0MB 1.3 scenes/s eta 86min
499
+ [1600/8480] ok=1599 kept=278.9MB 1.3 scenes/s eta 85min
500
+ [1625/8480] ok=1624 kept=282.9MB 1.3 scenes/s eta 85min
501
+ [1650/8480] ok=1649 kept=287.0MB 1.3 scenes/s eta 84min
502
+ [1675/8480] ok=1674 kept=292.0MB 1.3 scenes/s eta 84min
503
+ [1700/8480] ok=1699 kept=295.8MB 1.4 scenes/s eta 84min
504
+ [1725/8480] ok=1724 kept=299.7MB 1.4 scenes/s eta 83min
505
+ [1750/8480] ok=1749 kept=304.3MB 1.4 scenes/s eta 83min
506
+ [1775/8480] ok=1774 kept=309.4MB 1.4 scenes/s eta 82min
507
+ [1800/8480] ok=1799 kept=313.8MB 1.4 scenes/s eta 82min
508
+ [1825/8480] ok=1824 kept=318.0MB 1.4 scenes/s eta 82min
509
+ [1850/8480] ok=1849 kept=322.7MB 1.4 scenes/s eta 81min
510
+ [1875/8480] ok=1874 kept=327.3MB 1.4 scenes/s eta 81min
511
+ [1900/8480] ok=1899 kept=331.7MB 1.4 scenes/s eta 81min
512
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: f027a619-504e-4fa1-b368-5bc0ea2f8d94)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251219_172607_layout_9b3145ad.zip
513
+ Retrying in 1s [Retry 1/5].
514
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: a0b2ca33-8fa5-4082-ad3f-8811edc0beb8)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251219_172703_layout_09a5f30e.zip
515
+ Retrying in 1s [Retry 1/5].
516
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: 96bb092c-8ad5-4da1-abd1-90c40201ef7c)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251219_172407_layout_8d6373ce.zip
517
+ Retrying in 1s [Retry 1/5].
518
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: 26a98a3c-4ebf-488c-96fd-06f47202ca2e)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251219_171823_layout_99c1db4e.zip
519
+ Retrying in 1s [Retry 1/5].
520
+ [1925/8480] ok=1924 kept=336.2MB 1.3 scenes/s eta 81min
521
+ [1950/8480] ok=1949 kept=340.3MB 1.3 scenes/s eta 81min
522
+ [1975/8480] ok=1974 kept=344.7MB 1.3 scenes/s eta 81min
523
+ [2000/8480] ok=1999 kept=347.9MB 1.3 scenes/s eta 81min
524
+ [2025/8480] ok=2024 kept=351.9MB 1.3 scenes/s eta 80min
525
+ [2050/8480] ok=2049 kept=356.3MB 1.3 scenes/s eta 80min
526
+ [2075/8480] ok=2074 kept=360.9MB 1.3 scenes/s eta 80min
527
+ [2100/8480] ok=2099 kept=365.4MB 1.3 scenes/s eta 79min
528
+ [2125/8480] ok=2124 kept=370.1MB 1.3 scenes/s eta 79min
529
+ [2150/8480] ok=2149 kept=374.6MB 1.3 scenes/s eta 79min
530
+ [2175/8480] ok=2174 kept=379.0MB 1.3 scenes/s eta 78min
531
+ [2200/8480] ok=2199 kept=383.1MB 1.3 scenes/s eta 78min
532
+ [2225/8480] ok=2224 kept=387.7MB 1.3 scenes/s eta 78min
533
+ [2250/8480] ok=2249 kept=391.9MB 1.3 scenes/s eta 77min
534
+ [2275/8480] ok=2274 kept=396.2MB 1.3 scenes/s eta 77min
535
+ [2300/8480] ok=2299 kept=399.8MB 1.3 scenes/s eta 77min
536
+ [2325/8480] ok=2324 kept=403.5MB 1.3 scenes/s eta 76min
537
+ [2350/8480] ok=2349 kept=407.8MB 1.3 scenes/s eta 76min
538
+ [2375/8480] ok=2374 kept=412.5MB 1.3 scenes/s eta 76min
539
+ [2400/8480] ok=2399 kept=417.3MB 1.3 scenes/s eta 75min
540
+ [2425/8480] ok=2424 kept=421.9MB 1.3 scenes/s eta 75min
541
+ [2450/8480] ok=2449 kept=426.8MB 1.3 scenes/s eta 75min
542
+ [2475/8480] ok=2474 kept=431.4MB 1.3 scenes/s eta 75min
543
+ [2500/8480] ok=2499 kept=436.6MB 1.3 scenes/s eta 74min
544
+ [2525/8480] ok=2524 kept=442.0MB 1.3 scenes/s eta 74min
545
+ [2550/8480] ok=2549 kept=447.2MB 1.3 scenes/s eta 74min
546
+ [2575/8480] ok=2574 kept=451.0MB 1.3 scenes/s eta 73min
547
+ [2600/8480] ok=2599 kept=455.1MB 1.3 scenes/s eta 73min
548
+ [2625/8480] ok=2624 kept=459.4MB 1.3 scenes/s eta 73min
549
+ [2650/8480] ok=2649 kept=464.1MB 1.3 scenes/s eta 72min
550
+ [2675/8480] ok=2674 kept=468.7MB 1.3 scenes/s eta 72min
551
+ [2700/8480] ok=2699 kept=473.5MB 1.3 scenes/s eta 72min
552
+ [2725/8480] ok=2724 kept=478.1MB 1.3 scenes/s eta 71min
553
+ [2750/8480] ok=2749 kept=482.4MB 1.3 scenes/s eta 71min
554
+ [2775/8480] ok=2774 kept=486.7MB 1.3 scenes/s eta 71min
555
+ [2800/8480] ok=2799 kept=491.0MB 1.3 scenes/s eta 70min
556
+ [2825/8480] ok=2824 kept=495.3MB 1.3 scenes/s eta 70min
557
+ [2850/8480] ok=2849 kept=499.9MB 1.3 scenes/s eta 70min
558
+ [2875/8480] ok=2874 kept=504.6MB 1.3 scenes/s eta 69min
559
+ [2900/8480] ok=2899 kept=508.3MB 1.3 scenes/s eta 69min
560
+ [2925/8480] ok=2924 kept=512.6MB 1.3 scenes/s eta 69min
561
+ [2950/8480] ok=2949 kept=516.2MB 1.3 scenes/s eta 68min
562
+ [2975/8480] ok=2974 kept=520.1MB 1.3 scenes/s eta 68min
563
+ [3000/8480] ok=2999 kept=524.1MB 1.3 scenes/s eta 68min
564
+ [3025/8480] ok=3024 kept=528.2MB 1.3 scenes/s eta 67min
565
+ [3050/8480] ok=3049 kept=532.4MB 1.3 scenes/s eta 67min
566
+ [3075/8480] ok=3074 kept=536.4MB 1.3 scenes/s eta 67min
567
+ [3100/8480] ok=3099 kept=541.1MB 1.3 scenes/s eta 66min
568
+ [3125/8480] ok=3124 kept=545.3MB 1.3 scenes/s eta 66min
569
+ [3150/8480] ok=3149 kept=549.9MB 1.3 scenes/s eta 66min
570
+ [3175/8480] ok=3174 kept=554.0MB 1.4 scenes/s eta 65min
571
+ [3200/8480] ok=3199 kept=558.3MB 1.3 scenes/s eta 65min
572
+ [3225/8480] ok=3224 kept=563.0MB 1.4 scenes/s eta 65min
573
+ [3250/8480] ok=3249 kept=567.1MB 1.4 scenes/s eta 65min
574
+ [3275/8480] ok=3274 kept=571.1MB 1.4 scenes/s eta 64min
575
+ [3300/8480] ok=3299 kept=574.5MB 1.4 scenes/s eta 64min
576
+ [3325/8480] ok=3324 kept=578.0MB 1.4 scenes/s eta 64min
577
+ [3350/8480] ok=3349 kept=581.5MB 1.4 scenes/s eta 63min
578
+ [3375/8480] ok=3374 kept=584.7MB 1.4 scenes/s eta 63min
579
+ [3400/8480] ok=3399 kept=589.1MB 1.4 scenes/s eta 63min
580
+ [3425/8480] ok=3424 kept=593.3MB 1.4 scenes/s eta 62min
581
+ [3450/8480] ok=3449 kept=597.8MB 1.4 scenes/s eta 62min
582
+ [3475/8480] ok=3474 kept=602.5MB 1.4 scenes/s eta 62min
583
+ [3500/8480] ok=3499 kept=606.5MB 1.4 scenes/s eta 61min
584
+ [3525/8480] ok=3524 kept=611.1MB 1.4 scenes/s eta 61min
585
+ [3550/8480] ok=3549 kept=615.7MB 1.4 scenes/s eta 61min
586
+ [3575/8480] ok=3574 kept=619.8MB 1.4 scenes/s eta 60min
587
+ [3600/8480] ok=3599 kept=623.9MB 1.4 scenes/s eta 60min
588
+ [3625/8480] ok=3624 kept=627.8MB 1.4 scenes/s eta 60min
589
+ [3650/8480] ok=3649 kept=632.1MB 1.4 scenes/s eta 59min
590
+ [3675/8480] ok=3674 kept=635.7MB 1.4 scenes/s eta 59min
591
+ [3700/8480] ok=3699 kept=639.3MB 1.4 scenes/s eta 59min
592
+ [3725/8480] ok=3724 kept=643.1MB 1.4 scenes/s eta 58min
593
+ [3750/8480] ok=3749 kept=647.4MB 1.4 scenes/s eta 58min
594
+ [3775/8480] ok=3774 kept=652.1MB 1.4 scenes/s eta 58min
595
+ [3800/8480] ok=3799 kept=656.1MB 1.4 scenes/s eta 57min
596
+ [3825/8480] ok=3824 kept=660.8MB 1.4 scenes/s eta 57min
597
+ [3850/8480] ok=3849 kept=664.7MB 1.4 scenes/s eta 57min
598
+ [3875/8480] ok=3874 kept=669.0MB 1.4 scenes/s eta 56min
599
+ [3900/8480] ok=3899 kept=672.9MB 1.4 scenes/s eta 56min
600
+ [3925/8480] ok=3924 kept=677.3MB 1.4 scenes/s eta 56min
601
+ [3950/8480] ok=3949 kept=681.9MB 1.4 scenes/s eta 56min
602
+ [3975/8480] ok=3974 kept=686.1MB 1.4 scenes/s eta 55min
603
+ [4000/8480] ok=3999 kept=690.2MB 1.4 scenes/s eta 55min
604
+ [4025/8480] ok=4024 kept=695.0MB 1.4 scenes/s eta 55min
605
+ [4050/8480] ok=4049 kept=698.3MB 1.4 scenes/s eta 54min
606
+ [4075/8480] ok=4074 kept=702.1MB 1.4 scenes/s eta 54min
607
+ [4100/8480] ok=4099 kept=706.3MB 1.4 scenes/s eta 54min
608
+ [4125/8480] ok=4124 kept=710.6MB 1.4 scenes/s eta 53min
609
+ [4150/8480] ok=4149 kept=714.7MB 1.4 scenes/s eta 53min
610
+ [4175/8480] ok=4174 kept=718.6MB 1.4 scenes/s eta 53min
611
+ [4200/8480] ok=4199 kept=722.6MB 1.4 scenes/s eta 52min
612
+ [4225/8480] ok=4224 kept=726.7MB 1.4 scenes/s eta 52min
613
+ [4250/8480] ok=4249 kept=730.7MB 1.4 scenes/s eta 52min
614
+ [4275/8480] ok=4274 kept=735.3MB 1.4 scenes/s eta 52min
615
+ [4300/8480] ok=4299 kept=739.9MB 1.4 scenes/s eta 51min
616
+ [4325/8480] ok=4324 kept=743.9MB 1.4 scenes/s eta 51min
617
+ [4350/8480] ok=4349 kept=748.0MB 1.4 scenes/s eta 51min
618
+ [4375/8480] ok=4374 kept=752.5MB 1.4 scenes/s eta 50min
619
+ [4400/8480] ok=4399 kept=756.9MB 1.4 scenes/s eta 50min
620
+ [4425/8480] ok=4424 kept=760.2MB 1.4 scenes/s eta 50min
621
+ [4450/8480] ok=4449 kept=763.9MB 1.4 scenes/s eta 49min
622
+ [4475/8480] ok=4474 kept=768.3MB 1.4 scenes/s eta 49min
623
+ [4500/8480] ok=4499 kept=772.2MB 1.4 scenes/s eta 49min
624
+ 'HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out.' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_212822_layout_dcdb498c.zip
625
+ Retrying in 1s [Retry 1/5].
626
+ '(ReadTimeoutError("HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: 0f8073bc-7a96-4b2c-9cda-c8354916dfbf)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_212944_layout_23580bff.zip
627
+ Retrying in 1s [Retry 1/5].
628
+ 'HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out.' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_211611_layout_a6657781.zip
629
+ Retrying in 1s [Retry 1/5].
630
+ 'HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out.' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_210531_layout_47b26d56.zip
631
+ Retrying in 1s [Retry 1/5].
632
+ '(MaxRetryError('HTTPSConnectionPool(host=\'huggingface.co\', port=443): Max retries exceeded with url: /datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_212944_layout_23580bff.zip (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x10b6a0a50>: Failed to resolve \'huggingface.co\' ([Errno 8] nodename nor servname provided, or not known)"))'), '(Request ID: 5c5e5898-11ef-46b4-9c16-0dd9b7e0bd5e)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_212944_layout_23580bff.zip
633
+ Retrying in 2s [Retry 2/5].
634
+ '(MaxRetryError('HTTPSConnectionPool(host=\'huggingface.co\', port=443): Max retries exceeded with url: /datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_212944_layout_23580bff.zip (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x10b6a3750>: Failed to resolve \'huggingface.co\' ([Errno 8] nodename nor servname provided, or not known)"))'), '(Request ID: c18ef14d-b4aa-43d7-99ad-45dedf22ece9)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_212944_layout_23580bff.zip
635
+ Retrying in 4s [Retry 3/5].
636
+ '(ReadTimeoutError("HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: 0992dbae-9636-4ebf-b6f2-beab7e74d8d0)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_212822_layout_dcdb498c.zip
637
+ Retrying in 2s [Retry 2/5].
638
+ '(ReadTimeoutError("HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: 39fb672d-4783-4c04-b47d-096098ae89fa)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_210531_layout_47b26d56.zip
639
+ Retrying in 2s [Retry 2/5].
640
+ '(ReadTimeoutError("HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: 2676441b-12a1-4b57-b886-7b7737de7805)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_211611_layout_a6657781.zip
641
+ Retrying in 2s [Retry 2/5].
642
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: 5775ef3d-805b-441f-af0f-762e3f1ccece)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251226_212944_layout_23580bff.zip
643
+ Retrying in 8s [Retry 4/5].
644
+ [4525/8480] ok=4524 kept=776.5MB 1.3 scenes/s eta 49min
645
+ [4550/8480] ok=4549 kept=779.7MB 1.3 scenes/s eta 49min
646
+ [4575/8480] ok=4574 kept=784.3MB 1.3 scenes/s eta 48min
647
+ [4600/8480] ok=4599 kept=788.8MB 1.3 scenes/s eta 48min
648
+ [4625/8480] ok=4624 kept=792.5MB 1.4 scenes/s eta 48min
649
+ [4650/8480] ok=4649 kept=796.9MB 1.4 scenes/s eta 47min
650
+ [4675/8480] ok=4674 kept=800.8MB 1.4 scenes/s eta 47min
651
+ [4700/8480] ok=4699 kept=804.7MB 1.4 scenes/s eta 47min
652
+ [4725/8480] ok=4724 kept=809.3MB 1.4 scenes/s eta 46min
653
+ [4750/8480] ok=4749 kept=812.9MB 1.4 scenes/s eta 46min
654
+ [4775/8480] ok=4774 kept=817.4MB 1.4 scenes/s eta 46min
655
+ [4800/8480] ok=4799 kept=820.9MB 1.4 scenes/s eta 45min
656
+ [4825/8480] ok=4824 kept=823.4MB 1.4 scenes/s eta 45min
657
+ [4850/8480] ok=4849 kept=827.0MB 1.4 scenes/s eta 45min
658
+ [4875/8480] ok=4874 kept=830.8MB 1.4 scenes/s eta 44min
659
+ [4900/8480] ok=4899 kept=835.5MB 1.4 scenes/s eta 44min
660
+ '(ReadTimeoutError("HTTPSConnectionPool(host='huggingface.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: 855632f7-68ca-4b33-a5a3-4b5047991c42)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251229_003106_layout_27b0fa62.zip
661
+ Retrying in 1s [Retry 1/5].
662
+ '(ReadTimeoutError("HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out. (read timeout=10)"), '(Request ID: bb4a55a3-3beb-46aa-b247-7e6d5900a6a4)')' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251229_003218_layout_1d6ed619.zip
663
+ Retrying in 1s [Retry 1/5].
664
+ 'HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out.' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251229_002109_layout_8a5a6972.zip
665
+ Retrying in 1s [Retry 1/5].
666
+ 'HTTPSConnectionPool(host='us.aws.cdn.hf.co', port=443): Read timed out.' thrown while requesting GET https://huggingface.co/datasets/nvidia/SAGE-10k/resolve/main/scenes/20251229_001942_layout_3c0d9948.zip
667
+ Retrying in 1s [Retry 1/5].
668
+ [4925/8480] ok=4924 kept=840.1MB 1.3 scenes/s eta 44min
669
+ [4950/8480] ok=4949 kept=844.6MB 1.3 scenes/s eta 44min
670
+ [4975/8480] ok=4974 kept=848.7MB 1.3 scenes/s eta 43min
671
+ [5000/8480] ok=4999 kept=853.0MB 1.3 scenes/s eta 43min
672
+ [5025/8480] ok=5024 kept=857.1MB 1.3 scenes/s eta 43min
673
+ [5050/8480] ok=5049 kept=861.4MB 1.3 scenes/s eta 42min
674
+ [5075/8480] ok=5074 kept=866.0MB 1.3 scenes/s eta 42min
675
+ [5100/8480] ok=5099 kept=870.4MB 1.3 scenes/s eta 42min
676
+ [5125/8480] ok=5124 kept=875.3MB 1.3 scenes/s eta 41min
677
+ [5150/8480] ok=5149 kept=879.4MB 1.3 scenes/s eta 41min
678
+ [5175/8480] ok=5174 kept=882.2MB 1.3 scenes/s eta 41min
679
+ [5200/8480] ok=5199 kept=885.6MB 1.3 scenes/s eta 41min
680
+ [5225/8480] ok=5224 kept=888.9MB 1.3 scenes/s eta 40min
681
+ [5250/8480] ok=5249 kept=892.7MB 1.3 scenes/s eta 40min
682
+ [5275/8480] ok=5274 kept=897.2MB 1.3 scenes/s eta 40min
683
+ [5300/8480] ok=5299 kept=901.2MB 1.3 scenes/s eta 39min
684
+ [5325/8480] ok=5324 kept=905.6MB 1.3 scenes/s eta 39min
685
+ Listing nvidia/SAGE-10k/scenes ...
686
+ Traceback (most recent call last):
687
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/urllib3/connection.py", line 198, in _new_conn
688
+ sock = connection.create_connection(
689
+ (self._dns_host, self.port),
690
+ ...<2 lines>...
691
+ socket_options=self.socket_options,
692
+ )
693
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/urllib3/util/connection.py", line 60, in create_connection
694
+ for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
695
+ ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
696
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/socket.py", line 975, in getaddrinfo
697
+ for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
698
+ ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
699
+ socket.gaierror: [Errno 8] nodename nor servname provided, or not known
700
+
701
+ The above exception was the direct cause of the following exception:
702
+
703
+ Traceback (most recent call last):
704
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/urllib3/connectionpool.py", line 787, in urlopen
705
+ response = self._make_request(
706
+ conn,
707
+ ...<10 lines>...
708
+ **response_kw,
709
+ )
710
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/urllib3/connectionpool.py", line 488, in _make_request
711
+ raise new_e
712
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/urllib3/connectionpool.py", line 464, in _make_request
713
+ self._validate_conn(conn)
714
+ ~~~~~~~~~~~~~~~~~~~^^^^^^
715
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/urllib3/connectionpool.py", line 1093, in _validate_conn
716
+ conn.connect()
717
+ ~~~~~~~~~~~~^^
718
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/urllib3/connection.py", line 704, in connect
719
+ self.sock = sock = self._new_conn()
720
+ ~~~~~~~~~~~~~~^^
721
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/urllib3/connection.py", line 205, in _new_conn
722
+ raise NameResolutionError(self.host, self, e) from e
723
+ urllib3.exceptions.NameResolutionError: <urllib3.connection.HTTPSConnection object at 0x10af25be0>: Failed to resolve 'huggingface.co' ([Errno 8] nodename nor servname provided, or not known)
724
+
725
+ The above exception was the direct cause of the following exception:
726
+
727
+ Traceback (most recent call last):
728
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/requests/adapters.py", line 667, in send
729
+ resp = conn.urlopen(
730
+ method=request.method,
731
+ ...<9 lines>...
732
+ chunked=chunked,
733
+ )
734
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/urllib3/connectionpool.py", line 841, in urlopen
735
+ retries = retries.increment(
736
+ method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2]
737
+ )
738
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/urllib3/util/retry.py", line 519, in increment
739
+ raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type]
740
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
741
+ urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /api/datasets/nvidia/SAGE-10k/tree/main?recursive=True&expand=False (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x10af25be0>: Failed to resolve 'huggingface.co' ([Errno 8] nodename nor servname provided, or not known)"))
742
+
743
+ During handling of the above exception, another exception occurred:
744
+
745
+ Traceback (most recent call last):
746
+ File "/Users/slian/Desktop/3D/SAGE/download_json_only.py", line 252, in <module>
747
+ raise SystemExit(main())
748
+ ~~~~^^
749
+ File "/Users/slian/Desktop/3D/SAGE/download_json_only.py", line 197, in main
750
+ remote_zips = list_remote_zips()
751
+ File "/Users/slian/Desktop/3D/SAGE/download_json_only.py", line 86, in list_remote_zips
752
+ files = HfApi().list_repo_files(REPO_ID, repo_type="dataset")
753
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
754
+ return fn(*args, **kwargs)
755
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/huggingface_hub/hf_api.py", line 2923, in list_repo_files
756
+ for f in self.list_repo_tree(
757
+ ~~~~~~~~~~~~~~~~~~~^
758
+ repo_id=repo_id, recursive=True, revision=revision, repo_type=repo_type, token=token
759
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
760
+ )
761
+ ^
762
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/huggingface_hub/hf_api.py", line 3058, in list_repo_tree
763
+ for path_info in paginate(path=tree_url, headers=headers, params={"recursive": recursive, "expand": expand}):
764
+ ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
765
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/huggingface_hub/utils/_pagination.py", line 36, in paginate
766
+ r = session.get(path, params=params, headers=headers)
767
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/requests/sessions.py", line 602, in get
768
+ return self.request("GET", url, **kwargs)
769
+ ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
770
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/requests/sessions.py", line 589, in request
771
+ resp = self.send(prep, **send_kwargs)
772
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/requests/sessions.py", line 703, in send
773
+ r = adapter.send(request, **kwargs)
774
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/huggingface_hub/utils/_http.py", line 96, in send
775
+ return super().send(request, *args, **kwargs)
776
+ ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
777
+ File "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/requests/adapters.py", line 700, in send
778
+ raise ConnectionError(e, request=request)
779
+ requests.exceptions.ConnectionError: (MaxRetryError('HTTPSConnectionPool(host=\'huggingface.co\', port=443): Max retries exceeded with url: /api/datasets/nvidia/SAGE-10k/tree/main?recursive=True&expand=False (Caused by NameResolutionError("<urllib3.connection.HTTPSConnection object at 0x10af25be0>: Failed to resolve \'huggingface.co\' ([Errno 8] nodename nor servname provided, or not known)"))'), '(Request ID: 687dbc63-0b85-461b-8364-69e28765261a)')
SAGE10k/sage10k/kits/__pycache__/models.cpython-312.pyc ADDED
Binary file (4.4 kB). View file
 
SAGE10k/sage10k/kits/__pycache__/utils.cpython-312.pyc ADDED
Binary file (8.6 kB). View file
 
SAGE10k/sage10k/kits/examples.sh ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ python export_glb.py \
2
+ data/${scene_id}/${layout_id}.json \
3
+ vis/glb/
4
+
5
+ python camera_traj_gen.py \
6
+ data/${scene_id}/${layout_id}.json \
7
+ --output vis/renders/${scene_id}/${layout_id}.json \
8
+ --render \
9
+ --save_point_cloud
10
+
11
+ python export_usd.py \
12
+ data/${scene_id}/${layout_id}.json \
13
+ vis/usd/${layout_id}
14
+
15
+ python load_isaacsim_demo.py \
16
+ data/${scene_id}/${layout_id}.json
SAGE10k/sage10k/kits/export_glb.py ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import asyncio
2
+ import json
3
+ import sys
4
+ import os
5
+ import argparse
6
+ import numpy as np
7
+ from PIL import Image
8
+
9
+ # Add the server directory to the Python path to import from layout.py
10
+ server_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
11
+ sys.path.insert(0, server_dir)
12
+
13
+ # from tex_utils import export_layout_to_mesh_dict_list
14
+ from tex_utils_local import export_layout_to_mesh_dict_list_v2
15
+ from glb_utils import (
16
+ create_glb_scene,
17
+ add_textured_mesh_to_glb_scene,
18
+ save_glb_scene
19
+ )
20
+ from utils import (
21
+ dict_to_floor_plan,
22
+ )
23
+
24
+ def export_glb(layout_file_path: str, output_dir: str):
25
+ """Test loading layout from JSON file"""
26
+
27
+
28
+ with open(layout_file_path, 'r') as f:
29
+ layout_data = json.load(f)
30
+ current_layout = dict_to_floor_plan(layout_data)
31
+
32
+ export_glb_path = os.path.join(output_dir, os.path.basename(layout_file_path).replace(".json", ".glb"))
33
+ mesh_dict_list = export_layout_to_mesh_dict_list_v2(current_layout, os.path.dirname(layout_file_path))
34
+ scene = create_glb_scene()
35
+ for mesh_id, mesh_data in mesh_dict_list.items():
36
+ mesh_data_dict = {
37
+ 'vertices': mesh_data['mesh'].vertices,
38
+ 'faces': mesh_data['mesh'].faces,
39
+ 'vts': mesh_data['texture']['vts'],
40
+ 'fts': mesh_data['texture']['fts'],
41
+ 'texture_image': np.array(Image.open(mesh_data['texture']['texture_map_path'])),
42
+ 'metallic_factor': mesh_data['texture'].get('metallic_factor', 0.0),
43
+ 'roughness_factor': mesh_data['texture'].get('roughness_factor', 1.0)
44
+ }
45
+ add_textured_mesh_to_glb_scene(
46
+ mesh_data_dict,
47
+ scene,
48
+ material_name=f"material_{mesh_id}",
49
+ mesh_name=f"mesh_{mesh_id}",
50
+ preserve_coordinate_system=True,
51
+ )
52
+ save_glb_scene(export_glb_path, scene)
53
+ print(f"GLB exported to: {os.path.abspath(export_glb_path)}")
54
+
55
+
56
+
57
+ if __name__ == "__main__":
58
+ # Parse command-line arguments
59
+ parser = argparse.ArgumentParser(description="Export layout to GLB file")
60
+ parser.add_argument("layout_file_path", type=str, help="Layout file path")
61
+ parser.add_argument("output_dir", type=str, help="Output directory")
62
+ args = parser.parse_args()
63
+
64
+ # Run the test
65
+ export_glb(args.layout_file_path, args.output_dir)
SAGE10k/sage10k/kits/export_usd.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from isaacsim_utils import (
2
+ start_simulation_app,
3
+ get_room_layout_scene_usd_separate_from_layout
4
+ )
5
+ import argparse
6
+
7
+ if __name__ == "__main__":
8
+ parser = argparse.ArgumentParser(description="Export USD file")
9
+ parser.add_argument("layout_json_path", type=str, help="Layout JSON file path")
10
+ parser.add_argument("output_dir", type=str, help="Output directory")
11
+ args = parser.parse_args()
12
+
13
+ start_simulation_app()
14
+ result = get_room_layout_scene_usd_separate_from_layout(args.layout_json_path, args.output_dir)
15
+ if result["status"] == "success":
16
+ print(f"USD file exported to {args.output_dir}")
17
+ else:
18
+ print(f"Failed to export USD file: {result['message']}")
SAGE10k/sage10k/kits/glb_utils.py ADDED
@@ -0,0 +1,485 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import base64
3
+ import json
4
+ from PIL import Image
5
+ from pygltflib import (
6
+ GLTF2, Scene, Node, Mesh, Primitive, Attributes,
7
+ Buffer, BufferView, Accessor,
8
+ Image as GLTFImage, Texture, Sampler, Material, PbrMetallicRoughness,
9
+ FLOAT, UNSIGNED_INT, SCALAR, VEC2, VEC3, ARRAY_BUFFER, ELEMENT_ARRAY_BUFFER
10
+ )
11
+
12
+ # Global variable to store the current GLB scene
13
+ _current_scene = None
14
+
15
+ def create_glb_scene():
16
+ """
17
+ Create a new GLB scene with basic structure.
18
+
19
+ Returns:
20
+ GLTF2: A new GLTF2 object with basic scene structure
21
+ """
22
+ global _current_scene
23
+
24
+ # Create a new GLTF2 object
25
+ gltf = GLTF2()
26
+
27
+ # Set up basic asset info
28
+ gltf.asset = {"version": "2.0"}
29
+
30
+ # Initialize empty lists for all components
31
+ gltf.scenes = []
32
+ gltf.nodes = []
33
+ gltf.meshes = []
34
+ gltf.materials = []
35
+ gltf.textures = []
36
+ gltf.images = []
37
+ gltf.samplers = []
38
+ gltf.buffers = []
39
+ gltf.bufferViews = []
40
+ gltf.accessors = []
41
+
42
+ # Create a default scene
43
+ scene = Scene(nodes=[])
44
+ gltf.scenes.append(scene)
45
+ gltf.scene = 0 # Set the default scene
46
+
47
+ _current_scene = gltf
48
+ return gltf
49
+
50
+ def add_textured_mesh_to_glb_scene(textured_mesh_dict, scene=None, material_name="Material", mesh_name="Mesh", preserve_coordinate_system=True):
51
+ """
52
+ Add a textured mesh to the GLB scene.
53
+
54
+ Args:
55
+ textured_mesh_dict: {
56
+ 'vertices': numpy array of shape (n, 3)
57
+ 'faces': numpy array of shape (m, 3)
58
+ 'vts': numpy array of shape (n', 2)
59
+ 'fts': numpy array of shape (m, 3)
60
+ 'texture_image': numpy array of shape (h, w, 3), np.uint8, RGB
61
+ }
62
+ scene: GLTF2 object to add mesh to. If None, uses the global current scene.
63
+ material_name: Name for the material
64
+ mesh_name: Name for the mesh
65
+ preserve_coordinate_system: If True, preserves original coordinate system (Z-up).
66
+ If False, converts to glTF standard (Y-up).
67
+
68
+ Returns:
69
+ int: Index of the created mesh in the scene
70
+ """
71
+ global _current_scene
72
+
73
+ if scene is None:
74
+ scene = _current_scene
75
+
76
+ if scene is None:
77
+ raise ValueError("No scene available. Call create_glb_scene() first.")
78
+
79
+ vertices = textured_mesh_dict['vertices']
80
+ faces = textured_mesh_dict['faces']
81
+ vts = textured_mesh_dict['vts']
82
+ vts[:, 1] = 1.0 - vts[:, 1]
83
+ fts = textured_mesh_dict['fts']
84
+ texture_image = textured_mesh_dict['texture_image']
85
+
86
+ metallic_factor = textured_mesh_dict['metallic_factor']
87
+ roughness_factor = textured_mesh_dict['roughness_factor']
88
+
89
+ # Ensure data types are correct
90
+ vertices = vertices.astype(np.float32)
91
+ faces = faces.astype(np.uint32)
92
+ vts = vts.astype(np.float32)
93
+ fts = fts.astype(np.uint32)
94
+
95
+ # Preserve original coordinate system if requested
96
+ if preserve_coordinate_system:
97
+ # Keep vertices as-is (preserve Z-up coordinate system)
98
+ # Note: This preserves the original coordinate system instead of converting to glTF's Y-up standard
99
+ vertices_transformed = vertices.copy()
100
+ vertices_transformed[:, [1, 2]] = vertices[:, [2, 1]] # Swap Y and Z
101
+ vertices_transformed[:, 2] = -vertices_transformed[:, 2] # Flip new Z to maintain handedness
102
+ vertices = vertices_transformed
103
+ else:
104
+ # Convert to glTF standard Y-up coordinate system (Z-up -> Y-up)
105
+ pass
106
+
107
+ # Ensure texture image is in the right format
108
+ if texture_image.dtype != np.uint8:
109
+ texture_image = (texture_image * 255).astype(np.uint8)
110
+
111
+ # Validate that face indices are valid for vertices
112
+ if faces.max() >= len(vertices):
113
+ raise ValueError(f"Face indices exceed vertex count: max face index {faces.max()}, vertex count {len(vertices)}")
114
+
115
+ # Validate that texture face indices are valid for texture coordinates
116
+ if fts.max() >= len(vts):
117
+ raise ValueError(f"Texture face indices exceed texture coordinate count: max fts index {fts.max()}, vts count {len(vts)}")
118
+
119
+ # For GLB export, we need to create a unified mesh where each vertex has both position and texture coordinates
120
+ # This means we need to "expand" the vertex data to match the texture coordinate indexing
121
+
122
+ # Create expanded vertex array that matches texture coordinate indices
123
+ # Use the texture face indices (fts) to determine the correspondence
124
+ expanded_vertices = []
125
+ expanded_uvs = []
126
+ new_faces = []
127
+
128
+ vertex_map = {} # Map (vertex_idx, uv_idx) -> new_vertex_idx
129
+ next_vertex_idx = 0
130
+
131
+ for face_idx in range(len(faces)):
132
+ face = faces[face_idx]
133
+ tex_face = fts[face_idx]
134
+ new_face = []
135
+
136
+ for i in range(3): # Triangle vertices
137
+ vertex_idx = face[i]
138
+ uv_idx = tex_face[i]
139
+
140
+ # Create a unique key for this vertex-uv combination
141
+ key = (vertex_idx, uv_idx)
142
+
143
+ if key not in vertex_map:
144
+ # Add new expanded vertex
145
+ expanded_vertices.append(vertices[vertex_idx])
146
+ expanded_uvs.append(vts[uv_idx])
147
+ vertex_map[key] = next_vertex_idx
148
+ next_vertex_idx += 1
149
+
150
+ new_face.append(vertex_map[key])
151
+
152
+ new_faces.append(new_face)
153
+
154
+ # Convert to numpy arrays
155
+ expanded_vertices = np.array(expanded_vertices, dtype=np.float32)
156
+ expanded_uvs = np.array(expanded_uvs, dtype=np.float32)
157
+ new_faces = np.array(new_faces, dtype=np.uint32)
158
+
159
+ # Now use the expanded data for GLB export
160
+ vertices = expanded_vertices
161
+ vts = expanded_uvs
162
+ faces = new_faces
163
+
164
+ # Create buffer data
165
+ vertex_data = vertices.tobytes()
166
+ texcoord_data = vts.tobytes()
167
+ indices_data = faces.flatten().tobytes()
168
+
169
+ # Calculate buffer sizes
170
+ vertex_size = len(vertex_data)
171
+ texcoord_size = len(texcoord_data)
172
+ indices_size = len(indices_data)
173
+
174
+ # Align to 4-byte boundaries
175
+ def align_to_4(size):
176
+ return (size + 3) & ~3
177
+
178
+ vertex_aligned = align_to_4(vertex_size)
179
+ texcoord_aligned = align_to_4(texcoord_size)
180
+
181
+ # Create combined buffer
182
+ buffer_data = bytearray()
183
+ buffer_data.extend(vertex_data)
184
+ buffer_data.extend(b'\x00' * (vertex_aligned - vertex_size)) # Padding
185
+
186
+ texcoord_offset = len(buffer_data)
187
+ buffer_data.extend(texcoord_data)
188
+ buffer_data.extend(b'\x00' * (texcoord_aligned - texcoord_size)) # Padding
189
+
190
+ indices_offset = len(buffer_data)
191
+ buffer_data.extend(indices_data)
192
+
193
+ # Create buffer
194
+ buffer = Buffer(byteLength=len(buffer_data))
195
+ buffer_index = len(scene.buffers)
196
+ scene.buffers.append(buffer)
197
+
198
+ # Create buffer views
199
+ vertex_buffer_view = BufferView(
200
+ buffer=buffer_index,
201
+ byteOffset=0,
202
+ byteLength=vertex_size,
203
+ target=ARRAY_BUFFER
204
+ )
205
+ vertex_buffer_view_index = len(scene.bufferViews)
206
+ scene.bufferViews.append(vertex_buffer_view)
207
+
208
+ texcoord_buffer_view = BufferView(
209
+ buffer=buffer_index,
210
+ byteOffset=texcoord_offset,
211
+ byteLength=texcoord_size,
212
+ target=ARRAY_BUFFER
213
+ )
214
+ texcoord_buffer_view_index = len(scene.bufferViews)
215
+ scene.bufferViews.append(texcoord_buffer_view)
216
+
217
+ indices_buffer_view = BufferView(
218
+ buffer=buffer_index,
219
+ byteOffset=indices_offset,
220
+ byteLength=indices_size,
221
+ target=ELEMENT_ARRAY_BUFFER
222
+ )
223
+ indices_buffer_view_index = len(scene.bufferViews)
224
+ scene.bufferViews.append(indices_buffer_view)
225
+
226
+ # Create accessors
227
+ vertex_accessor = Accessor(
228
+ bufferView=vertex_buffer_view_index,
229
+ componentType=FLOAT,
230
+ count=len(vertices),
231
+ type=VEC3,
232
+ min=vertices.min(axis=0).tolist(),
233
+ max=vertices.max(axis=0).tolist()
234
+ )
235
+ vertex_accessor_index = len(scene.accessors)
236
+ scene.accessors.append(vertex_accessor)
237
+
238
+ texcoord_accessor = Accessor(
239
+ bufferView=texcoord_buffer_view_index,
240
+ componentType=FLOAT,
241
+ count=len(vts),
242
+ type=VEC2,
243
+ min=vts.min(axis=0).tolist(),
244
+ max=vts.max(axis=0).tolist()
245
+ )
246
+ texcoord_accessor_index = len(scene.accessors)
247
+ scene.accessors.append(texcoord_accessor)
248
+
249
+ indices_accessor = Accessor(
250
+ bufferView=indices_buffer_view_index,
251
+ componentType=UNSIGNED_INT,
252
+ count=len(faces.flatten()),
253
+ type=SCALAR
254
+ )
255
+ indices_accessor_index = len(scene.accessors)
256
+ scene.accessors.append(indices_accessor)
257
+
258
+ # Create texture
259
+ # Convert texture image to PIL Image
260
+ from io import BytesIO
261
+ pil_image = Image.fromarray(texture_image, 'RGB')
262
+ buffer_io = BytesIO()
263
+ pil_image.save(buffer_io, format='PNG')
264
+ image_data = buffer_io.getvalue()
265
+ image_base64 = base64.b64encode(image_data).decode('utf-8')
266
+ image_uri = f"data:image/png;base64,{image_base64}"
267
+
268
+ # Create image
269
+ gltf_image = GLTFImage(uri=image_uri)
270
+ image_index = len(scene.images)
271
+ scene.images.append(gltf_image)
272
+
273
+ # Create sampler
274
+ sampler = Sampler()
275
+ sampler_index = len(scene.samplers)
276
+ scene.samplers.append(sampler)
277
+
278
+ # Create texture
279
+ texture = Texture(source=image_index, sampler=sampler_index)
280
+ texture_index = len(scene.textures)
281
+ scene.textures.append(texture)
282
+
283
+ # Create material
284
+ pbr_metallic_roughness = PbrMetallicRoughness(
285
+ baseColorTexture={"index": texture_index},
286
+ metallicFactor=metallic_factor,
287
+ roughnessFactor=roughness_factor
288
+ )
289
+ material = Material(
290
+ name=material_name,
291
+ pbrMetallicRoughness=pbr_metallic_roughness
292
+ )
293
+ material_index = len(scene.materials)
294
+ scene.materials.append(material)
295
+
296
+ # Create primitive
297
+ primitive = Primitive(
298
+ attributes=Attributes(
299
+ POSITION=vertex_accessor_index,
300
+ TEXCOORD_0=texcoord_accessor_index
301
+ ),
302
+ indices=indices_accessor_index,
303
+ material=material_index
304
+ )
305
+
306
+ # Create mesh
307
+ mesh = Mesh(name=mesh_name, primitives=[primitive])
308
+ mesh_index = len(scene.meshes)
309
+ scene.meshes.append(mesh)
310
+
311
+ # Create node
312
+ node = Node(mesh=mesh_index)
313
+ node_index = len(scene.nodes)
314
+ scene.nodes.append(node)
315
+
316
+ # Add node to the scene
317
+ scene.scenes[0].nodes.append(node_index)
318
+
319
+ # Store buffer data for later saving
320
+ if not hasattr(scene, '_buffer_data'):
321
+ scene._buffer_data = {}
322
+ scene._buffer_data[buffer_index] = buffer_data
323
+
324
+ return mesh_index
325
+
326
+ def save_glb_scene(save_path, scene=None):
327
+ """
328
+ Save the GLB scene to a file.
329
+
330
+ Args:
331
+ save_path: Path where to save the GLB file
332
+ scene: GLTF2 object to save. If None, uses the global current scene.
333
+ """
334
+ global _current_scene
335
+
336
+ if scene is None:
337
+ scene = _current_scene
338
+
339
+ if scene is None:
340
+ raise ValueError("No scene available. Call create_glb_scene() first.")
341
+
342
+ # Consolidate all buffer data into a single buffer for GLB format
343
+ if hasattr(scene, '_buffer_data') and scene._buffer_data:
344
+ # Calculate total size and create unified buffer
345
+ total_size = 0
346
+ buffer_info = []
347
+
348
+ for i, buffer_data in scene._buffer_data.items():
349
+ if i < len(scene.buffers):
350
+ # Align to 4-byte boundaries
351
+ aligned_size = (len(buffer_data) + 3) & ~3
352
+ buffer_info.append((i, total_size, len(buffer_data), aligned_size, buffer_data))
353
+ total_size += aligned_size
354
+
355
+ # Create unified buffer
356
+ unified_buffer = bytearray(total_size)
357
+
358
+ # Copy buffer data and update buffer views
359
+ for buffer_idx, offset, original_size, aligned_size, buffer_data in buffer_info:
360
+ # Copy data to unified buffer
361
+ unified_buffer[offset:offset + original_size] = buffer_data
362
+ # Pad with zeros if needed
363
+ if aligned_size > original_size:
364
+ unified_buffer[offset + original_size:offset + aligned_size] = b'\x00' * (aligned_size - original_size)
365
+
366
+ # Update buffer views that reference this buffer
367
+ for bv in scene.bufferViews:
368
+ if bv.buffer == buffer_idx:
369
+ bv.byteOffset += offset
370
+ bv.buffer = 0 # All buffers now reference the unified buffer
371
+
372
+ # Replace all buffers with a single unified buffer
373
+ scene.buffers = [Buffer(byteLength=total_size)]
374
+
375
+ # Set the unified buffer data
376
+ scene.set_binary_blob(unified_buffer)
377
+
378
+ # Save the file
379
+ scene.save(save_path)
380
+
381
+
382
+
383
+
384
+ def save_glb_from_mesh_dict(mesh_dict, save_path):
385
+ """
386
+ save a glb file from a mesh dict
387
+ mesh_dict: {
388
+ 'vertices': numpy array of shape (n, 3)
389
+ 'faces': numpy array of shape (m, 3)
390
+ 'vts': numpy array of shape (n', 2)
391
+ 'fts': numpy array of shape (m, 3)
392
+ 'texture_image': numpy array of shape (h, w, 3), np.uint8, RGB
393
+ }
394
+ save_path: path to save the glb file
395
+ """
396
+ scene = create_glb_scene()
397
+ add_textured_mesh_to_glb_scene(mesh_dict, scene=scene)
398
+ save_glb_scene(save_path, scene=scene)
399
+
400
+ def load_glb_to_mesh_dict(glb_path):
401
+ """
402
+ load a glb file to a mesh dict
403
+ glb_path: path to the glb file
404
+ return: mesh dict: {
405
+ 'vertices': numpy array of shape (n, 3)
406
+ 'faces': numpy array of shape (m, 3)
407
+ 'vts': numpy array of shape (n', 2)
408
+ 'fts': numpy array of shape (m, 3)
409
+ 'texture_image': numpy array of shape (h, w, 3), np.uint8, RGB
410
+ }
411
+ """
412
+ from io import BytesIO
413
+
414
+ # Load the GLB file
415
+ gltf = GLTF2.load(glb_path)
416
+ binary_blob = gltf.binary_blob()
417
+
418
+ # Get the first mesh (assuming single mesh saved by save_glb_from_mesh_dict)
419
+ mesh = gltf.meshes[0]
420
+ primitive = mesh.primitives[0]
421
+
422
+ # Extract vertices from POSITION accessor
423
+ position_accessor = gltf.accessors[primitive.attributes.POSITION]
424
+ position_buffer_view = gltf.bufferViews[position_accessor.bufferView]
425
+ position_offset = position_buffer_view.byteOffset + (position_accessor.byteOffset or 0)
426
+ position_data = binary_blob[position_offset:position_offset + position_buffer_view.byteLength]
427
+ vertices = np.frombuffer(position_data, dtype=np.float32).reshape(-1, 3).copy()
428
+
429
+ # Reverse coordinate transformation (was: swap Y/Z, then flip Z)
430
+ # To reverse: flip Z, then swap Y/Z back
431
+ vertices[:, 2] = -vertices[:, 2] # Flip Z back
432
+ vertices[:, [1, 2]] = vertices[:, [2, 1]] # Swap Y and Z back
433
+
434
+ # Extract texture coordinates from TEXCOORD_0 accessor
435
+ texcoord_accessor = gltf.accessors[primitive.attributes.TEXCOORD_0]
436
+ texcoord_buffer_view = gltf.bufferViews[texcoord_accessor.bufferView]
437
+ texcoord_offset = texcoord_buffer_view.byteOffset + (texcoord_accessor.byteOffset or 0)
438
+ texcoord_data = binary_blob[texcoord_offset:texcoord_offset + texcoord_buffer_view.byteLength]
439
+ vts = np.frombuffer(texcoord_data, dtype=np.float32).reshape(-1, 2).copy()
440
+
441
+ # Reverse UV flip (was: vts[:, 1] = 1.0 - vts[:, 1])
442
+ vts[:, 1] = 1.0 - vts[:, 1]
443
+
444
+ # Extract face indices from indices accessor
445
+ indices_accessor = gltf.accessors[primitive.indices]
446
+ indices_buffer_view = gltf.bufferViews[indices_accessor.bufferView]
447
+ indices_offset = indices_buffer_view.byteOffset + (indices_accessor.byteOffset or 0)
448
+ indices_data = binary_blob[indices_offset:indices_offset + indices_buffer_view.byteLength]
449
+ faces = np.frombuffer(indices_data, dtype=np.uint32).reshape(-1, 3).copy()
450
+
451
+ # Since save_glb_from_mesh_dict expands vertices to match UVs 1:1,
452
+ # faces and fts are the same
453
+ fts = faces.copy()
454
+
455
+ # Extract texture image
456
+ material = gltf.materials[primitive.material]
457
+ texture_index = material.pbrMetallicRoughness.baseColorTexture['index']
458
+ texture = gltf.textures[texture_index]
459
+ image = gltf.images[texture.source]
460
+
461
+ if image.uri and image.uri.startswith('data:'):
462
+ # Base64-encoded image in URI
463
+ # Format: data:image/png;base64,<base64_data>
464
+ base64_data = image.uri.split(',', 1)[1]
465
+ image_bytes = base64.b64decode(base64_data)
466
+ elif image.bufferView is not None:
467
+ # Image stored in buffer view
468
+ image_buffer_view = gltf.bufferViews[image.bufferView]
469
+ image_offset = image_buffer_view.byteOffset
470
+ image_bytes = binary_blob[image_offset:image_offset + image_buffer_view.byteLength]
471
+ else:
472
+ raise ValueError("Could not find texture image data")
473
+
474
+ # Decode image
475
+ pil_image = Image.open(BytesIO(image_bytes))
476
+ texture_image = np.array(pil_image.convert('RGB'), dtype=np.uint8)
477
+
478
+ return {
479
+ 'vertices': vertices,
480
+ 'faces': faces,
481
+ 'vts': vts,
482
+ 'fts': fts,
483
+ 'texture_image': texture_image
484
+ }
485
+
SAGE10k/sage10k/kits/isaacsim_utils.py ADDED
@@ -0,0 +1,1146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import numpy as np
2
+ import trimesh
3
+ import sys
4
+ import json
5
+ import os
6
+ from isaacsim import SimulationApp
7
+ simulation_app = None
8
+
9
+ def start_simulation_app():
10
+
11
+ global simulation_app
12
+ simulation_app = SimulationApp({"headless": True})
13
+ print("Starting simulation app...")
14
+
15
+
16
+ from tex_utils_local import (
17
+ dict_to_floor_plan,
18
+ export_layout_to_mesh_dict_list_v2,
19
+ export_layout_to_mesh_dict_list_no_object_transform_v2
20
+ )
21
+
22
+ def AddTranslate(top, offset):
23
+ top.AddTranslateOp().Set(value=offset)
24
+
25
+ def convert_mesh_to_usd(stage, usd_internal_path, verts, faces, collision_approximation, static, articulation,
26
+ physics_iter=(16, 1), mass=None, apply_debug_torque=False, debug_torque_value=50.0,
27
+ texture=None, usd_internal_art_reference_path="/World",
28
+ add_damping=False):
29
+ from pxr import Gf, Usd, UsdGeom, Vt, UsdPhysics, PhysxSchema, UsdUtils, Sdf, UsdShade
30
+ n_verts = verts.shape[0]
31
+ n_faces = faces.shape[0]
32
+
33
+ points = verts
34
+
35
+ # bbox_max = np.max(points, axis=0)
36
+ # bbox_min = np.min(points, axis=0)
37
+ # center = (bbox_max + bbox_min) / 2
38
+ # points = points - center
39
+ # center = (center[0], center[1], center[2])
40
+
41
+ vertex_counts = np.ones(n_faces).astype(np.int32) * 3
42
+
43
+ mesh = UsdGeom.Mesh.Define(stage, usd_internal_path)
44
+
45
+ mesh.CreatePointsAttr(Vt.Vec3fArray.FromNumpy(points))
46
+ # mesh.CreateDisplayColorPrimvar("vertex")
47
+ mesh.CreateFaceVertexCountsAttr(Vt.IntArray.FromNumpy(vertex_counts))
48
+ mesh.CreateFaceVertexIndicesAttr(Vt.IntArray.FromNumpy(faces))
49
+ mesh.CreateExtentAttr([(-100, -100, -100), (100, 100, 100)])
50
+
51
+ # tilt = mesh.AddRotateXOp(opSuffix='tilt')
52
+ # tilt.Set(value=-90)
53
+ # AddTranslate(mesh, center)
54
+
55
+ prim = stage.GetPrimAtPath(usd_internal_path)
56
+
57
+ if texture is not None:
58
+ vts = texture["vts"]
59
+ fts = texture["fts"]
60
+ texture_map_path = texture["texture_map_path"]
61
+ tex_coords = vts[fts.reshape(-1)].reshape(-1, 2)
62
+
63
+ texCoords = UsdGeom.PrimvarsAPI(mesh).CreatePrimvar("st",
64
+ Sdf.ValueTypeNames.TexCoord2fArray,
65
+ UsdGeom.Tokens.faceVarying)
66
+ texCoords.Set(Vt.Vec2fArray.FromNumpy(tex_coords))
67
+
68
+ usd_mat_path = usd_internal_path+"_mat"
69
+ material = UsdShade.Material.Define(stage, usd_mat_path)
70
+ stInput = material.CreateInput('frame:stPrimvarName', Sdf.ValueTypeNames.Token)
71
+ stInput.Set('st')
72
+
73
+ pbrShader = UsdShade.Shader.Define(stage, f"{usd_mat_path}/PBRShader")
74
+ pbrShader.CreateIdAttr("UsdPreviewSurface")
75
+ if "pbr_parameters" in texture:
76
+ pbr_parameters = texture["pbr_parameters"]
77
+ roughness = pbr_parameters.get("roughness", 1.0)
78
+ metallic = pbr_parameters.get("metallic", 0.0)
79
+ else:
80
+ roughness = 1.0
81
+ metallic = 0.0
82
+ pbrShader.CreateInput("roughness", Sdf.ValueTypeNames.Float).Set(roughness)
83
+ pbrShader.CreateInput("metallic", Sdf.ValueTypeNames.Float).Set(metallic)
84
+ pbrShader.CreateInput('useSpecularWorkflow', Sdf.ValueTypeNames.Bool).Set(True)
85
+
86
+ material.CreateSurfaceOutput().ConnectToSource(pbrShader.ConnectableAPI(), "surface")
87
+
88
+ # create texture coordinate reader
89
+ stReader = UsdShade.Shader.Define(stage, f"{usd_mat_path}/stReader")
90
+ stReader.CreateIdAttr('UsdPrimvarReader_float2')
91
+ # Note here we are connecting the shader's input to the material's
92
+ # "public interface" attribute. This allows users to change the primvar name
93
+ # on the material itself without drilling inside to examine shader nodes.
94
+ stReader.CreateInput('varname',Sdf.ValueTypeNames.Token).ConnectToSource(stInput)
95
+
96
+ # diffuse texture
97
+ diffuseTextureSampler = UsdShade.Shader.Define(stage, f"{usd_mat_path}/diffuseTexture")
98
+ diffuseTextureSampler.CreateIdAttr('UsdUVTexture')
99
+ diffuseTextureSampler.CreateInput('file', Sdf.ValueTypeNames.Asset).Set(texture_map_path)
100
+ diffuseTextureSampler.CreateInput("st", Sdf.ValueTypeNames.Float2).ConnectToSource(stReader.ConnectableAPI(), 'result')
101
+ diffuseTextureSampler.CreateOutput('rgb', Sdf.ValueTypeNames.Float3)
102
+ pbrShader.CreateInput("diffuseColor", Sdf.ValueTypeNames.Color3f).ConnectToSource(diffuseTextureSampler.ConnectableAPI(), 'rgb')
103
+
104
+ # Now bind the Material to the card
105
+ mesh.GetPrim().ApplyAPI(UsdShade.MaterialBindingAPI)
106
+ UsdShade.MaterialBindingAPI(mesh).Bind(material)
107
+
108
+
109
+ physx_rigid_body = PhysxSchema.PhysxRigidBodyAPI.Apply(prim)
110
+ if not static:
111
+ mass_api = UsdPhysics.MassAPI.Apply(prim)
112
+ if mass is not None:
113
+ mass_api.CreateMassAttr(mass)
114
+ rigid_api = UsdPhysics.RigidBodyAPI.Apply(prim)
115
+ ps_rigid_api = PhysxSchema.PhysxRigidBodyAPI.Apply(prim)
116
+ physx_rigid_body.CreateSolverPositionIterationCountAttr(physics_iter[0])
117
+ physx_rigid_body.CreateSolverVelocityIterationCountAttr(physics_iter[1])
118
+
119
+ if articulation is not None:
120
+ articulation_api = UsdPhysics.ArticulationRootAPI.Apply(prim)
121
+ # Add revolute joint articulation
122
+ rotate_axis_point_lower, rotate_axis_point_upper = articulation
123
+
124
+ # Calculate the rotation axis vector
125
+ axis_vector = np.array(rotate_axis_point_upper) - np.array(rotate_axis_point_lower)
126
+ axis_vector = axis_vector / np.linalg.norm(axis_vector) # Normalize
127
+ # Create a revolute joint
128
+ joint_path = usd_internal_path + "_joint"
129
+ joint = UsdPhysics.RevoluteJoint.Define(stage, joint_path)
130
+ # Set the joint axis (in local space)
131
+ joint.CreateAxisAttr("Z") # Default to Z-axis, we'll transform to match our axis
132
+ # Set the joint bodies - this connects the joint to the rigid body
133
+ joint.CreateBody0Rel().SetTargets([usd_internal_path])
134
+ joint.CreateBody1Rel().SetTargets([usd_internal_art_reference_path])
135
+ # For a single body joint (attached to world), we don't set body1
136
+ # Create joint position (midpoint of the axis)
137
+ joint_pos = (np.array(rotate_axis_point_lower) + np.array(rotate_axis_point_upper)) / 2
138
+ # Apply transform to position the joint at the rotation axis
139
+ joint_prim = stage.GetPrimAtPath(joint_path)
140
+ joint_xform = UsdGeom.Xformable(joint_prim)
141
+ # Set the joint position using physics:localPos0 and physics:localPos1
142
+ # These define the connection points on each body
143
+ joint.CreateLocalPos0Attr(Gf.Vec3f(joint_pos[0], joint_pos[1], joint_pos[2]))
144
+ joint.CreateLocalPos1Attr(Gf.Vec3f(joint_pos[0], joint_pos[1], joint_pos[2]))
145
+
146
+ # # Also set the transform position for visualization/debugging
147
+ # translate_op = joint_xform.AddTranslateOp()
148
+ # translate_op.Set(Gf.Vec3f(joint_pos[0], joint_pos[1], joint_pos[2]))
149
+ # If the rotation axis is not along Z, we need to rotate the joint
150
+ if not np.allclose(axis_vector, [0, 0, 1]):
151
+ # Calculate rotation to align Z-axis with our desired axis
152
+ z_axis = np.array([0, 0, 1])
153
+ # Use cross product to find rotation axis
154
+ rotation_axis = np.cross(z_axis, axis_vector)
155
+ if np.linalg.norm(rotation_axis) > 1e-6: # Not parallel
156
+ rotation_axis = rotation_axis / np.linalg.norm(rotation_axis)
157
+ # Calculate angle between vectors
158
+ angle = np.arccos(np.clip(np.dot(z_axis, axis_vector), -1.0, 1.0))
159
+ # Convert to degrees
160
+ angle_degrees = np.degrees(angle)
161
+
162
+ # Create rotation quaternion
163
+ sin_half = np.sin(angle / 2)
164
+ cos_half = np.cos(angle / 2)
165
+ quat = Gf.Quatf(cos_half, sin_half * rotation_axis[0],
166
+ sin_half * rotation_axis[1], sin_half * rotation_axis[2])
167
+
168
+ # Apply rotation using physics:localRot0 and physics:localRot1
169
+ joint.CreateLocalRot0Attr(quat)
170
+ joint.CreateLocalRot1Attr(quat)
171
+ # Optional: Set joint limits if needed
172
+ # joint.CreateLowerLimitAttr(-180.0) # -180 degrees
173
+ # joint.CreateUpperLimitAttr(180.0) # +180 degrees
174
+
175
+ # Apply debug torque if requested (for testing joint functionality)
176
+ if apply_debug_torque:
177
+ print(f"Applying debug torque: {debug_torque_value}")
178
+ # Apply DriveAPI to the joint
179
+ drive_api = UsdPhysics.DriveAPI.Apply(joint_prim, "angular")
180
+ # Set drive type to velocity control
181
+ drive_api.CreateTypeAttr("force")
182
+ # Set target velocity to make the joint rotate
183
+ drive_api.CreateTargetVelocityAttr(debug_torque_value) # degrees per second
184
+ # Set drive stiffness and damping
185
+ drive_api.CreateStiffnessAttr(0.0) # No position control
186
+ drive_api.CreateDampingAttr(1e4) # High damping for velocity control
187
+ # Set max force
188
+ drive_api.CreateMaxForceAttr(1000.0) # Maximum force for the drive
189
+ print("Debug torque applied - joint should rotate")
190
+
191
+ # Apply PhysX-specific joint properties for better simulation
192
+ physx_joint = PhysxSchema.PhysxJointAPI.Apply(joint_prim)
193
+ # Note: Break force/torque attributes may not be available for all joint types
194
+ # physx_joint.CreateBreakForceAttr(1e10) # Very large value - effectively never break
195
+ # physx_joint.CreateBreakTorqueAttr(1e10) # Very large value - effectively never break
196
+ UsdPhysics.CollisionAPI.Apply(prim)
197
+ ps_collision_api = PhysxSchema.PhysxCollisionAPI.Apply(prim)
198
+ ps_collision_api.CreateContactOffsetAttr(0.005)
199
+ ps_collision_api.CreateRestOffsetAttr(0.001)
200
+ ps_collision_api.CreateTorsionalPatchRadiusAttr(0.01)
201
+
202
+ physx_rigid_body.CreateLinearDampingAttr(10.0)
203
+ physx_rigid_body.CreateAngularDampingAttr(10.0)
204
+
205
+ physx_rigid_body.CreateMaxLinearVelocityAttr(0.5)
206
+ physx_rigid_body.CreateMaxAngularVelocityAttr(0.5)
207
+ physx_rigid_body.CreateMaxDepenetrationVelocityAttr(50.0)
208
+
209
+ # physxSceneAPI = PhysxSchema.PhysxSceneAPI.Apply(prim)
210
+ # physxSceneAPI.CreateGpuTempBufferCapacityAttr(16 * 1024 * 1024 * 2)
211
+ # physxSceneAPI.CreateGpuHeapCapacityAttr(64 * 1024 * 1024 * 2)
212
+
213
+ if collision_approximation == "sdf":
214
+ physx_sdf = PhysxSchema.PhysxSDFMeshCollisionAPI.Apply(prim)
215
+ physx_sdf.CreateSdfResolutionAttr(256)
216
+ collider = UsdPhysics.MeshCollisionAPI.Apply(prim)
217
+ collider.CreateApproximationAttr("sdf")
218
+ elif collision_approximation == "convexDecomposition":
219
+ convexdecomp = PhysxSchema.PhysxConvexDecompositionCollisionAPI.Apply(prim)
220
+ collider = UsdPhysics.MeshCollisionAPI.Apply(prim)
221
+ collider.CreateApproximationAttr("convexDecomposition")
222
+
223
+ mat = UsdPhysics.MaterialAPI.Apply(prim)
224
+ mat.CreateDynamicFrictionAttr(1e20)
225
+ mat.CreateStaticFrictionAttr(1e20)
226
+ # mat.CreateDynamicFrictionAttr(2.0) # Increased from 0.4 for better grasping
227
+ # mat.CreateStaticFrictionAttr(2.0) # Increased from 0.4 for better grasping
228
+
229
+ return stage
230
+
231
+
232
+ def door_frame_to_usd(
233
+ stage,
234
+ usd_internal_path_door,
235
+ usd_internal_path_door_frame,
236
+ mesh_obj_door,
237
+ mesh_obj_door_frame,
238
+ articulation_door,
239
+ texture_door,
240
+ texture_door_frame,
241
+ apply_debug_torque=False,
242
+ debug_torque_value=50.0
243
+ ):
244
+ """
245
+ Create door and door frame USD objects with a revolute joint between them.
246
+
247
+ Args:
248
+ stage: USD stage
249
+ usd_internal_path_door: USD path for the door
250
+ usd_internal_path_door_frame: USD path for the door frame
251
+ mesh_obj_door: Trimesh object for the door
252
+ mesh_obj_door_frame: Trimesh object for the door frame
253
+ articulation_door: Tuple of (rotate_axis_point_lower, rotate_axis_point_upper) in world coordinates
254
+ texture_door: Texture info for door (can be None)
255
+ texture_door_frame: Texture info for door frame (can be None)
256
+ apply_debug_torque: Whether to apply debug torque for testing joint functionality
257
+ debug_torque_value: Target velocity for debug torque (degrees per second)
258
+ """
259
+ from pxr import Gf, Usd, UsdGeom, Vt, UsdPhysics, PhysxSchema, UsdUtils, Sdf, UsdShade
260
+
261
+ # Extract vertices and faces from mesh objects
262
+ door_verts = np.array(mesh_obj_door.vertices)
263
+ door_faces = np.array(mesh_obj_door.faces)
264
+ frame_verts = np.array(mesh_obj_door_frame.vertices)
265
+ frame_faces = np.array(mesh_obj_door_frame.faces)
266
+
267
+ # Create the door frame first (this will be the static parent)
268
+ # Door frame is static and acts as the base for the joint
269
+ n_frame_verts = frame_verts.shape[0]
270
+ n_frame_faces = frame_faces.shape[0]
271
+ frame_vertex_counts = np.ones(n_frame_faces).astype(np.int32) * 3
272
+
273
+ # Create door frame mesh
274
+ frame_mesh = UsdGeom.Mesh.Define(stage, usd_internal_path_door_frame)
275
+ frame_mesh.CreatePointsAttr(Vt.Vec3fArray.FromNumpy(frame_verts))
276
+ frame_mesh.CreateFaceVertexCountsAttr(Vt.IntArray.FromNumpy(frame_vertex_counts))
277
+ frame_mesh.CreateFaceVertexIndicesAttr(Vt.IntArray.FromNumpy(frame_faces))
278
+ frame_mesh.CreateExtentAttr([(-100, -100, -100), (100, 100, 100)])
279
+
280
+ frame_prim = stage.GetPrimAtPath(usd_internal_path_door_frame)
281
+
282
+ # Apply texture to door frame if provided
283
+ if texture_door_frame is not None:
284
+ vts = texture_door_frame["vts"]
285
+ fts = texture_door_frame["fts"]
286
+ texture_map_path = texture_door_frame["texture_map_path"]
287
+ tex_coords = vts[fts.reshape(-1)].reshape(-1, 2)
288
+
289
+ texCoords = UsdGeom.PrimvarsAPI(frame_mesh).CreatePrimvar("st",
290
+ Sdf.ValueTypeNames.TexCoord2fArray,
291
+ UsdGeom.Tokens.faceVarying)
292
+ texCoords.Set(Vt.Vec2fArray.FromNumpy(tex_coords))
293
+
294
+ usd_mat_path = usd_internal_path_door_frame + "_mat"
295
+ material = UsdShade.Material.Define(stage, usd_mat_path)
296
+ stInput = material.CreateInput('frame:stPrimvarName', Sdf.ValueTypeNames.Token)
297
+ stInput.Set('st')
298
+
299
+ pbrShader = UsdShade.Shader.Define(stage, f"{usd_mat_path}/PBRShader")
300
+ pbrShader.CreateIdAttr("UsdPreviewSurface")
301
+ pbrShader.CreateInput("roughness", Sdf.ValueTypeNames.Float).Set(1.0)
302
+ pbrShader.CreateInput("metallic", Sdf.ValueTypeNames.Float).Set(0.0)
303
+ pbrShader.CreateInput('useSpecularWorkflow', Sdf.ValueTypeNames.Bool).Set(True)
304
+
305
+ material.CreateSurfaceOutput().ConnectToSource(pbrShader.ConnectableAPI(), "surface")
306
+
307
+ # create texture coordinate reader
308
+ stReader = UsdShade.Shader.Define(stage, f"{usd_mat_path}/stReader")
309
+ stReader.CreateIdAttr('UsdPrimvarReader_float2')
310
+ stReader.CreateInput('varname',Sdf.ValueTypeNames.Token).ConnectToSource(stInput)
311
+
312
+ # diffuse texture
313
+ diffuseTextureSampler = UsdShade.Shader.Define(stage, f"{usd_mat_path}/diffuseTexture")
314
+ diffuseTextureSampler.CreateIdAttr('UsdUVTexture')
315
+ diffuseTextureSampler.CreateInput('file', Sdf.ValueTypeNames.Asset).Set(texture_map_path)
316
+ diffuseTextureSampler.CreateInput("st", Sdf.ValueTypeNames.Float2).ConnectToSource(stReader.ConnectableAPI(), 'result')
317
+ diffuseTextureSampler.CreateOutput('rgb', Sdf.ValueTypeNames.Float3)
318
+ pbrShader.CreateInput("diffuseColor", Sdf.ValueTypeNames.Color3f).ConnectToSource(diffuseTextureSampler.ConnectableAPI(), 'rgb')
319
+
320
+ # Bind material to door frame
321
+ frame_mesh.GetPrim().ApplyAPI(UsdShade.MaterialBindingAPI)
322
+ UsdShade.MaterialBindingAPI(frame_mesh).Bind(material)
323
+
324
+ # Set up door frame physics (static)
325
+ # UsdPhysics.CollisionAPI.Apply(frame_prim)
326
+ # UsdPhysics.RigidBodyAPI.Apply(frame_prim)
327
+
328
+ # Apply physics material to door frame
329
+ frame_mat = UsdPhysics.MaterialAPI.Apply(frame_prim)
330
+ frame_mat.CreateDynamicFrictionAttr(2.0)
331
+ frame_mat.CreateStaticFrictionAttr(2.0)
332
+
333
+ # Create the door (this will be the moving part)
334
+ n_door_verts = door_verts.shape[0]
335
+ n_door_faces = door_faces.shape[0]
336
+ door_vertex_counts = np.ones(n_door_faces).astype(np.int32) * 3
337
+
338
+ # Create door mesh
339
+ door_mesh = UsdGeom.Mesh.Define(stage, usd_internal_path_door)
340
+ door_mesh.CreatePointsAttr(Vt.Vec3fArray.FromNumpy(door_verts))
341
+ door_mesh.CreateFaceVertexCountsAttr(Vt.IntArray.FromNumpy(door_vertex_counts))
342
+ door_mesh.CreateFaceVertexIndicesAttr(Vt.IntArray.FromNumpy(door_faces))
343
+ door_mesh.CreateExtentAttr([(-100, -100, -100), (100, 100, 100)])
344
+
345
+ door_prim = stage.GetPrimAtPath(usd_internal_path_door)
346
+
347
+ # Apply texture to door if provided
348
+ if texture_door is not None:
349
+ vts = texture_door["vts"]
350
+ fts = texture_door["fts"]
351
+ texture_map_path = texture_door["texture_map_path"]
352
+ tex_coords = vts[fts.reshape(-1)].reshape(-1, 2)
353
+
354
+ texCoords = UsdGeom.PrimvarsAPI(door_mesh).CreatePrimvar("st",
355
+ Sdf.ValueTypeNames.TexCoord2fArray,
356
+ UsdGeom.Tokens.faceVarying)
357
+ texCoords.Set(Vt.Vec2fArray.FromNumpy(tex_coords))
358
+
359
+ usd_mat_path = usd_internal_path_door + "_mat"
360
+ material = UsdShade.Material.Define(stage, usd_mat_path)
361
+ stInput = material.CreateInput('frame:stPrimvarName', Sdf.ValueTypeNames.Token)
362
+ stInput.Set('st')
363
+
364
+ pbrShader = UsdShade.Shader.Define(stage, f"{usd_mat_path}/PBRShader")
365
+ pbrShader.CreateIdAttr("UsdPreviewSurface")
366
+ pbrShader.CreateInput("roughness", Sdf.ValueTypeNames.Float).Set(1.0)
367
+ pbrShader.CreateInput("metallic", Sdf.ValueTypeNames.Float).Set(0.0)
368
+ pbrShader.CreateInput('useSpecularWorkflow', Sdf.ValueTypeNames.Bool).Set(True)
369
+
370
+ material.CreateSurfaceOutput().ConnectToSource(pbrShader.ConnectableAPI(), "surface")
371
+
372
+ # create texture coordinate reader
373
+ stReader = UsdShade.Shader.Define(stage, f"{usd_mat_path}/stReader")
374
+ stReader.CreateIdAttr('UsdPrimvarReader_float2')
375
+ stReader.CreateInput('varname',Sdf.ValueTypeNames.Token).ConnectToSource(stInput)
376
+
377
+ # diffuse texture
378
+ diffuseTextureSampler = UsdShade.Shader.Define(stage, f"{usd_mat_path}/diffuseTexture")
379
+ diffuseTextureSampler.CreateIdAttr('UsdUVTexture')
380
+ diffuseTextureSampler.CreateInput('file', Sdf.ValueTypeNames.Asset).Set(texture_map_path)
381
+ diffuseTextureSampler.CreateInput("st", Sdf.ValueTypeNames.Float2).ConnectToSource(stReader.ConnectableAPI(), 'result')
382
+ diffuseTextureSampler.CreateOutput('rgb', Sdf.ValueTypeNames.Float3)
383
+ pbrShader.CreateInput("diffuseColor", Sdf.ValueTypeNames.Color3f).ConnectToSource(diffuseTextureSampler.ConnectableAPI(), 'rgb')
384
+
385
+ # Bind material to door
386
+ door_mesh.GetPrim().ApplyAPI(UsdShade.MaterialBindingAPI)
387
+ UsdShade.MaterialBindingAPI(door_mesh).Bind(material)
388
+
389
+ # Set up door physics (dynamic)
390
+ UsdPhysics.CollisionAPI.Apply(door_prim)
391
+ mass_api = UsdPhysics.MassAPI.Apply(door_prim)
392
+ mass_api.CreateMassAttr(10.0) # Set door mass to 10kg
393
+ rigid_api = UsdPhysics.RigidBodyAPI.Apply(door_prim)
394
+
395
+ # Apply PhysX rigid body properties for better simulation
396
+ physx_rigid_body = PhysxSchema.PhysxRigidBodyAPI.Apply(door_prim)
397
+ physx_rigid_body.CreateSolverPositionIterationCountAttr(255)
398
+ physx_rigid_body.CreateSolverVelocityIterationCountAttr(255)
399
+ physx_rigid_body.CreateLinearDampingAttr(10.0)
400
+ physx_rigid_body.CreateAngularDampingAttr(10.0)
401
+ physx_rigid_body.CreateMaxLinearVelocityAttr(0.5)
402
+ physx_rigid_body.CreateMaxAngularVelocityAttr(0.5)
403
+ physx_rigid_body.CreateMaxDepenetrationVelocityAttr(50.0)
404
+
405
+ # # Apply collision properties
406
+ # ps_collision_api = PhysxSchema.PhysxCollisionAPI.Apply(door_prim)
407
+ # ps_collision_api.CreateContactOffsetAttr(0.005)
408
+ # ps_collision_api.CreateRestOffsetAttr(0.001)
409
+ # ps_collision_api.CreateTorsionalPatchRadiusAttr(0.01)
410
+
411
+ physx_sdf = PhysxSchema.PhysxSDFMeshCollisionAPI.Apply(door_prim)
412
+ physx_sdf.CreateSdfResolutionAttr(256)
413
+ collider = UsdPhysics.MeshCollisionAPI.Apply(door_prim)
414
+ collider.CreateApproximationAttr("sdf")
415
+
416
+ # Apply physics material to door
417
+ door_mat = UsdPhysics.MaterialAPI.Apply(door_prim)
418
+ door_mat.CreateDynamicFrictionAttr(2.0)
419
+ door_mat.CreateStaticFrictionAttr(2.0)
420
+
421
+ # Create the revolute joint between door and door frame
422
+ if articulation_door is not None:
423
+ rotate_axis_point_lower, rotate_axis_point_upper = articulation_door
424
+
425
+ # Calculate the rotation axis vector
426
+ axis_vector = np.array(rotate_axis_point_upper) - np.array(rotate_axis_point_lower)
427
+ axis_vector = axis_vector / np.linalg.norm(axis_vector) # Normalize
428
+
429
+ # Create a revolute joint
430
+ joint_path = usd_internal_path_door + "_hinge_joint"
431
+ joint = UsdPhysics.RevoluteJoint.Define(stage, joint_path)
432
+
433
+ # Set the joint axis (in local space)
434
+ joint.CreateAxisAttr("Z") # Default to Z-axis, we'll transform to match our axis
435
+
436
+ # Set the joint bodies - door rotates relative to door frame
437
+ joint.CreateBody0Rel().SetTargets([usd_internal_path_door]) # Moving body (door)
438
+ joint.CreateBody1Rel().SetTargets([usd_internal_path_door_frame]) # Static body (door frame)
439
+
440
+ # Create joint position (midpoint of the axis)
441
+ joint_pos = (np.array(rotate_axis_point_lower) + np.array(rotate_axis_point_upper)) / 2
442
+
443
+ # Set the joint position using physics:localPos0 and physics:localPos1
444
+ # These define the connection points on each body
445
+ joint.CreateLocalPos0Attr(Gf.Vec3f(joint_pos[0], joint_pos[1], joint_pos[2]))
446
+ joint.CreateLocalPos1Attr(Gf.Vec3f(joint_pos[0], joint_pos[1], joint_pos[2]))
447
+
448
+ # If the rotation axis is not along Z, we need to rotate the joint
449
+ if not np.allclose(axis_vector, [0, 0, 1]):
450
+ # Calculate rotation to align Z-axis with our desired axis
451
+ z_axis = np.array([0, 0, 1])
452
+ # Use cross product to find rotation axis
453
+ rotation_axis = np.cross(z_axis, axis_vector)
454
+ if np.linalg.norm(rotation_axis) > 1e-6: # Not parallel
455
+ rotation_axis = rotation_axis / np.linalg.norm(rotation_axis)
456
+ # Calculate angle between vectors
457
+ angle = np.arccos(np.clip(np.dot(z_axis, axis_vector), -1.0, 1.0))
458
+
459
+ # Create rotation quaternion
460
+ sin_half = np.sin(angle / 2)
461
+ cos_half = np.cos(angle / 2)
462
+ quat = Gf.Quatf(cos_half, sin_half * rotation_axis[0],
463
+ sin_half * rotation_axis[1], sin_half * rotation_axis[2])
464
+
465
+ # Apply rotation using physics:localRot0 and physics:localRot1
466
+ joint.CreateLocalRot0Attr(quat)
467
+ joint.CreateLocalRot1Attr(quat)
468
+
469
+ # Set joint limits for a typical door (0 to 120 degrees)
470
+ joint.CreateLowerLimitAttr(-120.0) # 0 degrees (closed)
471
+ joint.CreateUpperLimitAttr(120.0) # 120 degrees (open)
472
+
473
+ # Apply PhysX-specific joint properties for better simulation
474
+ joint_prim = stage.GetPrimAtPath(joint_path)
475
+ physx_joint = PhysxSchema.PhysxJointAPI.Apply(joint_prim)
476
+
477
+ # Apply debug torque if requested (for testing joint functionality)
478
+ if apply_debug_torque:
479
+ print(f"Applying debug torque to door joint: {debug_torque_value}")
480
+ # Apply DriveAPI to the joint
481
+ drive_api = UsdPhysics.DriveAPI.Apply(joint_prim, "angular")
482
+ # Set drive type to velocity control
483
+ drive_api.CreateTypeAttr("force")
484
+ # Set target velocity to make the door rotate
485
+ drive_api.CreateTargetVelocityAttr(debug_torque_value) # degrees per second
486
+ # Set drive stiffness and damping
487
+ drive_api.CreateStiffnessAttr(0.0) # No position control
488
+ drive_api.CreateDampingAttr(100) # High damping for velocity control
489
+ # Set max force
490
+ drive_api.CreateMaxForceAttr(1000.0) # Maximum force for the drive
491
+ print("Debug torque applied - door should rotate")
492
+ else:
493
+ # Add some damping to make the door movement more realistic without active torque
494
+ drive_api = UsdPhysics.DriveAPI.Apply(joint_prim, "angular")
495
+ drive_api.CreateTypeAttr("force")
496
+ drive_api.CreateStiffnessAttr(0.0) # No position control
497
+ drive_api.CreateDampingAttr(100.0) # Add damping for realistic movement
498
+ drive_api.CreateMaxForceAttr(1000.0) # Maximum force for the drive
499
+
500
+ return stage
501
+
502
+
503
+ def save_usd_with_ids(usd_file_path, mesh_info_dict, room_base_ids):
504
+ from pxr import Gf, Usd, UsdGeom, Vt, UsdPhysics, PhysxSchema, UsdUtils, Sdf, UsdShade
505
+
506
+
507
+ stage = Usd.Stage.CreateNew(usd_file_path)
508
+
509
+ collision_approximation = "sdf"
510
+ # collision_approximation = "convexDecomposition"
511
+
512
+
513
+ world_base_prim = UsdGeom.Xform.Define(stage, "/World")
514
+
515
+ # set default prim to World
516
+ stage.SetDefaultPrim(stage.GetPrimAtPath("/World"))
517
+
518
+ for mesh_id in room_base_ids:
519
+ if mesh_id.startswith("door_"):
520
+ continue
521
+ else:
522
+ usd_internal_path = f"/World/{mesh_id}"
523
+ mesh_dict = mesh_info_dict[mesh_id]
524
+ mesh_obj_i = mesh_dict['mesh']
525
+ static = mesh_dict['static']
526
+ articulation = mesh_dict.get('articulation', None)
527
+ # articulation = None
528
+ texture = mesh_dict.get('texture', None)
529
+ mass = mesh_dict.get('mass', 1.0)
530
+
531
+ stage = convert_mesh_to_usd(stage, usd_internal_path,
532
+ mesh_obj_i.vertices, mesh_obj_i.faces,
533
+ collision_approximation, static, articulation, mass=mass, physics_iter=(16, 4),
534
+ apply_debug_torque=False, debug_torque_value=30.0, texture=texture,
535
+ usd_internal_art_reference_path=f"/World/{mesh_id}",
536
+ add_damping=True)
537
+
538
+
539
+ stage.Save()
540
+
541
+
542
+ success = UsdUtils.CreateNewUsdzPackage(f"{usd_file_path}",
543
+ usd_file_path.replace(".usd", ".usdz"))
544
+
545
+ if success:
546
+ print(f"Successfully created USDZ: {usd_file_path.replace('.usd', '.usdz')}")
547
+ else:
548
+ print("Failed to create USDZ.")
549
+
550
+ def save_door_frame_to_usd(
551
+ usd_file_path,
552
+ mesh_info_dict_door,
553
+ mesh_info_dict_door_frame,
554
+ door_id,
555
+ door_frame_id
556
+ ):
557
+ from pxr import Gf, Usd, UsdGeom, Vt, UsdPhysics, PhysxSchema, UsdUtils, Sdf, UsdShade
558
+ stage = Usd.Stage.CreateNew(usd_file_path)
559
+
560
+ world_base_prim = UsdGeom.Xform.Define(stage, "/World")
561
+
562
+ # set default prim to World
563
+ stage.SetDefaultPrim(stage.GetPrimAtPath("/World"))
564
+
565
+ UsdPhysics.ArticulationRootAPI.Apply(stage.GetPrimAtPath("/World"))
566
+
567
+ usd_internal_path_door = f"/World/{door_id}"
568
+ usd_internal_path_door_frame = f"/World/{door_frame_id}"
569
+
570
+
571
+ mesh_dict_door = mesh_info_dict_door
572
+ mesh_obj_door = mesh_dict_door['mesh']
573
+ articulation_door = mesh_dict_door.get('articulation', None)
574
+ texture_door = mesh_dict_door.get('texture', None)
575
+
576
+ mesh_dict_door_frame = mesh_info_dict_door_frame
577
+ mesh_obj_door_frame = mesh_dict_door_frame['mesh']
578
+ texture_door_frame = mesh_dict_door_frame.get('texture', None)
579
+
580
+ stage = door_frame_to_usd(
581
+ stage,
582
+ usd_internal_path_door,
583
+ usd_internal_path_door_frame,
584
+ mesh_obj_door,
585
+ mesh_obj_door_frame,
586
+ articulation_door,
587
+ texture_door,
588
+ texture_door_frame
589
+ )
590
+
591
+ stage.Save()
592
+
593
+
594
+ success = UsdUtils.CreateNewUsdzPackage(f"{usd_file_path}",
595
+ usd_file_path.replace(".usd", ".usdz"))
596
+
597
+ if success:
598
+ print(f"Successfully created USDZ: {usd_file_path.replace('.usd', '.usdz')}")
599
+ else:
600
+ print("Failed to create USDZ.")
601
+
602
+
603
+
604
+
605
+
606
+ def get_room_layout_scene_usd_separate_from_layout(layout_json_path: str, usd_collection_dir: str):
607
+ """
608
+ Create a room layout scene from a dictionary of mesh information.
609
+ """
610
+ with open(layout_json_path, 'r') as f:
611
+ layout_data = json.load(f)
612
+
613
+ layout_dir = os.path.dirname(layout_json_path)
614
+
615
+ floor_plan = dict_to_floor_plan(layout_data)
616
+ current_layout = floor_plan
617
+
618
+ mesh_info_dict = export_layout_to_mesh_dict_list_no_object_transform_v2(current_layout, layout_dir)
619
+
620
+ rigid_object_property_dict = {}
621
+ rigid_object_transform_dict = {}
622
+
623
+ os.makedirs(usd_collection_dir, exist_ok=True)
624
+
625
+ room_base_ids = [mesh_id for mesh_id in mesh_info_dict.keys() if mesh_id.startswith("door_") or mesh_id.startswith("wall_room_") or mesh_id.startswith("window_") or mesh_id.startswith("floor_")]
626
+ rigid_object_ids = [mesh_id for mesh_id in mesh_info_dict.keys() if mesh_id not in room_base_ids]
627
+
628
+ door_ids = []
629
+ door_frame_ids = []
630
+
631
+ for room_base_id in room_base_ids:
632
+ if room_base_id.startswith("door_"):
633
+ if room_base_id.endswith("_frame"):
634
+ door_frame_ids.append(room_base_id)
635
+ else:
636
+ door_ids.append(room_base_id)
637
+ continue
638
+
639
+ usd_file_path = f"{usd_collection_dir}/{room_base_id}.usd"
640
+ save_usd_with_ids(usd_file_path, mesh_info_dict, [room_base_id])
641
+
642
+ for rigid_object_id in rigid_object_ids:
643
+ usd_file_path = f"{usd_collection_dir}/{rigid_object_id}.usd"
644
+ rigid_object_property_dict[rigid_object_id] = {
645
+ "static": mesh_info_dict[rigid_object_id]['static'],
646
+ "mass": mesh_info_dict[rigid_object_id]['mass'],
647
+ }
648
+ rigid_object_transform_dict[rigid_object_id] = mesh_info_dict[rigid_object_id]["transform"]
649
+ mesh_info_dict[rigid_object_id]['static'] = False
650
+ save_usd_with_ids(usd_file_path, mesh_info_dict, [rigid_object_id])
651
+
652
+
653
+ for door_id, door_frame_id in zip(door_ids, door_frame_ids):
654
+
655
+ save_door_frame_to_usd(
656
+ usd_file_path=f"{usd_collection_dir}/{door_id}.usd",
657
+ mesh_info_dict_door=mesh_info_dict[door_id],
658
+ mesh_info_dict_door_frame=mesh_info_dict[door_frame_id],
659
+ door_id=door_id,
660
+ door_frame_id=door_frame_id
661
+ )
662
+
663
+ with open(os.path.join(usd_collection_dir, "rigid_object_property_dict.json"), "w") as f:
664
+ json.dump(rigid_object_property_dict, f, indent=4)
665
+
666
+ with open(os.path.join(usd_collection_dir, "rigid_object_transform_dict.json"), "w") as f:
667
+ json.dump(rigid_object_transform_dict, f, indent=4)
668
+
669
+ return {
670
+ "status": "success",
671
+ "message": f"Room layout scene created successfully",
672
+ }
673
+
674
+
675
+ def get_layout_scene_loaded(layout_json_path: str):
676
+ """
677
+ Create a room layout scene from a dictionary of mesh information.
678
+ """
679
+ from pxr import Gf, Usd, UsdGeom, Vt, UsdPhysics, PhysxSchema, UsdUtils, Sdf, UsdShade
680
+ import omni
681
+ with open(layout_json_path, 'r') as f:
682
+ layout_data = json.load(f)
683
+
684
+ layout_dir = os.path.dirname(layout_json_path)
685
+
686
+ floor_plan = dict_to_floor_plan(layout_data)
687
+ current_layout = floor_plan
688
+ mesh_info_dict = export_layout_to_mesh_dict_list_v2(current_layout, layout_dir)
689
+
690
+ stage = Usd.Stage.CreateInMemory()
691
+
692
+
693
+ world_base_prim = UsdGeom.Xform.Define(stage, "/World")
694
+
695
+ # set default prim to World
696
+ stage.SetDefaultPrim(stage.GetPrimAtPath("/World"))
697
+
698
+ collision_approximation = "sdf"
699
+
700
+ track_ids = []
701
+ door_ids = []
702
+ door_frame_ids = []
703
+
704
+ print(f"mesh_info_dict: {mesh_info_dict.keys()}")
705
+
706
+ for mesh_id in mesh_info_dict:
707
+ if mesh_id.startswith("wall_room_") or mesh_id.startswith("window_") or mesh_id.startswith("floor_"):
708
+ usd_internal_path = f"/World/{mesh_id}"
709
+ elif mesh_id.startswith("door_"):
710
+ if mesh_id.endswith("_frame"):
711
+ door_frame_ids.append(mesh_id)
712
+ else:
713
+ door_ids.append(mesh_id)
714
+ continue
715
+ else:
716
+ track_ids.append(mesh_id)
717
+ usd_internal_path = f"/World/{mesh_id}"
718
+ mesh_dict = mesh_info_dict[mesh_id]
719
+ mesh_obj_i = mesh_dict['mesh']
720
+ static = mesh_dict['static']
721
+ articulation = mesh_dict.get('articulation', None)
722
+ texture = mesh_dict.get('texture', None)
723
+ mass = mesh_dict.get('mass', 1.0)
724
+
725
+ print(f"usd_internal_path: {usd_internal_path}")
726
+
727
+ stage = convert_mesh_to_usd(stage, usd_internal_path,
728
+ mesh_obj_i.vertices, mesh_obj_i.faces,
729
+ collision_approximation, static, articulation, mass=mass, physics_iter=(16, 4),
730
+ apply_debug_torque=False, debug_torque_value=30.0, texture=texture,
731
+ usd_internal_art_reference_path=f"/World/{mesh_id}")
732
+
733
+ door_ids = sorted(door_ids)
734
+ door_frame_ids = sorted(door_frame_ids)
735
+
736
+ for door_id, door_frame_id in zip(door_ids, door_frame_ids):
737
+ usd_internal_path_door = f"/World/{door_id}"
738
+ usd_internal_path_door_frame = f"/World/{door_frame_id}"
739
+
740
+
741
+ mesh_dict_door = mesh_info_dict[door_id]
742
+ mesh_obj_door = mesh_dict_door['mesh']
743
+ articulation_door = mesh_dict_door.get('articulation', None)
744
+ texture_door = mesh_dict_door.get('texture', None)
745
+
746
+ mesh_dict_door_frame = mesh_info_dict[door_frame_id]
747
+ mesh_obj_door_frame = mesh_dict_door_frame['mesh']
748
+ texture_door_frame = mesh_dict_door_frame.get('texture', None)
749
+
750
+ stage = door_frame_to_usd(
751
+ stage,
752
+ usd_internal_path_door,
753
+ usd_internal_path_door_frame,
754
+ mesh_obj_door,
755
+ mesh_obj_door_frame,
756
+ articulation_door,
757
+ texture_door,
758
+ texture_door_frame,
759
+ )
760
+
761
+ cache = UsdUtils.StageCache.Get()
762
+ stage_id = cache.Insert(stage).ToLongInt()
763
+ omni.usd.get_context().attach_stage_with_callback(stage_id)
764
+
765
+ # Set the world axis of the stage root layer to Z
766
+ UsdGeom.SetStageUpAxis(stage, UsdGeom.Tokens.z)
767
+
768
+ return track_ids
769
+
770
+ def get_all_prim_paths(ids):
771
+ # Get all prim paths in the stage
772
+
773
+ prim_paths = [f"/World/{id}" for id in ids]
774
+ return prim_paths
775
+
776
+ def get_prim(prim_path):
777
+ import omni
778
+ stage = omni.usd.get_context().get_stage()
779
+ prim = stage.GetPrimAtPath(prim_path)
780
+ if not prim.IsValid():
781
+ print(f"Prim at path {prim_path} is not valid.")
782
+ return None
783
+ return prim
784
+
785
+
786
+ def quaternion_angle(q1, q2):
787
+ """
788
+ Calculate the angle between two quaternions.
789
+
790
+ Parameters:
791
+ q1, q2: Lists or arrays of shape [w, x, y, z] representing quaternions
792
+
793
+ Returns:
794
+ angle: The angle in radians between the two quaternions
795
+ """
796
+ # Convert lists to numpy arrays if they aren't already
797
+ q1 = np.array(q1)
798
+ q2 = np.array(q2)
799
+
800
+ # Normalize the quaternions
801
+ q1 = q1 / np.linalg.norm(q1)
802
+ q2 = q2 / np.linalg.norm(q2)
803
+
804
+ # Calculate the relative quaternion: q_rel = q2 * q1^(-1)
805
+ q1_inv = np.array([q1[0], -q1[1], -q1[2], -q1[3]]) # Inverse of a normalized quaternion
806
+
807
+ # Quaternion multiplication for q_rel = q2 * q1_inv
808
+ q_rel = np.array([
809
+ q2[0] * q1_inv[0] - q2[1] * q1_inv[1] - q2[2] * q1_inv[2] - q2[3] * q1_inv[3],
810
+ q2[0] * q1_inv[1] + q2[1] * q1_inv[0] + q2[2] * q1_inv[3] - q2[3] * q1_inv[2],
811
+ q2[0] * q1_inv[2] - q2[1] * q1_inv[3] + q2[2] * q1_inv[0] + q2[3] * q1_inv[1],
812
+ q2[0] * q1_inv[3] + q2[1] * q1_inv[2] - q2[2] * q1_inv[1] + q2[3] * q1_inv[0]
813
+ ])
814
+
815
+ # The angle can be calculated from the scalar part (real part) of the relative quaternion
816
+ angle = 2 * np.arccos(min(abs(q_rel[0]), 1.0))
817
+
818
+ return angle * 180 / np.pi # Convert to degrees
819
+
820
+
821
+
822
+
823
+ def get_all_prims_with_paths(ids):
824
+ # implement this function to get all prims in the stage
825
+ prim_paths = get_all_prim_paths(ids)
826
+ prims = []
827
+ for prim_path in prim_paths:
828
+ prim = get_prim(prim_path)
829
+ prims.append(prim)
830
+ return prims, prim_paths
831
+
832
+ def extract_position_orientation(transform):
833
+ from pxr import Gf, Usd, UsdGeom, Vt, UsdPhysics, PhysxSchema, UsdUtils
834
+ position = Gf.Vec3d(transform.ExtractTranslation())
835
+ rotation = transform.ExtractRotationQuat()
836
+ orientation = Gf.Quatd(rotation.GetReal(), *rotation.GetImaginary())
837
+ return position, orientation
838
+
839
+
840
+ def start_simulation_and_track(
841
+ prims, prim_paths,
842
+ simulation_steps=2000,
843
+ longterm_equilibrium_steps=20,
844
+ stable_position_limit=0.2, stable_rotation_limit=8.0,
845
+ early_stop_unstable_exemption_prim_paths=[]
846
+ ):
847
+
848
+ import omni
849
+ import omni.kit.app
850
+ from pxr import Gf, Usd, UsdGeom, Vt, UsdPhysics, PhysxSchema, UsdUtils
851
+ app = omni.kit.app.get_app()
852
+
853
+ # Reset and initialize the simulation
854
+ stage = omni.usd.get_context().get_stage()
855
+
856
+ # Get the timeline interface
857
+ timeline = omni.timeline.get_timeline_interface()
858
+ # Stop the timeline if it's currently playing
859
+ if timeline.is_playing():
860
+ timeline.stop()
861
+ # Reset the simulation to initial state
862
+ timeline.set_current_time(0.0)
863
+ # Wait a moment for the reset to complete
864
+ import time
865
+ time.sleep(0.1)
866
+ # Define a list to store the traced data
867
+ traced_data_all = {}
868
+ init_data = {}
869
+
870
+ # Start the simulation
871
+ timeline.play()
872
+ # Initialize variables for tracking the previous position for speed calculation
873
+ elapsed_steps = 0
874
+ init = True
875
+
876
+ early_stop = False
877
+ while not early_stop and elapsed_steps < simulation_steps:
878
+ # Get the current time code
879
+ current_time_code = Usd.TimeCode.Default()
880
+ # Get current position and orientation
881
+ traced_data_frame_prims = []
882
+ for prim in prims:
883
+ xform = UsdGeom.Xformable(prim)
884
+ transform = xform.ComputeLocalToWorldTransform(current_time_code)
885
+ traced_data_frame_prim = extract_position_orientation(transform)
886
+ traced_data_frame_prims.append(traced_data_frame_prim)
887
+ for prim_i, (position, orientation) in enumerate(traced_data_frame_prims):
888
+ # Calculate speed if previous position is available
889
+
890
+ prim_path = prim_paths[prim_i]
891
+
892
+ traced_data = traced_data_all.get(prim_path, [])
893
+
894
+
895
+ if init:
896
+ init_data[prim_path] = {}
897
+ init_data[prim_path]["position"] = [position[0], position[1], position[2]]
898
+ init_data[prim_path]["orientation"] = [orientation.GetReal(),
899
+ orientation.GetImaginary()[0],
900
+ orientation.GetImaginary()[1],
901
+ orientation.GetImaginary()[2]
902
+ ]
903
+ relative_position = 0.
904
+ relative_orientation = 0.
905
+
906
+ position_cur = np.array([init_data[prim_path]["position"][0],
907
+ init_data[prim_path]["position"][1],
908
+ init_data[prim_path]["position"][2]])
909
+
910
+ orientation_cur = np.array([init_data[prim_path]["orientation"][0],
911
+ init_data[prim_path]["orientation"][1],
912
+ init_data[prim_path]["orientation"][2],
913
+ init_data[prim_path]["orientation"][3]
914
+ ])
915
+
916
+ else:
917
+ position_cur = np.array([position[0], position[1], position[2]])
918
+ position_init = np.array([init_data[prim_path]["position"][0],
919
+ init_data[prim_path]["position"][1],
920
+ init_data[prim_path]["position"][2]])
921
+
922
+ orientation_cur = np.array([orientation.GetReal(),
923
+ orientation.GetImaginary()[0],
924
+ orientation.GetImaginary()[1],
925
+ orientation.GetImaginary()[2]
926
+ ])
927
+ orientation_init = np.array([init_data[prim_path]["orientation"][0],
928
+ init_data[prim_path]["orientation"][1],
929
+ init_data[prim_path]["orientation"][2],
930
+ init_data[prim_path]["orientation"][3]
931
+ ])
932
+
933
+ position_last = traced_data[0]["position_last"]
934
+ orientation_last = traced_data[0]["orientation_last"]
935
+
936
+ relative_position_last = position_cur - position_last
937
+ relative_orientation_last = quaternion_angle(orientation_cur, orientation_last)
938
+
939
+ relative_position_last = float(np.linalg.norm(relative_position_last))
940
+ relative_orientation_last = float(relative_orientation_last)
941
+
942
+ relative_position = position_cur - position_init
943
+ relative_orientation = quaternion_angle(orientation_cur, orientation_init)
944
+
945
+ relative_position = float(np.linalg.norm(relative_position))
946
+ relative_orientation = float(relative_orientation)
947
+
948
+
949
+ traced_data.append({
950
+ "position": position_cur.copy(),
951
+ "orientation": orientation_cur.copy(),
952
+ "d_position": relative_position,
953
+ "d_orientation": relative_orientation,
954
+ "position_last": position_cur.copy(),
955
+ "orientation_last": orientation_cur.copy(),
956
+ })
957
+
958
+ if traced_data[-1]["d_position"] > stable_position_limit or \
959
+ traced_data[-1]["d_orientation"] > stable_rotation_limit:
960
+ traced_data[-1]["stable"] = False
961
+ else:
962
+ traced_data[-1]["stable"] = True
963
+
964
+ if not init:
965
+ traced_data[-1]["relative_position_last"] = relative_position_last
966
+ traced_data[-1]["relative_orientation_last"] = relative_orientation_last
967
+ if relative_position_last < 1e-3 and relative_orientation_last < 1e-3:
968
+ traced_data[-1]["shortterm_equilibrium"] = True
969
+ else:
970
+ traced_data[-1]["shortterm_equilibrium"] = False
971
+
972
+
973
+ if len(traced_data) > longterm_equilibrium_steps:
974
+ traced_data.pop(0)
975
+
976
+ longterm_equilibrium = True
977
+ for trace_item in traced_data:
978
+ longterm_equilibrium = longterm_equilibrium and trace_item["shortterm_equilibrium"]
979
+
980
+ traced_data[-1]["longterm_equilibrium"] = longterm_equilibrium
981
+ else:
982
+ traced_data[-1]["longterm_equilibrium"] = False
983
+ traced_data_all[prim_path] = traced_data
984
+
985
+ all_longterm_equilibrium = True
986
+
987
+ for prim_path, traced_data in traced_data_all.items():
988
+ all_longterm_equilibrium = all_longterm_equilibrium and traced_data[-1]["longterm_equilibrium"]
989
+
990
+ if all_longterm_equilibrium:
991
+ print("early stop: all longterm equilibrium")
992
+ early_stop = True
993
+
994
+
995
+ existing_stable = True
996
+
997
+ for prim_path, traced_data in traced_data_all.items():
998
+ if prim_path not in early_stop_unstable_exemption_prim_paths and not traced_data[-1]["stable"]:
999
+ print(f"early stop: unstable prim: {prim_path}")
1000
+ existing_stable = False
1001
+ break
1002
+
1003
+ if not existing_stable:
1004
+ early_stop = True
1005
+
1006
+ if init:
1007
+ init = False
1008
+
1009
+
1010
+ # Step the simulation forward by one frame
1011
+
1012
+
1013
+ # Update the simulation by one frame
1014
+ app.update()
1015
+
1016
+ # Also step the timeline forward if needed
1017
+ current_time = timeline.get_current_time()
1018
+ time_step = 1.0 / 60.0 # Assuming 60 FPS
1019
+ timeline.set_current_time(current_time + time_step)
1020
+
1021
+
1022
+ # Increment the elapsed time
1023
+ elapsed_steps += 1
1024
+
1025
+ print(f"\relapsed steps: {elapsed_steps:05d}/{simulation_steps:05d}", end="")
1026
+
1027
+ traced_data_all_final = {}
1028
+
1029
+ for prim_path, traced_data in traced_data_all.items():
1030
+
1031
+ traced_data_all_final[prim_path] = {}
1032
+ traced_data_all_final[prim_path]["final_position"] = np.array(traced_data[-1]["position"]).reshape(3)
1033
+ traced_data_all_final[prim_path]["final_orientation"] = np.array(traced_data[-1]["orientation"]).reshape(4)
1034
+ traced_data_all_final[prim_path]["stable"] = traced_data[-1]["stable"]
1035
+
1036
+ traced_data_all_final[prim_path]["initial_position"] = np.array(init_data[prim_path]["position"]).reshape(3)
1037
+ traced_data_all_final[prim_path]["initial_orientation"] = np.array(init_data[prim_path]["orientation"]).reshape(4)
1038
+
1039
+ position_list = [np.array(traced_data[trace_idx]["position"]).reshape(3) for trace_idx in range(len(traced_data))]
1040
+ orientation_list = [np.array(traced_data[trace_idx]["orientation"]).reshape(4) for trace_idx in range(len(traced_data))]
1041
+
1042
+ traced_data_all_final[prim_path]["position_traj"] = np.array(position_list).reshape(-1, 3).astype(np.float32)
1043
+ traced_data_all_final[prim_path]["orientation_traj"] = np.array(orientation_list).reshape(-1, 4).astype(np.float32)
1044
+
1045
+ # Stop the simulation
1046
+ timeline.stop()
1047
+
1048
+ return traced_data_all_final
1049
+
1050
+
1051
+
1052
+ def generate_physics_statistics(traced_data_all, track_ids):
1053
+ """
1054
+ Generate physics statistics from traced simulation data.
1055
+
1056
+ Args:
1057
+ traced_data_all: Dictionary mapping prim paths to traced data
1058
+ track_ids: List of object IDs that were tracked
1059
+
1060
+ Returns:
1061
+ Dictionary containing physics statistics in the desired format
1062
+ """
1063
+ statistics = {
1064
+ "objects": {},
1065
+ "total_objects": 0,
1066
+ "stable_objects": 0,
1067
+ "unstable_objects": 0,
1068
+ "stability_ratio": 0.0
1069
+ }
1070
+
1071
+ # Generate statistics for each object
1072
+ for object_id, (prim_path, traced_data) in zip(track_ids, traced_data_all.items()):
1073
+ # Extract data
1074
+ initial_pos = traced_data["initial_position"]
1075
+ final_pos = traced_data["final_position"]
1076
+ initial_orient = traced_data["initial_orientation"]
1077
+ final_orient = traced_data["final_orientation"]
1078
+ stable = traced_data["stable"]
1079
+
1080
+ # Calculate position offset
1081
+ position_offset = (final_pos - initial_pos).tolist()
1082
+ position_offset_magnitude = float(np.linalg.norm(final_pos - initial_pos))
1083
+
1084
+ # Calculate orientation angle offset using quaternion_angle function
1085
+ orientation_angle_offset = float(quaternion_angle(initial_orient, final_orient))
1086
+
1087
+
1088
+ # Store statistics for this object
1089
+ statistics["objects"][object_id] = {
1090
+ "stable": bool(stable),
1091
+ "position_offset": position_offset,
1092
+ "position_offset_magnitude": position_offset_magnitude,
1093
+ "orientation_angle_offset": orientation_angle_offset,
1094
+ }
1095
+
1096
+ # Update counters
1097
+ statistics["total_objects"] += 1
1098
+ if stable:
1099
+ statistics["stable_objects"] += 1
1100
+ else:
1101
+ statistics["unstable_objects"] += 1
1102
+
1103
+ # Calculate stability ratio
1104
+ if statistics["total_objects"] > 0:
1105
+ statistics["stability_ratio"] = statistics["stable_objects"] / statistics["total_objects"]
1106
+
1107
+
1108
+ return statistics
1109
+
1110
+
1111
+
1112
+ def simulate_the_scene(track_ids):
1113
+ """
1114
+ Simulate the scene.
1115
+ """
1116
+ from pxr import Gf, Usd, UsdGeom, Vt, UsdPhysics, PhysxSchema, UsdUtils, Sdf, UsdShade
1117
+ import omni
1118
+ stage = omni.usd.get_context().get_stage()
1119
+
1120
+ prims, prim_paths = get_all_prims_with_paths(track_ids)
1121
+ traced_data_all = start_simulation_and_track(
1122
+ prims, prim_paths, simulation_steps=120, longterm_equilibrium_steps=120,
1123
+ early_stop_unstable_exemption_prim_paths=prim_paths
1124
+ )
1125
+
1126
+ unstable_prims = []
1127
+ unstable_object_ids = []
1128
+ for object_id, (prim_path, traced_data) in zip(track_ids, traced_data_all.items()):
1129
+ if not traced_data["stable"]:
1130
+ unstable_prims.append(os.path.basename(prim_path))
1131
+ unstable_object_ids.append(object_id)
1132
+
1133
+ if len(unstable_prims) > 0:
1134
+ next_step_message = f"""
1135
+ The scene is unstable: {unstable_prims};
1136
+ """
1137
+ else:
1138
+ next_step_message = "The scene is stable."
1139
+
1140
+ return {
1141
+ "status": "success",
1142
+ "message": "Scene simulated successfully!",
1143
+ "unstable_objects": unstable_object_ids,
1144
+ "next_step": next_step_message,
1145
+ "traced_data_all": traced_data_all,
1146
+ }
SAGE10k/sage10k/kits/load_isaacsim_demo.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from isaacsim_utils import (
2
+ start_simulation_app,
3
+ get_layout_scene_loaded,
4
+ simulate_the_scene,
5
+ generate_physics_statistics
6
+ )
7
+ import argparse
8
+
9
+ if __name__ == "__main__":
10
+ parser = argparse.ArgumentParser(description="Export USD file")
11
+ parser.add_argument("layout_json_path", type=str, help="Layout JSON file path")
12
+ args = parser.parse_args()
13
+
14
+ start_simulation_app()
15
+ track_ids = get_layout_scene_loaded(args.layout_json_path)
16
+ result = simulate_the_scene(track_ids)
17
+
18
+ # print(result)
19
+ unstable_objects = result["unstable_objects"]
20
+ traced_data_all = result["traced_data_all"]
21
+
22
+ # Generate physics statistics with pre-computed collision record
23
+ physics_statistics = generate_physics_statistics(traced_data_all, track_ids)
24
+
25
+ # Print summary
26
+ print(f"\n=== Physics Simulation Results ===")
27
+ print(f"Total objects: {physics_statistics['total_objects']}")
28
+ print(f"Stable objects: {physics_statistics['stable_objects']}")
29
+ print(f"Unstable objects: {physics_statistics['unstable_objects']}")
30
+ print(f"Stability ratio: {physics_statistics['stability_ratio']:.2%}")
31
+
SAGE10k/sage10k/kits/models.py ADDED
@@ -0,0 +1,102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from typing import List, Optional, Dict
2
+ from dataclasses import dataclass
3
+
4
+
5
+ @dataclass
6
+ class Point3D:
7
+ """Represents a 3D coordinate point."""
8
+ x: float
9
+ y: float
10
+ z: float
11
+
12
+ @dataclass
13
+ class Euler:
14
+ """Represents a 3D rotation in Euler angles (x, y, z) in degrees."""
15
+ x: float
16
+ y: float
17
+ z: float
18
+
19
+ @dataclass
20
+ class Dimensions:
21
+ """Represents 3D dimensions."""
22
+ width: float
23
+ length: float
24
+ height: float
25
+
26
+ @dataclass
27
+ class Wall:
28
+ """Represents a wall in the room."""
29
+ id: str
30
+ start_point: Point3D
31
+ end_point: Point3D
32
+ height: float
33
+ thickness: float = 0.1
34
+ material: str = "drywall"
35
+
36
+ @dataclass
37
+ class Window:
38
+ """Represents a window on a wall."""
39
+ id: str
40
+ wall_id: str
41
+ position_on_wall: float # 0-1, position along the wall
42
+ width: float
43
+ height: float
44
+ sill_height: float # height from floor to window sill
45
+ window_type: str = "standard"
46
+ window_material: str = "standard"
47
+
48
+ @dataclass
49
+ class Door:
50
+ """Represents a door on a wall."""
51
+ id: str
52
+ wall_id: str
53
+ position_on_wall: float # 0-1, position along the wall
54
+ width: float
55
+ height: float
56
+ door_type: str = "standard"
57
+ opens_inward: bool = True
58
+ opening: bool = False # if opening is true, then it is a permanent opening without any actual door at the space
59
+ door_material: str = "standard"
60
+
61
+ @dataclass
62
+ class Object:
63
+ """Represents an object/furniture item in a room."""
64
+ id: str # unique id for the object
65
+ room_id: str # id of the room the object is in
66
+ type: str # type of the object
67
+ description: str # description of the object
68
+ position: Point3D # position of the object in the room
69
+ rotation: Euler # rotation of the object in the room
70
+ dimensions: Dimensions # dimensions of the object
71
+ source: str # "objaverse", "generation", etc.
72
+ source_id: str # id of the object in the source
73
+ place_id: str # id of the place the object is in; could be a wall (wall_id), a floor (room_id), or another object (object_id)
74
+ place_guidance: str = "Standard placement for the object" # guidance on where to place the object in the room
75
+ placement_constraints: List[Dict] = None # constraints on the placement of the object
76
+ mass: float = 1.0 # mass of the object in kg
77
+ pbr_parameters: Dict = None # pbr parameters of the object
78
+
79
+ @dataclass
80
+ class Room:
81
+ """Represents a room in the layout."""
82
+ id: str
83
+ room_type: str
84
+ position: Point3D
85
+ dimensions: Dimensions
86
+ walls: List[Wall]
87
+ doors: List[Door]
88
+ objects: List[Object]
89
+ windows: List[Window]
90
+ floor_material: str = "hardwood"
91
+ ceiling_height: float = 2.7 # meters
92
+
93
+ @dataclass
94
+ class FloorPlan:
95
+ """Represents the complete floor plan layout."""
96
+ id: str
97
+ rooms: List[Room]
98
+ total_area: float
99
+ building_style: str
100
+ description: str
101
+ created_from_text: str
102
+ policy_analysis: Dict = None
SAGE10k/sage10k/kits/render_video.py ADDED
@@ -0,0 +1,1606 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ from ast import arg
3
+ import os
4
+ import sys
5
+ import json
6
+ import numpy as np
7
+ import trimesh
8
+ from tqdm import tqdm
9
+ from scipy.interpolate import CubicHermiteSpline, interp1d
10
+ from scipy.ndimage import gaussian_filter1d
11
+ from collections import Counter
12
+ from contextlib import contextmanager
13
+ import bpy
14
+ import imageio
15
+ from tqdm import tqdm
16
+ from PIL import Image
17
+ import mathutils
18
+ import open3d as o3d
19
+
20
+ # Add parent directory to path to import modules
21
+ sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
22
+
23
+ @contextmanager
24
+ def suppress_output():
25
+ with open(os.devnull, "w") as devnull:
26
+ old_stdout = os.dup(1)
27
+ old_stderr = os.dup(2)
28
+ try:
29
+ os.dup2(devnull.fileno(), 1)
30
+ os.dup2(devnull.fileno(), 2)
31
+ yield
32
+ finally:
33
+ os.dup2(old_stdout, 1)
34
+ os.dup2(old_stderr, 2)
35
+ os.close(old_stdout)
36
+ os.close(old_stderr)
37
+
38
+ from tex_utils_local import (
39
+ dict_to_floor_plan,
40
+ export_layout_to_mesh_dict_list_v2
41
+ )
42
+
43
+ # Constants
44
+ MIN_DIST_OBSTACLE = 0.5 # User requirement
45
+ CAMERA_RADIUS = 0.5 # Safety margin for camera body
46
+ WORLD_UP = np.array([0, 0, 1])
47
+
48
+ # Step limits for adaptive sampling
49
+ MAX_TRANS_STEP = 0.05
50
+ MAX_ROT_STEP = np.radians(0.5)
51
+
52
+ class CameraPlannerEnv:
53
+ def __init__(self, room_bounds, all_meshes, interest_meshes=None):
54
+ """
55
+ room_bounds: list/array [x_min, y_min, z_min, x_max, y_max, z_max]
56
+ all_meshes: list of trimesh.Trimesh objects (walls, floor, objects)
57
+ interest_meshes: list of trimesh.Trimesh objects (only objects to focus on)
58
+ """
59
+ self.bounds = np.array(room_bounds)
60
+
61
+ # 1. MERGE MESHES
62
+ if all_meshes:
63
+ self.scene_mesh = trimesh.util.concatenate(all_meshes)
64
+ else:
65
+ self.scene_mesh = trimesh.Trimesh() # Empty mesh if no objects
66
+
67
+ print("Finished merging meshes")
68
+
69
+ if interest_meshes:
70
+ self.interest_mesh = trimesh.util.concatenate(interest_meshes)
71
+ else:
72
+ self.interest_mesh = trimesh.Trimesh()
73
+
74
+ print("Finished merging interest meshes")
75
+
76
+ # 2. BUILD COLLISION ENGINE (All Meshes)
77
+ self.use_kdtree = True
78
+
79
+ if len(self.scene_mesh.faces) > 0:
80
+ try:
81
+ # Sample points from the surface (fast) for collision
82
+ self.collision_points, _ = trimesh.sample.sample_surface(self.scene_mesh, 100000)
83
+ from scipy.spatial import cKDTree
84
+ print(f"Sampled {len(self.collision_points)} collision points, shape: {self.collision_points.shape}")
85
+ self.collision_kdtree = cKDTree(self.collision_points, balanced_tree=False)
86
+ print("Finished building collision kdtree")
87
+ except Exception as e:
88
+ print(f"Warning: Collision point sampling failed ({e}).")
89
+ self.use_kdtree = False
90
+ else:
91
+ self.use_kdtree = False
92
+
93
+ print("Finished building collision engine")
94
+
95
+ # 3. RAY INTERSECTOR
96
+ try:
97
+ from trimesh.ray.ray_pyembree import RayMeshIntersector
98
+ self.intersector = RayMeshIntersector(self.scene_mesh)
99
+ except ImportError:
100
+ from trimesh.ray.ray_triangle import RayMeshIntersector
101
+ self.intersector = RayMeshIntersector(self.scene_mesh)
102
+
103
+ print("Finished building ray intersector")
104
+
105
+ def is_valid_location(self, point, min_dist=0.1):
106
+ """
107
+ Check if the camera position is inside the room AND
108
+ far enough from obstacles.
109
+ """
110
+ # A. Room Bounds Check (Simple AABB)
111
+ if not (np.all(point > self.bounds[:3]) and np.all(point < self.bounds[3:])):
112
+ return False
113
+
114
+ if not self.use_kdtree:
115
+ return True
116
+
117
+ # B. Obstacle Distance Check (Approximate using KDTree of ALL surface points)
118
+ dist, _ = self.collision_kdtree.query(point, k=1)
119
+
120
+ if dist < min_dist:
121
+ return False
122
+
123
+ return True
124
+
125
+ def is_view_clear(self, origin, target, min_view_dist=0.1):
126
+ """
127
+ Check if the 'forward' ray hits an object too early.
128
+ """
129
+ direction = np.array(target) - np.array(origin)
130
+ dist_to_target = np.linalg.norm(direction)
131
+
132
+ if dist_to_target < 1e-6: return False # Target too close to origin
133
+
134
+ direction = direction / dist_to_target
135
+
136
+ if len(self.scene_mesh.faces) == 0:
137
+ return True
138
+
139
+ # Cast a single ray
140
+ hit_points, _, _ = self.intersector.intersects_location(
141
+ ray_origins=[origin],
142
+ ray_directions=[direction]
143
+ )
144
+
145
+ if len(hit_points) == 0:
146
+ return True
147
+
148
+ # Check distance to the closest hit
149
+ closest_hit_dist = np.min(np.linalg.norm(hit_points - origin, axis=1))
150
+
151
+ # If the ray hits something closer than the target (with some margin), view is blocked
152
+ # Ideally we want to see the target, so if hit < dist_to_target, it's blocked.
153
+ # However, target is on surface, so we might hit target itself.
154
+ if closest_hit_dist < dist_to_target - 0.1:
155
+ return False
156
+
157
+ return True
158
+
159
+ def ray_hits_mesh(self, origin, direction):
160
+ """
161
+ Check if a ray from origin in direction hits the mesh.
162
+ """
163
+ if len(self.scene_mesh.faces) == 0:
164
+ return False
165
+
166
+ hit_points, _, _ = self.intersector.intersects_location(
167
+ ray_origins=[origin],
168
+ ray_directions=[direction]
169
+ )
170
+
171
+ return len(hit_points) > 0
172
+
173
+ def check_view_up(forward):
174
+ # Check if up vector satisfies constraint: abs(up . world_up) > 0.2
175
+ # forward: (3,)
176
+ right = np.cross(forward, WORLD_UP)
177
+ if np.linalg.norm(right) < 1e-6:
178
+ return False
179
+ right = right / np.linalg.norm(right)
180
+ up = np.cross(right, forward)
181
+ up = up / np.linalg.norm(up)
182
+ return abs(np.dot(up, WORLD_UP)) > 0.2
183
+
184
+ def slerp_vector(v0, v1, t_array):
185
+ # v0, v1: (3,) unit vectors
186
+ # t_array: (N,) or float, 0..1
187
+ # Returns (N, 3)
188
+
189
+ if np.isscalar(t_array):
190
+ t_array = np.array([t_array])
191
+
192
+ dot = np.dot(v0, v1)
193
+ dot = np.clip(dot, -1.0, 1.0)
194
+ theta = np.arccos(dot)
195
+ sin_theta = np.sin(theta)
196
+
197
+ if abs(sin_theta) < 1e-6:
198
+ # Linear interpolation if parallel
199
+ res = (1 - t_array)[:, np.newaxis] * v0 + t_array[:, np.newaxis] * v1
200
+ norms = np.linalg.norm(res, axis=1)
201
+ # Avoid division by zero
202
+ norms[norms < 1e-6] = 1.0
203
+ return res / norms[:, np.newaxis]
204
+
205
+ w0 = np.sin((1 - t_array) * theta) / sin_theta
206
+ w1 = np.sin(t_array * theta) / sin_theta
207
+
208
+ res = w0[:, np.newaxis] * v0 + w1[:, np.newaxis] * v1
209
+ return res
210
+
211
+ def get_interpolated_forwards(eval_dists, cum_dist, forwards):
212
+ """
213
+ Interpolate forward vectors at given distances along the path.
214
+ """
215
+ new_F = []
216
+ current_seg = 0
217
+
218
+ # Ensure eval_dists are within range
219
+ eval_dists = np.clip(eval_dists, cum_dist[0], cum_dist[-1])
220
+
221
+ for d in eval_dists:
222
+ # Find segment
223
+ while current_seg < len(cum_dist) - 2 and d > cum_dist[current_seg+1]:
224
+ current_seg += 1
225
+
226
+ t_segment_start = cum_dist[current_seg]
227
+ t_segment_end = cum_dist[current_seg+1]
228
+
229
+ segment_len = t_segment_end - t_segment_start
230
+ if segment_len < 1e-6:
231
+ t = 0.0
232
+ else:
233
+ t = (d - t_segment_start) / segment_len
234
+ t = np.clip(t, 0.0, 1.0)
235
+
236
+ f0 = forwards[current_seg]
237
+ f1 = forwards[current_seg+1]
238
+
239
+ res = slerp_vector(f0, f1, t)
240
+ new_F.append(res[0])
241
+
242
+ return np.array(new_F)
243
+
244
+ def get_object_view_candidates(env, obj_mesh, num_samples=300):
245
+ """
246
+ Sample candidate views (position, target) around a specific object mesh.
247
+ """
248
+ candidates = []
249
+
250
+ if obj_mesh is None or obj_mesh.is_empty:
251
+ return candidates
252
+
253
+ center = obj_mesh.centroid
254
+ # max_extent = np.max(obj_mesh.bounding_box.extents)
255
+ extent_x = obj_mesh.bounding_box.extents[0] * 0.5
256
+ extent_y = obj_mesh.bounding_box.extents[1] * 0.5
257
+ extent_z = obj_mesh.bounding_box.extents[2] * 0.5
258
+ max_extent = max(extent_x, extent_y, extent_z)
259
+
260
+ # Sample points on spheres at different radii
261
+ # radii = [1.5 * max_extent, 2.0 * max_extent, 2.5 * max_extent, 3.0 * max_extent]
262
+
263
+ for _ in range(num_samples):
264
+ # Random direction on sphere
265
+ azimuth = np.random.uniform(0, 2 * np.pi)
266
+ elevation = np.random.uniform(0, 60.0 * np.pi / 180.0)
267
+
268
+ direction = np.array([
269
+ np.cos(azimuth) * np.sin(elevation),
270
+ np.sin(azimuth) * np.sin(elevation),
271
+ np.cos(elevation)
272
+ ])
273
+
274
+ r_direction = direction * max_extent
275
+ scale_r = np.max(np.array([r_direction[0] / extent_x, r_direction[1] / extent_y, r_direction[2] / extent_z]))
276
+ r_direction = r_direction / scale_r
277
+
278
+ for _ in range(10):
279
+ r_x = np.random.uniform(1.0, 3.0)
280
+ r_y = np.random.uniform(1.0, 3.0)
281
+ r_z = np.random.uniform(1.0, 3.0)
282
+ r = np.array([r_x, r_y, r_z])
283
+ cam_pos = center + direction * r
284
+
285
+ # Check if position is valid
286
+ if not env.is_valid_location(cam_pos, min_dist=CAMERA_RADIUS):
287
+ # print(f"Invalid location, too close to obstacles")
288
+ continue
289
+
290
+ # Vector from camera to object center
291
+ forward = center - cam_pos
292
+ f_norm = np.linalg.norm(forward)
293
+ if f_norm < 1e-6: continue
294
+ forward /= f_norm
295
+
296
+ # Check constraints
297
+ if not check_view_up(forward):
298
+ # print(f"Invalid view up")
299
+ continue
300
+
301
+ # if not env.is_view_clear(cam_pos, center):
302
+ # print(f"Invalid view clear")
303
+ # continue
304
+
305
+ candidates.append({
306
+ 'position': cam_pos,
307
+ 'target': center,
308
+ 'forward': forward
309
+ })
310
+
311
+ return candidates
312
+
313
+ def generate_anchors(env, room, mesh_dict, max_anchors=20):
314
+ """
315
+ Generate anchor points based on object importance logic.
316
+ """
317
+
318
+ # 1. Classify objects
319
+ wall_ids = set(w.id for w in room.walls)
320
+
321
+ # Count occurrences of objects being placed on other objects
322
+ place_counts = Counter()
323
+ children_info = {}
324
+ for obj in room.objects:
325
+ place_counts[obj.place_id] += 1
326
+ children_info[obj.place_id] = children_info.get(obj.place_id, []) + [obj.id]
327
+
328
+ all_candidates = []
329
+
330
+ # Weight Constants
331
+ BASE_SCORE_FLOOR = 2.0
332
+ BASE_SCORE_WALL = 1.0
333
+ BONUS_PER_CHILD = 1.0
334
+
335
+ processed_count = 0
336
+
337
+ for obj in room.objects:
338
+ # Check if mesh exists
339
+ if obj.id not in mesh_dict:
340
+ continue
341
+
342
+ weight = 0.0
343
+ is_target = False
344
+
345
+ if obj.place_id == 'floor':
346
+ weight = BASE_SCORE_FLOOR
347
+ is_target = True
348
+ elif obj.place_id == 'wall':
349
+ weight = BASE_SCORE_WALL
350
+ is_target = True
351
+
352
+ if is_target:
353
+ # Add bonus for children objects (objects on top)
354
+ weight += place_counts[obj.id] * BONUS_PER_CHILD
355
+
356
+
357
+ # Generate candidates
358
+ mesh_info = mesh_dict.get(obj.id)
359
+
360
+ target_mesh = mesh_info['mesh']
361
+ children_meshes = []
362
+ for child_id in children_info.get(obj.id, []):
363
+ child_mesh = mesh_dict.get(child_id)['mesh']
364
+ children_meshes.append(child_mesh)
365
+
366
+ target_mesh = trimesh.util.concatenate([target_mesh] + children_meshes)
367
+
368
+ cands = get_object_view_candidates(env, target_mesh)
369
+ if len(cands) > 2:
370
+ cands = cands[:2]
371
+ for c in cands:
372
+ c['weight'] = weight
373
+ c['obj_id'] = obj.id
374
+ all_candidates.append(c)
375
+ processed_count += 1
376
+
377
+ # print(f"Object {obj.id} with weight {weight} and {len(cands)} candidates")
378
+ # if 'vanity' in obj.id:
379
+ # assert False
380
+
381
+
382
+ print(f"Processed {processed_count} objects for anchors with weighted scoring.")
383
+
384
+ if not all_candidates:
385
+ print("Warning: No valid object-centric views found. Falling back to random sampling.")
386
+ # Fallback to random valid points
387
+ for _ in range(max_anchors * 5):
388
+ pos = np.random.uniform(env.bounds[:3], env.bounds[3:])
389
+ if env.is_valid_location(pos, min_dist=CAMERA_RADIUS):
390
+ # Look at random point
391
+ target = np.random.uniform(env.bounds[:3], env.bounds[3:])
392
+ fwd = target - pos
393
+ if np.linalg.norm(fwd) > 0.1:
394
+ fwd /= np.linalg.norm(fwd)
395
+ if check_view_up(fwd):
396
+ all_candidates.append({
397
+ 'position': pos,
398
+ 'target': target,
399
+ 'forward': fwd,
400
+ 'weight': 1.0
401
+ })
402
+
403
+ if not all_candidates:
404
+ raise RuntimeError("Could not generate any valid anchors")
405
+
406
+ # 3. Select Anchors
407
+ # Probabilistic selection without replacement (if possible)
408
+ selected_anchors = []
409
+
410
+ weights = np.array([c['weight'] for c in all_candidates])
411
+ weights /= np.sum(weights)
412
+
413
+ # Use indices
414
+ indices = np.arange(len(all_candidates))
415
+
416
+ num_select = min(max_anchors, len(all_candidates))
417
+ selected_indices = np.random.choice(indices, size=num_select, replace=False, p=weights)
418
+
419
+ for idx in selected_indices:
420
+ selected_anchors.append(all_candidates[idx])
421
+
422
+ return selected_anchors
423
+
424
+ def connect_anchors_tsp(anchors, start_idx=0):
425
+ """
426
+ Connect anchors using a greedy nearest neighbor approach, considering both translation and rotation.
427
+ """
428
+ if not anchors:
429
+ return []
430
+
431
+ path = [anchors[start_idx]]
432
+ remaining = anchors[:start_idx] + anchors[start_idx+1:]
433
+
434
+ current = anchors[start_idx]
435
+
436
+ # Weights for distance metric
437
+ W_TRANS = 1.0
438
+ W_ROT = 1.5 # 1.5 meter equivalent per radian of rotation
439
+
440
+ while remaining:
441
+ # Find closest
442
+ best_cost = float('inf')
443
+ best_idx = -1
444
+
445
+ curr_pos = current['position']
446
+ curr_fwd = current['forward']
447
+
448
+ for i, cand in enumerate(remaining):
449
+ # Translation distance
450
+ dist_trans = np.linalg.norm(cand['position'] - curr_pos)
451
+
452
+ # Rotation distance (angle between forward vectors)
453
+ dot = np.dot(curr_fwd, cand['forward'])
454
+ dot = np.clip(dot, -1.0, 1.0)
455
+ dist_rot = np.arccos(dot) # Radians [0, pi]
456
+
457
+ cost = W_TRANS * dist_trans + W_ROT * dist_rot
458
+
459
+ if cost < best_cost:
460
+ best_cost = cost
461
+ best_idx = i
462
+
463
+ current = remaining.pop(best_idx)
464
+ path.append(current)
465
+
466
+ return path
467
+
468
+ def generate_smooth_path(anchors, num_frames=300, env=None):
469
+ """
470
+ Interpolate smoothly between anchors using Cubic Hermite Spline.
471
+ """
472
+ if len(anchors) < 2:
473
+ return np.array([anchors[0]['position']]*num_frames), np.array([anchors[0]['forward']]*num_frames)
474
+
475
+ positions = np.array([a['position'] for a in anchors])
476
+ forwards = np.array([a['forward'] for a in anchors])
477
+
478
+ # Add tangents for Catmull-Rom style or just heuristic
479
+ # tangent[i] ~ (P[i+1] - P[i-1]) / 2
480
+ # For start/end, use difference
481
+ n = len(positions)
482
+ tangents = np.zeros_like(positions)
483
+
484
+ for i in range(n):
485
+ prev_p = positions[max(0, i-1)]
486
+ next_p = positions[min(n-1, i+1)]
487
+ tangents[i] = (next_p - prev_p) * 0.5 # tension
488
+
489
+ # Create spline
490
+ # Parametrize by cumulative distance
491
+ dists = np.linalg.norm(positions[1:] - positions[:-1], axis=1)
492
+ cum_dist = np.insert(np.cumsum(dists), 0, 0)
493
+ total_dist = cum_dist[-1]
494
+
495
+ if total_dist < 1e-6:
496
+ return np.resize(positions, (num_frames, 3)), np.resize(forwards, (num_frames, 3))
497
+
498
+ spline = CubicHermiteSpline(cum_dist, positions, tangents)
499
+
500
+ # --- Adaptive Sampling Strategy ---
501
+ # 1. Sample densely to estimate complexity
502
+ # Use a high enough resolution to capture curvature
503
+ num_dense = max(num_frames * 10, 2000)
504
+ dense_dists = np.linspace(0, total_dist, num_dense)
505
+ dense_P = spline(dense_dists)
506
+
507
+ # Interpolate forwards at dense points
508
+ dense_F = get_interpolated_forwards(dense_dists, cum_dist, forwards)
509
+
510
+ # 2. Compute costs per segment
511
+ # Translation cost
512
+ delta_trans = np.linalg.norm(dense_P[1:] - dense_P[:-1], axis=1)
513
+
514
+ # Rotation cost
515
+ dot_prods = np.sum(dense_F[1:] * dense_F[:-1], axis=1)
516
+ dot_prods = np.clip(dot_prods, -1.0, 1.0)
517
+ delta_rot = np.arccos(dot_prods)
518
+
519
+ # Combined cost (normalized by limits)
520
+ # We want step <= LIMIT, so cost = step / LIMIT
521
+ step_costs = np.maximum(delta_trans / MAX_TRANS_STEP, delta_rot / MAX_ROT_STEP)
522
+
523
+ # Integrate cost to get "effort" coordinate
524
+ cum_effort = np.concatenate(([0], np.cumsum(step_costs)))
525
+ total_effort = cum_effort[-1]
526
+
527
+ # 3. Generate intermediate high-res path based on effort
528
+ # We want enough frames so that each step is small (<= limits)
529
+ # total_effort is roughly the number of steps needed at limit.
530
+ # Add safety factor and ensure at least num_frames
531
+ ideal_num_frames = int(np.ceil(total_effort * 1.2))
532
+ intermediate_num = max(num_frames, ideal_num_frames)
533
+
534
+ # Distribute points uniformly in effort space
535
+ target_effort = np.linspace(0, total_effort, intermediate_num)
536
+
537
+ # Map target effort back to distance
538
+ # interp1d(x=cum_effort, y=dense_dists)
539
+ dist_mapper = interp1d(cum_effort, dense_dists, kind='linear')
540
+ eval_dists = dist_mapper(target_effort)
541
+
542
+ # Initial intermediate positions
543
+ inter_P = spline(eval_dists)
544
+
545
+ # --- Collision Avoidance and Smoothing (on intermediate path) ---
546
+ if env is not None and env.use_kdtree:
547
+ # Check if we have collision info
548
+ # Increase iterations for better convergence with smoothing
549
+ for iteration in range(15):
550
+ # 1. Check collisions
551
+ dists_to_obs, indices = env.collision_kdtree.query(inter_P)
552
+
553
+ # Identify violating points
554
+ # Use a slightly larger margin for the path than for static anchors to be safe
555
+ safe_margin = CAMERA_RADIUS + 0.1
556
+ violations = dists_to_obs < safe_margin
557
+
558
+ # If no violations and we have done at least one smoothing pass (except if perfectly clean initially)
559
+ if not np.any(violations) and iteration > 0:
560
+ break
561
+
562
+ # 2. Push points away
563
+ if np.any(violations):
564
+ near_obs_pts = env.collision_points[indices[violations]]
565
+ cam_pts = inter_P[violations]
566
+
567
+ push_dirs = cam_pts - near_obs_pts
568
+ dirs_norm = np.linalg.norm(push_dirs, axis=1)
569
+
570
+ # Handle concentric case (rare)
571
+ safe_mask = dirs_norm > 1e-6
572
+ push_dirs[~safe_mask] = np.random.normal(size=(np.sum(~safe_mask), 3))
573
+ push_dirs[~safe_mask] /= np.linalg.norm(push_dirs[~safe_mask], axis=1)[:, np.newaxis]
574
+ dirs_norm[~safe_mask] = 1.0
575
+
576
+ push_dirs = push_dirs / dirs_norm[:, np.newaxis]
577
+
578
+ # Push amount: how much deeper are we than safe_margin?
579
+ needed_push = safe_margin - dists_to_obs[violations]
580
+
581
+ # Add a small buffer to push slightly further to account for smoothing pulling it back
582
+ inter_P[violations] += push_dirs * (needed_push[:, np.newaxis] + 0.05)
583
+
584
+ # 3. Smooth the path to avoid jaggedness
585
+ # Use Gaussian smoothing for higher quality results
586
+ if len(inter_P) > 5:
587
+ # Apply smoothing
588
+ # Use sigma=2.0 for reasonable smoothness.
589
+ # Since inter_P is dense (small steps), sigma=2.0 is a local smoothing.
590
+ smoothed_P = gaussian_filter1d(inter_P, sigma=2.0, axis=0, mode='nearest')
591
+
592
+ # Anchor constraints: keep start/end fixed
593
+ smoothed_P[0] = inter_P[0]
594
+ smoothed_P[-1] = inter_P[-1]
595
+
596
+ inter_P = smoothed_P
597
+
598
+ # 4. Enforce room bounds
599
+ inter_P = np.maximum(inter_P, env.bounds[:3] + CAMERA_RADIUS)
600
+ inter_P = np.minimum(inter_P, env.bounds[3:] - CAMERA_RADIUS)
601
+
602
+ # Calculate intermediate orientations
603
+ inter_F = get_interpolated_forwards(eval_dists, cum_dist, forwards)
604
+
605
+ # --- 4. Resample to final num_frames ---
606
+ if intermediate_num == num_frames:
607
+ return inter_P, inter_F
608
+
609
+ # Resample
610
+ t_inter = np.linspace(0, 1, intermediate_num)
611
+ t_final = np.linspace(0, 1, num_frames)
612
+
613
+ # Linear interpolation for positions
614
+ resampler_P = interp1d(t_inter, inter_P, axis=0, kind='linear')
615
+ final_P = resampler_P(t_final)
616
+
617
+ # Linear interpolation for forwards (safe because dense)
618
+ resampler_F = interp1d(t_inter, inter_F, axis=0, kind='linear')
619
+ final_F = resampler_F(t_final)
620
+
621
+ # Normalize forwards
622
+ norms = np.linalg.norm(final_F, axis=1)
623
+ norms[norms < 1e-6] = 1.0
624
+ final_F = final_F / norms[:, np.newaxis]
625
+
626
+ return final_P, final_F
627
+
628
+ def setup_camera_look_at(camera, camera_pos, lookat_pos):
629
+ """Position camera and make it look at target position"""
630
+ # Set camera position
631
+ camera.location = camera_pos
632
+
633
+ # Calculate direction vector
634
+ direction = mathutils.Vector(lookat_pos) - mathutils.Vector(camera_pos)
635
+
636
+ # Point camera to look at target
637
+ rot_quat = direction.to_track_quat('-Z', 'Y')
638
+ camera.rotation_euler = rot_quat.to_euler()
639
+
640
+
641
+ def generate_camera_trajectory(
642
+ room_bounds,
643
+ all_meshes,
644
+ num_frames=300,
645
+ complexity=10,
646
+ env=None,
647
+ room=None,
648
+ mesh_dict=None
649
+ ):
650
+ # 0. Preprocessing
651
+ if env is None:
652
+ print("preprocessing: Building environment...")
653
+ env = CameraPlannerEnv(room_bounds, all_meshes)
654
+
655
+ # 1. Generate Anchors
656
+ anchors = generate_anchors(env, room, mesh_dict, max_anchors=complexity)
657
+
658
+ # 2. Connect Anchors
659
+ # Start with a random one as the first point
660
+ start_idx = np.random.randint(0, len(anchors))
661
+ sorted_anchors = connect_anchors_tsp(anchors, start_idx)
662
+
663
+ # 3. Generate Smooth Path
664
+ trajectory_P, trajectory_F = generate_smooth_path(sorted_anchors, num_frames, env=env)
665
+
666
+ trajectory_poses = []
667
+
668
+ for i in range(num_frames):
669
+ curr_P = trajectory_P[i]
670
+ curr_F = trajectory_F[i]
671
+
672
+ # 4. Compute Orientation (LookAt)
673
+ forward = curr_F
674
+ dist = np.linalg.norm(forward)
675
+ if dist < 1e-6: forward = np.array([1, 0, 0])
676
+ else: forward = forward / dist
677
+
678
+ right = np.cross(forward, WORLD_UP)
679
+ if np.linalg.norm(right) < 1e-6:
680
+ right = np.array([1, 0, 0])
681
+
682
+ right = right / np.linalg.norm(right)
683
+ up = np.cross(right, forward)
684
+ up = up / np.linalg.norm(up)
685
+
686
+ R_mat = np.column_stack([right, up, -forward])
687
+
688
+ # Calculate lookat target from forward vector
689
+ target_pt = curr_P + forward * 2.0
690
+
691
+ trajectory_poses.append({
692
+ 'position': curr_P,
693
+ 'rotation': R_mat,
694
+ 'target': target_pt
695
+ })
696
+
697
+ return trajectory_poses
698
+
699
+ def get_room_meshes(layout, layout_dir):
700
+ mesh_info_dict = export_layout_to_mesh_dict_list_v2(layout, layout_dir)
701
+ all_meshes = []
702
+ interest_meshes = []
703
+
704
+ # Identify object IDs
705
+ object_ids = set()
706
+ for r in layout.rooms:
707
+ for obj in r.objects:
708
+ object_ids.add(obj.id)
709
+
710
+ for mesh_id, mesh_info in mesh_info_dict.items():
711
+ if "mesh" in mesh_info:
712
+ m = mesh_info["mesh"]
713
+ all_meshes.append(m)
714
+ # Check if this mesh corresponds to an object
715
+ if mesh_id in object_ids:
716
+ interest_meshes.append(m)
717
+
718
+ print(f"Found {len(all_meshes)} meshes, {len(interest_meshes)} object meshes")
719
+
720
+ return all_meshes, interest_meshes, mesh_info_dict
721
+
722
+ def setup_scene_lighting(scene, room_size_dict):
723
+ if scene.world is None:
724
+ scene.world = bpy.data.worlds.new("World")
725
+ scene.world.use_nodes = True
726
+ world_nodes = scene.world.node_tree.nodes
727
+ world_nodes.clear()
728
+ world_bg = world_nodes.new(type='ShaderNodeBackground')
729
+ world_bg.inputs[0].default_value = (1, 1, 1, 1)
730
+ world_bg.inputs[1].default_value = 1.0
731
+ world_output = world_nodes.new(type='ShaderNodeOutputWorld')
732
+ scene.world.node_tree.links.new(world_output.inputs['Surface'], world_bg.outputs['Background'])
733
+
734
+ if "WarmAmbientLight" in bpy.data.objects:
735
+ light = bpy.data.objects["WarmAmbientLight"]
736
+ else:
737
+ bpy.ops.object.light_add(type='SUN', location=(0, 0, 10))
738
+ light = bpy.context.active_object
739
+ light.name = "WarmAmbientLight"
740
+
741
+ light.data.energy = 10.0
742
+ light.data.color = (1.0, 0.9, 0.7)
743
+ light.data.angle = np.radians(10)
744
+
745
+ # add ceiling grid lights with 1.0m spacing
746
+ grid_size = 2.0
747
+ offset = 0.1
748
+ ceiling_z = room_size_dict['height'] - offset
749
+
750
+ # Grid spans from offset to width/length - offset
751
+ x_start = offset
752
+ x_end = room_size_dict['width'] - offset
753
+ y_start = offset
754
+ y_end = room_size_dict['length'] - offset
755
+
756
+ # Calculate number of lights in each direction
757
+ num_x = max(1, int((x_end - x_start) / grid_size) + 1)
758
+ num_y = max(1, int((y_end - y_start) / grid_size) + 1)
759
+
760
+ # Calculate spacing
761
+ x_spacing = (x_end - x_start) / max(1, num_x - 1) if num_x > 1 else 0
762
+ y_spacing = (y_end - y_start) / max(1, num_y - 1) if num_y > 1 else 0
763
+
764
+ for i in range(num_x):
765
+ for j in range(num_y):
766
+ x = x_start + x_spacing * i if num_x > 1 else (x_start + x_end) / 2
767
+ y = y_start + y_spacing * j if num_y > 1 else (y_start + y_end) / 2
768
+ bpy.ops.object.light_add(type='POINT', location=(x, y, ceiling_z))
769
+ light = bpy.context.active_object
770
+ light.name = f"CeilingGridLight_{i}_{j}"
771
+ light.data.energy = 100.0
772
+ light.data.color = (1.0, 0.9, 0.7)
773
+
774
+ def get_or_create_collection(collection_name):
775
+ """Get or create a collection"""
776
+ if collection_name in bpy.data.collections:
777
+ return bpy.data.collections[collection_name]
778
+
779
+ collection = bpy.data.collections.new(collection_name)
780
+ bpy.context.scene.collection.children.link(collection)
781
+ return collection
782
+
783
+
784
+ def clear_blender_scene():
785
+ """Clear all objects from Blender scene"""
786
+ bpy.ops.object.select_all(action='SELECT')
787
+ bpy.ops.object.delete(use_global=False)
788
+
789
+ # Clear all collections except the default Scene Collection
790
+ for collection in list(bpy.data.collections):
791
+ bpy.data.collections.remove(collection)
792
+
793
+
794
+ def load_scene_meshes_into_blender(room, layout, layout_dir):
795
+ """Load room layout meshes from files into Blender"""
796
+
797
+ # Clear all existing Blender assets before loading new ones
798
+ clear_blender_scene()
799
+
800
+ # Get mesh info dict
801
+ mesh_info_dict = export_layout_to_mesh_dict_list_v2(layout, layout_dir)
802
+
803
+ # Create collection for scene objects
804
+ scene_collection = get_or_create_collection("scene_objects")
805
+
806
+ # Identify object IDs for pass index assignment
807
+ # Sort for determinism
808
+ object_ids = sorted([obj.id for obj in room.objects])
809
+ obj_id_to_pass_index = {oid: idx + 1 for idx, oid in enumerate(object_ids)}
810
+ print(f"Assigned pass indices for {len(object_ids)} objects (indices 1-{len(object_ids)})")
811
+
812
+ # Import each mesh
813
+ for mesh_id, mesh_info in mesh_info_dict.items():
814
+ # if mesh_id.startswith("door") or mesh_id.startswith("window"):
815
+ # continue
816
+
817
+ trimesh_mesh = mesh_info["mesh"]
818
+
819
+ # Convert trimesh to Blender mesh
820
+ vertices = trimesh_mesh.vertices
821
+ faces = trimesh_mesh.faces
822
+
823
+ # Create new mesh data
824
+ mesh_data = bpy.data.meshes.new(name=f"mesh_{mesh_id}")
825
+ mesh_data.from_pydata(vertices.tolist(), [], faces.tolist())
826
+ mesh_data.update()
827
+
828
+ # Create object from mesh
829
+ obj = bpy.data.objects.new(mesh_id, mesh_data)
830
+
831
+ # Assign pass index
832
+ if mesh_id in obj_id_to_pass_index:
833
+ obj.pass_index = obj_id_to_pass_index[mesh_id]
834
+ else:
835
+ obj.pass_index = 0
836
+
837
+ scene_collection.objects.link(obj)
838
+
839
+ # Load and apply texture if available
840
+ texture_info = mesh_info.get("texture")
841
+ if texture_info and texture_info.get("texture_map_path"):
842
+ texture_path = texture_info["texture_map_path"]
843
+ if os.path.exists(texture_path):
844
+ # Create material with texture
845
+ mat = bpy.data.materials.new(name=f"mat_{mesh_id}")
846
+ mat.use_nodes = True
847
+ nodes = mat.node_tree.nodes
848
+ nodes.clear()
849
+
850
+ # Create shader nodes
851
+ bsdf = nodes.new(type='ShaderNodeBsdfPrincipled')
852
+ tex_image = nodes.new(type='ShaderNodeTexImage')
853
+ output = nodes.new(type='ShaderNodeOutputMaterial')
854
+
855
+ # Load texture image
856
+ tex_image.image = bpy.data.images.load(texture_path)
857
+ tex_image.image.colorspace_settings.name = 'sRGB' # Ensure correct color space
858
+
859
+ # Configure BSDF for clean, slightly glossy appearance like reference images
860
+ bsdf.inputs['Roughness'].default_value = texture_info.get("roughness_factor", 1.0) # Slight gloss
861
+ bsdf.inputs['Specular'].default_value = texture_info.get("metallic_factor", 0.03) # Subtle specularity
862
+ bsdf.inputs['Sheen Tint'].default_value = 0.0 # No sheen
863
+
864
+ # Connect nodes
865
+ mat.node_tree.links.new(bsdf.inputs['Base Color'], tex_image.outputs['Color'])
866
+ mat.node_tree.links.new(output.inputs['Surface'], bsdf.outputs['BSDF'])
867
+
868
+ # Apply material to object
869
+ if obj.data.materials:
870
+ obj.data.materials[0] = mat
871
+ else:
872
+ obj.data.materials.append(mat)
873
+
874
+ # Set UV coordinates if available
875
+ vts = texture_info.get("vts")
876
+ fts = texture_info.get("fts")
877
+ if vts is not None and fts is not None:
878
+ # Create UV layer
879
+ uv_layer = obj.data.uv_layers.new(name="UVMap")
880
+ for face_idx, face in enumerate(fts):
881
+ for vert_idx in range(len(face)):
882
+ loop_idx = face_idx * len(face) + vert_idx
883
+ if loop_idx < len(uv_layer.data):
884
+ uv = vts[face[vert_idx]]
885
+ uv_layer.data[loop_idx].uv = (uv[0], uv[1])
886
+
887
+ print(f"Loaded {len(mesh_info_dict)} meshes into Blender scene")
888
+ return mesh_info_dict, len(object_ids)
889
+
890
+
891
+
892
+ def render_trajectory_video(layout, layout_dir, room_id, trajectory, output_path, fov=30.0, resolution=512, fps=30, render_depth=True):
893
+
894
+
895
+ all_rooms = layout.rooms
896
+ room = next((r for r in all_rooms if r.id == room_id), None)
897
+ if room is None:
898
+ raise ValueError(f"Room {room_id} not found in layout")
899
+
900
+ print("Loading scene meshes into Blender...")
901
+ mesh_info_dict, num_objects = load_scene_meshes_into_blender(room, layout, layout_dir)
902
+
903
+ scene_collection = bpy.data.collections.get("scene_objects")
904
+ scene_objects = list(scene_collection.objects) if scene_collection else []
905
+
906
+ scene = bpy.context.scene
907
+
908
+ if "Camera" in bpy.data.objects:
909
+ camera = bpy.data.objects["Camera"]
910
+ else:
911
+ bpy.ops.object.camera_add()
912
+ camera = bpy.context.active_object
913
+ camera.name = "Camera"
914
+ scene.camera = camera
915
+
916
+ camera.data.type = 'PERSP'
917
+ camera.data.sensor_fit = 'VERTICAL'
918
+ camera.data.angle = np.radians(fov)
919
+
920
+ if args.engine == 'CYCLES':
921
+
922
+ scene.render.engine = 'CYCLES'
923
+ scene.cycles.samples = 64 # Lower samples, denoiser compensates
924
+ scene.cycles.use_denoising = True
925
+
926
+ # Enable GPU/CUDA rendering
927
+ scene.cycles.device = 'GPU'
928
+
929
+ # Use OptiX denoiser (GPU-accelerated, much faster than OIDN on NVIDIA)
930
+ # Fall back to OIDN if OptiX not available
931
+ # scene.cycles.denoiser = 'OPENIMAGEDENOISE'
932
+
933
+ preferences = bpy.context.preferences
934
+ cycles_preferences = preferences.addons['cycles'].preferences
935
+ cycles_preferences.compute_device_type = 'OPTIX'
936
+ # scene.cycles.denoiser = 'OPTIX'
937
+ # Refresh devices to ensure L40S is recognized
938
+ cycles_preferences.get_devices()
939
+ for device in cycles_preferences.devices:
940
+ device.use = (device.type == 'OPTIX')
941
+
942
+ # GPU performance optimizations
943
+ scene.cycles.use_adaptive_sampling = True # Reduces samples in simple areas
944
+ scene.cycles.adaptive_threshold = 0.01
945
+ scene.render.use_persistent_data = True # Keep BVH in memory between frames
946
+
947
+ # Reduce light bounces for faster rendering (still good quality for interiors)
948
+ scene.cycles.max_bounces = 2
949
+ scene.cycles.diffuse_bounces = 2
950
+ scene.cycles.glossy_bounces = 1
951
+ scene.cycles.transmission_bounces = 1
952
+ scene.cycles.volume_bounces = 0
953
+ scene.cycles.transparent_max_bounces = 1
954
+
955
+ else:
956
+ scene.render.engine = 'BLENDER_EEVEE'
957
+ scene.eevee.taa_render_samples = 64
958
+ scene.eevee.use_gtao = True
959
+ scene.eevee.use_ssr = True
960
+ scene.eevee.use_soft_shadows = True
961
+
962
+ room_size_dict = {
963
+ 'width': room.dimensions.width,
964
+ 'length': room.dimensions.length,
965
+ 'height': room.dimensions.height
966
+ }
967
+
968
+ setup_scene_lighting(scene, room_size_dict)
969
+
970
+ scene.render.resolution_x = resolution
971
+ scene.render.resolution_y = resolution
972
+ scene.render.image_settings.file_format = "PNG"
973
+ scene.render.image_settings.color_mode = "RGBA"
974
+ scene.render.film_transparent = True
975
+
976
+ scene.use_nodes = True
977
+ scene.view_layers["ViewLayer"].use_pass_combined = True
978
+ scene.view_layers["ViewLayer"].use_pass_object_index = True
979
+ scene.view_layers["ViewLayer"].use_pass_z = True # Enable depth pass
980
+
981
+ output_dir = os.path.dirname(output_path)
982
+ output_basename = os.path.splitext(os.path.basename(output_path))[0]
983
+ frames_dir = os.path.join(output_dir, f"{output_basename}_frames")
984
+ os.makedirs(frames_dir, exist_ok=True)
985
+
986
+ # Setup Compositor for Instance Masks
987
+ tree = scene.node_tree
988
+ # Clear default nodes
989
+ for n in tree.nodes:
990
+ tree.nodes.remove(n)
991
+
992
+ rl_node = tree.nodes.new('CompositorNodeRLayers')
993
+
994
+ # Output node for masks
995
+ masks_dir = os.path.join(output_dir, f"{output_basename}_masks")
996
+ os.makedirs(masks_dir, exist_ok=True)
997
+
998
+ mask_output_node = tree.nodes.new('CompositorNodeOutputFile')
999
+ mask_output_node.base_path = masks_dir
1000
+ mask_output_node.file_slots[0].path = "mask_"
1001
+ mask_output_node.file_slots[0].use_node_format = True
1002
+ mask_output_node.file_slots[0].format.file_format = 'PNG'
1003
+ mask_output_node.file_slots[0].format.color_depth = '8'
1004
+ mask_output_node.file_slots[0].format.color_mode = 'BW'
1005
+
1006
+ # Divide index by 255 so that ID 1 becomes 1/255 (value 1 in 8-bit PNG)
1007
+ math_node = tree.nodes.new('CompositorNodeMath')
1008
+ math_node.operation = 'DIVIDE'
1009
+ math_node.inputs[1].default_value = 255.0
1010
+
1011
+ tree.links.new(rl_node.outputs['IndexOB'], math_node.inputs[0])
1012
+ tree.links.new(math_node.outputs[0], mask_output_node.inputs[0])
1013
+
1014
+ # Setup depth output via File Output node with EXR format
1015
+ depth_dir = None
1016
+ if render_depth:
1017
+ depth_dir = os.path.join(output_dir, f"{output_basename}_depth")
1018
+ os.makedirs(depth_dir, exist_ok=True)
1019
+
1020
+ # Add File Output node for depth - saves as EXR (32-bit float)
1021
+ depth_output_node = tree.nodes.new('CompositorNodeOutputFile')
1022
+ depth_output_node.name = "DepthOutput"
1023
+ depth_output_node.base_path = depth_dir
1024
+ depth_output_node.file_slots[0].path = "depth_"
1025
+ depth_output_node.file_slots[0].use_node_format = False
1026
+ depth_output_node.file_slots[0].format.file_format = 'OPEN_EXR'
1027
+ depth_output_node.file_slots[0].format.color_depth = '32'
1028
+ tree.links.new(rl_node.outputs['Depth'], depth_output_node.inputs[0])
1029
+
1030
+ rendered_frames = []
1031
+ depth_frames = [] # Store depth arrays for video generation
1032
+
1033
+ print(f"Rendering {len(trajectory)} frames...")
1034
+ for i, pose in enumerate(tqdm(trajectory, desc="Rendering frames")):
1035
+ scene.frame_set(i) # Update frame for File Output node naming
1036
+
1037
+ camera_pos = pose['position']
1038
+ lookat_pos = pose['target']
1039
+
1040
+ setup_camera_look_at(camera, camera_pos, lookat_pos)
1041
+
1042
+ frame_path = os.path.join(frames_dir, f"frame_{i:04d}.png")
1043
+ scene.render.filepath = frame_path
1044
+
1045
+ # Render the frame
1046
+ with suppress_output():
1047
+ bpy.ops.render.render(write_still=True)
1048
+
1049
+ if os.path.exists(frame_path):
1050
+ img = Image.open(frame_path)
1051
+ frame_img = np.array(img)
1052
+
1053
+ if frame_img.shape[-1] == 4:
1054
+ alpha_mask = frame_img[:, :, 3] == 0
1055
+ frame_img[alpha_mask, 0:3] = 255
1056
+
1057
+ rendered_frames.append(frame_img)
1058
+
1059
+ # Depth EXR is saved by the compositor File Output node
1060
+ # We'll read all depth files after rendering is complete
1061
+
1062
+ print(f"Saving video to {output_path}...")
1063
+ imageio.mimsave(output_path, rendered_frames, fps=fps)
1064
+
1065
+ # --- Generate Mask Video ---
1066
+ mask_files = []
1067
+ if os.path.exists(masks_dir):
1068
+ # List all png files in masks_dir
1069
+ # Expected format: mask_XXXX.png (created by blender file output node)
1070
+ # We need to sort them numerically to ensure correct order
1071
+ files = [f for f in os.listdir(masks_dir) if f.endswith('.png')]
1072
+
1073
+ # Helper to extract frame number
1074
+ def get_frame_num(fname):
1075
+ # Assumes format mask_XXXX.png or similar where last part is number
1076
+ name_part = os.path.splitext(fname)[0]
1077
+ # Try to find the number at the end
1078
+ try:
1079
+ return int(name_part.split('_')[-1])
1080
+ except ValueError:
1081
+ return 0
1082
+
1083
+ files.sort(key=get_frame_num)
1084
+ mask_files = [os.path.join(masks_dir, f) for f in files]
1085
+
1086
+ if mask_files and len(mask_files) == len(trajectory):
1087
+ print("Generating mask video with random colors...")
1088
+ mask_frames = []
1089
+
1090
+ # Generate stable random colors
1091
+ # 0 is background (black)
1092
+ # 1..num_objects are instances
1093
+ np.random.seed(42)
1094
+ # Ensure at least enough colors
1095
+ # +1 for background, +1 for safety margin
1096
+ palette_size = max(num_objects + 2, 256)
1097
+ colors = np.random.randint(50, 256, size=(palette_size, 3), dtype=np.uint8)
1098
+ colors[0] = [0, 0, 0] # Background Black
1099
+
1100
+ for fpath in tqdm(mask_files, desc="Processing masks"):
1101
+ try:
1102
+ # Read mask image
1103
+ img = Image.open(fpath)
1104
+ m = np.array(img)
1105
+
1106
+ # Check dimensions. If saved as RGB/RGBA by mistake, take first channel
1107
+ if m.ndim == 3:
1108
+ m = m[..., 0]
1109
+
1110
+ # m contains values 0..N (where 0 is bg, 1..N are objects)
1111
+ # Clip to palette size just in case
1112
+ m_indices = np.clip(m, 0, palette_size - 1)
1113
+
1114
+ # Map to colors
1115
+ colored_frame = colors[m_indices]
1116
+ mask_frames.append(colored_frame)
1117
+ except Exception as e:
1118
+ print(f"Warning: Failed to process mask {fpath}: {e}")
1119
+
1120
+ if mask_frames:
1121
+ mask_video_path = output_path.replace('.mp4', '_mask.mp4')
1122
+ # Handle case where extension wasn't .mp4
1123
+ if mask_video_path == output_path:
1124
+ mask_video_path = output_path + '_mask.mp4'
1125
+
1126
+ print(f"Saving mask video to {mask_video_path}...")
1127
+ imageio.mimsave(mask_video_path, mask_frames, fps=fps)
1128
+
1129
+ # --- Process Depth EXR files and Generate Visualization Video ---
1130
+ if render_depth and depth_dir and os.path.exists(depth_dir):
1131
+ print("Processing depth EXR files using Blender...")
1132
+ import matplotlib.pyplot as plt
1133
+
1134
+ # Find all EXR files in depth_dir
1135
+ exr_files = [f for f in os.listdir(depth_dir) if f.endswith('.exr')]
1136
+
1137
+ # Sort by frame number
1138
+ def get_frame_num(fname):
1139
+ name_part = os.path.splitext(fname)[0]
1140
+ try:
1141
+ return int(name_part.split('_')[-1])
1142
+ except ValueError:
1143
+ return 0
1144
+
1145
+ exr_files.sort(key=get_frame_num)
1146
+ print(f"Found {len(exr_files)} EXR depth files")
1147
+
1148
+ if exr_files:
1149
+ depth_frames = []
1150
+
1151
+ # Read all EXR files using Blender's image loading
1152
+ for exr_fname in tqdm(exr_files, desc="Reading depth EXR files"):
1153
+ exr_path = os.path.join(depth_dir, exr_fname)
1154
+
1155
+ # Load image using Blender
1156
+ img = bpy.data.images.load(exr_path)
1157
+
1158
+ width = img.size[0]
1159
+ height = img.size[1]
1160
+
1161
+ # Get pixel data as float array
1162
+ pixels = np.array(img.pixels[:], dtype=np.float32)
1163
+ pixels = pixels.reshape((height, width, 4)) # RGBA
1164
+
1165
+ # Depth is in R channel
1166
+ depth = pixels[:, :, 0].copy()
1167
+
1168
+ # Flip vertically (Blender images are bottom-up)
1169
+ depth = np.flipud(depth)
1170
+
1171
+ # print(f"Depth: {depth.shape}, {depth.min():.4f}, {depth.max():.4f}")
1172
+
1173
+ depth_frames.append(depth)
1174
+
1175
+ # Save as .npy
1176
+ frame_num = get_frame_num(exr_fname)
1177
+ npy_path = os.path.join(depth_dir, f"depth_{frame_num:04d}.npy")
1178
+ np.save(npy_path, depth)
1179
+
1180
+ # Remove from Blender to free memory
1181
+ bpy.data.images.remove(img)
1182
+
1183
+ # Remove EXR files after converting to npy
1184
+ for exr_fname in exr_files:
1185
+ exr_path = os.path.join(depth_dir, exr_fname)
1186
+ os.remove(exr_path)
1187
+
1188
+ print("Generating depth visualization video with plasma colormap...")
1189
+
1190
+ # Find global max depth for normalization (excluding inf values)
1191
+ all_depths = np.concatenate([d.flatten() for d in depth_frames])
1192
+ finite_depths = all_depths[np.isfinite(all_depths) & (all_depths > 0) & (all_depths < 1e3)]
1193
+ if len(finite_depths) > 0:
1194
+ global_max_depth = np.max(finite_depths)
1195
+ else:
1196
+ global_max_depth = 1.0
1197
+
1198
+ print(f"Global max depth: {global_max_depth}")
1199
+
1200
+ depth_viz_frames = []
1201
+ plasma_cmap = plt.cm.plasma
1202
+
1203
+ for depth in tqdm(depth_frames, desc="Processing depth frames"):
1204
+ # Handle infinite values (background/sky)
1205
+ depth_viz = depth.copy()
1206
+ depth_viz[~np.isfinite(depth_viz)] = global_max_depth
1207
+
1208
+ # Normalize by max depth
1209
+ depth_normalized = depth_viz / global_max_depth
1210
+ depth_normalized = np.clip(depth_normalized, 0, 1)
1211
+
1212
+ # Apply plasma colormap
1213
+ depth_colored = plasma_cmap(depth_normalized)
1214
+
1215
+ # Convert to uint8 RGB (drop alpha channel)
1216
+ depth_rgb = (depth_colored[:, :, :3] * 255).astype(np.uint8)
1217
+ depth_viz_frames.append(depth_rgb)
1218
+
1219
+ depth_video_path = output_path.replace('.mp4', '_depth.mp4')
1220
+ if depth_video_path == output_path:
1221
+ depth_video_path = output_path + '_depth.mp4'
1222
+
1223
+ print(f"Saving depth video to {depth_video_path}...")
1224
+ imageio.mimsave(depth_video_path, depth_viz_frames, fps=fps)
1225
+
1226
+ print(f"Depth .npy files saved to {depth_dir}")
1227
+
1228
+ print("Done!")
1229
+
1230
+
1231
+ def save_point_cloud(output_path, camera_json_path, voxel_size=0.02, save_instance_cloud=True):
1232
+ """
1233
+ Create a merged point cloud from RGB-D frames using Open3D.
1234
+
1235
+ Args:
1236
+ output_path: Path to save the .ply file
1237
+ camera_json_path: Path to the camera trajectory JSON file containing K, width, height, and frames
1238
+ voxel_size: Voxel size for downsampling (default 0.02m = 2cm)
1239
+ save_instance_cloud: If True, also save an instance-colored point cloud (bg=white, instances=random colors)
1240
+ """
1241
+ # Load camera data from JSON
1242
+ with open(camera_json_path, 'r') as f:
1243
+ camera_data = json.load(f)
1244
+
1245
+ K = np.array(camera_data['K'])
1246
+ width = camera_data['width']
1247
+ height = camera_data['height']
1248
+ frames = camera_data['frames']
1249
+
1250
+ # Derive directory paths from camera JSON path (assumes video is .mp4 with same basename)
1251
+ output_dir = os.path.dirname(camera_json_path)
1252
+ output_basename = os.path.splitext(os.path.basename(camera_json_path))[0]
1253
+
1254
+ frames_dir = os.path.join(output_dir, f"{output_basename}_frames")
1255
+ depth_dir = os.path.join(output_dir, f"{output_basename}_depth")
1256
+ masks_dir = os.path.join(output_dir, f"{output_basename}_masks")
1257
+
1258
+ if not os.path.exists(frames_dir):
1259
+ print(f"Error: Frames directory not found: {frames_dir}")
1260
+ return
1261
+ if not os.path.exists(depth_dir):
1262
+ print(f"Error: Depth directory not found: {depth_dir}")
1263
+ return
1264
+
1265
+ # Check if masks directory exists for instance cloud
1266
+ has_masks = os.path.exists(masks_dir) and save_instance_cloud
1267
+ if save_instance_cloud and not os.path.exists(masks_dir):
1268
+ print(f"Warning: Masks directory not found: {masks_dir}. Skipping instance point cloud.")
1269
+
1270
+ # Create Open3D intrinsic object
1271
+ intrinsic = o3d.camera.PinholeCameraIntrinsic(
1272
+ width=width,
1273
+ height=height,
1274
+ fx=K[0, 0],
1275
+ fy=K[1, 1],
1276
+ cx=K[0, 2],
1277
+ cy=K[1, 2]
1278
+ )
1279
+
1280
+ # Find all frame files
1281
+ frame_files = sorted([f for f in os.listdir(frames_dir) if f.endswith('.png')])
1282
+ depth_files = sorted([f for f in os.listdir(depth_dir) if f.endswith('.npy')])
1283
+ mask_files = sorted([f for f in os.listdir(masks_dir) if f.endswith('.png')]) if has_masks else []
1284
+
1285
+ print(f"Found {len(frame_files)} RGB frames and {len(depth_files)} depth maps")
1286
+ if has_masks:
1287
+ print(f"Found {len(mask_files)} mask files")
1288
+
1289
+ if len(frame_files) != len(frames) or len(depth_files) != len(frames):
1290
+ print(f"Warning: Mismatch in counts - rgb_frames: {len(frame_files)}, "
1291
+ f"depths: {len(depth_files)}, camera_frames: {len(frames)}")
1292
+
1293
+ # Use minimum count
1294
+ num_frames = min(len(frame_files), len(depth_files), len(frames))
1295
+ if has_masks:
1296
+ num_frames = min(num_frames, len(mask_files))
1297
+
1298
+ # Generate random colors for instances (consistent across frames)
1299
+ # Use a fixed seed for reproducibility
1300
+ np.random.seed(42)
1301
+ palette_size = 256 # Should be enough for most scenes
1302
+ instance_colors = np.random.randint(50, 256, size=(palette_size, 3), dtype=np.uint8)
1303
+ instance_colors[0] = [255, 255, 255] # Background is white
1304
+
1305
+ # Merged point clouds
1306
+ merged_pcd = o3d.geometry.PointCloud()
1307
+ merged_instance_pcd = o3d.geometry.PointCloud() if has_masks else None
1308
+
1309
+ print(f"Processing {num_frames} frames...")
1310
+ for i in tqdm(range(num_frames), desc="Building point cloud"):
1311
+ # Load RGB image
1312
+ rgb_path = os.path.join(frames_dir, frame_files[i])
1313
+ rgb_img = np.array(Image.open(rgb_path))
1314
+
1315
+ # Handle RGBA -> RGB
1316
+ if rgb_img.shape[-1] == 4:
1317
+ rgb_img = rgb_img[:, :, :3]
1318
+
1319
+ # Load depth map
1320
+ depth_path = os.path.join(depth_dir, depth_files[i])
1321
+ depth = np.load(depth_path)
1322
+
1323
+ # Handle infinite/invalid depth values
1324
+ max_depth = 100.0 # Clip to reasonable max
1325
+ depth[~np.isfinite(depth)] = 0
1326
+ depth[depth > max_depth] = 0
1327
+
1328
+ # Get camera pose from JSON frame data (eye, lookat, up)
1329
+ frame_data = frames[i]
1330
+ eye = np.array(frame_data['eye'])
1331
+ lookat = np.array(frame_data['lookat'])
1332
+ up_vec = np.array(frame_data['up'])
1333
+
1334
+ # Reconstruct rotation matrix from eye, lookat, up
1335
+ # forward = direction camera is looking
1336
+ forward = lookat - eye
1337
+ forward = forward / np.linalg.norm(forward)
1338
+
1339
+ # right = forward × up (perpendicular to both)
1340
+ right = np.cross(forward, up_vec)
1341
+ right = right / np.linalg.norm(right)
1342
+
1343
+ # Recompute up to ensure orthonormality
1344
+ up = np.cross(right, forward)
1345
+ up = up / np.linalg.norm(up)
1346
+
1347
+ # Build rotation matrix: columns are [right, -up, forward]
1348
+ R_mat = np.column_stack([right, -up, forward])
1349
+
1350
+ # Build camera-to-world transform (extrinsic)
1351
+ # R_mat transforms from camera to world: world_vec = R_mat @ cam_vec
1352
+ extrinsic_c2w = np.eye(4)
1353
+ extrinsic_c2w[:3, :3] = R_mat
1354
+ extrinsic_c2w[:3, 3] = eye
1355
+
1356
+ # Open3D's create_point_cloud_from_rgbd_image expects world-to-camera (extrinsic)
1357
+ # So we need the inverse
1358
+ extrinsic_w2c = np.linalg.inv(extrinsic_c2w)
1359
+
1360
+ # Convert to Open3D images for RGB point cloud
1361
+ rgb_o3d = o3d.geometry.Image(rgb_img.astype(np.uint8))
1362
+ depth_o3d = o3d.geometry.Image(depth.astype(np.float32))
1363
+
1364
+ # Create RGBD image
1365
+ rgbd = o3d.geometry.RGBDImage.create_from_color_and_depth(
1366
+ rgb_o3d,
1367
+ depth_o3d,
1368
+ depth_scale=1.0, # depth is already in meters
1369
+ depth_trunc=max_depth,
1370
+ convert_rgb_to_intensity=False
1371
+ )
1372
+
1373
+ # Create point cloud from this frame
1374
+ pcd = o3d.geometry.PointCloud.create_from_rgbd_image(
1375
+ rgbd,
1376
+ intrinsic,
1377
+ extrinsic=extrinsic_w2c
1378
+ )
1379
+
1380
+ # Merge into main point cloud
1381
+ merged_pcd += pcd
1382
+
1383
+ # Process instance mask if available
1384
+ if has_masks:
1385
+ # Load mask
1386
+ mask_path = os.path.join(masks_dir, mask_files[i])
1387
+ mask_img = np.array(Image.open(mask_path))
1388
+
1389
+ # Handle RGB/RGBA mask - take first channel
1390
+ if mask_img.ndim == 3:
1391
+ mask_img = mask_img[..., 0]
1392
+
1393
+ # Map mask indices to colors
1394
+ mask_indices = np.clip(mask_img, 0, palette_size - 1)
1395
+ instance_rgb = instance_colors[mask_indices]
1396
+
1397
+ # Create instance-colored RGBD image
1398
+ instance_rgb_o3d = o3d.geometry.Image(instance_rgb.astype(np.uint8))
1399
+ depth_o3d_instance = o3d.geometry.Image(depth.astype(np.float32))
1400
+
1401
+ rgbd_instance = o3d.geometry.RGBDImage.create_from_color_and_depth(
1402
+ instance_rgb_o3d,
1403
+ depth_o3d_instance,
1404
+ depth_scale=1.0,
1405
+ depth_trunc=max_depth,
1406
+ convert_rgb_to_intensity=False
1407
+ )
1408
+
1409
+ # Create instance point cloud from this frame
1410
+ instance_pcd = o3d.geometry.PointCloud.create_from_rgbd_image(
1411
+ rgbd_instance,
1412
+ intrinsic,
1413
+ extrinsic=extrinsic_w2c
1414
+ )
1415
+
1416
+ merged_instance_pcd += instance_pcd
1417
+
1418
+ print(f"Total points before downsampling: {len(merged_pcd.points)}")
1419
+
1420
+ # Downsample using voxel grid
1421
+ if voxel_size > 0 and len(merged_pcd.points) > 0:
1422
+ merged_pcd = merged_pcd.voxel_down_sample(voxel_size=voxel_size)
1423
+ print(f"Total points after downsampling (voxel_size={voxel_size}m): {len(merged_pcd.points)}")
1424
+
1425
+ # Remove statistical outliers
1426
+ if len(merged_pcd.points) > 100:
1427
+ merged_pcd, _ = merged_pcd.remove_statistical_outlier(nb_neighbors=20, std_ratio=2.0)
1428
+ print(f"Total points after outlier removal: {len(merged_pcd.points)}")
1429
+
1430
+ # Save point cloud
1431
+ o3d.io.write_point_cloud(output_path, merged_pcd)
1432
+ print(f"Point cloud saved to {output_path}")
1433
+
1434
+ # Process and save instance point cloud
1435
+ if has_masks and merged_instance_pcd is not None:
1436
+ print(f"Instance point cloud - Total points before downsampling: {len(merged_instance_pcd.points)}")
1437
+
1438
+ if voxel_size > 0 and len(merged_instance_pcd.points) > 0:
1439
+ merged_instance_pcd = merged_instance_pcd.voxel_down_sample(voxel_size=voxel_size)
1440
+ print(f"Instance point cloud - Total points after downsampling: {len(merged_instance_pcd.points)}")
1441
+
1442
+ if len(merged_instance_pcd.points) > 100:
1443
+ merged_instance_pcd, _ = merged_instance_pcd.remove_statistical_outlier(nb_neighbors=20, std_ratio=2.0)
1444
+ print(f"Instance point cloud - Total points after outlier removal: {len(merged_instance_pcd.points)}")
1445
+
1446
+ # Generate instance output path
1447
+ instance_output_path = output_path.replace('.ply', '_instance.ply')
1448
+ if instance_output_path == output_path:
1449
+ instance_output_path = output_path + '_instance.ply'
1450
+
1451
+ o3d.io.write_point_cloud(instance_output_path, merged_instance_pcd)
1452
+ print(f"Instance point cloud saved to {instance_output_path}")
1453
+
1454
+
1455
+ if __name__ == "__main__":
1456
+ parser = argparse.ArgumentParser(description="Generate camera trajectory for a room")
1457
+ parser.add_argument("layout_path", type=str, help="Layout ID to visualize")
1458
+ parser.add_argument("--room_id", type=str, help="Room ID (optional, defaults to first room)")
1459
+ parser.add_argument("--frames", type=int, default=300, help="Number of frames")
1460
+ parser.add_argument("--complexity", type=int, default=25, help="Number of anchors")
1461
+ parser.add_argument("--num_samples", type=int, default=1, help="Number of samples to generate")
1462
+ parser.add_argument("--output", type=str, default="trajectory.json", help="Output JSON path")
1463
+ parser.add_argument("--render", action="store_true", help="Render video using Blender")
1464
+ parser.add_argument("--engine", type=str, default="CYCLES", choices=["CYCLES", "BLENDER_EEVEE"], help="Render engine")
1465
+ parser.add_argument("--resolution", type=int, default=1024, help="Resolution width (if rendering)")
1466
+ parser.add_argument("--fps", type=int, default=30, help="FPS (if rendering)")
1467
+ parser.add_argument("--save_point_cloud", action="store_true", help="Save merged point cloud from RGB-D frames")
1468
+
1469
+ if "--" in sys.argv:
1470
+ argv = sys.argv[sys.argv.index("--") + 1:]
1471
+ else:
1472
+ argv = sys.argv[1:]
1473
+
1474
+ args = parser.parse_args(argv)
1475
+
1476
+ try:
1477
+ layout_dir = os.path.dirname(args.layout_path)
1478
+ json_path = args.layout_path
1479
+
1480
+ if not os.path.exists(json_path):
1481
+ print(f"Error: Layout file not found at {json_path}")
1482
+ sys.exit(1)
1483
+
1484
+ print(f"Loading layout from {json_path}...")
1485
+ with open(json_path, 'r') as f:
1486
+ layout_data = json.load(f)
1487
+ layout = dict_to_floor_plan(layout_data)
1488
+
1489
+ if args.room_id:
1490
+ room = next((r for r in layout.rooms if r.id == args.room_id), None)
1491
+ if room is None:
1492
+ print(f"Error: Room {args.room_id} not found")
1493
+ sys.exit(1)
1494
+ else:
1495
+ room = layout.rooms[0]
1496
+ print(f"Selected room: {room.id}")
1497
+
1498
+ bounds = [
1499
+ room.position.x, room.position.y, room.position.z,
1500
+ room.position.x + room.dimensions.width,
1501
+ room.position.y + room.dimensions.length,
1502
+ room.position.z + room.dimensions.height
1503
+ ]
1504
+
1505
+ print("Extracting meshes...")
1506
+ all_meshes, interest_meshes, mesh_info_dict = get_room_meshes(layout, layout_dir)
1507
+
1508
+ print("Building environment...")
1509
+ env = CameraPlannerEnv(bounds, all_meshes, interest_meshes)
1510
+
1511
+ base_output, ext = os.path.splitext(args.output)
1512
+ os.makedirs(os.path.dirname(args.output), exist_ok=True)
1513
+ if ext == '': ext = '.json'
1514
+
1515
+ for sample_idx in range(args.num_samples):
1516
+ print(f"\n--- Generating sample {sample_idx} / {args.num_samples} ---")
1517
+ trajectory = generate_camera_trajectory(
1518
+ bounds,
1519
+ all_meshes,
1520
+ num_frames=args.frames,
1521
+ complexity=args.complexity,
1522
+ env=env,
1523
+ room=room,
1524
+ mesh_dict=mesh_info_dict
1525
+ )
1526
+
1527
+ # Compute camera intrinsic matrix K
1528
+ args.fov = np.random.choice([35.0, 45.0, 60.0, 80.0])
1529
+ fov_y = np.radians(args.fov) # Vertical FOV from camera settings
1530
+ width = args.resolution
1531
+ height = width # Aspect ratio from render settings
1532
+
1533
+ fy = height / (2 * np.tan(fov_y / 2))
1534
+ fx = fy # Square pixels
1535
+ cx = width / 2.0
1536
+ cy = height / 2.0
1537
+
1538
+ K = [
1539
+ [fx, 0.0, cx],
1540
+ [0.0, fy, cy],
1541
+ [0.0, 0.0, 1.0]
1542
+ ]
1543
+
1544
+ frames_data = []
1545
+ for pose in trajectory:
1546
+ # up vector is column 1 of rotation matrix (R_mat = [right, up, -forward])
1547
+ up_vector = pose['rotation'][:, 1]
1548
+
1549
+ frames_data.append({
1550
+ 'eye': pose['position'].tolist(),
1551
+ 'lookat': pose['target'].tolist(),
1552
+ 'up': up_vector.tolist()
1553
+ })
1554
+
1555
+ output_data = {
1556
+ 'K': K,
1557
+ 'width': width,
1558
+ 'height': height,
1559
+ 'fov_y_deg': args.fov,
1560
+ 'frames': frames_data
1561
+ }
1562
+
1563
+ current_output_path = f"{base_output}_{sample_idx}{ext}"
1564
+
1565
+ with open(current_output_path, 'w') as f:
1566
+ json.dump(output_data, f, indent=2)
1567
+
1568
+ print(f"Trajectory saved to {current_output_path} with {len(frames_data)} frames")
1569
+
1570
+ if args.render:
1571
+ print(f"Rendering video for sample {sample_idx}...")
1572
+ video_output_path = current_output_path.replace('.json', '.mp4')
1573
+ if video_output_path == current_output_path:
1574
+ video_output_path = current_output_path + '.mp4'
1575
+
1576
+ render_trajectory_video(
1577
+ layout,
1578
+ layout_dir,
1579
+ room.id,
1580
+ trajectory,
1581
+ video_output_path,
1582
+ fov=args.fov,
1583
+ resolution=args.resolution,
1584
+ fps=args.fps,
1585
+ render_depth=True
1586
+ )
1587
+
1588
+ if args.save_point_cloud:
1589
+ if not args.render:
1590
+ print("Warning: --save_point_cloud requires --render to generate RGB-D frames. Skipping.")
1591
+ else:
1592
+ print(f"Saving point cloud for sample {sample_idx}...")
1593
+ point_cloud_output_path = current_output_path.replace('.json', '_point_cloud.ply')
1594
+ if point_cloud_output_path == current_output_path:
1595
+ point_cloud_output_path = current_output_path + '_point_cloud.ply'
1596
+
1597
+ save_point_cloud(
1598
+ output_path=point_cloud_output_path,
1599
+ camera_json_path=current_output_path
1600
+ )
1601
+
1602
+ except Exception as e:
1603
+ print(f"Error: {e}", file=sys.stderr)
1604
+ import traceback
1605
+ traceback.print_exc()
1606
+ sys.exit(1)
SAGE10k/sage10k/kits/tex_utils_local.py ADDED
@@ -0,0 +1,2016 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from models import FloorPlan, Room, Wall, Door, Object, Window, Point3D, Dimensions, Euler
2
+ import trimesh
3
+ import numpy as np
4
+ import os
5
+ import xatlas
6
+ from typing import Dict
7
+ import json
8
+ from glb_utils import load_glb_to_mesh_dict
9
+ from plyfile import PlyData
10
+
11
+
12
+ def load_ply_to_mesh_dict(ply_path):
13
+ """
14
+ Load PLY file to mesh dict with texture coordinates.
15
+ Loads the original topology without any modifications.
16
+
17
+ Args:
18
+ ply_path: Path to the PLY file
19
+
20
+ Returns:
21
+ mesh_dict: Dictionary containing:
22
+ - 'vertices': Nx3 array of vertex positions
23
+ - 'faces': Mx3 array of face vertex indices
24
+ - 'vts': Kx2 array of texture coordinates
25
+ - 'fts': Mx3 array of face texture coordinate indices
26
+ """
27
+
28
+ ply_data = PlyData.read(ply_path)
29
+
30
+ # Extract vertex data
31
+ vertex_data = ply_data['vertex']
32
+ vertices = np.column_stack([
33
+ vertex_data['x'],
34
+ vertex_data['y'],
35
+ vertex_data['z']
36
+ ])
37
+
38
+ # Extract texture coordinates from separate element
39
+ texcoord_data = ply_data['texcoord']
40
+ vts = np.column_stack([
41
+ texcoord_data['s'],
42
+ texcoord_data['t']
43
+ ])
44
+
45
+ # Extract face data with both vertex_indices and texcoord_indices
46
+ face_data = ply_data['face']
47
+ faces = np.vstack(face_data['vertex_indices'])
48
+ fts = np.vstack(face_data['texcoord_indices'])
49
+
50
+ return {
51
+ 'vertices': vertices,
52
+ 'faces': faces,
53
+ 'vts': vts,
54
+ 'fts': fts,
55
+ }
56
+
57
+
58
+
59
+ def dict_to_room(room_data: dict) -> Room:
60
+ """
61
+ Convert a dictionary to a Room object.
62
+
63
+ Args:
64
+ room_data: Dictionary containing room data
65
+
66
+ Returns:
67
+ Room object reconstructed from the dictionary
68
+ """
69
+ try:
70
+ # Convert position
71
+ position = Point3D(
72
+ x=room_data["position"]["x"],
73
+ y=room_data["position"]["y"],
74
+ z=room_data["position"]["z"]
75
+ )
76
+
77
+ # Convert dimensions
78
+ dimensions = Dimensions(
79
+ width=room_data["dimensions"]["width"],
80
+ length=room_data["dimensions"]["length"],
81
+ height=room_data["dimensions"]["height"]
82
+ )
83
+
84
+ # Convert walls
85
+ walls = []
86
+ for wall_data in room_data["walls"]:
87
+ wall = dict_to_wall(wall_data)
88
+ walls.append(wall)
89
+
90
+ # Convert doors
91
+ doors = []
92
+ for door_data in room_data["doors"]:
93
+ door = dict_to_door(door_data)
94
+ doors.append(door)
95
+
96
+ # Convert windows
97
+ windows = []
98
+ for window_data in room_data["windows"]:
99
+ window = dict_to_window(window_data)
100
+ windows.append(window)
101
+
102
+ # Convert objects
103
+ objects = []
104
+ for object_data in room_data.get("objects", []):
105
+ obj = dict_to_object(object_data)
106
+ objects.append(obj)
107
+
108
+ # Create Room object
109
+ room = Room(
110
+ id=room_data["id"],
111
+ room_type=room_data["room_type"],
112
+ position=position,
113
+ dimensions=dimensions,
114
+ walls=walls,
115
+ doors=doors,
116
+ objects=objects,
117
+ windows=windows,
118
+ floor_material=room_data.get("floor_material", "hardwood"),
119
+ ceiling_height=room_data.get("ceiling_height", 2.7)
120
+ )
121
+
122
+ return room
123
+
124
+ except KeyError as e:
125
+ raise ValueError(f"Missing required field in room data: {e}")
126
+ except Exception as e:
127
+ raise ValueError(f"Error converting room data: {e}")
128
+
129
+
130
+ def dict_to_wall(wall_data: dict) -> Wall:
131
+ """
132
+ Convert a dictionary to a Wall object.
133
+
134
+ Args:
135
+ wall_data: Dictionary containing wall data
136
+
137
+ Returns:
138
+ Wall object reconstructed from the dictionary
139
+ """
140
+ try:
141
+ start_point = Point3D(
142
+ x=wall_data["start_point"]["x"],
143
+ y=wall_data["start_point"]["y"],
144
+ z=wall_data["start_point"]["z"]
145
+ )
146
+
147
+ end_point = Point3D(
148
+ x=wall_data["end_point"]["x"],
149
+ y=wall_data["end_point"]["y"],
150
+ z=wall_data["end_point"]["z"]
151
+ )
152
+
153
+ wall = Wall(
154
+ id=wall_data["id"],
155
+ start_point=start_point,
156
+ end_point=end_point,
157
+ height=wall_data["height"],
158
+ thickness=wall_data.get("thickness", 0.1),
159
+ material=wall_data.get("material", "drywall")
160
+ )
161
+
162
+ return wall
163
+
164
+ except KeyError as e:
165
+ raise ValueError(f"Missing required field in wall data: {e}")
166
+ except Exception as e:
167
+ raise ValueError(f"Error converting wall data: {e}")
168
+
169
+
170
+ def dict_to_door(door_data: dict) -> Door:
171
+ """
172
+ Convert a dictionary to a Door object.
173
+
174
+ Args:
175
+ door_data: Dictionary containing door data
176
+
177
+ Returns:
178
+ Door object reconstructed from the dictionary
179
+ """
180
+ try:
181
+ door = Door(
182
+ id=door_data["id"],
183
+ wall_id=door_data["wall_id"],
184
+ position_on_wall=door_data["position_on_wall"],
185
+ width=door_data["width"],
186
+ height=door_data["height"],
187
+ door_type=door_data.get("door_type", "standard"),
188
+ opens_inward=door_data.get("opens_inward", True),
189
+ opening=door_data.get("opening", False),
190
+ door_material=door_data.get("door_material", "wood")
191
+ )
192
+
193
+ return door
194
+
195
+ except KeyError as e:
196
+ raise ValueError(f"Missing required field in door data: {e}")
197
+ except Exception as e:
198
+ raise ValueError(f"Error converting door data: {e}")
199
+
200
+
201
+ def dict_to_window(window_data: dict) -> Window:
202
+ """
203
+ Convert a dictionary to a Window object.
204
+
205
+ Args:
206
+ window_data: Dictionary containing window data
207
+
208
+ Returns:
209
+ Window object reconstructed from the dictionary
210
+ """
211
+ try:
212
+ window = Window(
213
+ id=window_data["id"],
214
+ wall_id=window_data["wall_id"],
215
+ position_on_wall=window_data["position_on_wall"],
216
+ width=window_data["width"],
217
+ height=window_data["height"],
218
+ sill_height=window_data["sill_height"],
219
+ window_type=window_data.get("window_type", "standard")
220
+ )
221
+
222
+ return window
223
+
224
+ except KeyError as e:
225
+ raise ValueError(f"Missing required field in window data: {e}")
226
+ except Exception as e:
227
+ raise ValueError(f"Error converting window data: {e}")
228
+
229
+
230
+ def dict_to_object(object_data: dict) -> Object:
231
+ """
232
+ Convert a dictionary to an Object object.
233
+
234
+ Args:
235
+ object_data: Dictionary containing object data
236
+
237
+ Returns:
238
+ Object object reconstructed from the dictionary
239
+ """
240
+ try:
241
+ # Convert position
242
+ position = Point3D(
243
+ x=object_data["position"]["x"],
244
+ y=object_data["position"]["y"],
245
+ z=object_data["position"]["z"]
246
+ )
247
+
248
+ # Convert rotation
249
+ rotation = Euler(
250
+ x=object_data["rotation"]["x"],
251
+ y=object_data["rotation"]["y"],
252
+ z=object_data["rotation"]["z"]
253
+ )
254
+
255
+ # Convert dimensions
256
+ dimensions = Dimensions(
257
+ width=object_data["dimensions"]["width"],
258
+ length=object_data["dimensions"]["length"],
259
+ height=object_data["dimensions"]["height"]
260
+ )
261
+
262
+ obj = Object(
263
+ id=object_data["id"],
264
+ room_id=object_data["room_id"],
265
+ type=object_data["type"],
266
+ description=object_data["description"],
267
+ position=position,
268
+ rotation=rotation,
269
+ dimensions=dimensions,
270
+ source=object_data["source"],
271
+ source_id=object_data["source_id"],
272
+ place_id=object_data["place_id"],
273
+ mass=object_data.get("mass", 1.0),
274
+ pbr_parameters=object_data.get("pbr_parameters", None)
275
+ )
276
+
277
+ return obj
278
+
279
+ except KeyError as e:
280
+ raise ValueError(f"Missing required field in object data: {e}")
281
+ except Exception as e:
282
+ raise ValueError(f"Error converting object data: {e}")
283
+
284
+
285
+ def apply_object_transform(mesh: trimesh.Trimesh, obj: Object) -> trimesh.Trimesh:
286
+ """
287
+ Apply position and rotation transforms to an object mesh.
288
+
289
+ Args:
290
+ mesh: The original mesh (untransformed)
291
+ obj: Object containing position and rotation information
292
+
293
+ Returns:
294
+ Transformed mesh positioned and rotated according to object properties
295
+ """
296
+ # Create a copy of the mesh to avoid modifying the original
297
+ transformed_mesh = mesh.copy()
298
+
299
+ # Convert Euler angles from degrees to radians
300
+ rx_rad = np.radians(obj.rotation.x)
301
+ ry_rad = np.radians(obj.rotation.y)
302
+ rz_rad = np.radians(obj.rotation.z)
303
+
304
+ # Create rotation matrices for each axis
305
+ # Rotation order: X -> Y -> Z (Euler XYZ)
306
+ rotation_x = trimesh.transformations.rotation_matrix(rx_rad, [1, 0, 0])
307
+ rotation_y = trimesh.transformations.rotation_matrix(ry_rad, [0, 1, 0])
308
+ rotation_z = trimesh.transformations.rotation_matrix(rz_rad, [0, 0, 1])
309
+
310
+ # Combine rotations (order matters: Z * Y * X for XYZ Euler)
311
+ combined_rotation = rotation_z @ rotation_y @ rotation_x
312
+
313
+ # Create translation matrix
314
+ translation = trimesh.transformations.translation_matrix([
315
+ obj.position.x,
316
+ obj.position.y,
317
+ obj.position.z
318
+ ])
319
+
320
+ # Combine rotation and translation (translation after rotation)
321
+ final_transform = translation @ combined_rotation
322
+
323
+ # Apply the transform to the mesh
324
+ transformed_mesh.apply_transform(final_transform)
325
+
326
+ return transformed_mesh
327
+
328
+ def apply_object_transform_return_transform(mesh: trimesh.Trimesh, obj: Object) -> trimesh.Trimesh:
329
+ """
330
+ Apply position and rotation transforms to an object mesh.
331
+
332
+ Args:
333
+ mesh: The original mesh (untransformed)
334
+ obj: Object containing position and rotation information
335
+
336
+ Returns:
337
+ Transformed mesh positioned and rotated according to object properties
338
+ """
339
+ # Create a copy of the mesh to avoid modifying the original
340
+ transformed_mesh = mesh.copy()
341
+
342
+ # Convert Euler angles from degrees to radians
343
+ rx_rad = np.radians(obj.rotation.x)
344
+ ry_rad = np.radians(obj.rotation.y)
345
+ rz_rad = np.radians(obj.rotation.z)
346
+
347
+ # Create rotation matrices for each axis
348
+ # Rotation order: X -> Y -> Z (Euler XYZ)
349
+ rotation_x = trimesh.transformations.rotation_matrix(rx_rad, [1, 0, 0])
350
+ rotation_y = trimesh.transformations.rotation_matrix(ry_rad, [0, 1, 0])
351
+ rotation_z = trimesh.transformations.rotation_matrix(rz_rad, [0, 0, 1])
352
+
353
+ # Combine rotations (order matters: Z * Y * X for XYZ Euler)
354
+ combined_rotation = rotation_z @ rotation_y @ rotation_x
355
+
356
+ # Create translation matrix
357
+ translation = trimesh.transformations.translation_matrix([
358
+ obj.position.x,
359
+ obj.position.y,
360
+ obj.position.z
361
+ ])
362
+
363
+ # Combine rotation and translation (translation after rotation)
364
+ final_transform = translation @ combined_rotation
365
+
366
+ # Apply the transform to the mesh
367
+ transformed_mesh.apply_transform(final_transform)
368
+
369
+ return transformed_mesh, final_transform
370
+
371
+
372
+ def apply_object_transform_direct(mesh: trimesh.Trimesh, position: Dict[str, float], rotation: Dict[str, float]) -> trimesh.Trimesh:
373
+ """
374
+ Apply position and rotation transforms to an object mesh.
375
+
376
+ Args:
377
+ mesh: The original mesh (untransformed)
378
+ obj: Object containing position and rotation information
379
+
380
+ Returns:
381
+ Transformed mesh positioned and rotated according to object properties
382
+ """
383
+ # Create a copy of the mesh to avoid modifying the original
384
+ transformed_mesh = mesh.copy()
385
+
386
+ # Convert Euler angles from degrees to radians
387
+ rx_rad = np.radians(rotation["x"])
388
+ ry_rad = np.radians(rotation["y"])
389
+ rz_rad = np.radians(rotation["z"])
390
+
391
+ # Create rotation matrices for each axis
392
+ # Rotation order: X -> Y -> Z (Euler XYZ)
393
+ rotation_x = trimesh.transformations.rotation_matrix(rx_rad, [1, 0, 0])
394
+ rotation_y = trimesh.transformations.rotation_matrix(ry_rad, [0, 1, 0])
395
+ rotation_z = trimesh.transformations.rotation_matrix(rz_rad, [0, 0, 1])
396
+
397
+ # Combine rotations (order matters: Z * Y * X for XYZ Euler)
398
+ combined_rotation = rotation_z @ rotation_y @ rotation_x
399
+
400
+ # Create translation matrix
401
+ translation = trimesh.transformations.translation_matrix([
402
+ position["x"],
403
+ position["y"],
404
+ position["z"]
405
+ ])
406
+
407
+ # Combine rotation and translation (translation after rotation)
408
+ final_transform = translation @ combined_rotation
409
+
410
+ # Apply the transform to the mesh
411
+ transformed_mesh.apply_transform(final_transform)
412
+
413
+ return transformed_mesh
414
+
415
+
416
+ def dict_to_floor_plan(layout_data: dict) -> FloorPlan:
417
+ """
418
+ Convert a dictionary (from JSON) back to a FloorPlan object.
419
+
420
+ Args:
421
+ layout_data: Dictionary containing the floor plan data
422
+
423
+ Returns:
424
+ FloorPlan object reconstructed from the dictionary
425
+
426
+ Raises:
427
+ ValueError: If the data structure is invalid or incomplete
428
+ """
429
+ try:
430
+ # Convert rooms
431
+ rooms = []
432
+ for room_data in layout_data["rooms"]:
433
+ room = dict_to_room(room_data)
434
+ rooms.append(room)
435
+
436
+ # Create FloorPlan object
437
+ floor_plan = FloorPlan(
438
+ id=layout_data["id"],
439
+ rooms=rooms,
440
+ total_area=layout_data["total_area"],
441
+ building_style=layout_data["building_style"],
442
+ description=layout_data["description"],
443
+ created_from_text=layout_data["created_from_text"]
444
+ )
445
+
446
+ return floor_plan
447
+
448
+ except KeyError as e:
449
+ raise ValueError(f"Missing required field in layout data: {e}")
450
+ except Exception as e:
451
+ raise ValueError(f"Error converting layout data: {e}")
452
+
453
+
454
+ def create_floor_mesh(room: Room) -> trimesh.Trimesh:
455
+ """Create a floor mesh for a room."""
456
+ pos = room.position
457
+ dims = room.dimensions
458
+
459
+ # Create floor as a thin box
460
+ floor_thickness = 0.1
461
+ floor_box = trimesh.creation.box(
462
+ extents=[dims.width, dims.length, floor_thickness],
463
+ transform=trimesh.transformations.translation_matrix([
464
+ pos.x + dims.width/2,
465
+ pos.y + dims.length/2,
466
+ pos.z - floor_thickness/2
467
+ ])
468
+ )
469
+
470
+ return floor_box
471
+
472
+
473
+ def create_room_meshes_with_openings(room: Room, processed_doors: set, processed_windows: set):
474
+ """
475
+ Create wall meshes with door and window openings cut out using boolean operations.
476
+
477
+ Returns:
478
+ Tuple of (wall_meshes, door_meshes, window_meshes)
479
+ """
480
+ wall_meshes = []
481
+ door_meshes = []
482
+ window_meshes = []
483
+
484
+ wall_ids = []
485
+ door_ids = []
486
+ window_ids = []
487
+
488
+ # Create each wall
489
+ for wall in room.walls:
490
+ wall_mesh = create_wall_mesh(wall, room)
491
+ wall_ids.append(wall.id)
492
+ # Find doors and windows on this wall
493
+ wall_doors = [door for door in room.doors if door.wall_id == wall.id]
494
+ wall_windows = [window for window in room.windows if window.wall_id == wall.id]
495
+
496
+ # Create door meshes and subtract from wall
497
+ for door in wall_doors:
498
+ door_id = get_door_unique_id(room, door)
499
+ if door_id not in processed_doors:
500
+ door_mesh = create_door_mesh(wall, door, door_size_offset=0.11)
501
+ if not door.opening:
502
+ door_meshes.append(door_mesh)
503
+ processed_doors.add(door_id)
504
+ door_ids.append(door_id)
505
+ # Cut door opening from wall
506
+ try:
507
+ wall_mesh = wall_mesh.difference(door_mesh, engine="manifold")
508
+ except:
509
+ # If boolean operation fails, just subtract a simple box
510
+ opening_mesh = create_door_opening_mesh(wall, door)
511
+ try:
512
+ wall_mesh = wall_mesh.difference(opening_mesh, engine="manifold")
513
+ except:
514
+ print(f"Boolean operation failed for door {door.id} on wall {wall.id}")
515
+ pass # Keep original wall if boolean ops fail
516
+
517
+ # Create window meshes and subtract from wall
518
+ for window in wall_windows:
519
+ window_id = get_window_unique_id(room, window)
520
+ if window_id not in processed_windows:
521
+ window_mesh = create_window_mesh(wall, window)
522
+ window_meshes.append(window_mesh)
523
+ processed_windows.add(window_id)
524
+ window_ids.append(window.id)
525
+ # Cut window opening from wall
526
+ try:
527
+ wall_mesh = wall_mesh.difference(window_mesh, engine="manifold")
528
+ except:
529
+ # If boolean operation fails, just subtract a simple box
530
+ opening_mesh = create_window_opening_mesh(wall, window)
531
+ try:
532
+ wall_mesh = wall_mesh.difference(opening_mesh, engine="manifold")
533
+ except:
534
+ print(f"Boolean operation failed for window {window.id} on wall {wall.id}")
535
+ pass # Keep original wall if boolean ops fail
536
+
537
+ wall_meshes.append(wall_mesh)
538
+
539
+ return wall_meshes, door_meshes, window_meshes, wall_ids, door_ids, window_ids
540
+
541
+
542
+
543
+ def create_wall_mesh(wall: Wall, room: Room) -> trimesh.Trimesh:
544
+ """Create a wall mesh from wall definition."""
545
+ import numpy as np
546
+
547
+ # Calculate wall direction and length
548
+ start = np.array([wall.start_point.x, wall.start_point.y, wall.start_point.z])
549
+ end = np.array([wall.end_point.x, wall.end_point.y, wall.end_point.z])
550
+
551
+ wall_vector = end - start
552
+ wall_length = np.linalg.norm(wall_vector)
553
+ wall_direction = wall_vector / wall_length
554
+
555
+ # Calculate room center from room position and dimensions
556
+ room_center = np.array([
557
+ room.position.x + room.dimensions.width / 2,
558
+ room.position.y + room.dimensions.length / 2,
559
+ room.position.z
560
+ ])
561
+
562
+ # Calculate wall center point at the midpoint of start-end line
563
+ wall_center = (start + end) / 2
564
+
565
+ # Calculate both possible normal directions (perpendicular to wall)
566
+ # For a vector (x, y, z), the two perpendicular directions in XY plane are:
567
+ normal1 = np.array([wall_direction[1], -wall_direction[0], 0])
568
+ normal2 = np.array([-wall_direction[1], wall_direction[0], 0])
569
+
570
+ # Vector from wall center to room center
571
+ wall_to_room = room_center - wall_center
572
+
573
+ # Choose the normal that points toward the room center
574
+ # (has positive dot product with wall_to_room vector)
575
+ if np.dot(normal1, wall_to_room) > 0:
576
+ inward_normal = normal1
577
+ else:
578
+ inward_normal = normal2
579
+
580
+ # Use half thickness to avoid overlapping with adjacent walls
581
+ half_thickness = wall.thickness / 2
582
+
583
+ # Set wall center Z coordinate
584
+ wall_center[2] = wall.start_point.z + wall.height / 2
585
+
586
+ # Offset the wall center by half thickness in the inward direction
587
+ # This positions the wall mesh only on the inside of the room
588
+ wall_center_offset = wall_center + inward_normal * (half_thickness / 2)
589
+
590
+ # Create wall mesh as a box with half thickness
591
+ wall_box = trimesh.creation.box(
592
+ extents=[wall_length, half_thickness, wall.height]
593
+ )
594
+
595
+ # Calculate rotation to align with wall direction
596
+ # Default box is aligned with X-axis, we need to rotate to wall direction
597
+ if abs(wall_direction[0]) < 0.001: # Vertical wall (Y-aligned)
598
+ rotation_matrix = trimesh.transformations.rotation_matrix(np.pi/2, [0, 0, 1])
599
+ else: # Horizontal wall (X-aligned) - no rotation needed
600
+ rotation_matrix = np.eye(4)
601
+
602
+ # Apply transformation
603
+ transform = trimesh.transformations.translation_matrix(wall_center_offset) @ rotation_matrix
604
+ wall_box.apply_transform(transform)
605
+
606
+ return wall_box
607
+
608
+
609
+ def create_door_mesh(wall: Wall, door: Door, size_scale: float = 1.0, thickness_scale: float = 1.0, door_size_offset: float = 0.0) -> trimesh.Trimesh:
610
+ """Create a door mesh positioned on the wall."""
611
+ import numpy as np
612
+
613
+ # Calculate door position on wall
614
+ start = np.array([wall.start_point.x, wall.start_point.y, wall.start_point.z])
615
+ end = np.array([wall.end_point.x, wall.end_point.y, wall.end_point.z])
616
+ wall_vector = end - start
617
+
618
+ # Position along the wall
619
+ door_position_3d = start + wall_vector * door.position_on_wall
620
+ door_position_3d[2] = wall.start_point.z + door.height / 2
621
+
622
+ # Create door mesh
623
+ door_box = trimesh.creation.box(
624
+ extents=[door.width * size_scale + door_size_offset, wall.thickness * thickness_scale, door.height * size_scale + door_size_offset] # Slightly thicker than wall
625
+ )
626
+
627
+ # Rotate if wall is vertical
628
+ wall_direction = wall_vector / np.linalg.norm(wall_vector)
629
+ if abs(wall_direction[0]) < 0.001: # Vertical wall
630
+ rotation_matrix = trimesh.transformations.rotation_matrix(np.pi/2, [0, 0, 1])
631
+ door_box.apply_transform(rotation_matrix)
632
+
633
+ # Position door
634
+ door_box.apply_translation(door_position_3d)
635
+
636
+ return door_box
637
+
638
+
639
+ def create_door_frame_mesh(wall: Wall, door: Door, size_scale: float = 1.0, thickness_scale: float = 1.0, frame_width: float = 0.05) -> trimesh.Trimesh:
640
+ """Create a door frame mesh with left, right, and top edges surrounding the door."""
641
+ import numpy as np
642
+
643
+ # Calculate door position on wall
644
+ start = np.array([wall.start_point.x, wall.start_point.y, wall.start_point.z])
645
+ end = np.array([wall.end_point.x, wall.end_point.y, wall.end_point.z])
646
+ wall_vector = end - start
647
+ wall_direction = wall_vector / np.linalg.norm(wall_vector)
648
+
649
+ # Position along the wall
650
+ door_position_3d = start + wall_vector * door.position_on_wall
651
+ door_position_3d[2] = wall.start_point.z + door.height / 2
652
+
653
+ # Door dimensions (scaled) - this is the actual door size that will be created
654
+ door_width = door.width * size_scale
655
+ door_height = door.height * size_scale
656
+ door_thickness = wall.thickness * thickness_scale
657
+
658
+ # Frame dimensions
659
+ frame_thickness = wall.thickness * thickness_scale # Frame uses full wall thickness
660
+
661
+ # Calculate the gap between scaled door and original door opening
662
+ # The wall opening is typically the full door size, scaled door is smaller
663
+ gap_width = (door.width - door_width) / 2
664
+ gap_height = door.height - door_height # Only at top since door sits on floor
665
+
666
+ # The frame should be positioned completely outside the door region
667
+ # We need to ensure no overlap with the actual door (door_width x door_height)
668
+
669
+ frame_meshes = []
670
+
671
+ # Create left frame piece - positioned completely outside the door region
672
+ left_frame = trimesh.creation.box(
673
+ extents=[frame_width, frame_thickness, door_height + gap_height + frame_width]
674
+ )
675
+ # Position left frame to be completely outside the door region
676
+ # The door extends from -door_width/2 to +door_width/2
677
+ # So the left frame should start at -door_width/2 - frame_width/2 and extend outward
678
+ left_offset = np.array([-(door_width/2 + frame_width/2), 0, (gap_height + frame_width)/2])
679
+
680
+ # Create right frame piece - positioned completely outside the door region
681
+ right_frame = trimesh.creation.box(
682
+ extents=[frame_width, frame_thickness, door_height + gap_height + frame_width]
683
+ )
684
+ # Position right frame to be completely outside the door region
685
+ # The right frame should start at +door_width/2 + frame_width/2 and extend outward
686
+ right_offset = np.array([door_width/2 + frame_width/2, 0, (gap_height + frame_width)/2])
687
+
688
+ # Create top frame piece - positioned completely above the door region
689
+ top_frame = trimesh.creation.box(
690
+ extents=[door_width + 2*frame_width, frame_thickness, frame_width]
691
+ )
692
+ # Position top frame to be completely above the door region
693
+ # The door extends from 0 to door_height, so top frame starts at door_height + frame_width/2
694
+ top_offset = np.array([0, 0, door_height/2 + frame_width/2])
695
+
696
+ # Apply offsets
697
+ left_frame.apply_translation(left_offset)
698
+ right_frame.apply_translation(right_offset)
699
+ top_frame.apply_translation(top_offset)
700
+
701
+ # Combine frame pieces
702
+ frame_meshes = [left_frame, right_frame, top_frame]
703
+ combined_frame = trimesh.util.concatenate(frame_meshes)
704
+
705
+ # Rotate if wall is vertical
706
+ if abs(wall_direction[0]) < 0.001: # Vertical wall
707
+ rotation_matrix = trimesh.transformations.rotation_matrix(np.pi/2, [0, 0, 1])
708
+ combined_frame.apply_transform(rotation_matrix)
709
+
710
+ # Position frame at door location
711
+ combined_frame.apply_translation(door_position_3d)
712
+
713
+ return combined_frame
714
+
715
+
716
+ def create_window_mesh(wall: Wall, window: Window) -> trimesh.Trimesh:
717
+ """Create a window mesh positioned on the wall."""
718
+ import numpy as np
719
+
720
+ # Calculate window position on wall
721
+ start = np.array([wall.start_point.x, wall.start_point.y, wall.start_point.z])
722
+ end = np.array([wall.end_point.x, wall.end_point.y, wall.end_point.z])
723
+ wall_vector = end - start
724
+
725
+ # Position along the wall
726
+ window_position_3d = start + wall_vector * window.position_on_wall
727
+ window_position_3d[2] = wall.start_point.z + window.sill_height + window.height / 2
728
+
729
+ # Create window mesh
730
+ window_box = trimesh.creation.box(
731
+ extents=[window.width, wall.thickness * 1.0, window.height] # Slightly thicker than wall
732
+ )
733
+
734
+ # Rotate if wall is vertical
735
+ wall_direction = wall_vector / np.linalg.norm(wall_vector)
736
+ if abs(wall_direction[0]) < 0.001: # Vertical wall
737
+ rotation_matrix = trimesh.transformations.rotation_matrix(np.pi/2, [0, 0, 1])
738
+ window_box.apply_transform(rotation_matrix)
739
+
740
+ # Position window
741
+ window_box.apply_translation(window_position_3d)
742
+
743
+ return window_box
744
+
745
+
746
+ def create_door_opening_mesh(wall: Wall, door: Door) -> trimesh.Trimesh:
747
+ """Create a door opening mesh for boolean subtraction."""
748
+ return create_door_mesh(wall, door) # Same as door mesh for cutting
749
+
750
+
751
+ def create_window_opening_mesh(wall: Wall, window: Window) -> trimesh.Trimesh:
752
+ """Create a window opening mesh for boolean subtraction."""
753
+ return create_window_mesh(wall, window) # Same as window mesh for cutting
754
+
755
+
756
+ def get_door_unique_id(room: Room, door: Door) -> str:
757
+ """Generate unique ID for a door to avoid processing bidirectional doors twice."""
758
+ if door.door_type == "connecting":
759
+ # For connecting doors, create ID based on position to match bidirectional pairs
760
+ wall_id = door.wall_id
761
+ position = door.position_on_wall
762
+ return f"connecting_door_{wall_id}_{position:.3f}"
763
+ else:
764
+ return f"door_{room.id}_{door.id}"
765
+
766
+
767
+ def get_window_unique_id(room: Room, window: Window) -> str:
768
+ """Generate unique ID for a window to avoid processing bidirectional windows twice."""
769
+ if window.window_type == "connecting":
770
+ # For connecting windows, create ID based on position to match bidirectional pairs
771
+ wall_id = window.wall_id
772
+ position = window.position_on_wall
773
+ return f"connecting_window_{wall_id}_{position:.3f}"
774
+ else:
775
+ return f"window_{room.id}_{window.id}"
776
+
777
+
778
+ def create_ceiling_mesh(room: Room) -> trimesh.Trimesh:
779
+ """Create a ceiling mesh for a room."""
780
+ pos = room.position
781
+ dims = room.dimensions
782
+
783
+ # Create floor as a thin box
784
+ ceiling_thickness = 0.1
785
+ ceiling_box = trimesh.creation.box(
786
+ extents=[dims.width, dims.length, ceiling_thickness],
787
+ transform=trimesh.transformations.translation_matrix([
788
+ pos.x + dims.width/2,
789
+ pos.y + dims.length/2,
790
+ pos.z + dims.height + ceiling_thickness/2
791
+ ])
792
+ )
793
+
794
+ return ceiling_box
795
+
796
+ def create_floor_mesh_tex_coords(floor_mesh: trimesh.Trimesh) -> dict:
797
+ """
798
+ Generate texture coordinates for a floor mesh using xatlas.
799
+
800
+ Args:
801
+ floor_mesh: Trimesh object representing the floor
802
+
803
+ Returns:
804
+ Dictionary with 'vts' (texture coordinates) and 'fts' (face texture indices)
805
+ """
806
+ try:
807
+ # Create xatlas mesh from trimesh
808
+ atlas = xatlas.Atlas()
809
+
810
+ # Convert trimesh to xatlas format
811
+ vertices = floor_mesh.vertices.astype(np.float32)
812
+ faces = floor_mesh.faces.astype(np.uint32)
813
+
814
+ # Add mesh to atlas
815
+ atlas.add_mesh(vertices, faces)
816
+
817
+ # Generate UV coordinates
818
+ atlas.generate()
819
+
820
+ # Get the UV coordinates and face indices
821
+ vmapping, indices, uvs = atlas.get_mesh(0)
822
+
823
+ # Convert to the expected format
824
+ # vts: texture coordinates (u, v) for each vertex
825
+ vts = uvs
826
+
827
+ # fts: face texture indices - map each face to texture coordinates
828
+ fts = indices
829
+
830
+ return {
831
+ "vts": vts,
832
+ "fts": fts
833
+ }
834
+
835
+ except Exception as e:
836
+ print(f"Error generating texture coordinates for floor mesh: {e}")
837
+ # Fallback: simple planar UV mapping
838
+ return _simple_planar_uv_mapping(floor_mesh)
839
+
840
+
841
+ def create_wall_mesh_tex_coords(wall_mesh: trimesh.Trimesh) -> dict:
842
+ """
843
+ Generate texture coordinates for a wall mesh using xatlas.
844
+
845
+ Args:
846
+ wall_mesh: Trimesh object representing the wall
847
+
848
+ Returns:
849
+ Dictionary with 'vts' (texture coordinates) and 'fts' (face texture indices)
850
+ """
851
+ try:
852
+ # Create xatlas mesh from trimesh
853
+ atlas = xatlas.Atlas()
854
+
855
+ # Convert trimesh to xatlas format
856
+ vertices = wall_mesh.vertices.astype(np.float32)
857
+ faces = wall_mesh.faces.astype(np.uint32)
858
+
859
+ # Add mesh to atlas
860
+ atlas.add_mesh(vertices, faces)
861
+
862
+ # Generate UV coordinates
863
+ atlas.generate()
864
+
865
+ # Get the UV coordinates and face indices
866
+ vmapping, indices, uvs = atlas.get_mesh(0)
867
+
868
+ # Convert to the expected format
869
+ # vts: texture coordinates (u, v) for each vertex
870
+ vts = uvs
871
+
872
+ # fts: face texture indices - map each face to texture coordinates
873
+ fts = indices
874
+
875
+ return {
876
+ "vts": vts,
877
+ "fts": fts
878
+ }
879
+
880
+ except Exception as e:
881
+ print(f"Error generating texture coordinates for wall mesh: {e}")
882
+ # Fallback: simple planar UV mapping
883
+ return _simple_planar_uv_mapping(wall_mesh)
884
+
885
+
886
+ def _simple_planar_uv_mapping(mesh: trimesh.Trimesh) -> dict:
887
+ """
888
+ Fallback function for simple planar UV mapping when xatlas fails.
889
+
890
+ Args:
891
+ mesh: Trimesh object
892
+
893
+ Returns:
894
+ Dictionary with 'vts' (texture coordinates) and 'fts' (face texture indices)
895
+ """
896
+ # Get mesh bounds
897
+ bounds = mesh.bounds
898
+ min_coords = bounds[0]
899
+ max_coords = bounds[1]
900
+
901
+ # Calculate UV coordinates by projecting vertices onto XY plane
902
+ vertices = mesh.vertices
903
+ u = (vertices[:, 0] - min_coords[0]) / (max_coords[0] - min_coords[0])
904
+ v = (vertices[:, 1] - min_coords[1]) / (max_coords[1] - min_coords[1])
905
+
906
+ # Clamp to [0, 1] range
907
+ u = np.clip(u, 0, 1)
908
+ v = np.clip(v, 0, 1)
909
+
910
+ # Create texture coordinates
911
+ vts = np.column_stack([u, v])
912
+
913
+ # Face texture indices are the same as vertex indices
914
+ fts = mesh.faces
915
+
916
+ return {
917
+ "vts": vts,
918
+ "fts": fts
919
+ }
920
+
921
+
922
+ def export_layout_to_mesh_dict_list(layout: FloorPlan, layout_dir: str):
923
+ """
924
+ Export a FloorPlan object to a mesh file using trimesh.
925
+ Creates gray boxes for walls/floors, red boxes for doors, blue boxes for windows,
926
+ and includes actual object meshes with their transforms.
927
+ Uses boolean operations to cut door/window openings in walls.
928
+
929
+ Args:
930
+ layout: FloorPlan object to export
931
+ """
932
+ import os
933
+ import pickle
934
+
935
+ def get_object_mesh(source, source_id):
936
+ object_save_path = f"{layout_dir}/{source}/{source_id}.ply"
937
+ if os.path.exists(object_save_path):
938
+ return trimesh.load(object_save_path)
939
+ else:
940
+ return None
941
+
942
+ def get_object_mesh_texture(source, source_id):
943
+ tex_coords_save_path = f"{layout_dir}/{source}/{source_id}_tex_coords.pkl"
944
+ texture_map_path = f"{layout_dir}/{source}/{source_id}_texture.png"
945
+ pbr_metallic_roughness_save_path = f"{layout_dir}/{source}/{source_id}_pbr_parameters.json"
946
+ if os.path.exists(tex_coords_save_path) and os.path.exists(pbr_metallic_roughness_save_path):
947
+ with open(tex_coords_save_path, "rb") as f:
948
+ tex_coords = pickle.load(f)
949
+ pbr_metallic_roughness = json.load(open(pbr_metallic_roughness_save_path))
950
+ return {
951
+ "vts": tex_coords["vts"],
952
+ "fts": tex_coords["fts"],
953
+ "texture_map_path": texture_map_path,
954
+ "metallic_factor": pbr_metallic_roughness["metallic"],
955
+ "roughness_factor": pbr_metallic_roughness["roughness"]
956
+ }
957
+ else:
958
+ return None
959
+
960
+ mesh_info_dict = {}
961
+
962
+ # Collections for different mesh types
963
+ floor_meshes = []
964
+ wall_meshes = []
965
+ door_meshes = []
966
+ window_meshes = []
967
+ object_meshes = []
968
+
969
+ # Track processed bidirectional doors/windows to avoid duplicates
970
+ processed_doors = set()
971
+ processed_windows = set()
972
+
973
+ # Process each room
974
+ for room in layout.rooms:
975
+ # Create floor mesh
976
+ floor_mesh = create_floor_mesh(room)
977
+ floor_mesh_texture_map_path = f"{layout_dir}/materials/{room.floor_material}.png"
978
+ # TODO: generate tex coords for floor mesh
979
+ floor_mesh_tex_coords = create_floor_mesh_tex_coords(floor_mesh)
980
+ # floor_meshes.append(floor_mesh)
981
+
982
+ mesh_info_dict[f"floor_{room.id}"] = {
983
+ "mesh": floor_mesh,
984
+ "static": True,
985
+ "texture": {
986
+ "vts": floor_mesh_tex_coords["vts"],
987
+ "fts": floor_mesh_tex_coords["fts"],
988
+ "texture_map_path": floor_mesh_texture_map_path
989
+ }
990
+ }
991
+
992
+ # Create wall meshes with door/window cutouts
993
+ room_wall_meshes, room_door_meshes, room_window_meshes, room_wall_ids, room_door_ids, room_window_ids = create_room_meshes_with_openings(
994
+ room, processed_doors, processed_windows
995
+ )
996
+
997
+ # wall_meshes.extend(room_wall_meshes)
998
+ # door_meshes.extend(room_door_meshes)
999
+ # window_meshes.extend(room_window_meshes)
1000
+
1001
+ wall_mesh_texture_map_path = f"{layout_dir}/materials/{room.walls[0].material}.png"
1002
+
1003
+ for wall_id, wall_mesh in zip(room_wall_ids, room_wall_meshes):
1004
+ # TODO: generate tex coords for wall mesh
1005
+ wall_mesh_tex_coords = create_wall_mesh_tex_coords(wall_mesh)
1006
+ mesh_info_dict[f"{wall_id}"] = {
1007
+ "mesh": wall_mesh,
1008
+ "static": True,
1009
+ "texture": {
1010
+ "vts": wall_mesh_tex_coords["vts"],
1011
+ "fts": wall_mesh_tex_coords["fts"],
1012
+ "texture_map_path": wall_mesh_texture_map_path
1013
+ }
1014
+ }
1015
+
1016
+ for window_id, window_mesh in zip(room_window_ids, room_window_meshes):
1017
+ # window_mesh_tex_coords = create_window_mesh_tex_coords(window_mesh)
1018
+
1019
+ window_mesh_texture_map_path = f"{layout_dir}/materials/{window_id}_texture.png"
1020
+ window_mesh_tex_coords_save_path = f"{layout_dir}/materials/{window_id}_tex_coords.pkl"
1021
+ with open(window_mesh_tex_coords_save_path, "rb") as f:
1022
+ window_mesh_tex_coords = pickle.load(f)
1023
+
1024
+ mesh_info_dict[f"{window_id}"] = {
1025
+ "mesh": window_mesh,
1026
+ "static": True,
1027
+ "texture": {
1028
+ "vts": window_mesh_tex_coords["vts"],
1029
+ "fts": window_mesh_tex_coords["fts"],
1030
+ "texture_map_path": window_mesh_texture_map_path
1031
+ }
1032
+ }
1033
+
1034
+ ceiling_mesh = create_ceiling_mesh(room)
1035
+ ceiling_mesh_texture_map_path = f"{layout_dir}/materials/{room.walls[0].material}.png"
1036
+ # TODO: generate tex coords for floor mesh
1037
+ ceiling_mesh_tex_coords = create_wall_mesh_tex_coords(ceiling_mesh)
1038
+
1039
+ mesh_info_dict[f"floor_{room.id}_ceiling"] = {
1040
+ "mesh": ceiling_mesh,
1041
+ "static": True,
1042
+ "texture": {
1043
+ "vts": ceiling_mesh_tex_coords["vts"],
1044
+ "fts": ceiling_mesh_tex_coords["fts"],
1045
+ "texture_map_path": ceiling_mesh_texture_map_path
1046
+ }
1047
+ }
1048
+
1049
+ # Process each room
1050
+ for room in layout.rooms:
1051
+ # Create object meshes with transforms
1052
+ for obj in room.objects:
1053
+ obj_mesh = get_object_mesh(obj.source, obj.source_id)
1054
+ if obj_mesh is not None:
1055
+ # Apply transforms to the object mesh
1056
+ transformed_mesh = apply_object_transform(obj_mesh, obj)
1057
+ texture_info = get_object_mesh_texture(obj.source, obj.source_id)
1058
+
1059
+ mesh_info_dict[obj.id] = {
1060
+ "mesh": transformed_mesh,
1061
+ "static": False if obj.place_id != "wall" else True,
1062
+ "texture": texture_info,
1063
+ "mass": getattr(obj, 'mass', 1.0)
1064
+ }
1065
+
1066
+
1067
+ door_center_list = []
1068
+
1069
+ for room in layout.rooms:
1070
+ wall_map = {wall.id: wall for wall in room.walls}
1071
+
1072
+ # Add doors - position them at the inner room boundary
1073
+ for door in room.doors:
1074
+
1075
+ if door.opening:
1076
+ continue
1077
+
1078
+ # Get the wall this door is on
1079
+ wall = wall_map.get(door.wall_id)
1080
+ assert wall is not None, f"Wall {door.wall_id} not found"
1081
+
1082
+ start_point = wall.start_point
1083
+ end_point = wall.end_point
1084
+
1085
+ position_on_wall = door.position_on_wall
1086
+ door_center_x = start_point.x + (end_point.x - start_point.x) * position_on_wall
1087
+ door_center_y = start_point.y + (end_point.y - start_point.y) * position_on_wall
1088
+
1089
+ duplicate_door = False
1090
+ for door_center_prev_x, door_center_prev_y in door_center_list:
1091
+ if abs(door_center_x - door_center_prev_x) < 0.01 and abs(door_center_y - door_center_prev_y) < 0.01:
1092
+ duplicate_door = True
1093
+ break
1094
+
1095
+ if duplicate_door:
1096
+ continue
1097
+
1098
+ door_center_list.append((door_center_x, door_center_y))
1099
+
1100
+ thickness_scale = 0.99
1101
+ size_scale = 0.99
1102
+
1103
+ door_width_original = door.width
1104
+ door_thickness = wall.thickness * thickness_scale
1105
+
1106
+ delta_s = 0.5 * (1 - size_scale) * door_width_original
1107
+ delta_r_min = max(0, ((0.5 * door_thickness) ** 2 - delta_s ** 2) / (2 * delta_s))
1108
+ delta_r = delta_r_min * 1.1
1109
+
1110
+ door_size_offset_calculated = (size_scale - 1) * door_width_original
1111
+ door_mesh = create_door_mesh(wall, door, size_scale=1.0, thickness_scale=thickness_scale, door_size_offset=door_size_offset_calculated)
1112
+ door_frame_mesh = create_door_frame_mesh(wall, door, size_scale=1.0, thickness_scale=1.05, frame_width=0.05)
1113
+
1114
+
1115
+ # Calculate door position on wall
1116
+ start = np.array([wall.start_point.x, wall.start_point.y, 0])
1117
+ end = np.array([wall.end_point.x, wall.end_point.y, 0])
1118
+ wall_vector = end - start
1119
+ wall_vector_norm = wall_vector / np.linalg.norm(wall_vector)
1120
+
1121
+ # Position along the wall
1122
+ door_center_point = start + wall_vector * door.position_on_wall
1123
+ door_start_point = door_center_point - wall_vector_norm * door.width / 2
1124
+
1125
+ door_rotate_axis_point_lower = door_start_point + wall_vector_norm * (delta_s + delta_r)
1126
+ door_rotate_axis_point_lower[2] = 0.
1127
+ door_rotate_axis_point_upper = door_start_point + wall_vector_norm * (delta_s + delta_r)
1128
+ door_rotate_axis_point_upper[2] = door.height
1129
+
1130
+ door_mesh_texture_map_path = f"{layout_dir}/materials/{door.door_material}_texture.png"
1131
+
1132
+ door_mesh_tex_coords_save_path = f"{layout_dir}/materials/{door.door_material}_tex_coords.pkl"
1133
+ with open(door_mesh_tex_coords_save_path, "rb") as f:
1134
+ door_mesh_tex_coords = pickle.load(f)
1135
+
1136
+ texture_info = {
1137
+ "vts": door_mesh_tex_coords["vts"],
1138
+ "fts": door_mesh_tex_coords["fts"],
1139
+ "texture_map_path": door_mesh_texture_map_path
1140
+ }
1141
+
1142
+
1143
+ mesh_info_dict[f"{door.id}"] = {
1144
+ "mesh": door_mesh,
1145
+ "static": False,
1146
+ "articulation": (door_rotate_axis_point_lower, door_rotate_axis_point_upper),
1147
+ "texture": texture_info
1148
+ }
1149
+
1150
+ # Add door frame mesh to the dictionary
1151
+ # Use door-specific frame texture based on door material
1152
+ door_frame_texture_map_path = f"{layout_dir}/materials/{door.door_material}_frame_texture.png"
1153
+ door_frame_tex_coords_save_path = f"{layout_dir}/materials/{door.door_material}_frame_tex_coords.pkl"
1154
+
1155
+ # Check if door frame texture files exist, if not use door material as fallback
1156
+ if not os.path.exists(door_frame_tex_coords_save_path):
1157
+ door_frame_texture_map_path = door_mesh_texture_map_path
1158
+ door_frame_tex_coords_save_path = door_mesh_tex_coords_save_path
1159
+
1160
+ with open(door_frame_tex_coords_save_path, "rb") as f:
1161
+ door_frame_tex_coords = pickle.load(f)
1162
+
1163
+ door_frame_texture_info = {
1164
+ "vts": door_frame_tex_coords["vts"],
1165
+ "fts": door_frame_tex_coords["fts"],
1166
+ "texture_map_path": door_frame_texture_map_path
1167
+ }
1168
+
1169
+ mesh_info_dict[f"{door.id}_frame"] = {
1170
+ "mesh": door_frame_mesh,
1171
+ "static": True, # Door frame is static, doesn't move with door
1172
+ "texture": door_frame_texture_info
1173
+ }
1174
+
1175
+
1176
+ return mesh_info_dict
1177
+
1178
+
1179
+
1180
+ def export_layout_to_mesh_dict_list_v2(layout: FloorPlan, layout_dir: str):
1181
+ """
1182
+ Export a FloorPlan object to a mesh file using trimesh.
1183
+ Creates gray boxes for walls/floors, red boxes for doors, blue boxes for windows,
1184
+ and includes actual object meshes with their transforms.
1185
+ Uses boolean operations to cut door/window openings in walls.
1186
+
1187
+ Args:
1188
+ layout: FloorPlan object to export
1189
+ """
1190
+ import os
1191
+ import pickle
1192
+
1193
+ def get_object_mesh(source, source_id):
1194
+ object_save_path = f"{layout_dir}/{source}/{source_id}.ply"
1195
+ if os.path.exists(object_save_path):
1196
+ return trimesh.load(object_save_path)
1197
+ else:
1198
+ return None
1199
+
1200
+ def get_object_mesh_texture(source, source_id):
1201
+ tex_coords_save_path = f"{layout_dir}/{source}/{source_id}_tex_coords.pkl"
1202
+ texture_map_path = f"{layout_dir}/{source}/{source_id}_texture.png"
1203
+ pbr_metallic_roughness_save_path = f"{layout_dir}/{source}/{source_id}_pbr_parameters.json"
1204
+ if os.path.exists(tex_coords_save_path) and os.path.exists(pbr_metallic_roughness_save_path):
1205
+ with open(tex_coords_save_path, "rb") as f:
1206
+ tex_coords = pickle.load(f)
1207
+ pbr_metallic_roughness = json.load(open(pbr_metallic_roughness_save_path))
1208
+ return {
1209
+ "vts": tex_coords["vts"],
1210
+ "fts": tex_coords["fts"],
1211
+ "texture_map_path": texture_map_path,
1212
+ "metallic_factor": pbr_metallic_roughness["metallic"],
1213
+ "roughness_factor": pbr_metallic_roughness["roughness"]
1214
+ }
1215
+ else:
1216
+ return None
1217
+
1218
+ mesh_info_dict = {}
1219
+
1220
+ # Collections for different mesh types
1221
+ floor_meshes = []
1222
+ wall_meshes = []
1223
+ door_meshes = []
1224
+ window_meshes = []
1225
+ object_meshes = []
1226
+
1227
+ # Track processed bidirectional doors/windows to avoid duplicates
1228
+ processed_doors = set()
1229
+ processed_windows = set()
1230
+
1231
+ # Process each room
1232
+ for room in layout.rooms:
1233
+ # Create floor mesh
1234
+ floor_mesh = create_floor_mesh(room)
1235
+ floor_mesh_texture_map_path = f"{layout_dir}/materials/{room.floor_material}.png"
1236
+ # TODO: generate tex coords for floor mesh
1237
+ floor_mesh_tex_coords = create_floor_mesh_tex_coords(floor_mesh)
1238
+ # floor_meshes.append(floor_mesh)
1239
+
1240
+ mesh_info_dict[f"floor_{room.id}"] = {
1241
+ "mesh": floor_mesh,
1242
+ "static": True,
1243
+ "texture": {
1244
+ "vts": floor_mesh_tex_coords["vts"],
1245
+ "fts": floor_mesh_tex_coords["fts"],
1246
+ "texture_map_path": floor_mesh_texture_map_path
1247
+ }
1248
+ }
1249
+
1250
+ # Create wall meshes with door/window cutouts
1251
+ room_wall_meshes, room_door_meshes, room_window_meshes, room_wall_ids, room_door_ids, room_window_ids = create_room_meshes_with_openings(
1252
+ room, processed_doors, processed_windows
1253
+ )
1254
+
1255
+ # wall_meshes.extend(room_wall_meshes)
1256
+ # door_meshes.extend(room_door_meshes)
1257
+ # window_meshes.extend(room_window_meshes)
1258
+
1259
+ wall_mesh_texture_map_path = f"{layout_dir}/materials/{room.walls[0].material}.png"
1260
+
1261
+ for wall_id, wall_mesh in zip(room_wall_ids, room_wall_meshes):
1262
+ # TODO: generate tex coords for wall mesh
1263
+ wall_mesh_tex_coords = create_wall_mesh_tex_coords(wall_mesh)
1264
+ mesh_info_dict[f"{wall_id}"] = {
1265
+ "mesh": wall_mesh,
1266
+ "static": True,
1267
+ "texture": {
1268
+ "vts": wall_mesh_tex_coords["vts"],
1269
+ "fts": wall_mesh_tex_coords["fts"],
1270
+ "texture_map_path": wall_mesh_texture_map_path
1271
+ }
1272
+ }
1273
+
1274
+ for window_id, window_mesh in zip(room_window_ids, room_window_meshes):
1275
+ # window_mesh_tex_coords = create_window_mesh_tex_coords(window_mesh)
1276
+
1277
+ window_mesh_texture_map_path = f"{layout_dir}/materials/{window_id}_texture.png"
1278
+ window_mesh_tex_coords_save_path = f"{layout_dir}/materials/{window_id}_tex_coords.pkl"
1279
+ with open(window_mesh_tex_coords_save_path, "rb") as f:
1280
+ window_mesh_tex_coords = pickle.load(f)
1281
+
1282
+ mesh_info_dict[f"{window_id}"] = {
1283
+ "mesh": window_mesh,
1284
+ "static": True,
1285
+ "texture": {
1286
+ "vts": window_mesh_tex_coords["vts"],
1287
+ "fts": window_mesh_tex_coords["fts"],
1288
+ "texture_map_path": window_mesh_texture_map_path
1289
+ }
1290
+ }
1291
+
1292
+ ceiling_mesh = create_ceiling_mesh(room)
1293
+ ceiling_mesh_texture_map_path = f"{layout_dir}/materials/{room.walls[0].material}.png"
1294
+ # TODO: generate tex coords for floor mesh
1295
+ ceiling_mesh_tex_coords = create_wall_mesh_tex_coords(ceiling_mesh)
1296
+
1297
+ mesh_info_dict[f"floor_{room.id}_ceiling"] = {
1298
+ "mesh": ceiling_mesh,
1299
+ "static": True,
1300
+ "texture": {
1301
+ "vts": ceiling_mesh_tex_coords["vts"],
1302
+ "fts": ceiling_mesh_tex_coords["fts"],
1303
+ "texture_map_path": ceiling_mesh_texture_map_path
1304
+ }
1305
+ }
1306
+
1307
+ # Process each room
1308
+ for room in layout.rooms:
1309
+ # Create object meshes with transforms
1310
+ for obj in room.objects:
1311
+ # obj_mesh = get_object_mesh(obj.source, obj.source_id)
1312
+ mesh_dict = load_ply_to_mesh_dict(f"{layout_dir}/objects/{obj.source_id}.ply")
1313
+ texture_map_path = f"{layout_dir}/objects/{obj.source_id}_texture.png"
1314
+ obj_mesh = trimesh.Trimesh(vertices=mesh_dict["vertices"], faces=mesh_dict["faces"], process=False)
1315
+ # Apply transforms to the object mesh
1316
+ transformed_mesh = apply_object_transform(obj_mesh, obj)
1317
+ texture_info = {
1318
+ "vts": mesh_dict["vts"],
1319
+ "fts": mesh_dict["fts"],
1320
+ "texture_map_path": texture_map_path,
1321
+ "pbr_parameters": obj.pbr_parameters
1322
+ }
1323
+
1324
+ mesh_info_dict[obj.id] = {
1325
+ "mesh": transformed_mesh,
1326
+ "static": False if obj.place_id != "wall" else True,
1327
+ "texture": texture_info,
1328
+ "mass": getattr(obj, 'mass', 1.0)
1329
+ }
1330
+
1331
+
1332
+ door_center_list = []
1333
+
1334
+ for room in layout.rooms:
1335
+ wall_map = {wall.id: wall for wall in room.walls}
1336
+
1337
+ # Add doors - position them at the inner room boundary
1338
+ for door in room.doors:
1339
+
1340
+ if door.opening:
1341
+ continue
1342
+
1343
+ # Get the wall this door is on
1344
+ wall = wall_map.get(door.wall_id)
1345
+ assert wall is not None, f"Wall {door.wall_id} not found"
1346
+
1347
+ start_point = wall.start_point
1348
+ end_point = wall.end_point
1349
+
1350
+ position_on_wall = door.position_on_wall
1351
+ door_center_x = start_point.x + (end_point.x - start_point.x) * position_on_wall
1352
+ door_center_y = start_point.y + (end_point.y - start_point.y) * position_on_wall
1353
+
1354
+ duplicate_door = False
1355
+ for door_center_prev_x, door_center_prev_y in door_center_list:
1356
+ if abs(door_center_x - door_center_prev_x) < 0.01 and abs(door_center_y - door_center_prev_y) < 0.01:
1357
+ duplicate_door = True
1358
+ break
1359
+
1360
+ if duplicate_door:
1361
+ continue
1362
+
1363
+ door_center_list.append((door_center_x, door_center_y))
1364
+
1365
+ thickness_scale = 0.99
1366
+ size_scale = 0.99
1367
+
1368
+ door_width_original = door.width
1369
+ door_thickness = wall.thickness * thickness_scale
1370
+
1371
+ delta_s = 0.5 * (1 - size_scale) * door_width_original
1372
+ delta_r_min = max(0, ((0.5 * door_thickness) ** 2 - delta_s ** 2) / (2 * delta_s))
1373
+ delta_r = delta_r_min * 1.1
1374
+
1375
+ door_size_offset_calculated = (size_scale - 1) * door_width_original
1376
+ door_mesh = create_door_mesh(wall, door, size_scale=1.0, thickness_scale=thickness_scale, door_size_offset=door_size_offset_calculated)
1377
+ door_frame_mesh = create_door_frame_mesh(wall, door, size_scale=1.0, thickness_scale=1.05, frame_width=0.05)
1378
+
1379
+
1380
+ # Calculate door position on wall
1381
+ start = np.array([wall.start_point.x, wall.start_point.y, 0])
1382
+ end = np.array([wall.end_point.x, wall.end_point.y, 0])
1383
+ wall_vector = end - start
1384
+ wall_vector_norm = wall_vector / np.linalg.norm(wall_vector)
1385
+
1386
+ # Position along the wall
1387
+ door_center_point = start + wall_vector * door.position_on_wall
1388
+ door_start_point = door_center_point - wall_vector_norm * door.width / 2
1389
+
1390
+ door_rotate_axis_point_lower = door_start_point + wall_vector_norm * (delta_s + delta_r)
1391
+ door_rotate_axis_point_lower[2] = 0.
1392
+ door_rotate_axis_point_upper = door_start_point + wall_vector_norm * (delta_s + delta_r)
1393
+ door_rotate_axis_point_upper[2] = door.height
1394
+
1395
+ door_mesh_texture_map_path = f"{layout_dir}/materials/{door.door_material}_texture.png"
1396
+
1397
+ door_mesh_tex_coords_save_path = f"{layout_dir}/materials/{door.door_material}_tex_coords.pkl"
1398
+ with open(door_mesh_tex_coords_save_path, "rb") as f:
1399
+ door_mesh_tex_coords = pickle.load(f)
1400
+
1401
+ texture_info = {
1402
+ "vts": door_mesh_tex_coords["vts"],
1403
+ "fts": door_mesh_tex_coords["fts"],
1404
+ "texture_map_path": door_mesh_texture_map_path
1405
+ }
1406
+
1407
+
1408
+ mesh_info_dict[f"{door.id}"] = {
1409
+ "mesh": door_mesh,
1410
+ "static": False,
1411
+ "articulation": (door_rotate_axis_point_lower, door_rotate_axis_point_upper),
1412
+ "texture": texture_info
1413
+ }
1414
+
1415
+ # Add door frame mesh to the dictionary
1416
+ # Use door-specific frame texture based on door material
1417
+ door_frame_texture_map_path = f"{layout_dir}/materials/{door.door_material}_frame_texture.png"
1418
+ door_frame_tex_coords_save_path = f"{layout_dir}/materials/{door.door_material}_frame_tex_coords.pkl"
1419
+
1420
+ # Check if door frame texture files exist, if not use door material as fallback
1421
+ if not os.path.exists(door_frame_tex_coords_save_path):
1422
+ door_frame_texture_map_path = door_mesh_texture_map_path
1423
+ door_frame_tex_coords_save_path = door_mesh_tex_coords_save_path
1424
+
1425
+ with open(door_frame_tex_coords_save_path, "rb") as f:
1426
+ door_frame_tex_coords = pickle.load(f)
1427
+
1428
+ door_frame_texture_info = {
1429
+ "vts": door_frame_tex_coords["vts"],
1430
+ "fts": door_frame_tex_coords["fts"],
1431
+ "texture_map_path": door_frame_texture_map_path
1432
+ }
1433
+
1434
+ mesh_info_dict[f"{door.id}_frame"] = {
1435
+ "mesh": door_frame_mesh,
1436
+ "static": True, # Door frame is static, doesn't move with door
1437
+ "texture": door_frame_texture_info
1438
+ }
1439
+
1440
+
1441
+ return mesh_info_dict
1442
+
1443
+
1444
+ def export_layout_to_mesh_dict_list_no_object_transform(layout: FloorPlan, layout_dir: str):
1445
+ """
1446
+ Export a FloorPlan object to a mesh file using trimesh.
1447
+ Creates gray boxes for walls/floors, red boxes for doors, blue boxes for windows,
1448
+ and includes actual object meshes with their transforms.
1449
+ Uses boolean operations to cut door/window openings in walls.
1450
+
1451
+ Args:
1452
+ layout: FloorPlan object to export
1453
+ export_path: Path where the mesh file will be saved (supports .obj, .ply, .stl, etc.)
1454
+ """
1455
+ import os
1456
+ import pickle
1457
+
1458
+ def get_object_mesh(source, source_id):
1459
+ object_save_path = f"{layout_dir}/{source}/{source_id}.ply"
1460
+ if os.path.exists(object_save_path):
1461
+ return trimesh.load(object_save_path)
1462
+ else:
1463
+ return None
1464
+
1465
+ def get_object_mesh_texture(source, source_id):
1466
+ tex_coords_save_path = f"{layout_dir}/{source}/{source_id}_tex_coords.pkl"
1467
+ texture_map_path = f"{layout_dir}/{source}/{source_id}_texture.png"
1468
+ texture_pbr_params_path = f"{layout_dir}/{source}/{source_id}_pbr_parameters.json"
1469
+ if os.path.exists(tex_coords_save_path):
1470
+ with open(tex_coords_save_path, "rb") as f:
1471
+ tex_coords = pickle.load(f)
1472
+ tex_dict = {
1473
+ "vts": tex_coords["vts"],
1474
+ "fts": tex_coords["fts"],
1475
+ "texture_map_path": texture_map_path
1476
+ }
1477
+ if os.path.exists(texture_pbr_params_path):
1478
+ with open(texture_pbr_params_path, "r") as f:
1479
+ pbr_parameters = json.load(f)
1480
+ tex_dict["pbr_parameters"] = pbr_parameters
1481
+ return tex_dict
1482
+ else:
1483
+ return None
1484
+
1485
+ mesh_info_dict = {}
1486
+
1487
+ # Track processed bidirectional doors/windows to avoid duplicates
1488
+ processed_doors = set()
1489
+ processed_windows = set()
1490
+
1491
+ # Process each room
1492
+ for room in layout.rooms:
1493
+ # Create floor mesh
1494
+ floor_mesh = create_floor_mesh(room)
1495
+ floor_mesh_texture_map_path = f"{layout_dir}/materials/{room.floor_material}.png"
1496
+ # TODO: generate tex coords for floor mesh
1497
+ floor_mesh_tex_coords = create_floor_mesh_tex_coords(floor_mesh)
1498
+ # floor_meshes.append(floor_mesh)
1499
+
1500
+ mesh_info_dict[f"floor_{room.id}"] = {
1501
+ "mesh": floor_mesh,
1502
+ "static": True,
1503
+ "texture": {
1504
+ "vts": floor_mesh_tex_coords["vts"],
1505
+ "fts": floor_mesh_tex_coords["fts"],
1506
+ "texture_map_path": floor_mesh_texture_map_path
1507
+ }
1508
+ }
1509
+
1510
+ # Create wall meshes with door/window cutouts
1511
+ room_wall_meshes, room_door_meshes, room_window_meshes, room_wall_ids, room_door_ids, room_window_ids = create_room_meshes_with_openings(
1512
+ room, processed_doors, processed_windows
1513
+ )
1514
+
1515
+ # wall_meshes.extend(room_wall_meshes)
1516
+ # door_meshes.extend(room_door_meshes)
1517
+ # window_meshes.extend(room_window_meshes)
1518
+
1519
+ wall_mesh_texture_map_path = f"{layout_dir}/materials/{room.walls[0].material}.png"
1520
+
1521
+ for wall_id, wall_mesh in zip(room_wall_ids, room_wall_meshes):
1522
+ # TODO: generate tex coords for wall mesh
1523
+ wall_mesh_tex_coords = create_wall_mesh_tex_coords(wall_mesh)
1524
+ mesh_info_dict[f"{wall_id}"] = {
1525
+ "mesh": wall_mesh,
1526
+ "static": True,
1527
+ "texture": {
1528
+ "vts": wall_mesh_tex_coords["vts"],
1529
+ "fts": wall_mesh_tex_coords["fts"],
1530
+ "texture_map_path": wall_mesh_texture_map_path
1531
+ }
1532
+ }
1533
+
1534
+ ceiling_mesh = create_ceiling_mesh(room)
1535
+ ceiling_mesh_texture_map_path = f"{layout_dir}/materials/{room.walls[0].material}.png"
1536
+ # TODO: generate tex coords for floor mesh
1537
+ ceiling_mesh_tex_coords = create_wall_mesh_tex_coords(ceiling_mesh)
1538
+
1539
+ mesh_info_dict[f"floor_{room.id}_ceiling"] = {
1540
+ "mesh": ceiling_mesh,
1541
+ "static": True,
1542
+ "texture": {
1543
+ "vts": ceiling_mesh_tex_coords["vts"],
1544
+ "fts": ceiling_mesh_tex_coords["fts"],
1545
+ "texture_map_path": ceiling_mesh_texture_map_path
1546
+ }
1547
+ }
1548
+
1549
+ for window_id, window_mesh in zip(room_window_ids, room_window_meshes):
1550
+ # window_mesh_tex_coords = create_window_mesh_tex_coords(window_mesh)
1551
+
1552
+ window_mesh_texture_map_path = f"{layout_dir}/materials/{window_id}_texture.png"
1553
+ window_mesh_tex_coords_save_path = f"{layout_dir}/materials/{window_id}_tex_coords.pkl"
1554
+ with open(window_mesh_tex_coords_save_path, "rb") as f:
1555
+ window_mesh_tex_coords = pickle.load(f)
1556
+
1557
+ mesh_info_dict[f"{window_id}"] = {
1558
+ "mesh": window_mesh,
1559
+ "static": True,
1560
+ "texture": {
1561
+ "vts": window_mesh_tex_coords["vts"],
1562
+ "fts": window_mesh_tex_coords["fts"],
1563
+ "texture_map_path": window_mesh_texture_map_path,
1564
+ "pbr_parameters": {
1565
+ "roughness": 0.05,
1566
+ "metallic": 0.0
1567
+ }
1568
+ }
1569
+ }
1570
+
1571
+
1572
+ # Process each room
1573
+ for room in layout.rooms:
1574
+ # Create object meshes with transforms
1575
+ for obj in room.objects:
1576
+ obj_mesh = get_object_mesh(obj.source, obj.source_id)
1577
+ if obj_mesh is not None:
1578
+ # Apply transforms to the object mesh
1579
+ # transformed_mesh = apply_object_transform(obj_mesh, obj)
1580
+ texture_info = get_object_mesh_texture(obj.source, obj.source_id)
1581
+
1582
+ mesh_info_dict[obj.id] = {
1583
+ "mesh": obj_mesh,
1584
+ "static": False if obj.place_id != "wall" else True,
1585
+ "texture": texture_info,
1586
+ "mass": getattr(obj, 'mass', 1.0),
1587
+ "transform": {
1588
+ "position": {
1589
+ "x": obj.position.x,
1590
+ "y": obj.position.y,
1591
+ "z": obj.position.z
1592
+ },
1593
+ "rotation": {
1594
+ "x": obj.rotation.x,
1595
+ "y": obj.rotation.y,
1596
+ "z": obj.rotation.z
1597
+ }
1598
+ }
1599
+ }
1600
+
1601
+
1602
+ door_center_list = []
1603
+
1604
+ for room in layout.rooms:
1605
+ wall_map = {wall.id: wall for wall in room.walls}
1606
+
1607
+ # Add doors - position them at the inner room boundary
1608
+ for door in room.doors:
1609
+
1610
+ if door.opening:
1611
+ continue
1612
+
1613
+ # Get the wall this door is on
1614
+ wall = wall_map.get(door.wall_id)
1615
+ assert wall is not None, f"Wall {door.wall_id} not found"
1616
+
1617
+ start_point = wall.start_point
1618
+ end_point = wall.end_point
1619
+
1620
+ position_on_wall = door.position_on_wall
1621
+ door_center_x = start_point.x + (end_point.x - start_point.x) * position_on_wall
1622
+ door_center_y = start_point.y + (end_point.y - start_point.y) * position_on_wall
1623
+
1624
+ duplicate_door = False
1625
+ for door_center_prev_x, door_center_prev_y in door_center_list:
1626
+ if abs(door_center_x - door_center_prev_x) < 0.01 and abs(door_center_y - door_center_prev_y) < 0.01:
1627
+ duplicate_door = True
1628
+ break
1629
+
1630
+ if duplicate_door:
1631
+ continue
1632
+
1633
+ door_center_list.append((door_center_x, door_center_y))
1634
+
1635
+ thickness_scale = 0.95
1636
+ size_scale = 0.95
1637
+
1638
+ # Create door frame mesh
1639
+ door_width_original = door.width
1640
+ door_thickness = wall.thickness * thickness_scale
1641
+
1642
+ delta_s = 0.5 * (1 - size_scale) * door_width_original
1643
+ delta_r_min = max(0, ((0.5 * door_thickness) ** 2 - delta_s ** 2) / (2 * delta_s))
1644
+ delta_r = delta_r_min * 1.1
1645
+
1646
+ door_size_offset_calculated = (size_scale - 1) * door_width_original
1647
+ door_mesh = create_door_mesh(wall, door, size_scale=1.0, thickness_scale=thickness_scale, door_size_offset=door_size_offset_calculated)
1648
+ door_frame_mesh = create_door_frame_mesh(wall, door, size_scale=1.0, thickness_scale=1.05, frame_width=0.05)
1649
+
1650
+
1651
+
1652
+ # Calculate door position on wall
1653
+ start = np.array([wall.start_point.x, wall.start_point.y, 0])
1654
+ end = np.array([wall.end_point.x, wall.end_point.y, 0])
1655
+ wall_vector = end - start
1656
+ wall_vector_norm = wall_vector / np.linalg.norm(wall_vector)
1657
+
1658
+ # Position along the wall
1659
+ door_center_point = start + wall_vector * door.position_on_wall
1660
+ door_start_point = door_center_point - wall_vector_norm * door.width / 2
1661
+
1662
+ door_rotate_axis_point_lower = door_start_point + wall_vector_norm * (delta_s + delta_r)
1663
+ door_rotate_axis_point_lower[2] = 0.
1664
+ door_rotate_axis_point_upper = door_start_point + wall_vector_norm * (delta_s + delta_r)
1665
+ door_rotate_axis_point_upper[2] = door.height
1666
+
1667
+ door_mesh_texture_map_path = f"{layout_dir}/materials/{door.door_material}_texture.png"
1668
+
1669
+ door_mesh_tex_coords_save_path = f"{layout_dir}/materials/{door.door_material}_tex_coords.pkl"
1670
+ with open(door_mesh_tex_coords_save_path, "rb") as f:
1671
+ door_mesh_tex_coords = pickle.load(f)
1672
+
1673
+ texture_info = {
1674
+ "vts": door_mesh_tex_coords["vts"],
1675
+ "fts": door_mesh_tex_coords["fts"],
1676
+ "texture_map_path": door_mesh_texture_map_path
1677
+ }
1678
+
1679
+
1680
+ mesh_info_dict[f"{door.id}"] = {
1681
+ "mesh": door_mesh,
1682
+ "static": False,
1683
+ "articulation": (door_rotate_axis_point_lower, door_rotate_axis_point_upper),
1684
+ "texture": texture_info
1685
+ }
1686
+
1687
+ # Add door frame mesh to the dictionary
1688
+ # Use door-specific frame texture based on door material
1689
+ door_frame_texture_map_path = f"{layout_dir}/materials/{door.door_material}_frame_texture.png"
1690
+ door_frame_tex_coords_save_path = f"{layout_dir}/materials/{door.door_material}_frame_tex_coords.pkl"
1691
+
1692
+ # Check if door frame texture files exist, if not use door material as fallback
1693
+ if not os.path.exists(door_frame_tex_coords_save_path):
1694
+ door_frame_texture_map_path = door_mesh_texture_map_path
1695
+ door_frame_tex_coords_save_path = door_mesh_tex_coords_save_path
1696
+
1697
+ with open(door_frame_tex_coords_save_path, "rb") as f:
1698
+ door_frame_tex_coords = pickle.load(f)
1699
+
1700
+ door_frame_texture_info = {
1701
+ "vts": door_frame_tex_coords["vts"],
1702
+ "fts": door_frame_tex_coords["fts"],
1703
+ "texture_map_path": door_frame_texture_map_path
1704
+ }
1705
+
1706
+ mesh_info_dict[f"{door.id}_frame"] = {
1707
+ "mesh": door_frame_mesh,
1708
+ "static": True, # Door frame is static, doesn't move with door
1709
+ "texture": door_frame_texture_info
1710
+ }
1711
+
1712
+
1713
+ return mesh_info_dict
1714
+
1715
+
1716
+ def export_layout_to_mesh_dict_list_no_object_transform_v2(layout: FloorPlan, layout_dir: str):
1717
+ """
1718
+ Export a FloorPlan object to a mesh file using trimesh.
1719
+ Creates gray boxes for walls/floors, red boxes for doors, blue boxes for windows,
1720
+ and includes actual object meshes with their transforms.
1721
+ Uses boolean operations to cut door/window openings in walls.
1722
+
1723
+ Args:
1724
+ layout: FloorPlan object to export
1725
+ export_path: Path where the mesh file will be saved (supports .obj, .ply, .stl, etc.)
1726
+ """
1727
+ import os
1728
+ import pickle
1729
+
1730
+ def get_object_mesh(source, source_id):
1731
+ object_save_path = f"{layout_dir}/{source}/{source_id}.ply"
1732
+ if os.path.exists(object_save_path):
1733
+ return trimesh.load(object_save_path)
1734
+ else:
1735
+ return None
1736
+
1737
+ def get_object_mesh_texture(source, source_id):
1738
+ tex_coords_save_path = f"{layout_dir}/{source}/{source_id}_tex_coords.pkl"
1739
+ texture_map_path = f"{layout_dir}/{source}/{source_id}_texture.png"
1740
+ texture_pbr_params_path = f"{layout_dir}/{source}/{source_id}_pbr_parameters.json"
1741
+ if os.path.exists(tex_coords_save_path):
1742
+ with open(tex_coords_save_path, "rb") as f:
1743
+ tex_coords = pickle.load(f)
1744
+ tex_dict = {
1745
+ "vts": tex_coords["vts"],
1746
+ "fts": tex_coords["fts"],
1747
+ "texture_map_path": texture_map_path
1748
+ }
1749
+ if os.path.exists(texture_pbr_params_path):
1750
+ with open(texture_pbr_params_path, "r") as f:
1751
+ pbr_parameters = json.load(f)
1752
+ tex_dict["pbr_parameters"] = pbr_parameters
1753
+ return tex_dict
1754
+ else:
1755
+ return None
1756
+
1757
+ mesh_info_dict = {}
1758
+
1759
+ # Track processed bidirectional doors/windows to avoid duplicates
1760
+ processed_doors = set()
1761
+ processed_windows = set()
1762
+
1763
+ # Process each room
1764
+ for room in layout.rooms:
1765
+ # Create floor mesh
1766
+ floor_mesh = create_floor_mesh(room)
1767
+ floor_mesh_texture_map_path = f"{layout_dir}/materials/{room.floor_material}.png"
1768
+ # TODO: generate tex coords for floor mesh
1769
+ floor_mesh_tex_coords = create_floor_mesh_tex_coords(floor_mesh)
1770
+ # floor_meshes.append(floor_mesh)
1771
+
1772
+ mesh_info_dict[f"floor_{room.id}"] = {
1773
+ "mesh": floor_mesh,
1774
+ "static": True,
1775
+ "texture": {
1776
+ "vts": floor_mesh_tex_coords["vts"],
1777
+ "fts": floor_mesh_tex_coords["fts"],
1778
+ "texture_map_path": floor_mesh_texture_map_path
1779
+ }
1780
+ }
1781
+
1782
+ # Create wall meshes with door/window cutouts
1783
+ room_wall_meshes, room_door_meshes, room_window_meshes, room_wall_ids, room_door_ids, room_window_ids = create_room_meshes_with_openings(
1784
+ room, processed_doors, processed_windows
1785
+ )
1786
+
1787
+ # wall_meshes.extend(room_wall_meshes)
1788
+ # door_meshes.extend(room_door_meshes)
1789
+ # window_meshes.extend(room_window_meshes)
1790
+
1791
+ wall_mesh_texture_map_path = f"{layout_dir}/materials/{room.walls[0].material}.png"
1792
+
1793
+ for wall_id, wall_mesh in zip(room_wall_ids, room_wall_meshes):
1794
+ # TODO: generate tex coords for wall mesh
1795
+ wall_mesh_tex_coords = create_wall_mesh_tex_coords(wall_mesh)
1796
+ mesh_info_dict[f"{wall_id}"] = {
1797
+ "mesh": wall_mesh,
1798
+ "static": True,
1799
+ "texture": {
1800
+ "vts": wall_mesh_tex_coords["vts"],
1801
+ "fts": wall_mesh_tex_coords["fts"],
1802
+ "texture_map_path": wall_mesh_texture_map_path
1803
+ }
1804
+ }
1805
+
1806
+ ceiling_mesh = create_ceiling_mesh(room)
1807
+ ceiling_mesh_texture_map_path = f"{layout_dir}/materials/{room.walls[0].material}.png"
1808
+ # TODO: generate tex coords for floor mesh
1809
+ ceiling_mesh_tex_coords = create_wall_mesh_tex_coords(ceiling_mesh)
1810
+
1811
+ mesh_info_dict[f"floor_{room.id}_ceiling"] = {
1812
+ "mesh": ceiling_mesh,
1813
+ "static": True,
1814
+ "texture": {
1815
+ "vts": ceiling_mesh_tex_coords["vts"],
1816
+ "fts": ceiling_mesh_tex_coords["fts"],
1817
+ "texture_map_path": ceiling_mesh_texture_map_path
1818
+ }
1819
+ }
1820
+
1821
+ for window_id, window_mesh in zip(room_window_ids, room_window_meshes):
1822
+ # window_mesh_tex_coords = create_window_mesh_tex_coords(window_mesh)
1823
+
1824
+ window_mesh_texture_map_path = f"{layout_dir}/materials/{window_id}_texture.png"
1825
+ window_mesh_tex_coords_save_path = f"{layout_dir}/materials/{window_id}_tex_coords.pkl"
1826
+ with open(window_mesh_tex_coords_save_path, "rb") as f:
1827
+ window_mesh_tex_coords = pickle.load(f)
1828
+
1829
+ mesh_info_dict[f"{window_id}"] = {
1830
+ "mesh": window_mesh,
1831
+ "static": True,
1832
+ "texture": {
1833
+ "vts": window_mesh_tex_coords["vts"],
1834
+ "fts": window_mesh_tex_coords["fts"],
1835
+ "texture_map_path": window_mesh_texture_map_path,
1836
+ "pbr_parameters": {
1837
+ "roughness": 0.05,
1838
+ "metallic": 0.0
1839
+ }
1840
+ }
1841
+ }
1842
+
1843
+
1844
+ # Process each room
1845
+ for room in layout.rooms:
1846
+ # Create object meshes with transforms
1847
+ for obj in room.objects:
1848
+ # obj_mesh = get_object_mesh(obj.source, obj.source_id)
1849
+ # if obj_mesh is not None:
1850
+ # # Apply transforms to the object mesh
1851
+ # # transformed_mesh = apply_object_transform(obj_mesh, obj)
1852
+ # texture_info = get_object_mesh_texture(obj.source, obj.source_id)
1853
+
1854
+ # mesh_info_dict[obj.id] = {
1855
+ # "mesh": obj_mesh,
1856
+ # "static": False if obj.place_id != "wall" else True,
1857
+ # "texture": texture_info,
1858
+ # "mass": getattr(obj, 'mass', 1.0),
1859
+ # "transform": {
1860
+ # "position": {
1861
+ # "x": obj.position.x,
1862
+ # "y": obj.position.y,
1863
+ # "z": obj.position.z
1864
+ # },
1865
+ # "rotation": {
1866
+ # "x": obj.rotation.x,
1867
+ # "y": obj.rotation.y,
1868
+ # "z": obj.rotation.z
1869
+ # }
1870
+ # }
1871
+ # }
1872
+ mesh_dict = load_ply_to_mesh_dict(f"{layout_dir}/objects/{obj.source_id}.ply")
1873
+ texture_map_path = f"{layout_dir}/objects/{obj.source_id}_texture.png"
1874
+ obj_mesh = trimesh.Trimesh(vertices=mesh_dict["vertices"], faces=mesh_dict["faces"], process=False)
1875
+ # Apply transforms to the object mesh
1876
+ transformed_mesh = apply_object_transform(obj_mesh, obj)
1877
+ texture_info = {
1878
+ "vts": mesh_dict["vts"],
1879
+ "fts": mesh_dict["fts"],
1880
+ "texture_map_path": texture_map_path,
1881
+ "pbr_parameters": obj.pbr_parameters
1882
+ }
1883
+
1884
+ mesh_info_dict[obj.id] = {
1885
+ "mesh": transformed_mesh,
1886
+ "static": False if obj.place_id != "wall" else True,
1887
+ "texture": texture_info,
1888
+ "mass": getattr(obj, 'mass', 1.0),
1889
+ "transform": {
1890
+ "position": {
1891
+ "x": obj.position.x,
1892
+ "y": obj.position.y,
1893
+ "z": obj.position.z
1894
+ },
1895
+ "rotation": {
1896
+ "x": obj.rotation.x,
1897
+ "y": obj.rotation.y,
1898
+ "z": obj.rotation.z
1899
+ }
1900
+ }
1901
+ }
1902
+
1903
+
1904
+ door_center_list = []
1905
+
1906
+ for room in layout.rooms:
1907
+ wall_map = {wall.id: wall for wall in room.walls}
1908
+
1909
+ # Add doors - position them at the inner room boundary
1910
+ for door in room.doors:
1911
+
1912
+ if door.opening:
1913
+ continue
1914
+
1915
+ # Get the wall this door is on
1916
+ wall = wall_map.get(door.wall_id)
1917
+ assert wall is not None, f"Wall {door.wall_id} not found"
1918
+
1919
+ start_point = wall.start_point
1920
+ end_point = wall.end_point
1921
+
1922
+ position_on_wall = door.position_on_wall
1923
+ door_center_x = start_point.x + (end_point.x - start_point.x) * position_on_wall
1924
+ door_center_y = start_point.y + (end_point.y - start_point.y) * position_on_wall
1925
+
1926
+ duplicate_door = False
1927
+ for door_center_prev_x, door_center_prev_y in door_center_list:
1928
+ if abs(door_center_x - door_center_prev_x) < 0.01 and abs(door_center_y - door_center_prev_y) < 0.01:
1929
+ duplicate_door = True
1930
+ break
1931
+
1932
+ if duplicate_door:
1933
+ continue
1934
+
1935
+ door_center_list.append((door_center_x, door_center_y))
1936
+
1937
+ thickness_scale = 0.95
1938
+ size_scale = 0.95
1939
+
1940
+ # Create door frame mesh
1941
+ door_width_original = door.width
1942
+ door_thickness = wall.thickness * thickness_scale
1943
+
1944
+ delta_s = 0.5 * (1 - size_scale) * door_width_original
1945
+ delta_r_min = max(0, ((0.5 * door_thickness) ** 2 - delta_s ** 2) / (2 * delta_s))
1946
+ delta_r = delta_r_min * 1.1
1947
+
1948
+ door_size_offset_calculated = (size_scale - 1) * door_width_original
1949
+ door_mesh = create_door_mesh(wall, door, size_scale=1.0, thickness_scale=thickness_scale, door_size_offset=door_size_offset_calculated)
1950
+ door_frame_mesh = create_door_frame_mesh(wall, door, size_scale=1.0, thickness_scale=1.05, frame_width=0.05)
1951
+
1952
+
1953
+
1954
+ # Calculate door position on wall
1955
+ start = np.array([wall.start_point.x, wall.start_point.y, 0])
1956
+ end = np.array([wall.end_point.x, wall.end_point.y, 0])
1957
+ wall_vector = end - start
1958
+ wall_vector_norm = wall_vector / np.linalg.norm(wall_vector)
1959
+
1960
+ # Position along the wall
1961
+ door_center_point = start + wall_vector * door.position_on_wall
1962
+ door_start_point = door_center_point - wall_vector_norm * door.width / 2
1963
+
1964
+ door_rotate_axis_point_lower = door_start_point + wall_vector_norm * (delta_s + delta_r)
1965
+ door_rotate_axis_point_lower[2] = 0.
1966
+ door_rotate_axis_point_upper = door_start_point + wall_vector_norm * (delta_s + delta_r)
1967
+ door_rotate_axis_point_upper[2] = door.height
1968
+
1969
+ door_mesh_texture_map_path = f"{layout_dir}/materials/{door.door_material}_texture.png"
1970
+
1971
+ door_mesh_tex_coords_save_path = f"{layout_dir}/materials/{door.door_material}_tex_coords.pkl"
1972
+ with open(door_mesh_tex_coords_save_path, "rb") as f:
1973
+ door_mesh_tex_coords = pickle.load(f)
1974
+
1975
+ texture_info = {
1976
+ "vts": door_mesh_tex_coords["vts"],
1977
+ "fts": door_mesh_tex_coords["fts"],
1978
+ "texture_map_path": door_mesh_texture_map_path
1979
+ }
1980
+
1981
+
1982
+ mesh_info_dict[f"{door.id}"] = {
1983
+ "mesh": door_mesh,
1984
+ "static": False,
1985
+ "articulation": (door_rotate_axis_point_lower, door_rotate_axis_point_upper),
1986
+ "texture": texture_info
1987
+ }
1988
+
1989
+ # Add door frame mesh to the dictionary
1990
+ # Use door-specific frame texture based on door material
1991
+ door_frame_texture_map_path = f"{layout_dir}/materials/{door.door_material}_frame_texture.png"
1992
+ door_frame_tex_coords_save_path = f"{layout_dir}/materials/{door.door_material}_frame_tex_coords.pkl"
1993
+
1994
+ # Check if door frame texture files exist, if not use door material as fallback
1995
+ if not os.path.exists(door_frame_tex_coords_save_path):
1996
+ door_frame_texture_map_path = door_mesh_texture_map_path
1997
+ door_frame_tex_coords_save_path = door_mesh_tex_coords_save_path
1998
+
1999
+ with open(door_frame_tex_coords_save_path, "rb") as f:
2000
+ door_frame_tex_coords = pickle.load(f)
2001
+
2002
+ door_frame_texture_info = {
2003
+ "vts": door_frame_tex_coords["vts"],
2004
+ "fts": door_frame_tex_coords["fts"],
2005
+ "texture_map_path": door_frame_texture_map_path
2006
+ }
2007
+
2008
+ mesh_info_dict[f"{door.id}_frame"] = {
2009
+ "mesh": door_frame_mesh,
2010
+ "static": True, # Door frame is static, doesn't move with door
2011
+ "texture": door_frame_texture_info
2012
+ }
2013
+
2014
+
2015
+ return mesh_info_dict
2016
+
SAGE10k/sage10k/kits/utils.py ADDED
@@ -0,0 +1,286 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from models import Point3D, Dimensions, Wall
2
+ import json
3
+ from models import FloorPlan, Room, Door, Window, Wall, Object, Euler
4
+
5
+
6
+ def dict_to_floor_plan(layout_data: dict) -> FloorPlan:
7
+ """
8
+ Convert a dictionary (from JSON) back to a FloorPlan object.
9
+
10
+ Args:
11
+ layout_data: Dictionary containing the floor plan data
12
+
13
+ Returns:
14
+ FloorPlan object reconstructed from the dictionary
15
+
16
+ Raises:
17
+ ValueError: If the data structure is invalid or incomplete
18
+ """
19
+ try:
20
+ # Convert rooms
21
+ rooms = []
22
+ for room_data in layout_data["rooms"]:
23
+ room = dict_to_room(room_data)
24
+ rooms.append(room)
25
+
26
+ # Create FloorPlan object
27
+ floor_plan = FloorPlan(
28
+ id=layout_data["id"],
29
+ rooms=rooms,
30
+ total_area=layout_data["total_area"],
31
+ building_style=layout_data["building_style"],
32
+ description=layout_data["description"],
33
+ created_from_text=layout_data["created_from_text"],
34
+ policy_analysis=layout_data.get("policy_analysis", None)
35
+ )
36
+
37
+ return floor_plan
38
+
39
+ except KeyError as e:
40
+ raise ValueError(f"Missing required field in layout data: {e}")
41
+ except Exception as e:
42
+ raise ValueError(f"Error converting layout data: {e}")
43
+
44
+
45
+ def dict_to_room(room_data: dict) -> Room:
46
+ """
47
+ Convert a dictionary to a Room object.
48
+
49
+ Args:
50
+ room_data: Dictionary containing room data
51
+
52
+ Returns:
53
+ Room object reconstructed from the dictionary
54
+ """
55
+ try:
56
+ # Convert position
57
+ position = Point3D(
58
+ x=room_data["position"]["x"],
59
+ y=room_data["position"]["y"],
60
+ z=room_data["position"]["z"]
61
+ )
62
+
63
+ # Convert dimensions
64
+ dimensions = Dimensions(
65
+ width=room_data["dimensions"]["width"],
66
+ length=room_data["dimensions"]["length"],
67
+ height=room_data["dimensions"]["height"]
68
+ )
69
+
70
+ # Convert walls
71
+ walls = []
72
+ for wall_data in room_data["walls"]:
73
+ wall = dict_to_wall(wall_data)
74
+ walls.append(wall)
75
+
76
+ # Convert doors
77
+ doors = []
78
+ for door_data in room_data["doors"]:
79
+ door = dict_to_door(door_data)
80
+ doors.append(door)
81
+
82
+ # Convert windows
83
+ windows = []
84
+ for window_data in room_data["windows"]:
85
+ window = dict_to_window(window_data)
86
+ windows.append(window)
87
+
88
+ # Convert objects
89
+ objects = []
90
+ for object_data in room_data.get("objects", []):
91
+ obj = dict_to_object(object_data)
92
+ objects.append(obj)
93
+
94
+ # Create Room object
95
+ room = Room(
96
+ id=room_data["id"],
97
+ room_type=room_data["room_type"],
98
+ position=position,
99
+ dimensions=dimensions,
100
+ walls=walls,
101
+ doors=doors,
102
+ objects=objects,
103
+ windows=windows,
104
+ floor_material=room_data.get("floor_material", "hardwood"),
105
+ ceiling_height=room_data.get("ceiling_height", 2.7)
106
+ )
107
+
108
+ return room
109
+
110
+ except KeyError as e:
111
+ raise ValueError(f"Missing required field in room data: {e}")
112
+ except Exception as e:
113
+ raise ValueError(f"Error converting room data: {e}")
114
+
115
+
116
+ def dict_to_wall(wall_data: dict) -> Wall:
117
+ """
118
+ Convert a dictionary to a Wall object.
119
+
120
+ Args:
121
+ wall_data: Dictionary containing wall data
122
+
123
+ Returns:
124
+ Wall object reconstructed from the dictionary
125
+ """
126
+ try:
127
+ start_point = Point3D(
128
+ x=wall_data["start_point"]["x"],
129
+ y=wall_data["start_point"]["y"],
130
+ z=wall_data["start_point"]["z"]
131
+ )
132
+
133
+ end_point = Point3D(
134
+ x=wall_data["end_point"]["x"],
135
+ y=wall_data["end_point"]["y"],
136
+ z=wall_data["end_point"]["z"]
137
+ )
138
+
139
+ wall = Wall(
140
+ id=wall_data["id"],
141
+ start_point=start_point,
142
+ end_point=end_point,
143
+ height=wall_data["height"],
144
+ thickness=wall_data.get("thickness", 0.1),
145
+ material=wall_data.get("material", "drywall")
146
+ )
147
+
148
+ return wall
149
+
150
+ except KeyError as e:
151
+ raise ValueError(f"Missing required field in wall data: {e}")
152
+ except Exception as e:
153
+ raise ValueError(f"Error converting wall data: {e}")
154
+
155
+
156
+ def dict_to_door(door_data: dict) -> Door:
157
+ """
158
+ Convert a dictionary to a Door object.
159
+
160
+ Args:
161
+ door_data: Dictionary containing door data
162
+
163
+ Returns:
164
+ Door object reconstructed from the dictionary
165
+ """
166
+ try:
167
+ door = Door(
168
+ id=door_data["id"],
169
+ wall_id=door_data["wall_id"],
170
+ position_on_wall=door_data["position_on_wall"],
171
+ width=door_data["width"],
172
+ height=door_data["height"],
173
+ door_type=door_data.get("door_type", "standard"),
174
+ opens_inward=door_data.get("opens_inward", True),
175
+ opening=door_data.get("opening", False), # Handle opening property
176
+ door_material=door_data.get("door_material", "wood")
177
+ )
178
+
179
+ return door
180
+
181
+ except KeyError as e:
182
+ raise ValueError(f"Missing required field in door data: {e}")
183
+ except Exception as e:
184
+ raise ValueError(f"Error converting door data: {e}")
185
+
186
+
187
+ def dict_to_window(window_data: dict) -> Window:
188
+ """
189
+ Convert a dictionary to a Window object.
190
+
191
+ Args:
192
+ window_data: Dictionary containing window data
193
+
194
+ Returns:
195
+ Window object reconstructed from the dictionary
196
+ """
197
+ try:
198
+ window = Window(
199
+ id=window_data["id"],
200
+ wall_id=window_data["wall_id"],
201
+ position_on_wall=window_data["position_on_wall"],
202
+ width=window_data["width"],
203
+ height=window_data["height"],
204
+ sill_height=window_data["sill_height"],
205
+ window_type=window_data.get("window_type", "standard"),
206
+ window_material=window_data.get("window_material", "standard")
207
+ )
208
+
209
+ return window
210
+
211
+ except KeyError as e:
212
+ raise ValueError(f"Missing required field in window data: {e}")
213
+ except Exception as e:
214
+ raise ValueError(f"Error converting window data: {e}")
215
+
216
+
217
+ def dict_to_object(object_data: dict) -> Object:
218
+ """
219
+ Convert a dictionary to an Object object.
220
+
221
+ Args:
222
+ object_data: Dictionary containing object data
223
+
224
+ Returns:
225
+ Object object reconstructed from the dictionary
226
+ """
227
+ try:
228
+ # Convert position
229
+ position = Point3D(
230
+ x=object_data["position"]["x"],
231
+ y=object_data["position"]["y"],
232
+ z=object_data["position"]["z"]
233
+ )
234
+
235
+ # Convert rotation
236
+ rotation = Euler(
237
+ x=object_data["rotation"]["x"],
238
+ y=object_data["rotation"]["y"],
239
+ z=object_data["rotation"]["z"]
240
+ )
241
+
242
+ # Convert dimensions
243
+ dimensions = Dimensions(
244
+ width=object_data["dimensions"]["width"],
245
+ length=object_data["dimensions"]["length"],
246
+ height=object_data["dimensions"]["height"]
247
+ )
248
+
249
+ obj = Object(
250
+ id=object_data["id"],
251
+ room_id=object_data["room_id"],
252
+ type=object_data["type"],
253
+ description=object_data["description"],
254
+ position=position,
255
+ rotation=rotation,
256
+ dimensions=dimensions,
257
+ source=object_data["source"],
258
+ source_id=object_data["source_id"],
259
+ place_id=object_data["place_id"],
260
+ mass=object_data.get("mass", 1.0),
261
+ placement_constraints=object_data.get("placement_constraints", None)
262
+ )
263
+
264
+ return obj
265
+
266
+ except KeyError as e:
267
+ raise ValueError(f"Missing required field in object data: {e}")
268
+ except Exception as e:
269
+ raise ValueError(f"Error converting object data: {e}")
270
+
271
+
272
+ """
273
+ Load a room layout from JSON data and set it as the current layout.
274
+ """
275
+ global current_layout
276
+
277
+ # Load JSON data
278
+
279
+ # Load from file
280
+ with open(json_file_path, 'r') as f:
281
+ layout_data = json.load(f)
282
+
283
+ # Convert JSON data back to FloorPlan object
284
+ floor_plan = dict_to_floor_plan(layout_data)
285
+
286
+ return floor_plan
SAGE10k/sage10k/scenes/.DS_Store ADDED
Binary file (12.3 kB). View file
 
SAGE10k/sage10k/scenes/20251213_020526_layout_84b703fb/layout_84b703fb.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_033758_layout_cf6c1dfd/layout_cf6c1dfd.json ADDED
@@ -0,0 +1,2161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "layout_cf6c1dfd",
3
+ "rooms": [
4
+ {
5
+ "id": "room_7cbb6d01",
6
+ "room_type": "kitchen",
7
+ "position": {
8
+ "x": 0.0,
9
+ "y": 0.0,
10
+ "z": 0.0
11
+ },
12
+ "dimensions": {
13
+ "width": 4.0,
14
+ "length": 5.0,
15
+ "height": 2.7
16
+ },
17
+ "walls": [
18
+ {
19
+ "id": "wall_room_7cbb6d01_north_13acb0fb",
20
+ "start_point": {
21
+ "x": 0.0,
22
+ "y": 5.0,
23
+ "z": 0.0
24
+ },
25
+ "end_point": {
26
+ "x": 4.0,
27
+ "y": 5.0,
28
+ "z": 0.0
29
+ },
30
+ "height": 2.7,
31
+ "thickness": 0.1,
32
+ "material": "room_7cbb6d01_wall"
33
+ },
34
+ {
35
+ "id": "wall_room_7cbb6d01_south_3c778a08",
36
+ "start_point": {
37
+ "x": 0.0,
38
+ "y": 0.0,
39
+ "z": 0.0
40
+ },
41
+ "end_point": {
42
+ "x": 4.0,
43
+ "y": 0.0,
44
+ "z": 0.0
45
+ },
46
+ "height": 2.7,
47
+ "thickness": 0.1,
48
+ "material": "room_7cbb6d01_wall"
49
+ },
50
+ {
51
+ "id": "wall_room_7cbb6d01_east_59ad0074",
52
+ "start_point": {
53
+ "x": 4.0,
54
+ "y": 0.0,
55
+ "z": 0.0
56
+ },
57
+ "end_point": {
58
+ "x": 4.0,
59
+ "y": 5.0,
60
+ "z": 0.0
61
+ },
62
+ "height": 2.7,
63
+ "thickness": 0.1,
64
+ "material": "room_7cbb6d01_wall"
65
+ },
66
+ {
67
+ "id": "wall_room_7cbb6d01_west_967dae07",
68
+ "start_point": {
69
+ "x": 0.0,
70
+ "y": 0.0,
71
+ "z": 0.0
72
+ },
73
+ "end_point": {
74
+ "x": 0.0,
75
+ "y": 5.0,
76
+ "z": 0.0
77
+ },
78
+ "height": 2.7,
79
+ "thickness": 0.1,
80
+ "material": "room_7cbb6d01_wall"
81
+ }
82
+ ],
83
+ "doors": [
84
+ {
85
+ "id": "door_b3683d7d",
86
+ "wall_id": "wall_room_7cbb6d01_north_13acb0fb",
87
+ "position_on_wall": 0.5381636428540826,
88
+ "width": 0.95,
89
+ "height": 2.05,
90
+ "door_type": "entry/main/front",
91
+ "opens_inward": true,
92
+ "opening": false,
93
+ "door_material": "Door_8"
94
+ }
95
+ ],
96
+ "objects": [
97
+ {
98
+ "id": "room_7cbb6d01_cabinet_eb150484",
99
+ "room_id": "room_7cbb6d01",
100
+ "type": "cabinet",
101
+ "description": "A Baroque cabinet featuring a tall rectangular silhouette, gold-gilded molding, curving panel lines, heavy ornamentation, and sumptuous dark lacquer finish.",
102
+ "position": {
103
+ "x": 0.27313406877862484,
104
+ "y": 1.85,
105
+ "z": 0.0
106
+ },
107
+ "rotation": {
108
+ "x": 0,
109
+ "y": 0,
110
+ "z": 270
111
+ },
112
+ "dimensions": {
113
+ "width": 1.014476077134447,
114
+ "length": 0.41126813755724967,
115
+ "height": 1.3767833728771544
116
+ },
117
+ "source": "generation",
118
+ "source_id": "ba782d6e",
119
+ "place_id": "floor",
120
+ "place_guidance": "Standard placement for the object",
121
+ "placement_constraints": [
122
+ [
123
+ 27.313406877862484,
124
+ 185.0
125
+ ],
126
+ 270,
127
+ [
128
+ [
129
+ 49.626813755724974,
130
+ 132.52619614327764
131
+ ],
132
+ [
133
+ 49.626813755724974,
134
+ 237.47380385672236
135
+ ],
136
+ [
137
+ 5.0,
138
+ 237.47380385672236
139
+ ],
140
+ [
141
+ 5.0,
142
+ 132.52619614327764
143
+ ]
144
+ ],
145
+ [
146
+ {
147
+ "type": "global",
148
+ "constraint": "edge"
149
+ }
150
+ ]
151
+ ],
152
+ "mass": 150.0,
153
+ "pbr_parameters": {
154
+ "metallic": 0.3,
155
+ "roughness": 0.2
156
+ }
157
+ },
158
+ {
159
+ "id": "room_7cbb6d01_cabinet_625795d7",
160
+ "room_id": "room_7cbb6d01",
161
+ "type": "cabinet",
162
+ "description": "A Baroque cabinet featuring a tall rectangular silhouette, gold-gilded molding, curving panel lines, heavy ornamentation, and sumptuous dark lacquer finish.",
163
+ "position": {
164
+ "x": 0.27313406877862484,
165
+ "y": 0.65,
166
+ "z": 0.0
167
+ },
168
+ "rotation": {
169
+ "x": 0,
170
+ "y": 0,
171
+ "z": 270
172
+ },
173
+ "dimensions": {
174
+ "width": 1.014476077134447,
175
+ "length": 0.41126813755724967,
176
+ "height": 1.3767833728771544
177
+ },
178
+ "source": "generation",
179
+ "source_id": "ba782d6e",
180
+ "place_id": "floor",
181
+ "place_guidance": "Standard placement for the object",
182
+ "placement_constraints": [
183
+ [
184
+ 27.313406877862484,
185
+ 65.0
186
+ ],
187
+ 270,
188
+ [
189
+ [
190
+ 49.626813755724974,
191
+ 12.526196143277652
192
+ ],
193
+ [
194
+ 49.626813755724974,
195
+ 117.47380385672236
196
+ ],
197
+ [
198
+ 5.0,
199
+ 117.47380385672236
200
+ ],
201
+ [
202
+ 5.0,
203
+ 12.526196143277652
204
+ ]
205
+ ],
206
+ [
207
+ {
208
+ "type": "global",
209
+ "constraint": "edge"
210
+ },
211
+ {
212
+ "type": "relative",
213
+ "constraint": "right of",
214
+ "target": "room_7cbb6d01_cabinet_eb150484"
215
+ },
216
+ {
217
+ "type": "distance",
218
+ "constraint": "near",
219
+ "target": "room_7cbb6d01_cabinet_eb150484"
220
+ },
221
+ {
222
+ "type": "direction",
223
+ "constraint": "face same as",
224
+ "target": "room_7cbb6d01_cabinet_eb150484"
225
+ }
226
+ ]
227
+ ],
228
+ "mass": 150.0,
229
+ "pbr_parameters": {
230
+ "metallic": 0.3,
231
+ "roughness": 0.2
232
+ }
233
+ },
234
+ {
235
+ "id": "room_7cbb6d01_cabinet_2b248fea",
236
+ "room_id": "room_7cbb6d01",
237
+ "type": "cabinet",
238
+ "description": "A Baroque cabinet featuring a tall rectangular silhouette, gold-gilded molding, curving panel lines, heavy ornamentation, and sumptuous dark lacquer finish.",
239
+ "position": {
240
+ "x": 0.27313406877862484,
241
+ "y": 3.05,
242
+ "z": 0.0
243
+ },
244
+ "rotation": {
245
+ "x": 0,
246
+ "y": 0,
247
+ "z": 270
248
+ },
249
+ "dimensions": {
250
+ "width": 1.014476077134447,
251
+ "length": 0.41126813755724967,
252
+ "height": 1.3767833728771544
253
+ },
254
+ "source": "generation",
255
+ "source_id": "ba782d6e",
256
+ "place_id": "floor",
257
+ "place_guidance": "Standard placement for the object",
258
+ "placement_constraints": [
259
+ [
260
+ 27.313406877862484,
261
+ 305.0
262
+ ],
263
+ 270,
264
+ [
265
+ [
266
+ 49.626813755724974,
267
+ 252.52619614327764
268
+ ],
269
+ [
270
+ 49.626813755724974,
271
+ 357.4738038567223
272
+ ],
273
+ [
274
+ 5.0,
275
+ 357.4738038567223
276
+ ],
277
+ [
278
+ 5.0,
279
+ 252.52619614327764
280
+ ]
281
+ ],
282
+ [
283
+ {
284
+ "type": "global",
285
+ "constraint": "edge"
286
+ },
287
+ {
288
+ "type": "distance",
289
+ "constraint": "near",
290
+ "target": "room_7cbb6d01_cabinet_625795d7"
291
+ },
292
+ {
293
+ "type": "direction",
294
+ "constraint": "face same as",
295
+ "target": "room_7cbb6d01_cabinet_625795d7"
296
+ }
297
+ ]
298
+ ],
299
+ "mass": 150.0,
300
+ "pbr_parameters": {
301
+ "metallic": 0.3,
302
+ "roughness": 0.2
303
+ }
304
+ },
305
+ {
306
+ "id": "room_7cbb6d01_cabinet_8d5b377e",
307
+ "room_id": "room_7cbb6d01",
308
+ "type": "cabinet",
309
+ "description": "A Baroque cabinet featuring a tall rectangular silhouette, gold-gilded molding, curving panel lines, heavy ornamentation, and sumptuous dark lacquer finish.",
310
+ "position": {
311
+ "x": 0.27313406877862484,
312
+ "y": 4.25,
313
+ "z": 0.0
314
+ },
315
+ "rotation": {
316
+ "x": 0,
317
+ "y": 0,
318
+ "z": 270
319
+ },
320
+ "dimensions": {
321
+ "width": 1.014476077134447,
322
+ "length": 0.41126813755724967,
323
+ "height": 1.3767833728771544
324
+ },
325
+ "source": "generation",
326
+ "source_id": "ba782d6e",
327
+ "place_id": "floor",
328
+ "place_guidance": "Standard placement for the object",
329
+ "placement_constraints": [
330
+ [
331
+ 27.313406877862484,
332
+ 425.0
333
+ ],
334
+ 270,
335
+ [
336
+ [
337
+ 49.626813755724974,
338
+ 372.5261961432777
339
+ ],
340
+ [
341
+ 49.626813755724974,
342
+ 477.4738038567223
343
+ ],
344
+ [
345
+ 5.0,
346
+ 477.4738038567223
347
+ ],
348
+ [
349
+ 5.0,
350
+ 372.5261961432777
351
+ ]
352
+ ],
353
+ [
354
+ {
355
+ "type": "global",
356
+ "constraint": "edge"
357
+ },
358
+ {
359
+ "type": "distance",
360
+ "constraint": "near",
361
+ "target": "room_7cbb6d01_cabinet_2b248fea"
362
+ },
363
+ {
364
+ "type": "direction",
365
+ "constraint": "face same as",
366
+ "target": "room_7cbb6d01_cabinet_2b248fea"
367
+ }
368
+ ]
369
+ ],
370
+ "mass": 150.0,
371
+ "pbr_parameters": {
372
+ "metallic": 0.3,
373
+ "roughness": 0.2
374
+ }
375
+ },
376
+ {
377
+ "id": "room_7cbb6d01_countertop_fdb11d9a",
378
+ "room_id": "room_7cbb6d01",
379
+ "type": "countertop",
380
+ "description": "A Baroque curved countertop with a sweeping semi\u2011circular shape, gold\u2011trimmed edge, polished marble surface, and intricate floral embossing.",
381
+ "position": {
382
+ "x": 1.05,
383
+ "y": 0.6201052642770855,
384
+ "z": 0.0
385
+ },
386
+ "rotation": {
387
+ "x": 0,
388
+ "y": 0,
389
+ "z": 0
390
+ },
391
+ "dimensions": {
392
+ "width": 0.9212761048815495,
393
+ "length": 1.105210528554171,
394
+ "height": 0.512559665135604
395
+ },
396
+ "source": "generation",
397
+ "source_id": "02ead4a3",
398
+ "place_id": "floor",
399
+ "place_guidance": "Standard placement for the object",
400
+ "placement_constraints": [
401
+ [
402
+ 105.0,
403
+ 62.01052642770855
404
+ ],
405
+ 0,
406
+ [
407
+ [
408
+ 152.81380524407749,
409
+ 5.0
410
+ ],
411
+ [
412
+ 152.81380524407749,
413
+ 119.02105285541711
414
+ ],
415
+ [
416
+ 57.18619475592252,
417
+ 119.02105285541711
418
+ ],
419
+ [
420
+ 57.18619475592252,
421
+ 5.0
422
+ ]
423
+ ],
424
+ [
425
+ {
426
+ "type": "global",
427
+ "constraint": "edge"
428
+ },
429
+ {
430
+ "type": "distance",
431
+ "constraint": "close to",
432
+ "target": "room_7cbb6d01_cabinet_eb150484"
433
+ }
434
+ ]
435
+ ],
436
+ "mass": 150.0,
437
+ "pbr_parameters": {
438
+ "metallic": 0.0,
439
+ "roughness": 0.2
440
+ }
441
+ },
442
+ {
443
+ "id": "room_7cbb6d01_island_4a6401c7",
444
+ "room_id": "room_7cbb6d01",
445
+ "type": "island",
446
+ "description": "A Baroque kitchen island with a rectangular footprint, gold-trimmed edges, curved ornamental legs, deep rich colors, and lavish gilded detailing.",
447
+ "position": {
448
+ "x": 3.5689186666993593,
449
+ "y": 0.65,
450
+ "z": 0.0
451
+ },
452
+ "rotation": {
453
+ "x": 0,
454
+ "y": 0,
455
+ "z": 90
456
+ },
457
+ "dimensions": {
458
+ "width": 1.080473460587524,
459
+ "length": 0.7271626666012809,
460
+ "height": 0.9744662393674592
461
+ },
462
+ "source": "generation",
463
+ "source_id": "a422f9a7",
464
+ "place_id": "floor",
465
+ "place_guidance": "Standard placement for the object",
466
+ "placement_constraints": [
467
+ [
468
+ 345,
469
+ 65
470
+ ],
471
+ 270,
472
+ [
473
+ [
474
+ 383.10813333006405,
475
+ 9.226326970623802
476
+ ],
477
+ [
478
+ 383.10813333006405,
479
+ 120.7736730293762
480
+ ],
481
+ [
482
+ 306.89186666993595,
483
+ 120.7736730293762
484
+ ],
485
+ [
486
+ 306.89186666993595,
487
+ 9.226326970623802
488
+ ],
489
+ [
490
+ 383.10813333006405,
491
+ 9.226326970623802
492
+ ]
493
+ ],
494
+ [
495
+ {
496
+ "type": "global",
497
+ "constraint": "middle"
498
+ },
499
+ {
500
+ "type": "alignment",
501
+ "constraint": "center aligned",
502
+ "target": "room_7cbb6d01_countertop_fdb11d9a"
503
+ },
504
+ {
505
+ "type": "distance",
506
+ "constraint": "far",
507
+ "target": "room_7cbb6d01_cabinet_eb150484"
508
+ },
509
+ {
510
+ "type": "distance",
511
+ "constraint": "far",
512
+ "target": "room_7cbb6d01_cabinet_8d5b377e"
513
+ }
514
+ ]
515
+ ],
516
+ "mass": 120.0,
517
+ "pbr_parameters": {
518
+ "metallic": 0.4,
519
+ "roughness": 0.3
520
+ }
521
+ },
522
+ {
523
+ "id": "room_7cbb6d01_fridge_23b773f9",
524
+ "room_id": "room_7cbb6d01",
525
+ "type": "fridge",
526
+ "description": "A Baroque tall fridge with a rectangular tower form, ornate gold\u2011gilded door panels, curvilinear handles, and richly painted finish.",
527
+ "position": {
528
+ "x": 1.05,
529
+ "y": 4.759381519007392,
530
+ "z": 0.0
531
+ },
532
+ "rotation": {
533
+ "x": 0,
534
+ "y": 0,
535
+ "z": 180
536
+ },
537
+ "dimensions": {
538
+ "width": 0.8210932598654834,
539
+ "length": 0.34623696198521575,
540
+ "height": 1.2949289904625136
541
+ },
542
+ "source": "generation",
543
+ "source_id": "4c39d32e",
544
+ "place_id": "floor",
545
+ "place_guidance": "Standard placement for the object",
546
+ "placement_constraints": [
547
+ [
548
+ 105.0,
549
+ 475.93815190073923
550
+ ],
551
+ 180,
552
+ [
553
+ [
554
+ 147.80466299327418,
555
+ 456.87630380147846
556
+ ],
557
+ [
558
+ 147.80466299327418,
559
+ 495.0
560
+ ],
561
+ [
562
+ 62.19533700672583,
563
+ 495.0
564
+ ],
565
+ [
566
+ 62.19533700672583,
567
+ 456.87630380147846
568
+ ]
569
+ ],
570
+ [
571
+ {
572
+ "type": "global",
573
+ "constraint": "edge"
574
+ },
575
+ {
576
+ "type": "distance",
577
+ "constraint": "far",
578
+ "target": "room_7cbb6d01_island_4a6401c7"
579
+ }
580
+ ]
581
+ ],
582
+ "mass": 150.0,
583
+ "pbr_parameters": {
584
+ "metallic": 0.8,
585
+ "roughness": 0.3
586
+ }
587
+ },
588
+ {
589
+ "id": "room_7cbb6d01_dishwasher_d8ff1a3b",
590
+ "room_id": "room_7cbb6d01",
591
+ "type": "dishwasher",
592
+ "description": "A Baroque built\u2011in dishwasher with a compact rectangular body, gold\u2011trimmed front, decorative scrollwork, and sleek glossy surface.",
593
+ "position": {
594
+ "x": 3.05,
595
+ "y": 4.681808053051224,
596
+ "z": 0.0
597
+ },
598
+ "rotation": {
599
+ "x": 0,
600
+ "y": 0,
601
+ "z": 180
602
+ },
603
+ "dimensions": {
604
+ "width": 0.5405516222731104,
605
+ "length": 0.5013838938975527,
606
+ "height": 0.8988534222552779
607
+ },
608
+ "source": "generation",
609
+ "source_id": "fa52adce",
610
+ "place_id": "floor",
611
+ "place_guidance": "Standard placement for the object",
612
+ "placement_constraints": [
613
+ [
614
+ 305.0,
615
+ 468.18080530512236
616
+ ],
617
+ 180,
618
+ [
619
+ [
620
+ 333.7775811136555,
621
+ 441.3616106102447
622
+ ],
623
+ [
624
+ 333.7775811136555,
625
+ 495.0
626
+ ],
627
+ [
628
+ 276.2224188863445,
629
+ 495.0
630
+ ],
631
+ [
632
+ 276.2224188863445,
633
+ 441.3616106102447
634
+ ]
635
+ ],
636
+ [
637
+ {
638
+ "type": "global",
639
+ "constraint": "edge"
640
+ },
641
+ {
642
+ "type": "distance",
643
+ "constraint": "near",
644
+ "target": "room_7cbb6d01_fridge_23b773f9"
645
+ },
646
+ {
647
+ "type": "distance",
648
+ "constraint": "far",
649
+ "target": "room_7cbb6d01_island_4a6401c7"
650
+ },
651
+ {
652
+ "type": "direction",
653
+ "constraint": "face same as",
654
+ "target": "room_7cbb6d01_fridge_23b773f9"
655
+ }
656
+ ]
657
+ ],
658
+ "mass": 50.0,
659
+ "pbr_parameters": {
660
+ "metallic": 0.7,
661
+ "roughness": 0.15
662
+ }
663
+ },
664
+ {
665
+ "id": "room_7cbb6d01_trashbin_5825db39",
666
+ "room_id": "room_7cbb6d01",
667
+ "type": "trashbin",
668
+ "description": "A metal trash bin with an ornate gold\u2011detailed cylindrical body, fluted sides, and a recessed lid handle.",
669
+ "position": {
670
+ "x": 3.6137900895724573,
671
+ "y": 4.05,
672
+ "z": 0.0
673
+ },
674
+ "rotation": {
675
+ "x": 0,
676
+ "y": 0,
677
+ "z": 90
678
+ },
679
+ "dimensions": {
680
+ "width": 0.6387510035127077,
681
+ "length": 0.6374198208550852,
682
+ "height": 0.9428031162847106
683
+ },
684
+ "source": "generation",
685
+ "source_id": "7eb11dc5",
686
+ "place_id": "floor",
687
+ "place_guidance": "Standard placement for the object",
688
+ "placement_constraints": [
689
+ [
690
+ 361.37900895724573,
691
+ 405.0
692
+ ],
693
+ 90,
694
+ [
695
+ [
696
+ 395.0,
697
+ 371.3124498243646
698
+ ],
699
+ [
700
+ 395.0,
701
+ 438.6875501756354
702
+ ],
703
+ [
704
+ 327.75801791449146,
705
+ 438.6875501756354
706
+ ],
707
+ [
708
+ 327.75801791449146,
709
+ 371.3124498243646
710
+ ]
711
+ ],
712
+ [
713
+ {
714
+ "type": "global",
715
+ "constraint": "edge"
716
+ },
717
+ {
718
+ "type": "relative",
719
+ "constraint": "left of",
720
+ "target": "room_7cbb6d01_cabinet_eb150484"
721
+ },
722
+ {
723
+ "type": "distance",
724
+ "constraint": "near",
725
+ "target": "room_7cbb6d01_cabinet_eb150484"
726
+ },
727
+ {
728
+ "type": "distance",
729
+ "constraint": "far",
730
+ "target": "room_7cbb6d01_island_4a6401c7"
731
+ }
732
+ ]
733
+ ],
734
+ "mass": 15.0,
735
+ "pbr_parameters": {
736
+ "metallic": 0.8,
737
+ "roughness": 0.6
738
+ }
739
+ },
740
+ {
741
+ "id": "room_7cbb6d01_stool_a102dbd4",
742
+ "room_id": "room_7cbb6d01",
743
+ "type": "stool",
744
+ "description": "A Baroque upholstered bar stool with a rounded seat, plush velvet fabric, gold\u2011accented wooden legs that curve inward, and a slightly tapered back.",
745
+ "position": {
746
+ "x": 3.45,
747
+ "y": 1.65,
748
+ "z": 0.0
749
+ },
750
+ "rotation": {
751
+ "x": 0,
752
+ "y": 0,
753
+ "z": 180
754
+ },
755
+ "dimensions": {
756
+ "width": 0.6440624883863789,
757
+ "length": 0.5713969993702516,
758
+ "height": 0.9251959033793223
759
+ },
760
+ "source": "generation",
761
+ "source_id": "2fa5b754",
762
+ "place_id": "floor",
763
+ "place_guidance": "Standard placement for the object",
764
+ "placement_constraints": [
765
+ [
766
+ 345,
767
+ 165
768
+ ],
769
+ 180,
770
+ [
771
+ [
772
+ 378.95312441931895,
773
+ 134.68015003148741
774
+ ],
775
+ [
776
+ 378.95312441931895,
777
+ 195.31984996851259
778
+ ],
779
+ [
780
+ 311.04687558068105,
781
+ 195.31984996851259
782
+ ],
783
+ [
784
+ 311.04687558068105,
785
+ 134.68015003148741
786
+ ],
787
+ [
788
+ 378.95312441931895,
789
+ 134.68015003148741
790
+ ]
791
+ ],
792
+ [
793
+ {
794
+ "type": "global",
795
+ "constraint": "middle"
796
+ },
797
+ {
798
+ "type": "distance",
799
+ "constraint": "close to",
800
+ "target": "room_7cbb6d01_island_4a6401c7"
801
+ },
802
+ {
803
+ "type": "direction",
804
+ "constraint": "face to",
805
+ "target": "room_7cbb6d01_island_4a6401c7"
806
+ },
807
+ {
808
+ "type": "distance",
809
+ "constraint": "far",
810
+ "target": "room_7cbb6d01_cabinet_eb150484"
811
+ }
812
+ ]
813
+ ],
814
+ "mass": 15.0,
815
+ "pbr_parameters": {
816
+ "metallic": 0.3,
817
+ "roughness": 0.6
818
+ }
819
+ },
820
+ {
821
+ "id": "room_7cbb6d01_stool_2658b91c",
822
+ "room_id": "room_7cbb6d01",
823
+ "type": "stool",
824
+ "description": "A Baroque upholstered bar stool with a rounded seat, plush velvet fabric, gold\u2011accented wooden legs that curve inward, and a slightly tapered back.",
825
+ "position": {
826
+ "x": 2.65,
827
+ "y": 1.05,
828
+ "z": 0.0
829
+ },
830
+ "rotation": {
831
+ "x": 0,
832
+ "y": 0,
833
+ "z": 270
834
+ },
835
+ "dimensions": {
836
+ "width": 0.6440624883863789,
837
+ "length": 0.5713969993702516,
838
+ "height": 0.9251959033793223
839
+ },
840
+ "source": "generation",
841
+ "source_id": "2fa5b754",
842
+ "place_id": "floor",
843
+ "place_guidance": "Standard placement for the object",
844
+ "placement_constraints": [
845
+ [
846
+ 265,
847
+ 105
848
+ ],
849
+ 270,
850
+ [
851
+ [
852
+ 295.3198499685126,
853
+ 71.04687558068105
854
+ ],
855
+ [
856
+ 295.3198499685126,
857
+ 138.95312441931895
858
+ ],
859
+ [
860
+ 234.68015003148741,
861
+ 138.95312441931895
862
+ ],
863
+ [
864
+ 234.68015003148741,
865
+ 71.04687558068105
866
+ ],
867
+ [
868
+ 295.3198499685126,
869
+ 71.04687558068105
870
+ ]
871
+ ],
872
+ [
873
+ {
874
+ "type": "global",
875
+ "constraint": "middle"
876
+ },
877
+ {
878
+ "type": "distance",
879
+ "constraint": "close to",
880
+ "target": "room_7cbb6d01_island_4a6401c7"
881
+ },
882
+ {
883
+ "type": "direction",
884
+ "constraint": "face to",
885
+ "target": "room_7cbb6d01_island_4a6401c7"
886
+ },
887
+ {
888
+ "type": "distance",
889
+ "constraint": "far",
890
+ "target": "room_7cbb6d01_cabinet_625795d7"
891
+ }
892
+ ]
893
+ ],
894
+ "mass": 15.0,
895
+ "pbr_parameters": {
896
+ "metallic": 0.3,
897
+ "roughness": 0.6
898
+ }
899
+ },
900
+ {
901
+ "id": "room_7cbb6d01_stool_4836acc2",
902
+ "room_id": "room_7cbb6d01",
903
+ "type": "stool",
904
+ "description": "A Baroque upholstered bar stool with a rounded seat, plush velvet fabric, gold\u2011accented wooden legs that curve inward, and a slightly tapered back.",
905
+ "position": {
906
+ "x": 2.65,
907
+ "y": 1.85,
908
+ "z": 0.0
909
+ },
910
+ "rotation": {
911
+ "x": 0,
912
+ "y": 0,
913
+ "z": 270
914
+ },
915
+ "dimensions": {
916
+ "width": 0.6440624883863789,
917
+ "length": 0.5713969993702516,
918
+ "height": 0.9251959033793223
919
+ },
920
+ "source": "generation",
921
+ "source_id": "2fa5b754",
922
+ "place_id": "floor",
923
+ "place_guidance": "Standard placement for the object",
924
+ "placement_constraints": [
925
+ [
926
+ 265,
927
+ 185
928
+ ],
929
+ 270,
930
+ [
931
+ [
932
+ 295.3198499685126,
933
+ 151.04687558068105
934
+ ],
935
+ [
936
+ 295.3198499685126,
937
+ 218.95312441931895
938
+ ],
939
+ [
940
+ 234.68015003148741,
941
+ 218.95312441931895
942
+ ],
943
+ [
944
+ 234.68015003148741,
945
+ 151.04687558068105
946
+ ],
947
+ [
948
+ 295.3198499685126,
949
+ 151.04687558068105
950
+ ]
951
+ ],
952
+ [
953
+ {
954
+ "type": "global",
955
+ "constraint": "middle"
956
+ },
957
+ {
958
+ "type": "distance",
959
+ "constraint": "close to",
960
+ "target": "room_7cbb6d01_island_4a6401c7"
961
+ },
962
+ {
963
+ "type": "direction",
964
+ "constraint": "face to",
965
+ "target": "room_7cbb6d01_island_4a6401c7"
966
+ },
967
+ {
968
+ "type": "distance",
969
+ "constraint": "far",
970
+ "target": "room_7cbb6d01_cabinet_2b248fea"
971
+ }
972
+ ]
973
+ ],
974
+ "mass": 15.0,
975
+ "pbr_parameters": {
976
+ "metallic": 0.3,
977
+ "roughness": 0.6
978
+ }
979
+ },
980
+ {
981
+ "id": "room_7cbb6d01_stove_a6613395",
982
+ "room_id": "room_7cbb6d01",
983
+ "type": "stove",
984
+ "description": "A Baroque gold\u2011gilded stove with ornate curved legs and a rectangular body, featuring intricate scrollwork on its front panels",
985
+ "position": {
986
+ "x": 3.7313105056529245,
987
+ "y": 2.45,
988
+ "z": 0.0
989
+ },
990
+ "rotation": {
991
+ "x": 0,
992
+ "y": 0,
993
+ "z": 90
994
+ },
995
+ "dimensions": {
996
+ "width": 0.5395228009752276,
997
+ "length": 0.4023789886941502,
998
+ "height": 0.3566443075145037
999
+ },
1000
+ "source": "generation",
1001
+ "source_id": "a894c68d",
1002
+ "place_id": "floor",
1003
+ "place_guidance": "Standard placement for the object",
1004
+ "placement_constraints": [
1005
+ [
1006
+ 373.13105056529247,
1007
+ 245.0
1008
+ ],
1009
+ 90,
1010
+ [
1011
+ [
1012
+ 395.0,
1013
+ 216.27385995123862
1014
+ ],
1015
+ [
1016
+ 395.0,
1017
+ 273.7261400487614
1018
+ ],
1019
+ [
1020
+ 351.26210113058494,
1021
+ 273.7261400487614
1022
+ ],
1023
+ [
1024
+ 351.26210113058494,
1025
+ 216.27385995123862
1026
+ ]
1027
+ ],
1028
+ [
1029
+ {
1030
+ "type": "global",
1031
+ "constraint": "edge"
1032
+ },
1033
+ {
1034
+ "type": "distance",
1035
+ "constraint": "close to",
1036
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1037
+ },
1038
+ {
1039
+ "type": "distance",
1040
+ "constraint": "near",
1041
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1042
+ }
1043
+ ]
1044
+ ],
1045
+ "mass": 15.0,
1046
+ "pbr_parameters": {
1047
+ "metallic": 0.95,
1048
+ "roughness": 0.15
1049
+ }
1050
+ },
1051
+ {
1052
+ "id": "room_7cbb6d01_sink_c03e1a12",
1053
+ "room_id": "room_7cbb6d01",
1054
+ "type": "sink",
1055
+ "description": "A Baroque gilded copper sink with a deep rounded basin and fluted copper edges, its surface polished to a high shine",
1056
+ "position": {
1057
+ "x": 1.85,
1058
+ "y": 1.05,
1059
+ "z": 0.0
1060
+ },
1061
+ "rotation": {
1062
+ "x": 0,
1063
+ "y": 0,
1064
+ "z": 0
1065
+ },
1066
+ "dimensions": {
1067
+ "width": 0.3360057728503899,
1068
+ "length": 0.33415231427075026,
1069
+ "height": 0.14183647746537523
1070
+ },
1071
+ "source": "generation",
1072
+ "source_id": "54e800d9",
1073
+ "place_id": "floor",
1074
+ "place_guidance": "Standard placement for the object",
1075
+ "placement_constraints": [
1076
+ [
1077
+ 185,
1078
+ 105
1079
+ ],
1080
+ 0,
1081
+ [
1082
+ [
1083
+ 203.5502886425195,
1084
+ 86.5423842864625
1085
+ ],
1086
+ [
1087
+ 203.5502886425195,
1088
+ 123.4576157135375
1089
+ ],
1090
+ [
1091
+ 166.4497113574805,
1092
+ 123.4576157135375
1093
+ ],
1094
+ [
1095
+ 166.4497113574805,
1096
+ 86.5423842864625
1097
+ ],
1098
+ [
1099
+ 203.5502886425195,
1100
+ 86.5423842864625
1101
+ ]
1102
+ ],
1103
+ [
1104
+ {
1105
+ "type": "global",
1106
+ "constraint": "middle"
1107
+ },
1108
+ {
1109
+ "type": "relative",
1110
+ "constraint": "right of",
1111
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1112
+ },
1113
+ {
1114
+ "type": "distance",
1115
+ "constraint": "close to",
1116
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1117
+ },
1118
+ {
1119
+ "type": "direction",
1120
+ "constraint": "face same as",
1121
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1122
+ },
1123
+ {
1124
+ "type": "distance",
1125
+ "constraint": "near",
1126
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1127
+ }
1128
+ ]
1129
+ ],
1130
+ "mass": 1.2,
1131
+ "pbr_parameters": {
1132
+ "metallic": 0.0,
1133
+ "roughness": 0.3
1134
+ }
1135
+ },
1136
+ {
1137
+ "id": "room_7cbb6d01_oven_9a9913d4",
1138
+ "room_id": "room_7cbb6d01",
1139
+ "type": "oven",
1140
+ "description": "A Baroque oven with a tall rectangular silhouette, gold\u2011gilded trim and a curved glass door, its fa\u00e7ade richly carved",
1141
+ "position": {
1142
+ "x": 3.3409343211112223,
1143
+ "y": 3.25,
1144
+ "z": 0.0
1145
+ },
1146
+ "rotation": {
1147
+ "x": 0,
1148
+ "y": 0,
1149
+ "z": 90
1150
+ },
1151
+ "dimensions": {
1152
+ "width": 0.6574013356454859,
1153
+ "length": 1.1831313577775553,
1154
+ "height": 1.2989427409978584
1155
+ },
1156
+ "source": "generation",
1157
+ "source_id": "0a93bf4c",
1158
+ "place_id": "floor",
1159
+ "place_guidance": "Standard placement for the object",
1160
+ "placement_constraints": [
1161
+ [
1162
+ 334.09343211112224,
1163
+ 325.0
1164
+ ],
1165
+ 90,
1166
+ [
1167
+ [
1168
+ 395.0,
1169
+ 290.3799332177257
1170
+ ],
1171
+ [
1172
+ 395.0,
1173
+ 359.6200667822743
1174
+ ],
1175
+ [
1176
+ 273.1868642222445,
1177
+ 359.6200667822743
1178
+ ],
1179
+ [
1180
+ 273.1868642222445,
1181
+ 290.3799332177257
1182
+ ]
1183
+ ],
1184
+ [
1185
+ {
1186
+ "type": "global",
1187
+ "constraint": "edge"
1188
+ },
1189
+ {
1190
+ "type": "relative",
1191
+ "constraint": "right of",
1192
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1193
+ },
1194
+ {
1195
+ "type": "distance",
1196
+ "constraint": "close to",
1197
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1198
+ },
1199
+ {
1200
+ "type": "distance",
1201
+ "constraint": "near",
1202
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1203
+ }
1204
+ ]
1205
+ ],
1206
+ "mass": 120.0,
1207
+ "pbr_parameters": {
1208
+ "metallic": 0.7,
1209
+ "roughness": 0.3
1210
+ }
1211
+ },
1212
+ {
1213
+ "id": "room_7cbb6d01_stove_532a1df7",
1214
+ "room_id": "room_7cbb6d01",
1215
+ "type": "stove",
1216
+ "description": "A Baroque gold\u2011gilded stove with ornate curved legs and a rectangular body, featuring intricate scrollwork and a polished brass finish",
1217
+ "position": {
1218
+ "x": 1.85,
1219
+ "y": 0.39407086602664537,
1220
+ "z": 0.0
1221
+ },
1222
+ "rotation": {
1223
+ "x": 0,
1224
+ "y": 0,
1225
+ "z": 0
1226
+ },
1227
+ "dimensions": {
1228
+ "width": 0.5832761961405359,
1229
+ "length": 0.6531417320532907,
1230
+ "height": 0.7828781179268964
1231
+ },
1232
+ "source": "generation",
1233
+ "source_id": "1fea822b",
1234
+ "place_id": "floor",
1235
+ "place_guidance": "Standard placement for the object",
1236
+ "placement_constraints": [
1237
+ [
1238
+ 185.0,
1239
+ 39.407086602664535
1240
+ ],
1241
+ 0,
1242
+ [
1243
+ [
1244
+ 215.9138098070268,
1245
+ 5.0
1246
+ ],
1247
+ [
1248
+ 215.9138098070268,
1249
+ 73.81417320532907
1250
+ ],
1251
+ [
1252
+ 154.0861901929732,
1253
+ 73.81417320532907
1254
+ ],
1255
+ [
1256
+ 154.0861901929732,
1257
+ 5.0
1258
+ ]
1259
+ ],
1260
+ [
1261
+ {
1262
+ "type": "global",
1263
+ "constraint": "edge"
1264
+ },
1265
+ {
1266
+ "type": "distance",
1267
+ "constraint": "close to",
1268
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1269
+ },
1270
+ {
1271
+ "type": "direction",
1272
+ "constraint": "face same as",
1273
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1274
+ },
1275
+ {
1276
+ "type": "distance",
1277
+ "constraint": "far",
1278
+ "target": "existing-room_7cbb6d01_island_4a6401c7"
1279
+ }
1280
+ ]
1281
+ ],
1282
+ "mass": 15.0,
1283
+ "pbr_parameters": {
1284
+ "metallic": 0.0,
1285
+ "roughness": 0.7
1286
+ }
1287
+ },
1288
+ {
1289
+ "id": "room_7cbb6d01_sink_3c5455c3",
1290
+ "room_id": "room_7cbb6d01",
1291
+ "type": "sink",
1292
+ "description": "A Baroque gilded\u2011copper sink with a deep rounded basin, flared rim and decorative copper filigree accents",
1293
+ "position": {
1294
+ "x": 1.65,
1295
+ "y": 2.05,
1296
+ "z": 0.0
1297
+ },
1298
+ "rotation": {
1299
+ "x": 0,
1300
+ "y": 0,
1301
+ "z": 0
1302
+ },
1303
+ "dimensions": {
1304
+ "width": 1.1289694941065207,
1305
+ "length": 0.6601684462651902,
1306
+ "height": 0.620726543768687
1307
+ },
1308
+ "source": "generation",
1309
+ "source_id": "11ef67f4",
1310
+ "place_id": "floor",
1311
+ "place_guidance": "Standard placement for the object",
1312
+ "placement_constraints": [
1313
+ [
1314
+ 165,
1315
+ 205
1316
+ ],
1317
+ 0,
1318
+ [
1319
+ [
1320
+ 223.19847470532602,
1321
+ 170.2415776867405
1322
+ ],
1323
+ [
1324
+ 223.19847470532602,
1325
+ 239.7584223132595
1326
+ ],
1327
+ [
1328
+ 106.80152529467397,
1329
+ 239.7584223132595
1330
+ ],
1331
+ [
1332
+ 106.80152529467397,
1333
+ 170.2415776867405
1334
+ ],
1335
+ [
1336
+ 223.19847470532602,
1337
+ 170.2415776867405
1338
+ ]
1339
+ ],
1340
+ [
1341
+ {
1342
+ "type": "global",
1343
+ "constraint": "middle"
1344
+ },
1345
+ {
1346
+ "type": "distance",
1347
+ "constraint": "near",
1348
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1349
+ },
1350
+ {
1351
+ "type": "relative",
1352
+ "constraint": "right of",
1353
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1354
+ },
1355
+ {
1356
+ "type": "direction",
1357
+ "constraint": "face same as",
1358
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1359
+ }
1360
+ ]
1361
+ ],
1362
+ "mass": 150.0,
1363
+ "pbr_parameters": {
1364
+ "metallic": 0.1,
1365
+ "roughness": 0.6
1366
+ }
1367
+ },
1368
+ {
1369
+ "id": "room_7cbb6d01_oven_a07dc012",
1370
+ "room_id": "room_7cbb6d01",
1371
+ "type": "oven",
1372
+ "description": "A Baroque oven with a tall rectangular profile, gold\u2011gilded panels and a sculpted cornice, finished in polished brass",
1373
+ "position": {
1374
+ "x": 2.65,
1375
+ "y": 0.45,
1376
+ "z": 0.0
1377
+ },
1378
+ "rotation": {
1379
+ "x": 0,
1380
+ "y": 0,
1381
+ "z": 0
1382
+ },
1383
+ "dimensions": {
1384
+ "width": 0.6620095261410616,
1385
+ "length": 0.4375328631637252,
1386
+ "height": 1.3092101022461768
1387
+ },
1388
+ "source": "generation",
1389
+ "source_id": "2b5b83ca",
1390
+ "place_id": "floor",
1391
+ "place_guidance": "Standard placement for the object",
1392
+ "placement_constraints": [
1393
+ [
1394
+ 265,
1395
+ 45
1396
+ ],
1397
+ 0,
1398
+ [
1399
+ [
1400
+ 299.8504763070531,
1401
+ 21.37335684181374
1402
+ ],
1403
+ [
1404
+ 299.8504763070531,
1405
+ 68.62664315818625
1406
+ ],
1407
+ [
1408
+ 230.14952369294693,
1409
+ 68.62664315818625
1410
+ ],
1411
+ [
1412
+ 230.14952369294693,
1413
+ 21.37335684181374
1414
+ ],
1415
+ [
1416
+ 299.8504763070531,
1417
+ 21.37335684181374
1418
+ ]
1419
+ ],
1420
+ [
1421
+ {
1422
+ "type": "global",
1423
+ "constraint": "middle"
1424
+ },
1425
+ {
1426
+ "type": "distance",
1427
+ "constraint": "near",
1428
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1429
+ },
1430
+ {
1431
+ "type": "relative",
1432
+ "constraint": "right of",
1433
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1434
+ },
1435
+ {
1436
+ "type": "direction",
1437
+ "constraint": "face same as",
1438
+ "target": "existing-room_7cbb6d01_countertop_fdb11d9a"
1439
+ },
1440
+ {
1441
+ "type": "distance",
1442
+ "constraint": "far",
1443
+ "target": "existing-room_7cbb6d01_island_4a6401c7"
1444
+ }
1445
+ ]
1446
+ ],
1447
+ "mass": 150.0,
1448
+ "pbr_parameters": {
1449
+ "metallic": 0.9,
1450
+ "roughness": 0.1
1451
+ }
1452
+ },
1453
+ {
1454
+ "id": "room_7cbb6d01_chandelier_a41293d7",
1455
+ "room_id": "room_7cbb6d01",
1456
+ "type": "chandelier",
1457
+ "description": "A Baroque crystal and gold chandelier with a wide circular frame, multiple dangling crystal prisms and gilded arms radiating outward",
1458
+ "position": {
1459
+ "x": 2.05,
1460
+ "y": 3.05,
1461
+ "z": 0.0
1462
+ },
1463
+ "rotation": {
1464
+ "x": 0,
1465
+ "y": 0,
1466
+ "z": 270
1467
+ },
1468
+ "dimensions": {
1469
+ "width": 1.2053220463936856,
1470
+ "length": 1.2096308310430426,
1471
+ "height": 1.3889415341435483
1472
+ },
1473
+ "source": "generation",
1474
+ "source_id": "0b4ee193",
1475
+ "place_id": "floor",
1476
+ "place_guidance": "Standard placement for the object",
1477
+ "placement_constraints": [
1478
+ [
1479
+ 205,
1480
+ 305
1481
+ ],
1482
+ 270,
1483
+ [
1484
+ [
1485
+ 267.2315415521521,
1486
+ 242.98389768031572
1487
+ ],
1488
+ [
1489
+ 267.2315415521521,
1490
+ 367.01610231968425
1491
+ ],
1492
+ [
1493
+ 142.76845844784788,
1494
+ 367.01610231968425
1495
+ ],
1496
+ [
1497
+ 142.76845844784788,
1498
+ 242.98389768031572
1499
+ ],
1500
+ [
1501
+ 267.2315415521521,
1502
+ 242.98389768031572
1503
+ ]
1504
+ ],
1505
+ [
1506
+ {
1507
+ "type": "global",
1508
+ "constraint": "middle"
1509
+ },
1510
+ {
1511
+ "type": "distance",
1512
+ "constraint": "near",
1513
+ "target": "existing-room_7cbb6d01_island_4a6401c7"
1514
+ },
1515
+ {
1516
+ "type": "distance",
1517
+ "constraint": "far",
1518
+ "target": "existing-room_7cbb6d01_fridge_23b773f9"
1519
+ }
1520
+ ]
1521
+ ],
1522
+ "mass": 8.5,
1523
+ "pbr_parameters": {
1524
+ "metallic": 0.7,
1525
+ "roughness": 0.3
1526
+ }
1527
+ },
1528
+ {
1529
+ "id": "room_7cbb6d01_vase2_32a547fc",
1530
+ "room_id": "room_7cbb6d01",
1531
+ "type": "vase2",
1532
+ "description": "A small Baroque style ornate vase with intricate scrollwork, finished in polished gold leaf",
1533
+ "position": {
1534
+ "x": 0.26620772591256486,
1535
+ "y": 1.9892101437991296,
1536
+ "z": 1.287330820666911
1537
+ },
1538
+ "rotation": {
1539
+ "x": -0.04036603143488886,
1540
+ "y": -0.19765646758382072,
1541
+ "z": 52.02576321712573
1542
+ },
1543
+ "dimensions": {
1544
+ "width": 0.34216014816816326,
1545
+ "length": 0.17932399919245118,
1546
+ "height": 0.3348380721578797
1547
+ },
1548
+ "source": "generation",
1549
+ "source_id": "8c1080e7",
1550
+ "place_id": "room_7cbb6d01_cabinet_eb150484",
1551
+ "place_guidance": "Standard placement for the object",
1552
+ "placement_constraints": null,
1553
+ "mass": 2.5,
1554
+ "pbr_parameters": {
1555
+ "metallic": 0.9,
1556
+ "roughness": 0.1
1557
+ }
1558
+ },
1559
+ {
1560
+ "id": "room_7cbb6d01_vase2_9aad708e",
1561
+ "room_id": "room_7cbb6d01",
1562
+ "type": "vase2",
1563
+ "description": "A small Baroque style ornate vase with intricate scrollwork, finished in polished gold leaf",
1564
+ "position": {
1565
+ "x": 0.274860211360283,
1566
+ "y": 2.231166675055434,
1567
+ "z": 1.2877236812982131
1568
+ },
1569
+ "rotation": {
1570
+ "x": 0.258918728173414,
1571
+ "y": -0.40967916409934774,
1572
+ "z": 41.018590091648385
1573
+ },
1574
+ "dimensions": {
1575
+ "width": 0.34216014816816326,
1576
+ "length": 0.17932399919245118,
1577
+ "height": 0.3348380721578797
1578
+ },
1579
+ "source": "generation",
1580
+ "source_id": "8c1080e7",
1581
+ "place_id": "room_7cbb6d01_cabinet_eb150484",
1582
+ "place_guidance": "Standard placement for the object",
1583
+ "placement_constraints": null,
1584
+ "mass": 2.5,
1585
+ "pbr_parameters": {
1586
+ "metallic": 0.9,
1587
+ "roughness": 0.1
1588
+ }
1589
+ },
1590
+ {
1591
+ "id": "room_7cbb6d01_vase3_73358475",
1592
+ "room_id": "room_7cbb6d01",
1593
+ "type": "vase3",
1594
+ "description": "A small Baroque style ornate vase with intricate scrollwork, finished in polished gold leaf",
1595
+ "position": {
1596
+ "x": 0.28666103662169995,
1597
+ "y": 1.0373110829430081,
1598
+ "z": 1.2881368031580136
1599
+ },
1600
+ "rotation": {
1601
+ "x": -0.69591654424717,
1602
+ "y": -0.8683927518971083,
1603
+ "z": 120.27390199921184
1604
+ },
1605
+ "dimensions": {
1606
+ "width": 0.30334682689128023,
1607
+ "length": 0.1910255402524348,
1608
+ "height": 0.37419394042128895
1609
+ },
1610
+ "source": "generation",
1611
+ "source_id": "61da0618",
1612
+ "place_id": "room_7cbb6d01_cabinet_625795d7",
1613
+ "place_guidance": "Standard placement for the object",
1614
+ "placement_constraints": null,
1615
+ "mass": 1.2,
1616
+ "pbr_parameters": {
1617
+ "metallic": 0.0,
1618
+ "roughness": 0.2
1619
+ }
1620
+ },
1621
+ {
1622
+ "id": "room_7cbb6d01_vase3_02d06d25",
1623
+ "room_id": "room_7cbb6d01",
1624
+ "type": "vase3",
1625
+ "description": "A small Baroque style ornate vase with intricate scrollwork, finished in polished gold leaf",
1626
+ "position": {
1627
+ "x": 0.2579237654785482,
1628
+ "y": 0.6937559729784862,
1629
+ "z": 1.286857510071688
1630
+ },
1631
+ "rotation": {
1632
+ "x": -0.033012522286383586,
1633
+ "y": -0.33408011040076063,
1634
+ "z": 71.9427392909318
1635
+ },
1636
+ "dimensions": {
1637
+ "width": 0.30334682689128023,
1638
+ "length": 0.1910255402524348,
1639
+ "height": 0.37419394042128895
1640
+ },
1641
+ "source": "generation",
1642
+ "source_id": "61da0618",
1643
+ "place_id": "room_7cbb6d01_cabinet_625795d7",
1644
+ "place_guidance": "Standard placement for the object",
1645
+ "placement_constraints": null,
1646
+ "mass": 1.2,
1647
+ "pbr_parameters": {
1648
+ "metallic": 0.0,
1649
+ "roughness": 0.2
1650
+ }
1651
+ },
1652
+ {
1653
+ "id": "room_7cbb6d01_vase4_3deec004",
1654
+ "room_id": "room_7cbb6d01",
1655
+ "type": "vase4",
1656
+ "description": "A small Baroque style ornate vase with intricate scrollwork, finished in polished gold leaf",
1657
+ "position": {
1658
+ "x": 0.2784904801302165,
1659
+ "y": 3.010691030349572,
1660
+ "z": 1.2866879579510648
1661
+ },
1662
+ "rotation": {
1663
+ "x": -0.15629531459418144,
1664
+ "y": -0.12123492594032936,
1665
+ "z": 85.7138074775645
1666
+ },
1667
+ "dimensions": {
1668
+ "width": 0.3094376962300277,
1669
+ "length": 0.3109580628797397,
1670
+ "height": 0.43468194693804435
1671
+ },
1672
+ "source": "generation",
1673
+ "source_id": "f2f46ba2",
1674
+ "place_id": "room_7cbb6d01_cabinet_2b248fea",
1675
+ "place_guidance": "Standard placement for the object",
1676
+ "placement_constraints": null,
1677
+ "mass": 2.5,
1678
+ "pbr_parameters": {
1679
+ "metallic": 0.0,
1680
+ "roughness": 0.6
1681
+ }
1682
+ },
1683
+ {
1684
+ "id": "room_7cbb6d01_plate1_9583e8e2",
1685
+ "room_id": "room_7cbb6d01",
1686
+ "type": "plate1",
1687
+ "description": "A decorative Baroque style gilded plate with a wide circular rim, embossed floral motifs and a polished gold finish",
1688
+ "position": {
1689
+ "x": 0.32055255005969113,
1690
+ "y": 1.6256847864476738,
1691
+ "z": 1.2867164580980242
1692
+ },
1693
+ "rotation": {
1694
+ "x": -2.3547254899873873,
1695
+ "y": 0.4069433269723045,
1696
+ "z": -108.39124593727016
1697
+ },
1698
+ "dimensions": {
1699
+ "width": 0.20495707111354103,
1700
+ "length": 0.04029420001817726,
1701
+ "height": 0.20511717023557421
1702
+ },
1703
+ "source": "generation",
1704
+ "source_id": "346bf68b",
1705
+ "place_id": "room_7cbb6d01_cabinet_eb150484",
1706
+ "place_guidance": "Standard placement for the object",
1707
+ "placement_constraints": null,
1708
+ "mass": 2.5,
1709
+ "pbr_parameters": {
1710
+ "metallic": 0.95,
1711
+ "roughness": 0.1
1712
+ }
1713
+ },
1714
+ {
1715
+ "id": "room_7cbb6d01_plate1_ed2210d8",
1716
+ "room_id": "room_7cbb6d01",
1717
+ "type": "plate1",
1718
+ "description": "A decorative Baroque style gilded plate with a wide circular rim, embossed floral motifs and a polished gold finish",
1719
+ "position": {
1720
+ "x": 0.27450223998140755,
1721
+ "y": 1.4288998163453253,
1722
+ "z": 1.2874779509245295
1723
+ },
1724
+ "rotation": {
1725
+ "x": -2.1116500964763314,
1726
+ "y": 0.2427814946267875,
1727
+ "z": -136.42135959294012
1728
+ },
1729
+ "dimensions": {
1730
+ "width": 0.20495707111354103,
1731
+ "length": 0.04029420001817726,
1732
+ "height": 0.20511717023557421
1733
+ },
1734
+ "source": "generation",
1735
+ "source_id": "346bf68b",
1736
+ "place_id": "room_7cbb6d01_cabinet_eb150484",
1737
+ "place_guidance": "Standard placement for the object",
1738
+ "placement_constraints": null,
1739
+ "mass": 2.5,
1740
+ "pbr_parameters": {
1741
+ "metallic": 0.95,
1742
+ "roughness": 0.1
1743
+ }
1744
+ },
1745
+ {
1746
+ "id": "room_7cbb6d01_plate2_7bb6afaa",
1747
+ "room_id": "room_7cbb6d01",
1748
+ "type": "plate2",
1749
+ "description": "A decorative Baroque style gilded plate with a wide circular rim, embossed floral motifs and a polished gold finish",
1750
+ "position": {
1751
+ "x": 0.3169562296893121,
1752
+ "y": 2.6763579082120135,
1753
+ "z": 1.2886709363925033
1754
+ },
1755
+ "rotation": {
1756
+ "x": 0.262012821837392,
1757
+ "y": -1.3734584276445971,
1758
+ "z": -97.94868165150157
1759
+ },
1760
+ "dimensions": {
1761
+ "width": 0.22268445234234427,
1762
+ "length": 0.22261225653646216,
1763
+ "height": 0.024922402182773657
1764
+ },
1765
+ "source": "generation",
1766
+ "source_id": "99b5bada",
1767
+ "place_id": "room_7cbb6d01_cabinet_2b248fea",
1768
+ "place_guidance": "Standard placement for the object",
1769
+ "placement_constraints": null,
1770
+ "mass": 0.5,
1771
+ "pbr_parameters": {
1772
+ "metallic": 0.95,
1773
+ "roughness": 0.1
1774
+ }
1775
+ },
1776
+ {
1777
+ "id": "room_7cbb6d01_plate2_29c5e410",
1778
+ "room_id": "room_7cbb6d01",
1779
+ "type": "plate2",
1780
+ "description": "A decorative Baroque style gilded plate with a wide circular rim, embossed floral motifs and a polished gold finish",
1781
+ "position": {
1782
+ "x": 0.25899503416271,
1783
+ "y": 3.2261026046433794,
1784
+ "z": 1.2872849500435644
1785
+ },
1786
+ "rotation": {
1787
+ "x": 0.026458958947716604,
1788
+ "y": -0.1609691897844278,
1789
+ "z": 31.88720009583184
1790
+ },
1791
+ "dimensions": {
1792
+ "width": 0.22268445234234427,
1793
+ "length": 0.22261225653646216,
1794
+ "height": 0.024922402182773657
1795
+ },
1796
+ "source": "generation",
1797
+ "source_id": "99b5bada",
1798
+ "place_id": "room_7cbb6d01_cabinet_2b248fea",
1799
+ "place_guidance": "Standard placement for the object",
1800
+ "placement_constraints": null,
1801
+ "mass": 0.5,
1802
+ "pbr_parameters": {
1803
+ "metallic": 0.95,
1804
+ "roughness": 0.1
1805
+ }
1806
+ },
1807
+ {
1808
+ "id": "room_7cbb6d01_plate4_f18a3cc3",
1809
+ "room_id": "room_7cbb6d01",
1810
+ "type": "plate4",
1811
+ "description": "A decorative Baroque style gilded plate with a wide circular rim, embossed floral motifs and a polished gold finish",
1812
+ "position": {
1813
+ "x": 0.22350653353268896,
1814
+ "y": 0.2994022406235307,
1815
+ "z": 1.2859886622148942
1816
+ },
1817
+ "rotation": {
1818
+ "x": -0.3054812162573883,
1819
+ "y": 1.554840293900576,
1820
+ "z": -158.500491139149
1821
+ },
1822
+ "dimensions": {
1823
+ "width": 0.2662213877610595,
1824
+ "length": 0.2644953443626989,
1825
+ "height": 0.04199507109930931
1826
+ },
1827
+ "source": "generation",
1828
+ "source_id": "54c84c6f",
1829
+ "place_id": "room_7cbb6d01_cabinet_625795d7",
1830
+ "place_guidance": "Standard placement for the object",
1831
+ "placement_constraints": null,
1832
+ "mass": 0.8,
1833
+ "pbr_parameters": {
1834
+ "metallic": 0.0,
1835
+ "roughness": 0.7
1836
+ }
1837
+ },
1838
+ {
1839
+ "id": "room_7cbb6d01_book2_2c11f877",
1840
+ "room_id": "room_7cbb6d01",
1841
+ "type": "book2",
1842
+ "description": "A Baroque style gold\u2011embossed book with a rectangular shape, thick cover and ornate lettering, featuring a slightly raised spine",
1843
+ "position": {
1844
+ "x": 0.27197535696213615,
1845
+ "y": 1.8070049962200883,
1846
+ "z": 1.2845531351368211
1847
+ },
1848
+ "rotation": {
1849
+ "x": 1.283533292193561,
1850
+ "y": 0.08395977798697006,
1851
+ "z": -176.5785746790583
1852
+ },
1853
+ "dimensions": {
1854
+ "width": 0.23466719521271082,
1855
+ "length": 0.18030858270516192,
1856
+ "height": 0.06776071763291723
1857
+ },
1858
+ "source": "generation",
1859
+ "source_id": "d3e2ec2d",
1860
+ "place_id": "room_7cbb6d01_cabinet_eb150484",
1861
+ "place_guidance": "Standard placement for the object",
1862
+ "placement_constraints": null,
1863
+ "mass": 1.2,
1864
+ "pbr_parameters": {
1865
+ "metallic": 0.6,
1866
+ "roughness": 0.3
1867
+ }
1868
+ },
1869
+ {
1870
+ "id": "room_7cbb6d01_book5_7760b18c",
1871
+ "room_id": "room_7cbb6d01",
1872
+ "type": "book5",
1873
+ "description": "A Baroque style gold\u2011embossed book with a rectangular shape, thick cover and ornate lettering, featuring a slightly raised spine",
1874
+ "position": {
1875
+ "x": 0.2864674624547319,
1876
+ "y": 4.136950071671591,
1877
+ "z": 1.285704041219386
1878
+ },
1879
+ "rotation": {
1880
+ "x": -0.1578429377767838,
1881
+ "y": 0.399735443769725,
1882
+ "z": 61.1588209493671
1883
+ },
1884
+ "dimensions": {
1885
+ "width": 0.2405282674049726,
1886
+ "length": 0.10481964108320944,
1887
+ "height": 0.2880870027779001
1888
+ },
1889
+ "source": "generation",
1890
+ "source_id": "fbbd874b",
1891
+ "place_id": "room_7cbb6d01_cabinet_8d5b377e",
1892
+ "place_guidance": "Standard placement for the object",
1893
+ "placement_constraints": null,
1894
+ "mass": 1.5,
1895
+ "pbr_parameters": {
1896
+ "metallic": 0.9,
1897
+ "roughness": 0.2
1898
+ }
1899
+ },
1900
+ {
1901
+ "id": "room_7cbb6d01_book5_2b720584",
1902
+ "room_id": "room_7cbb6d01",
1903
+ "type": "book5",
1904
+ "description": "A Baroque style gold\u2011embossed book with a rectangular shape, thick cover and ornate lettering, featuring a slightly raised spine",
1905
+ "position": {
1906
+ "x": 0.27717902571200853,
1907
+ "y": 4.413479268009085,
1908
+ "z": 1.2863763835013384
1909
+ },
1910
+ "rotation": {
1911
+ "x": 0.16046662516771693,
1912
+ "y": 0.5889024425548953,
1913
+ "z": -124.02958376054214
1914
+ },
1915
+ "dimensions": {
1916
+ "width": 0.2405282674049726,
1917
+ "length": 0.10481964108320944,
1918
+ "height": 0.2880870027779001
1919
+ },
1920
+ "source": "generation",
1921
+ "source_id": "fbbd874b",
1922
+ "place_id": "room_7cbb6d01_cabinet_8d5b377e",
1923
+ "place_guidance": "Standard placement for the object",
1924
+ "placement_constraints": null,
1925
+ "mass": 1.5,
1926
+ "pbr_parameters": {
1927
+ "metallic": 0.9,
1928
+ "roughness": 0.2
1929
+ }
1930
+ },
1931
+ {
1932
+ "id": "room_7cbb6d01_book5_4cd1c6d1",
1933
+ "room_id": "room_7cbb6d01",
1934
+ "type": "book5",
1935
+ "description": "A Baroque style gold\u2011embossed book with a rectangular shape, thick cover and ornate lettering, featuring a slightly raised spine",
1936
+ "position": {
1937
+ "x": 0.3253915035547936,
1938
+ "y": 4.670703907333239,
1939
+ "z": 1.2937385120230396
1940
+ },
1941
+ "rotation": {
1942
+ "x": -7.118341238661541,
1943
+ "y": 2.672167450307441,
1944
+ "z": 165.03122417584208
1945
+ },
1946
+ "dimensions": {
1947
+ "width": 0.2405282674049726,
1948
+ "length": 0.10481964108320944,
1949
+ "height": 0.2880870027779001
1950
+ },
1951
+ "source": "generation",
1952
+ "source_id": "fbbd874b",
1953
+ "place_id": "room_7cbb6d01_cabinet_8d5b377e",
1954
+ "place_guidance": "Standard placement for the object",
1955
+ "placement_constraints": null,
1956
+ "mass": 1.5,
1957
+ "pbr_parameters": {
1958
+ "metallic": 0.9,
1959
+ "roughness": 0.2
1960
+ }
1961
+ },
1962
+ {
1963
+ "id": "room_7cbb6d01_book8d5b377e_2f0f4d8f",
1964
+ "room_id": "room_7cbb6d01",
1965
+ "type": "book8d5b377e",
1966
+ "description": "A Baroque gold\u2011embossed book with a slim rectangular form, dark walnut cover, and raised gilded lettering on the spine",
1967
+ "position": {
1968
+ "x": 0.25559434208283727,
1969
+ "y": 3.93848018060187,
1970
+ "z": 1.2866160962778952
1971
+ },
1972
+ "rotation": {
1973
+ "x": -0.3797325678052533,
1974
+ "y": -0.18894705260779682,
1975
+ "z": 1.826439914971057
1976
+ },
1977
+ "dimensions": {
1978
+ "width": 0.20988505610379618,
1979
+ "length": 0.07662303393351758,
1980
+ "height": 0.2610390531516615
1981
+ },
1982
+ "source": "generation",
1983
+ "source_id": "fc72cbb1",
1984
+ "place_id": "room_7cbb6d01_cabinet_8d5b377e",
1985
+ "place_guidance": "Standard placement for the object",
1986
+ "placement_constraints": null,
1987
+ "mass": 1.2,
1988
+ "pbr_parameters": {
1989
+ "metallic": 0.6,
1990
+ "roughness": 0.5
1991
+ }
1992
+ },
1993
+ {
1994
+ "id": "room_7cbb6d01_candlecabinet_199343e4",
1995
+ "room_id": "room_7cbb6d01",
1996
+ "type": "candlecabinet",
1997
+ "description": "A Baroque style candle, 20\u202fcm tall, simple gold\u2011embossed shaft with a tiny ornamental base",
1998
+ "position": {
1999
+ "x": 0.19392815089971663,
2000
+ "y": 1.5381396987199838,
2001
+ "z": 1.2867058831297096
2002
+ },
2003
+ "rotation": {
2004
+ "x": -0.23744485517380723,
2005
+ "y": -0.18895462818457393,
2006
+ "z": 0.7856209818716154
2007
+ },
2008
+ "dimensions": {
2009
+ "width": 0.08008590292988574,
2010
+ "length": 0.07886275423633386,
2011
+ "height": 0.2993577967934952
2012
+ },
2013
+ "source": "generation",
2014
+ "source_id": "49dd75d5",
2015
+ "place_id": "room_7cbb6d01_cabinet_eb150484",
2016
+ "place_guidance": "Standard placement for the object",
2017
+ "placement_constraints": null,
2018
+ "mass": 0.5,
2019
+ "pbr_parameters": {
2020
+ "metallic": 0.9,
2021
+ "roughness": 0.2
2022
+ }
2023
+ },
2024
+ {
2025
+ "id": "room_7cbb6d01_candle625_493b015c",
2026
+ "room_id": "room_7cbb6d01",
2027
+ "type": "candle625",
2028
+ "description": "A 30\u202fcm gold\u2011embossed candle with a smooth cylindrical body and a decorative flared base, the gold surface etched with Baroque patterns",
2029
+ "position": {
2030
+ "x": 0.2838149591812843,
2031
+ "y": 0.8700136938596283,
2032
+ "z": 1.2874306550131565
2033
+ },
2034
+ "rotation": {
2035
+ "x": -0.11329785889792891,
2036
+ "y": -0.0952770501361728,
2037
+ "z": 45.48940341336083
2038
+ },
2039
+ "dimensions": {
2040
+ "width": 0.11120114642360268,
2041
+ "length": 0.1110017807585668,
2042
+ "height": 0.41156941476653974
2043
+ },
2044
+ "source": "generation",
2045
+ "source_id": "4fe58786",
2046
+ "place_id": "room_7cbb6d01_cabinet_625795d7",
2047
+ "place_guidance": "Standard placement for the object",
2048
+ "placement_constraints": null,
2049
+ "mass": 0.5,
2050
+ "pbr_parameters": {
2051
+ "metallic": 0.0,
2052
+ "roughness": 0.3
2053
+ }
2054
+ },
2055
+ {
2056
+ "id": "room_7cbb6d01_candle625_fac556b5",
2057
+ "room_id": "room_7cbb6d01",
2058
+ "type": "candle625",
2059
+ "description": "A 30\u202fcm gold\u2011embossed candle with a smooth cylindrical body and a decorative flared base, the gold surface etched with Baroque patterns",
2060
+ "position": {
2061
+ "x": 0.37548692495495317,
2062
+ "y": 0.23191263445446086,
2063
+ "z": 1.2904845616777063
2064
+ },
2065
+ "rotation": {
2066
+ "x": -0.14825963052732208,
2067
+ "y": -3.9914160110255277,
2068
+ "z": -79.59416607175673
2069
+ },
2070
+ "dimensions": {
2071
+ "width": 0.11120114642360268,
2072
+ "length": 0.1110017807585668,
2073
+ "height": 0.41156941476653974
2074
+ },
2075
+ "source": "generation",
2076
+ "source_id": "4fe58786",
2077
+ "place_id": "room_7cbb6d01_cabinet_625795d7",
2078
+ "place_guidance": "Standard placement for the object",
2079
+ "placement_constraints": null,
2080
+ "mass": 0.5,
2081
+ "pbr_parameters": {
2082
+ "metallic": 0.0,
2083
+ "roughness": 0.3
2084
+ }
2085
+ },
2086
+ {
2087
+ "id": "room_7cbb6d01_candle625_2e68b0e1",
2088
+ "room_id": "room_7cbb6d01",
2089
+ "type": "candle625",
2090
+ "description": "A 30\u202fcm gold\u2011embossed candle with a smooth cylindrical body and a decorative flared base, the gold surface etched with Baroque patterns",
2091
+ "position": {
2092
+ "x": 0.20458556137302833,
2093
+ "y": 0.49921105423415113,
2094
+ "z": 1.286366954106931
2095
+ },
2096
+ "rotation": {
2097
+ "x": -0.04891317827545767,
2098
+ "y": 0.16537590819045273,
2099
+ "z": 132.6442112758617
2100
+ },
2101
+ "dimensions": {
2102
+ "width": 0.11120114642360268,
2103
+ "length": 0.1110017807585668,
2104
+ "height": 0.41156941476653974
2105
+ },
2106
+ "source": "generation",
2107
+ "source_id": "4fe58786",
2108
+ "place_id": "room_7cbb6d01_cabinet_625795d7",
2109
+ "place_guidance": "Standard placement for the object",
2110
+ "placement_constraints": null,
2111
+ "mass": 0.5,
2112
+ "pbr_parameters": {
2113
+ "metallic": 0.0,
2114
+ "roughness": 0.3
2115
+ }
2116
+ },
2117
+ {
2118
+ "id": "room_7cbb6d01_candle2_e9af34d2",
2119
+ "room_id": "room_7cbb6d01",
2120
+ "type": "candle2",
2121
+ "description": "A 30\u202fcm gold\u2011embossed candle with a slender cylindrical shape, a smooth polished surface and a decorative fluted base",
2122
+ "position": {
2123
+ "x": 0.3286411650822487,
2124
+ "y": 0.4609049506233229,
2125
+ "z": 1.2867011349298958
2126
+ },
2127
+ "rotation": {
2128
+ "x": -0.11825641725035803,
2129
+ "y": 0.19001852574312741,
2130
+ "z": 135.82027953377997
2131
+ },
2132
+ "dimensions": {
2133
+ "width": 0.1212117510223001,
2134
+ "length": 0.12177688797332849,
2135
+ "height": 0.3314545426038994
2136
+ },
2137
+ "source": "generation",
2138
+ "source_id": "0537d980",
2139
+ "place_id": "room_7cbb6d01_cabinet_625795d7",
2140
+ "place_guidance": "Standard placement for the object",
2141
+ "placement_constraints": null,
2142
+ "mass": 0.5,
2143
+ "pbr_parameters": {
2144
+ "metallic": 0.8,
2145
+ "roughness": 0.2
2146
+ }
2147
+ }
2148
+ ],
2149
+ "windows": [],
2150
+ "floor_material": "room_7cbb6d01_floor",
2151
+ "ceiling_height": 2.7
2152
+ }
2153
+ ],
2154
+ "total_area": 20.0,
2155
+ "building_style": "Baroque residential kitchen with modern bright elements",
2156
+ "description": "Complete layout with doors/windows: a single medium-sized residential_kitchen with Baroque style: grandeur, drama, rich colors, gold gilding, heavy ornamentation, curved forms, palace luxury. Must include walls, doors, windows, and structural elements for kitchen setup. Room size: approximately 4m x 5m. Key features: ornate gold-trimmed cabinetry, curved countertops, gilded decorative elements, high-end appliances integrated into Baroque design, large central island with carved details, and decorative moldings. All structural elements must follow Baroque architectural principles.; The scene requires a 4.0m x 5.0m kitchen designed in modern and bright style.",
2157
+ "created_from_text": "a single medium-sized residential_kitchen with Baroque style: grandeur, drama, rich colors, gold gilding, heavy ornamentation, curved forms, palace luxury. Must include walls, doors, windows, and structural elements for kitchen setup. Room size: approximately 4m x 5m. Key features: ornate gold-trimmed cabinetry, curved countertops, gilded decorative elements, high-end appliances integrated into Baroque design, large central island with carved details, and decorative moldings. All structural elements must follow Baroque architectural principles.; The scene requires a 4.0m x 5.0m kitchen designed in modern and bright style.",
2158
+ "policy_analysis": {
2159
+ "scene_requirements": "The scene requires a 4.0m x 5.0m kitchen designed in modern and bright style. The room should include 7 floor-placed furniture and background objects: Gold\u2011trimmed island placed on floor; 4 Baroque cabinets placed on floor; Curved countertop placed on floor; Tall fridge placed on floor; Built\u2011in dishwasher placed on floor; 4 Upholstered chairs placed on floor; Metal trash bin placed on floor. Wall decorations consist of 5 items: 4 Wall sconces mounted on wall; 2 Large paintings mounted on wall; Ornate clock mounted on wall; Decorative mirror mounted on wall; 2 Wall shelfs mounted on wall. Furniture surfaces should be decorated with 12 functional and decorative objects: Integrated sink placed on island; Built\u2011in stove placed on island; 3 Ceramic vases placed on shelf; 2 Fruit bowls placed on island; Spice rack placed on cabinet; 2 Utensil holders placed on countertop; 2 Copper pots placed on countertop; 2 Copper pans placed on countertop; Built\u2011in oven placed on cabinet; Built\u2011in microwave placed on cabinet; Wooden board placed on countertop; Herb planter placed on countertop. Each furniture surface such as tables, desks, shelves, and cabinets should have at least 2 or more decorative or functional objects placed on top to create a lived-in, realistic environment. Important constraints: Do not add rugs, mats, carpets, curtains, blankets, ceiling-hanging objects, or ceiling objects to the scene as these are either already installed or restricted. The complete scene must contain a minimum of 24 objects total following the placement proposals described above to achieve a complete, diverse, and realistic room environment.Must ensure that: i. The layout (position, rotation, and size) is believable, and common daily objects make the room feel lived-in. Rich of daily furniture and objects.ii. Contains the necessary furniture and setup for the specified function.iii. Each objects is in **reasonable size**, neatly placed, objects of the same category are well aglined, relationships are reasonable (e.g., chairs face desks), sufficient space exists for walking, and **orientations must** be correct. iv. All necessary large and small items are present. Has rich details. Each shelf is full of objects (>5) inside. Each supporter (e.g. table, desk, and shelf) has small objects on it. The room feels done.Must avoid that: i. Unusual objects or strange placements make the room unrealistic.ii. Missing key objects or contains mismatched furniture (e.g., no bed in a bedroom).iii. Floating objects, crowded floor, **abnormal size**, objects with collision, incorrect **orientation**, or large items placed oddly (e.g., sofa not against the wall). Large empty space. Blocker in front of furniture.iv. Room is sparse or empty, lacks decor or key elements."
2160
+ }
2161
+ }
SAGE10k/sage10k/scenes/20251213_035441_layout_7ff33042/layout_7ff33042.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_040122_layout_ce0c7f91/layout_ce0c7f91.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_042117_layout_5d77e0d9/layout_5d77e0d9.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_044801_layout_575a4fb6/layout_575a4fb6.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_044921_layout_4c917bc4/layout_4c917bc4.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_051113_layout_05646dc7/layout_05646dc7.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_051404_layout_234eec7a/layout_234eec7a.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_055339_layout_b4e27201/layout_b4e27201.json ADDED
@@ -0,0 +1,1564 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "layout_b4e27201",
3
+ "rooms": [
4
+ {
5
+ "id": "room_6ca25d60",
6
+ "room_type": "bathroom",
7
+ "position": {
8
+ "x": 0.0,
9
+ "y": 0.0,
10
+ "z": 0.0
11
+ },
12
+ "dimensions": {
13
+ "width": 3.0,
14
+ "length": 3.7,
15
+ "height": 2.7
16
+ },
17
+ "walls": [
18
+ {
19
+ "id": "wall_room_6ca25d60_north_8be714dd",
20
+ "start_point": {
21
+ "x": 0.0,
22
+ "y": 3.7,
23
+ "z": 0.0
24
+ },
25
+ "end_point": {
26
+ "x": 3.0,
27
+ "y": 3.7,
28
+ "z": 0.0
29
+ },
30
+ "height": 2.7,
31
+ "thickness": 0.1,
32
+ "material": "room_6ca25d60_wall"
33
+ },
34
+ {
35
+ "id": "wall_room_6ca25d60_south_1f305b59",
36
+ "start_point": {
37
+ "x": 0.0,
38
+ "y": 0.0,
39
+ "z": 0.0
40
+ },
41
+ "end_point": {
42
+ "x": 3.0,
43
+ "y": 0.0,
44
+ "z": 0.0
45
+ },
46
+ "height": 2.7,
47
+ "thickness": 0.1,
48
+ "material": "room_6ca25d60_wall"
49
+ },
50
+ {
51
+ "id": "wall_room_6ca25d60_east_1c382bd2",
52
+ "start_point": {
53
+ "x": 3.0,
54
+ "y": 0.0,
55
+ "z": 0.0
56
+ },
57
+ "end_point": {
58
+ "x": 3.0,
59
+ "y": 3.7,
60
+ "z": 0.0
61
+ },
62
+ "height": 2.7,
63
+ "thickness": 0.1,
64
+ "material": "room_6ca25d60_wall"
65
+ },
66
+ {
67
+ "id": "wall_room_6ca25d60_west_d2f5cfe1",
68
+ "start_point": {
69
+ "x": 0.0,
70
+ "y": 0.0,
71
+ "z": 0.0
72
+ },
73
+ "end_point": {
74
+ "x": 0.0,
75
+ "y": 3.7,
76
+ "z": 0.0
77
+ },
78
+ "height": 2.7,
79
+ "thickness": 0.1,
80
+ "material": "room_6ca25d60_wall"
81
+ }
82
+ ],
83
+ "doors": [
84
+ {
85
+ "id": "door_04cdc9ea",
86
+ "wall_id": "wall_room_6ca25d60_north_8be714dd",
87
+ "position_on_wall": 0.45229181525233075,
88
+ "width": 0.9,
89
+ "height": 2.05,
90
+ "door_type": "entry/main/front",
91
+ "opens_inward": true,
92
+ "opening": false,
93
+ "door_material": "Door_7"
94
+ }
95
+ ],
96
+ "objects": [
97
+ {
98
+ "id": "room_6ca25d60_vanity_92f50522",
99
+ "room_id": "room_6ca25d60",
100
+ "type": "vanity",
101
+ "description": "A bamboo vanity with a low-profile rectangular base, smooth natural bamboo finish, Asian zen style, featuring a subtle curved front edge and integrated countertop.",
102
+ "position": {
103
+ "x": 0.21695082687324213,
104
+ "y": 1.85,
105
+ "z": 0.0
106
+ },
107
+ "rotation": {
108
+ "x": 0,
109
+ "y": 0,
110
+ "z": 270
111
+ },
112
+ "dimensions": {
113
+ "width": 0.6015723453953304,
114
+ "length": 0.29890165374648425,
115
+ "height": 0.8976537788073004
116
+ },
117
+ "source": "generation",
118
+ "source_id": "cf536542",
119
+ "place_id": "floor",
120
+ "place_guidance": "Standard placement for the object",
121
+ "placement_constraints": [
122
+ [
123
+ 21.695082687324213,
124
+ 185.0
125
+ ],
126
+ 270,
127
+ [
128
+ [
129
+ 38.39016537464843,
130
+ 153.1713827302335
131
+ ],
132
+ [
133
+ 38.39016537464843,
134
+ 216.8286172697665
135
+ ],
136
+ [
137
+ 5.0,
138
+ 216.8286172697665
139
+ ],
140
+ [
141
+ 5.0,
142
+ 153.1713827302335
143
+ ]
144
+ ],
145
+ [
146
+ {
147
+ "type": "global",
148
+ "constraint": "edge"
149
+ }
150
+ ]
151
+ ],
152
+ "mass": 15.0,
153
+ "pbr_parameters": {
154
+ "metallic": 0.0,
155
+ "roughness": 0.6
156
+ }
157
+ },
158
+ {
159
+ "id": "room_6ca25d60_toilet_c96abaca",
160
+ "room_id": "room_6ca25d60",
161
+ "type": "toilet",
162
+ "description": "A bamboo toilet with a seamless low-profile cylindrical bowl, natural bamboo texture, matte finish, minimalist Asian zen design, featuring a hidden flush mechanism.",
163
+ "position": {
164
+ "x": 0.32786508255460867,
165
+ "y": 1.05,
166
+ "z": 0.0
167
+ },
168
+ "rotation": {
169
+ "x": 0,
170
+ "y": 0,
171
+ "z": 270
172
+ },
173
+ "dimensions": {
174
+ "width": 0.7125337680732637,
175
+ "length": 0.5207301651092173,
176
+ "height": 0.7198193362090746
177
+ },
178
+ "source": "generation",
179
+ "source_id": "1de948f1",
180
+ "place_id": "floor",
181
+ "place_guidance": "Standard placement for the object",
182
+ "placement_constraints": [
183
+ [
184
+ 32.786508255460866,
185
+ 105.0
186
+ ],
187
+ 270,
188
+ [
189
+ [
190
+ 60.573016510921725,
191
+ 67.6233115963368
192
+ ],
193
+ [
194
+ 60.573016510921725,
195
+ 142.3766884036632
196
+ ],
197
+ [
198
+ 4.999999999999998,
199
+ 142.3766884036632
200
+ ],
201
+ [
202
+ 4.999999999999998,
203
+ 67.6233115963368
204
+ ]
205
+ ],
206
+ [
207
+ {
208
+ "type": "global",
209
+ "constraint": "edge"
210
+ },
211
+ {
212
+ "type": "distance",
213
+ "constraint": "close to",
214
+ "target": "room_6ca25d60_vanity_92f50522"
215
+ },
216
+ {
217
+ "type": "relative",
218
+ "constraint": "right of",
219
+ "target": "room_6ca25d60_vanity_92f50522"
220
+ },
221
+ {
222
+ "type": "direction",
223
+ "constraint": "face same as",
224
+ "target": "room_6ca25d60_vanity_92f50522"
225
+ }
226
+ ]
227
+ ],
228
+ "mass": 25.0,
229
+ "pbr_parameters": {
230
+ "metallic": 0.0,
231
+ "roughness": 0.8
232
+ }
233
+ },
234
+ {
235
+ "id": "room_6ca25d60_bathtub_61637b53",
236
+ "room_id": "room_6ca25d60",
237
+ "type": "bathtub",
238
+ "description": "A natural stone bathtub with an oval low-profile silhouette, smooth polished surface, earthy gray tones, Asian zen aesthetic, with a gentle tapered rim.",
239
+ "position": {
240
+ "x": 2.6796671784769233,
241
+ "y": 3.05,
242
+ "z": 0.0
243
+ },
244
+ "rotation": {
245
+ "x": 0,
246
+ "y": 0,
247
+ "z": 90
248
+ },
249
+ "dimensions": {
250
+ "width": 1.160507584119665,
251
+ "length": 0.5056656430461537,
252
+ "height": 0.4140916615579295
253
+ },
254
+ "source": "generation",
255
+ "source_id": "e85f6ecb",
256
+ "place_id": "floor",
257
+ "place_guidance": "Standard placement for the object",
258
+ "placement_constraints": [
259
+ [
260
+ 267.96671784769234,
261
+ 305.0
262
+ ],
263
+ 90,
264
+ [
265
+ [
266
+ 295.0,
267
+ 245.22462079401674
268
+ ],
269
+ [
270
+ 295.0,
271
+ 364.77537920598326
272
+ ],
273
+ [
274
+ 240.93343569538465,
275
+ 364.77537920598326
276
+ ],
277
+ [
278
+ 240.93343569538465,
279
+ 245.22462079401674
280
+ ]
281
+ ],
282
+ [
283
+ {
284
+ "type": "global",
285
+ "constraint": "edge"
286
+ },
287
+ {
288
+ "type": "distance",
289
+ "constraint": "far",
290
+ "target": "room_6ca25d60_vanity_92f50522"
291
+ },
292
+ {
293
+ "type": "distance",
294
+ "constraint": "far",
295
+ "target": "room_6ca25d60_toilet_c96abaca"
296
+ }
297
+ ]
298
+ ],
299
+ "mass": 150.0,
300
+ "pbr_parameters": {
301
+ "metallic": 0.0,
302
+ "roughness": 0.4
303
+ }
304
+ },
305
+ {
306
+ "id": "room_6ca25d60_shower_cbe130cc",
307
+ "room_id": "room_6ca25d60",
308
+ "type": "shower",
309
+ "description": "A pebble shower enclosure with low-profile rectangular floor, natural river pebbles embedded in a shallow tray, smooth stone base, Asian zen vibe, with a subtle sloped entry.",
310
+ "position": {
311
+ "x": 1.05,
312
+ "y": 0.3771351406282053,
313
+ "z": 0.0
314
+ },
315
+ "rotation": {
316
+ "x": 0,
317
+ "y": 0,
318
+ "z": 0
319
+ },
320
+ "dimensions": {
321
+ "width": 0.6183892983505599,
322
+ "length": 0.6192702812564106,
323
+ "height": 0.43745464392624633
324
+ },
325
+ "source": "generation",
326
+ "source_id": "fc7ddf42",
327
+ "place_id": "floor",
328
+ "place_guidance": "Standard placement for the object",
329
+ "placement_constraints": [
330
+ [
331
+ 105.0,
332
+ 37.71351406282053
333
+ ],
334
+ 0,
335
+ [
336
+ [
337
+ 137.669464917528,
338
+ 5.0
339
+ ],
340
+ [
341
+ 137.669464917528,
342
+ 70.42702812564107
343
+ ],
344
+ [
345
+ 72.33053508247201,
346
+ 70.42702812564107
347
+ ],
348
+ [
349
+ 72.33053508247201,
350
+ 5.0
351
+ ]
352
+ ],
353
+ [
354
+ {
355
+ "type": "global",
356
+ "constraint": "edge"
357
+ },
358
+ {
359
+ "type": "distance",
360
+ "constraint": "far",
361
+ "target": "room_6ca25d60_bathtub_61637b53"
362
+ }
363
+ ]
364
+ ],
365
+ "mass": 2.5,
366
+ "pbr_parameters": {
367
+ "metallic": 0.1,
368
+ "roughness": 0.6
369
+ }
370
+ },
371
+ {
372
+ "id": "room_6ca25d60_bench_1138f198",
373
+ "room_id": "room_6ca25d60",
374
+ "type": "bench",
375
+ "description": "A low-profile bamboo shower bench with a flat rectangular seat, smooth bamboo surface, subtle rounded edges, Asian zen design, includes a small integrated footrest.",
376
+ "position": {
377
+ "x": 2.05,
378
+ "y": 0.37335326651247974,
379
+ "z": 0.0
380
+ },
381
+ "rotation": {
382
+ "x": 0,
383
+ "y": 0,
384
+ "z": 0
385
+ },
386
+ "dimensions": {
387
+ "width": 1.2127245633682884,
388
+ "length": 0.6117065330249595,
389
+ "height": 0.7140066045926985
390
+ },
391
+ "source": "generation",
392
+ "source_id": "a2af8e71",
393
+ "place_id": "floor",
394
+ "place_guidance": "Standard placement for the object",
395
+ "placement_constraints": [
396
+ [
397
+ 205.0,
398
+ 37.335326651247975
399
+ ],
400
+ 0,
401
+ [
402
+ [
403
+ 267.3862281684144,
404
+ 5.0
405
+ ],
406
+ [
407
+ 267.3862281684144,
408
+ 69.67065330249596
409
+ ],
410
+ [
411
+ 142.61377183158558,
412
+ 69.67065330249596
413
+ ],
414
+ [
415
+ 142.61377183158558,
416
+ 5.0
417
+ ]
418
+ ],
419
+ [
420
+ {
421
+ "type": "global",
422
+ "constraint": "edge"
423
+ },
424
+ {
425
+ "type": "distance",
426
+ "constraint": "close to",
427
+ "target": "room_6ca25d60_shower_cbe130cc"
428
+ },
429
+ {
430
+ "type": "direction",
431
+ "constraint": "face same as",
432
+ "target": "room_6ca25d60_shower_cbe130cc"
433
+ }
434
+ ]
435
+ ],
436
+ "mass": 15.0,
437
+ "pbr_parameters": {
438
+ "metallic": 0.0,
439
+ "roughness": 0.7
440
+ }
441
+ },
442
+ {
443
+ "id": "room_6ca25d60_bin_cfadfb4d",
444
+ "room_id": "room_6ca25d60",
445
+ "type": "bin",
446
+ "description": "A small waste bin with bamboo texture, rectangular low-profile shape, natural bamboo color, matte finish, Asian zen simplicity, featuring a discreet lid.",
447
+ "position": {
448
+ "x": 0.23953964759584573,
449
+ "y": 0.45,
450
+ "z": 0.0
451
+ },
452
+ "rotation": {
453
+ "x": 0,
454
+ "y": 0,
455
+ "z": 270
456
+ },
457
+ "dimensions": {
458
+ "width": 0.3455258194736167,
459
+ "length": 0.34407929519169145,
460
+ "height": 0.818528000244121
461
+ },
462
+ "source": "generation",
463
+ "source_id": "7b5e6dc1",
464
+ "place_id": "floor",
465
+ "place_guidance": "Standard placement for the object",
466
+ "placement_constraints": [
467
+ [
468
+ 23.953964759584572,
469
+ 45.0
470
+ ],
471
+ 270,
472
+ [
473
+ [
474
+ 42.907929519169144,
475
+ 25.973709026319163
476
+ ],
477
+ [
478
+ 42.907929519169144,
479
+ 64.02629097368083
480
+ ],
481
+ [
482
+ 5.0,
483
+ 64.02629097368083
484
+ ],
485
+ [
486
+ 5.0,
487
+ 25.973709026319163
488
+ ]
489
+ ],
490
+ [
491
+ {
492
+ "type": "global",
493
+ "constraint": "edge"
494
+ },
495
+ {
496
+ "type": "distance",
497
+ "constraint": "close to",
498
+ "target": "room_6ca25d60_toilet_c96abaca"
499
+ },
500
+ {
501
+ "type": "relative",
502
+ "constraint": "right of",
503
+ "target": "room_6ca25d60_toilet_c96abaca"
504
+ },
505
+ {
506
+ "type": "direction",
507
+ "constraint": "face same as",
508
+ "target": "room_6ca25d60_toilet_c96abaca"
509
+ }
510
+ ]
511
+ ],
512
+ "mass": 5.0,
513
+ "pbr_parameters": {
514
+ "metallic": 0.0,
515
+ "roughness": 0.8
516
+ }
517
+ },
518
+ {
519
+ "id": "room_6ca25d60_basket_3ead690a",
520
+ "room_id": "room_6ca25d60",
521
+ "type": "basket",
522
+ "description": "A cylindrical bamboo storage basket with woven texture, natural bamboo finish, low-profile height, Asian zen style, includes a subtle handle groove.",
523
+ "position": {
524
+ "x": 0.27376258647211726,
525
+ "y": 2.45,
526
+ "z": 0.0
527
+ },
528
+ "rotation": {
529
+ "x": 0,
530
+ "y": 0,
531
+ "z": 270
532
+ },
533
+ "dimensions": {
534
+ "width": 0.4123427639624777,
535
+ "length": 0.41252517294423446,
536
+ "height": 0.39470388305379034
537
+ },
538
+ "source": "generation",
539
+ "source_id": "45f9dd89",
540
+ "place_id": "floor",
541
+ "place_guidance": "Standard placement for the object",
542
+ "placement_constraints": [
543
+ [
544
+ 27.376258647211724,
545
+ 245.0
546
+ ],
547
+ 270,
548
+ [
549
+ [
550
+ 49.752517294423455,
551
+ 222.63286180187612
552
+ ],
553
+ [
554
+ 49.752517294423455,
555
+ 267.3671381981239
556
+ ],
557
+ [
558
+ 5.0,
559
+ 267.3671381981239
560
+ ],
561
+ [
562
+ 5.0,
563
+ 222.63286180187612
564
+ ]
565
+ ],
566
+ [
567
+ {
568
+ "type": "global",
569
+ "constraint": "edge"
570
+ },
571
+ {
572
+ "type": "distance",
573
+ "constraint": "close to",
574
+ "target": "room_6ca25d60_vanity_92f50522"
575
+ },
576
+ {
577
+ "type": "alignment",
578
+ "constraint": "center aligned",
579
+ "target": "room_6ca25d60_vanity_92f50522"
580
+ },
581
+ {
582
+ "type": "direction",
583
+ "constraint": "face same as",
584
+ "target": "room_6ca25d60_vanity_92f50522"
585
+ }
586
+ ]
587
+ ],
588
+ "mass": 1.2,
589
+ "pbr_parameters": {
590
+ "metallic": 0.0,
591
+ "roughness": 0.75
592
+ }
593
+ },
594
+ {
595
+ "id": "room_6ca25d60_fountain_bfa602a1",
596
+ "room_id": "room_6ca25d60",
597
+ "type": "fountain",
598
+ "description": "A small bamboo fountain with a compact cylindrical base, smooth bamboo finish, continuous gentle water flow, Asian zen style, featuring a tiny carved wave pattern.",
599
+ "position": {
600
+ "x": 1.65,
601
+ "y": 1.65,
602
+ "z": 0.0
603
+ },
604
+ "rotation": {
605
+ "x": 0,
606
+ "y": 0,
607
+ "z": 0
608
+ },
609
+ "dimensions": {
610
+ "width": 0.6362076375531358,
611
+ "length": 0.6196167899632389,
612
+ "height": 0.7411530758843329
613
+ },
614
+ "source": "generation",
615
+ "source_id": "ab2ab518",
616
+ "place_id": "floor",
617
+ "place_guidance": "Standard placement for the object",
618
+ "placement_constraints": [
619
+ [
620
+ 165,
621
+ 165
622
+ ],
623
+ 0,
624
+ [
625
+ [
626
+ 198.5603818776568,
627
+ 132.26916050183806
628
+ ],
629
+ [
630
+ 198.5603818776568,
631
+ 197.73083949816194
632
+ ],
633
+ [
634
+ 131.4396181223432,
635
+ 197.73083949816194
636
+ ],
637
+ [
638
+ 131.4396181223432,
639
+ 132.26916050183806
640
+ ],
641
+ [
642
+ 198.5603818776568,
643
+ 132.26916050183806
644
+ ]
645
+ ],
646
+ [
647
+ {
648
+ "type": "global",
649
+ "constraint": "middle"
650
+ }
651
+ ]
652
+ ],
653
+ "mass": 15.0,
654
+ "pbr_parameters": {
655
+ "metallic": 0.0,
656
+ "roughness": 0.3
657
+ }
658
+ },
659
+ {
660
+ "id": "room_6ca25d60_lamp_c1ca59f3",
661
+ "room_id": "room_6ca25d60",
662
+ "type": "lamp",
663
+ "description": "A low-profile bamboo floor lamp with natural textured bamboo shaft, slender rectangular base and minimalist diffuser",
664
+ "position": {
665
+ "x": 2.681088397678597,
666
+ "y": 1.85,
667
+ "z": 0.0
668
+ },
669
+ "rotation": {
670
+ "x": 0,
671
+ "y": 0,
672
+ "z": 90
673
+ },
674
+ "dimensions": {
675
+ "width": 0.5098829236656011,
676
+ "length": 0.502823204642806,
677
+ "height": 1.677134349346836
678
+ },
679
+ "source": "generation",
680
+ "source_id": "b9989e0c",
681
+ "place_id": "floor",
682
+ "place_guidance": "Standard placement for the object",
683
+ "placement_constraints": [
684
+ [
685
+ 268.1088397678597,
686
+ 185.0
687
+ ],
688
+ 90,
689
+ [
690
+ [
691
+ 295.0,
692
+ 157.75585381671993
693
+ ],
694
+ [
695
+ 295.0,
696
+ 212.24414618328007
697
+ ],
698
+ [
699
+ 241.2176795357194,
700
+ 212.24414618328007
701
+ ],
702
+ [
703
+ 241.2176795357194,
704
+ 157.75585381671993
705
+ ]
706
+ ],
707
+ [
708
+ {
709
+ "type": "global",
710
+ "constraint": "edge"
711
+ },
712
+ {
713
+ "type": "distance",
714
+ "constraint": "far",
715
+ "target": "existing-room_6ca25d60_toilet_c96abaca"
716
+ },
717
+ {
718
+ "type": "distance",
719
+ "constraint": "far",
720
+ "target": "existing-room_6ca25d60_vanity_92f50522"
721
+ },
722
+ {
723
+ "type": "distance",
724
+ "constraint": "far",
725
+ "target": "existing-room_6ca25d60_fountain_bfa602a1"
726
+ },
727
+ {
728
+ "type": "distance",
729
+ "constraint": "near",
730
+ "target": "existing-room_6ca25d60_bathtub_61637b53"
731
+ }
732
+ ]
733
+ ],
734
+ "mass": 8.5,
735
+ "pbr_parameters": {
736
+ "metallic": 0.8,
737
+ "roughness": 0.2
738
+ }
739
+ },
740
+ {
741
+ "id": "room_6ca25d60_floorlamp_28a7ff3b",
742
+ "room_id": "room_6ca25d60",
743
+ "type": "floorlamp",
744
+ "description": "A bamboo floor lamp with a low-profile tapered stand, natural textured bamboo finish, and a simple round shade, featuring a subtle woven bamboo pattern on the base.",
745
+ "position": {
746
+ "x": 2.7401339294402396,
747
+ "y": 1.25,
748
+ "z": 0.0
749
+ },
750
+ "rotation": {
751
+ "x": 0,
752
+ "y": 0,
753
+ "z": 90
754
+ },
755
+ "dimensions": {
756
+ "width": 0.3832532921851012,
757
+ "length": 0.38473214111952114,
758
+ "height": 1.24958917962392
759
+ },
760
+ "source": "generation",
761
+ "source_id": "2c3e51af",
762
+ "place_id": "floor",
763
+ "place_guidance": "Standard placement for the object",
764
+ "placement_constraints": [
765
+ [
766
+ 274.01339294402396,
767
+ 125.0
768
+ ],
769
+ 90,
770
+ [
771
+ [
772
+ 295.0,
773
+ 104.08733539074494
774
+ ],
775
+ [
776
+ 295.0,
777
+ 145.91266460925505
778
+ ],
779
+ [
780
+ 253.0267858880479,
781
+ 145.91266460925505
782
+ ],
783
+ [
784
+ 253.0267858880479,
785
+ 104.08733539074494
786
+ ]
787
+ ],
788
+ [
789
+ {
790
+ "type": "global",
791
+ "constraint": "edge"
792
+ },
793
+ {
794
+ "type": "distance",
795
+ "constraint": "far",
796
+ "target": "existing-room_6ca25d60_bin_cfadfb4d"
797
+ },
798
+ {
799
+ "type": "direction",
800
+ "constraint": "face same as",
801
+ "target": "existing-room_6ca25d60_lamp_c1ca59f3"
802
+ },
803
+ {
804
+ "type": "distance",
805
+ "constraint": "near",
806
+ "target": "existing-room_6ca25d60_bathtub_61637b53"
807
+ }
808
+ ]
809
+ ],
810
+ "mass": 3.5,
811
+ "pbr_parameters": {
812
+ "metallic": 0.0,
813
+ "roughness": 0.7
814
+ }
815
+ },
816
+ {
817
+ "id": "room_6ca25d60_floorlamp_11f78f8e",
818
+ "room_id": "room_6ca25d60",
819
+ "type": "floorlamp",
820
+ "description": "A low\u2011profile bamboo floor lamp with a slender rectangular base, natural bamboo shaft, and a simple round diffuser at the top.",
821
+ "position": {
822
+ "x": 0.65,
823
+ "y": 3.434637589410252,
824
+ "z": 0.0
825
+ },
826
+ "rotation": {
827
+ "x": 0,
828
+ "y": 0,
829
+ "z": 180
830
+ },
831
+ "dimensions": {
832
+ "width": 0.3955677128386772,
833
+ "length": 0.39572482117949564,
834
+ "height": 1.6171515038289084
835
+ },
836
+ "source": "generation",
837
+ "source_id": "4d2fecab",
838
+ "place_id": "floor",
839
+ "place_guidance": "Standard placement for the object",
840
+ "placement_constraints": [
841
+ [
842
+ 65.0,
843
+ 343.4637589410252
844
+ ],
845
+ 180,
846
+ [
847
+ [
848
+ 86.52838564193385,
849
+ 321.92751788205044
850
+ ],
851
+ [
852
+ 86.52838564193385,
853
+ 365.0
854
+ ],
855
+ [
856
+ 43.47161435806614,
857
+ 365.0
858
+ ],
859
+ [
860
+ 43.47161435806614,
861
+ 321.92751788205044
862
+ ]
863
+ ],
864
+ [
865
+ {
866
+ "type": "global",
867
+ "constraint": "edge"
868
+ },
869
+ {
870
+ "type": "distance",
871
+ "constraint": "near",
872
+ "target": "existing-room_6ca25d60_shower_cbe130cc"
873
+ },
874
+ {
875
+ "type": "relative",
876
+ "constraint": "left of",
877
+ "target": "existing-room_6ca25d60_shower_cbe130cc"
878
+ },
879
+ {
880
+ "type": "direction",
881
+ "constraint": "face to",
882
+ "target": "existing-room_6ca25d60_shower_cbe130cc"
883
+ },
884
+ {
885
+ "type": "distance",
886
+ "constraint": "far",
887
+ "target": "existing-room_6ca25d60_bathtub_61637b53"
888
+ }
889
+ ]
890
+ ],
891
+ "mass": 3.5,
892
+ "pbr_parameters": {
893
+ "metallic": 0.0,
894
+ "roughness": 0.6
895
+ }
896
+ },
897
+ {
898
+ "id": "room_6ca25d60_plantfloor_764d77fe",
899
+ "room_id": "room_6ca25d60",
900
+ "type": "plantfloor",
901
+ "description": "A small potted bamboo plant in a round ceramic pot, natural green foliage, compact cylindrical form, and a smooth matte finish.",
902
+ "position": {
903
+ "x": 0.216003434123615,
904
+ "y": 3.45,
905
+ "z": 0.0
906
+ },
907
+ "rotation": {
908
+ "x": 0,
909
+ "y": 0,
910
+ "z": 270
911
+ },
912
+ "dimensions": {
913
+ "width": 0.2893532142011707,
914
+ "length": 0.29700686824723,
915
+ "height": 0.37864999391760895
916
+ },
917
+ "source": "generation",
918
+ "source_id": "9c6975bc",
919
+ "place_id": "floor",
920
+ "place_guidance": "Standard placement for the object",
921
+ "placement_constraints": [
922
+ [
923
+ 21.6003434123615,
924
+ 345.0
925
+ ],
926
+ 270,
927
+ [
928
+ [
929
+ 38.20068682472299,
930
+ 328.7823392899415
931
+ ],
932
+ [
933
+ 38.20068682472299,
934
+ 361.2176607100585
935
+ ],
936
+ [
937
+ 5.0,
938
+ 361.2176607100585
939
+ ],
940
+ [
941
+ 5.0,
942
+ 328.7823392899415
943
+ ]
944
+ ],
945
+ [
946
+ {
947
+ "type": "global",
948
+ "constraint": "edge"
949
+ },
950
+ {
951
+ "type": "distance",
952
+ "constraint": "near",
953
+ "target": "room_6ca25d60_floorlamp_11f78f8e"
954
+ },
955
+ {
956
+ "type": "direction",
957
+ "constraint": "face to",
958
+ "target": "room_6ca25d60_floorlamp_11f78f8e"
959
+ },
960
+ {
961
+ "type": "distance",
962
+ "constraint": "far",
963
+ "target": "existing-room_6ca25d60_bathtub_61637b53"
964
+ }
965
+ ]
966
+ ],
967
+ "mass": 2.5,
968
+ "pbr_parameters": {
969
+ "metallic": 0.0,
970
+ "roughness": 0.8
971
+ }
972
+ },
973
+ {
974
+ "id": "room_6ca25d60_basket_75fac047",
975
+ "room_id": "room_6ca25d60",
976
+ "type": "basket",
977
+ "description": "A cylindrical bamboo storage basket with a natural finish, smooth curved walls, and a low\u2011profile rim.",
978
+ "position": {
979
+ "x": 2.818525348005711,
980
+ "y": 0.85,
981
+ "z": 0.0
982
+ },
983
+ "rotation": {
984
+ "x": 0,
985
+ "y": 0,
986
+ "z": 90
987
+ },
988
+ "dimensions": {
989
+ "width": 0.22795447379156838,
990
+ "length": 0.2279493039885778,
991
+ "height": 0.20483328738406004
992
+ },
993
+ "source": "generation",
994
+ "source_id": "7ae584fd",
995
+ "place_id": "floor",
996
+ "place_guidance": "Standard placement for the object",
997
+ "placement_constraints": [
998
+ [
999
+ 281.8525348005711,
1000
+ 85.0
1001
+ ],
1002
+ 90,
1003
+ [
1004
+ [
1005
+ 295.0,
1006
+ 71.85227631042159
1007
+ ],
1008
+ [
1009
+ 295.0,
1010
+ 98.14772368957841
1011
+ ],
1012
+ [
1013
+ 268.7050696011422,
1014
+ 98.14772368957841
1015
+ ],
1016
+ [
1017
+ 268.7050696011422,
1018
+ 71.85227631042159
1019
+ ]
1020
+ ],
1021
+ [
1022
+ {
1023
+ "type": "global",
1024
+ "constraint": "edge"
1025
+ },
1026
+ {
1027
+ "type": "distance",
1028
+ "constraint": "near",
1029
+ "target": "existing-room_6ca25d60_vanity_92f50522"
1030
+ },
1031
+ {
1032
+ "type": "relative",
1033
+ "constraint": "right of",
1034
+ "target": "existing-room_6ca25d60_vanity_92f50522"
1035
+ }
1036
+ ]
1037
+ ],
1038
+ "mass": 0.5,
1039
+ "pbr_parameters": {
1040
+ "metallic": 0.0,
1041
+ "roughness": 0.6
1042
+ }
1043
+ },
1044
+ {
1045
+ "id": "room_6ca25d60_floorlamp_98ea3906",
1046
+ "room_id": "room_6ca25d60",
1047
+ "type": "floorlamp",
1048
+ "description": "A low-profile bamboo floor lamp with a slender cylindrical stand, natural bamboo finish, and a small rectangular shade, offering a minimalist zen look.",
1049
+ "position": {
1050
+ "x": 2.05,
1051
+ "y": 3.4069898710136073,
1052
+ "z": 0.0
1053
+ },
1054
+ "rotation": {
1055
+ "x": 0,
1056
+ "y": 0,
1057
+ "z": 180
1058
+ },
1059
+ "dimensions": {
1060
+ "width": 0.45083773263177096,
1061
+ "length": 0.451020257972785,
1062
+ "height": 1.3461934509123332
1063
+ },
1064
+ "source": "generation",
1065
+ "source_id": "3efb742a",
1066
+ "place_id": "floor",
1067
+ "place_guidance": "Standard placement for the object",
1068
+ "placement_constraints": [
1069
+ [
1070
+ 205.0,
1071
+ 340.69898710136073
1072
+ ],
1073
+ 180,
1074
+ [
1075
+ [
1076
+ 229.29188663158854,
1077
+ 316.39797420272146
1078
+ ],
1079
+ [
1080
+ 229.29188663158854,
1081
+ 365.0
1082
+ ],
1083
+ [
1084
+ 180.70811336841146,
1085
+ 365.0
1086
+ ],
1087
+ [
1088
+ 180.70811336841146,
1089
+ 316.39797420272146
1090
+ ]
1091
+ ],
1092
+ [
1093
+ {
1094
+ "type": "global",
1095
+ "constraint": "edge"
1096
+ },
1097
+ {
1098
+ "type": "distance",
1099
+ "constraint": "near",
1100
+ "target": "existing-room_6ca25d60_bin_cfadfb4d"
1101
+ },
1102
+ {
1103
+ "type": "distance",
1104
+ "constraint": "far",
1105
+ "target": "existing-room_6ca25d60_bathtub_61637b53"
1106
+ }
1107
+ ]
1108
+ ],
1109
+ "mass": 3.5,
1110
+ "pbr_parameters": {
1111
+ "metallic": 0.2,
1112
+ "roughness": 0.6
1113
+ }
1114
+ },
1115
+ {
1116
+ "id": "room_6ca25d60_plant_421e7920",
1117
+ "room_id": "room_6ca25d60",
1118
+ "type": "plant",
1119
+ "description": "A potted bamboo plant in a small ceramic pot, featuring slender green bamboo shoots, natural green foliage, and a smooth matte pot finish.",
1120
+ "position": {
1121
+ "x": 2.0966234437905897,
1122
+ "y": 0.4224662472155145,
1123
+ "z": 0.16568833484912132
1124
+ },
1125
+ "rotation": {
1126
+ "x": 0.06563486575357251,
1127
+ "y": 0.04419789620747722,
1128
+ "z": -19.06630303937162
1129
+ },
1130
+ "dimensions": {
1131
+ "width": 0.3747376274223253,
1132
+ "length": 0.3590806078524096,
1133
+ "height": 0.7804371384963904
1134
+ },
1135
+ "source": "generation",
1136
+ "source_id": "3ecd695e",
1137
+ "place_id": "room_6ca25d60_bench_1138f198",
1138
+ "place_guidance": "Standard placement for the object",
1139
+ "placement_constraints": null,
1140
+ "mass": 3.5,
1141
+ "pbr_parameters": {
1142
+ "metallic": 0.0,
1143
+ "roughness": 0.6
1144
+ }
1145
+ },
1146
+ {
1147
+ "id": "room_6ca25d60_candlebench_15c461f6",
1148
+ "room_id": "room_6ca25d60",
1149
+ "type": "candlebench",
1150
+ "description": "A small white soy candle with a smooth cylindrical shape, minimalist zen design, and a subtle natural wax finish, featuring a delicate bamboo lid as a unique accent.",
1151
+ "position": {
1152
+ "x": 1.5651052595987356,
1153
+ "y": 0.5543978136430813,
1154
+ "z": 0.041859188539112684
1155
+ },
1156
+ "rotation": {
1157
+ "x": -0.251386599578262,
1158
+ "y": 0.06399855946945701,
1159
+ "z": 41.75913220254977
1160
+ },
1161
+ "dimensions": {
1162
+ "width": 0.11449319689239028,
1163
+ "length": 0.11437328014562176,
1164
+ "height": 0.16255070568212104
1165
+ },
1166
+ "source": "generation",
1167
+ "source_id": "ecfe88d2",
1168
+ "place_id": "room_6ca25d60_bench_1138f198",
1169
+ "place_guidance": "Standard placement for the object",
1170
+ "placement_constraints": null,
1171
+ "mass": 0.1,
1172
+ "pbr_parameters": {
1173
+ "metallic": 0.0,
1174
+ "roughness": 0.7
1175
+ }
1176
+ },
1177
+ {
1178
+ "id": "room_6ca25d60_candlebench_93868696",
1179
+ "room_id": "room_6ca25d60",
1180
+ "type": "candlebench",
1181
+ "description": "A white soy candle with a smooth cylindrical shape, minimalist zen design, and a subtle natural wax finish, featuring a tiny bamboo imprint.",
1182
+ "position": {
1183
+ "x": 1.5235546316810813,
1184
+ "y": 0.20327817172290344,
1185
+ "z": 0.04215562916192265
1186
+ },
1187
+ "rotation": {
1188
+ "x": 0.01844012311607287,
1189
+ "y": 0.0349107174557069,
1190
+ "z": 23.457532471242878
1191
+ },
1192
+ "dimensions": {
1193
+ "width": 0.132162804978668,
1194
+ "length": 0.13215372559900246,
1195
+ "height": 0.13101571237192922
1196
+ },
1197
+ "source": "generation",
1198
+ "source_id": "f2a804d4",
1199
+ "place_id": "room_6ca25d60_bench_1138f198",
1200
+ "place_guidance": "Standard placement for the object",
1201
+ "placement_constraints": null,
1202
+ "mass": 0.5,
1203
+ "pbr_parameters": {
1204
+ "metallic": 0.0,
1205
+ "roughness": 0.3
1206
+ }
1207
+ },
1208
+ {
1209
+ "id": "room_6ca25d60_plantbench_8e64093f",
1210
+ "room_id": "room_6ca25d60",
1211
+ "type": "plantbench",
1212
+ "description": "A small potted bamboo plant in a round ceramic pot, featuring slender green bamboo shoots, a compact cylindrical form, and a natural earthy finish.",
1213
+ "position": {
1214
+ "x": 1.6687177127051638,
1215
+ "y": 0.33015644096744146,
1216
+ "z": 0.041561757376042896
1217
+ },
1218
+ "rotation": {
1219
+ "x": 0.09050354375363501,
1220
+ "y": 0.31343264867015963,
1221
+ "z": 38.23249964775029
1222
+ },
1223
+ "dimensions": {
1224
+ "width": 0.29066266409460384,
1225
+ "length": 0.2555564558696024,
1226
+ "height": 0.5696394160083597
1227
+ },
1228
+ "source": "generation",
1229
+ "source_id": "255d24fc",
1230
+ "place_id": "room_6ca25d60_bench_1138f198",
1231
+ "place_guidance": "Standard placement for the object",
1232
+ "placement_constraints": null,
1233
+ "mass": 2.5,
1234
+ "pbr_parameters": {
1235
+ "metallic": 0.0,
1236
+ "roughness": 0.8
1237
+ }
1238
+ },
1239
+ {
1240
+ "id": "room_6ca25d60_sconce_a156ef74",
1241
+ "room_id": "room_6ca25d60",
1242
+ "type": "sconce",
1243
+ "description": "A single piece of thin and upright bamboo wall sconce with Asian zen style, minimal design, low-profile and rectangular light panel",
1244
+ "position": {
1245
+ "x": 1.0274999999999999,
1246
+ "y": 0.2080555336936596,
1247
+ "z": 1.3529224212385476
1248
+ },
1249
+ "rotation": {
1250
+ "x": 0,
1251
+ "y": 0,
1252
+ "z": 0
1253
+ },
1254
+ "dimensions": {
1255
+ "width": 1.1132189393410301,
1256
+ "length": 0.25611106738731915,
1257
+ "height": 1.119155157522905
1258
+ },
1259
+ "source": "generation",
1260
+ "source_id": "113d511a",
1261
+ "place_id": "wall",
1262
+ "place_guidance": "Mount one sconce to the left and one to the right of the shower area",
1263
+ "placement_constraints": [
1264
+ [
1265
+ {
1266
+ "type": "alignment",
1267
+ "constraint": "on_top_of",
1268
+ "target": "room_6ca25d60_shower_cbe130cc"
1269
+ }
1270
+ ]
1271
+ ],
1272
+ "mass": 5.0,
1273
+ "pbr_parameters": {
1274
+ "metallic": 0.0,
1275
+ "roughness": 0.3
1276
+ }
1277
+ },
1278
+ {
1279
+ "id": "room_6ca25d60_sconce_619f48a6",
1280
+ "room_id": "room_6ca25d60",
1281
+ "type": "sconce",
1282
+ "description": "A single piece of thin and upright bamboo wall sconce with Asian zen style, minimal design, low-profile and rectangular light panel",
1283
+ "position": {
1284
+ "x": 0.2080555336936596,
1285
+ "y": 1.2550000000000001,
1286
+ "z": 1.3529224212385476
1287
+ },
1288
+ "rotation": {
1289
+ "x": 0,
1290
+ "y": 0,
1291
+ "z": 270
1292
+ },
1293
+ "dimensions": {
1294
+ "width": 1.1132189393410301,
1295
+ "length": 0.25611106738731915,
1296
+ "height": 1.119155157522905
1297
+ },
1298
+ "source": "generation",
1299
+ "source_id": "113d511a",
1300
+ "place_id": "wall",
1301
+ "place_guidance": "Mount one sconce to the left and one to the right of the shower area",
1302
+ "placement_constraints": [
1303
+ [
1304
+ {
1305
+ "type": "alignment",
1306
+ "constraint": "on_top_of",
1307
+ "target": "room_6ca25d60_shower_cbe130cc"
1308
+ }
1309
+ ]
1310
+ ],
1311
+ "mass": 5.0,
1312
+ "pbr_parameters": {
1313
+ "metallic": 0.0,
1314
+ "roughness": 0.3
1315
+ }
1316
+ },
1317
+ {
1318
+ "id": "room_6ca25d60_mirror_c83c09a8",
1319
+ "room_id": "room_6ca25d60",
1320
+ "type": "mirror",
1321
+ "description": "A single piece of thin and upright rectangular mirror with a natural bamboo frame, low-profile design, and a smooth reflective surface, featuring a subtle grain pattern on the frame.",
1322
+ "position": {
1323
+ "x": 0.16298084233316446,
1324
+ "y": 2.785,
1325
+ "z": 0.8022550444574611
1326
+ },
1327
+ "rotation": {
1328
+ "x": 0,
1329
+ "y": 0,
1330
+ "z": 270
1331
+ },
1332
+ "dimensions": {
1333
+ "width": 0.7732774318242668,
1334
+ "length": 0.16596168466632888,
1335
+ "height": 1.470489911085078
1336
+ },
1337
+ "source": "generation",
1338
+ "source_id": "cb0ff146",
1339
+ "place_id": "wall",
1340
+ "place_guidance": "Mount centered above the vanity, extending slightly beyond the vanity width.",
1341
+ "placement_constraints": [
1342
+ [
1343
+ {
1344
+ "type": "alignment",
1345
+ "constraint": "on_top_of",
1346
+ "target": "room_6ca25d60_vanity_92f50522"
1347
+ }
1348
+ ]
1349
+ ],
1350
+ "mass": 5.0,
1351
+ "pbr_parameters": {
1352
+ "metallic": 0.1,
1353
+ "roughness": 0.3
1354
+ }
1355
+ },
1356
+ {
1357
+ "id": "room_6ca25d60_sconce_fa99257a",
1358
+ "room_id": "room_6ca25d60",
1359
+ "type": "sconce",
1360
+ "description": "A single piece of thin and upright wall sconce with a minimalist bamboo frame, low-profile silhouette, and a soft warm light aperture, showcasing a carved bamboo motif.",
1361
+ "position": {
1362
+ "x": 2.2425,
1363
+ "y": 0.10206458278560693,
1364
+ "z": 1.5849874921388944
1365
+ },
1366
+ "rotation": {
1367
+ "x": 0,
1368
+ "y": 0,
1369
+ "z": 0
1370
+ },
1371
+ "dimensions": {
1372
+ "width": 0.7304643003353568,
1373
+ "length": 0.04412916557121383,
1374
+ "height": 0.9050250157222113
1375
+ },
1376
+ "source": "generation",
1377
+ "source_id": "80d4d0e5",
1378
+ "place_id": "wall",
1379
+ "place_guidance": "Mount one sconce to the left and one to the right of the shower area on the wall.",
1380
+ "placement_constraints": [
1381
+ [
1382
+ {
1383
+ "type": "alignment",
1384
+ "constraint": "on_top_of",
1385
+ "target": "room_6ca25d60_shower_cbe130cc"
1386
+ }
1387
+ ]
1388
+ ],
1389
+ "mass": 2.5,
1390
+ "pbr_parameters": {
1391
+ "metallic": 0.0,
1392
+ "roughness": 0.6
1393
+ }
1394
+ },
1395
+ {
1396
+ "id": "room_6ca25d60_sconce_a9ff9f0c",
1397
+ "room_id": "room_6ca25d60",
1398
+ "type": "sconce",
1399
+ "description": "A single piece of thin and upright wall sconce with a minimalist bamboo frame, low-profile silhouette, and a soft warm light aperture, showcasing a carved bamboo motif.",
1400
+ "position": {
1401
+ "x": 2.3775,
1402
+ "y": 3.5979354172143934,
1403
+ "z": 1.5849874921388944
1404
+ },
1405
+ "rotation": {
1406
+ "x": 0,
1407
+ "y": 0,
1408
+ "z": 180
1409
+ },
1410
+ "dimensions": {
1411
+ "width": 0.7304643003353568,
1412
+ "length": 0.04412916557121383,
1413
+ "height": 0.9050250157222113
1414
+ },
1415
+ "source": "generation",
1416
+ "source_id": "80d4d0e5",
1417
+ "place_id": "wall",
1418
+ "place_guidance": "Mount one sconce to the left and one to the right of the shower area on the wall.",
1419
+ "placement_constraints": [
1420
+ [
1421
+ {
1422
+ "type": "alignment",
1423
+ "constraint": "on_top_of",
1424
+ "target": "room_6ca25d60_shower_cbe130cc"
1425
+ }
1426
+ ]
1427
+ ],
1428
+ "mass": 2.5,
1429
+ "pbr_parameters": {
1430
+ "metallic": 0.0,
1431
+ "roughness": 0.6
1432
+ }
1433
+ },
1434
+ {
1435
+ "id": "room_6ca25d60_sconcevanity_ea11d807",
1436
+ "room_id": "room_6ca25d60",
1437
+ "type": "sconcevanity",
1438
+ "description": "A thin upright bamboo wall sconce with a minimalist zen silhouette, rectangular panel, natural bamboo finish, and a subtle recessed lighting cavity.",
1439
+ "position": {
1440
+ "x": 2.842988071264437,
1441
+ "y": 2.785,
1442
+ "z": 1.0645685754917409
1443
+ },
1444
+ "rotation": {
1445
+ "x": 0,
1446
+ "y": 0,
1447
+ "z": 90
1448
+ },
1449
+ "dimensions": {
1450
+ "width": 0.782719316440245,
1451
+ "length": 0.1540238574711255,
1452
+ "height": 0.9458628490165182
1453
+ },
1454
+ "source": "generation",
1455
+ "source_id": "86327ec7",
1456
+ "place_id": "wall",
1457
+ "place_guidance": "Mount the sconces on the wall left and right of the vanity at approximately 1.5\u202fm height.",
1458
+ "placement_constraints": [
1459
+ [
1460
+ {
1461
+ "type": "alignment",
1462
+ "constraint": "on_top_of",
1463
+ "target": "room_6ca25d60_vanity_92f50522"
1464
+ }
1465
+ ]
1466
+ ],
1467
+ "mass": 1.5,
1468
+ "pbr_parameters": {
1469
+ "metallic": 0.0,
1470
+ "roughness": 0.8
1471
+ }
1472
+ },
1473
+ {
1474
+ "id": "room_6ca25d60_sconcevanity_9b1d4ec3",
1475
+ "room_id": "room_6ca25d60",
1476
+ "type": "sconcevanity",
1477
+ "description": "A single piece of thin and upright bamboo wall sconce with a subtle curved shade, zen style and low\u2011profile silhouette",
1478
+ "position": {
1479
+ "x": 2.7837814787789186,
1480
+ "y": 0.5750000000000002,
1481
+ "z": 1.2378456506781719
1482
+ },
1483
+ "rotation": {
1484
+ "x": 0,
1485
+ "y": 0,
1486
+ "z": 90
1487
+ },
1488
+ "dimensions": {
1489
+ "width": 0.3670901043501374,
1490
+ "length": 0.27243704244216277,
1491
+ "height": 0.5993086986436567
1492
+ },
1493
+ "source": "generation",
1494
+ "source_id": "1828c766",
1495
+ "place_id": "wall",
1496
+ "place_guidance": "Mount one sconce on the wall left of the vanity and the other on the wall right of the vanity at approximately 1.5\u202fm height",
1497
+ "placement_constraints": [
1498
+ [
1499
+ {
1500
+ "type": "alignment",
1501
+ "constraint": "on_top_of",
1502
+ "target": "room_6ca25d60_vanity_92f50522"
1503
+ }
1504
+ ]
1505
+ ],
1506
+ "mass": 0.8,
1507
+ "pbr_parameters": {
1508
+ "metallic": 0.0,
1509
+ "roughness": 0.7
1510
+ }
1511
+ },
1512
+ {
1513
+ "id": "room_6ca25d60_sconcevanity_61ec803e",
1514
+ "room_id": "room_6ca25d60",
1515
+ "type": "sconcevanity",
1516
+ "description": "A single piece of thin and upright bamboo wall sconce with a subtle curved shade, zen style and low\u2011profile silhouette",
1517
+ "position": {
1518
+ "x": 0.48750000000000004,
1519
+ "y": 3.4837814787789187,
1520
+ "z": 1.8628456506781719
1521
+ },
1522
+ "rotation": {
1523
+ "x": 0,
1524
+ "y": 0,
1525
+ "z": 180
1526
+ },
1527
+ "dimensions": {
1528
+ "width": 0.3670901043501374,
1529
+ "length": 0.27243704244216277,
1530
+ "height": 0.5993086986436567
1531
+ },
1532
+ "source": "generation",
1533
+ "source_id": "1828c766",
1534
+ "place_id": "wall",
1535
+ "place_guidance": "Mount one sconce on the wall left of the vanity and the other on the wall right of the vanity at approximately 1.5\u202fm height",
1536
+ "placement_constraints": [
1537
+ [
1538
+ {
1539
+ "type": "alignment",
1540
+ "constraint": "on_top_of",
1541
+ "target": "room_6ca25d60_vanity_92f50522"
1542
+ }
1543
+ ]
1544
+ ],
1545
+ "mass": 0.8,
1546
+ "pbr_parameters": {
1547
+ "metallic": 0.0,
1548
+ "roughness": 0.7
1549
+ }
1550
+ }
1551
+ ],
1552
+ "windows": [],
1553
+ "floor_material": "room_6ca25d60_floor",
1554
+ "ceiling_height": 2.7
1555
+ }
1556
+ ],
1557
+ "total_area": 11.100000000000001,
1558
+ "building_style": "Asian Zen style bathroom",
1559
+ "description": "Complete layout with doors/windows: Generate a single medium-sized bathroom (10x12 feet) in Asian Zen style. The room must feature natural elements including bamboo materials for low-profile furniture, a small water feature (bamboo fountain), and harmonious tranquil balance. Include a bamboo vanity with stone sink, a natural stone bathtub, a low-profile toilet, and a shower area with pebble flooring. The walls should have natural texture finishes with shoji screen elements, and a large window for natural light. Place minimal potted plants (bamboo, ferns) for greenery. Maintain open space for calmness, with earthy color palette (whites, beiges, natural wood tones). The layout must include one entrance door, one window, and proper spatial relationships between all elements.; The scene requires a 3.0m x 3.7m bathroom designed in modern and bright style.",
1560
+ "created_from_text": "Generate a single medium-sized bathroom (10x12 feet) in Asian Zen style. The room must feature natural elements including bamboo materials for low-profile furniture, a small water feature (bamboo fountain), and harmonious tranquil balance. Include a bamboo vanity with stone sink, a natural stone bathtub, a low-profile toilet, and a shower area with pebble flooring. The walls should have natural texture finishes with shoji screen elements, and a large window for natural light. Place minimal potted plants (bamboo, ferns) for greenery. Maintain open space for calmness, with earthy color palette (whites, beiges, natural wood tones). The layout must include one entrance door, one window, and proper spatial relationships between all elements.; The scene requires a 3.0m x 3.7m bathroom designed in modern and bright style.",
1561
+ "policy_analysis": {
1562
+ "scene_requirements": "The scene requires a 3.0m x 3.7m bathroom designed in modern and bright style. The room should include 10 floor-placed furniture and background objects: Bamboo vanity placed on floor; Stone bathtub placed on floor; Bamboo toilet placed on floor; Pebble shower placed on floor; Bamboo fountain placed on floor; 2 Bamboo plants placed on floor; Waste bin placed on floor; Shower bench placed on floor; 2 Soy candles placed on floor; Storage basket placed on floor. Wall decorations consist of 9 items: Wall mirror mounted on wall; Bamboo shelf mounted on wall; 2 Wall lamps mounted on wall; Towel rack mounted on wall; Soap dispenser mounted on wall; Brush holder mounted on wall; Shoji panel mounted on wall; Wall clock mounted on wall; Zen artwork mounted on wall. Furniture surfaces should be decorated with 6 functional and decorative objects: 4 Hand towels placed on towelrack; Soap bar placed on dispenser; 2 Toothbrushs placed on holder; Vanity tray placed on vanity; Bathroom scale placed on vanity; Ceramic vase placed on shelf. Each furniture surface such as tables, desks, shelves, and cabinets should have at least 2 or more decorative or functional objects placed on top to create a lived-in, realistic environment. Important constraints: Do not add rugs, mats, carpets, curtains, blankets, ceiling-hanging objects, or ceiling objects to the scene as these are either already installed or restricted. The complete scene must contain a minimum of 25 objects total following the placement proposals described above to achieve a complete, diverse, and realistic room environment.Must ensure that: i. The layout (position, rotation, and size) is believable, and common daily objects make the room feel lived-in. Rich of daily furniture and objects.ii. Contains the necessary furniture and setup for the specified function.iii. Each objects is in **reasonable size**, neatly placed, objects of the same category are well aglined, relationships are reasonable (e.g., chairs face desks), sufficient space exists for walking, and **orientations must** be correct. iv. All necessary large and small items are present. Has rich details. Each shelf is full of objects (>5) inside. Each supporter (e.g. table, desk, and shelf) has small objects on it. The room feels done.Must avoid that: i. Unusual objects or strange placements make the room unrealistic.ii. Missing key objects or contains mismatched furniture (e.g., no bed in a bedroom).iii. Floating objects, crowded floor, **abnormal size**, objects with collision, incorrect **orientation**, or large items placed oddly (e.g., sofa not against the wall). Large empty space. Blocker in front of furniture.iv. Room is sparse or empty, lacks decor or key elements."
1563
+ }
1564
+ }
SAGE10k/sage10k/scenes/20251213_055817_layout_ed24dd11/layout_ed24dd11.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_060314_layout_0b66fd6d/layout_0b66fd6d.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_060624_layout_c99b7e46/layout_c99b7e46.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_061146_layout_f705f5b9/layout_f705f5b9.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_061428_layout_60b4dbe9/layout_60b4dbe9.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_062834_layout_e4c6d328/layout_e4c6d328.json ADDED
@@ -0,0 +1,1449 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "layout_e4c6d328",
3
+ "rooms": [
4
+ {
5
+ "id": "room_a70fc429",
6
+ "room_type": "bathroom",
7
+ "position": {
8
+ "x": 0.0,
9
+ "y": 0.0,
10
+ "z": 0.0
11
+ },
12
+ "dimensions": {
13
+ "width": 3.5,
14
+ "length": 3.0,
15
+ "height": 2.7
16
+ },
17
+ "walls": [
18
+ {
19
+ "id": "wall_room_a70fc429_north_3f70f04a",
20
+ "start_point": {
21
+ "x": 0.0,
22
+ "y": 3.0,
23
+ "z": 0.0
24
+ },
25
+ "end_point": {
26
+ "x": 3.5,
27
+ "y": 3.0,
28
+ "z": 0.0
29
+ },
30
+ "height": 2.7,
31
+ "thickness": 0.1,
32
+ "material": "room_a70fc429_wall"
33
+ },
34
+ {
35
+ "id": "wall_room_a70fc429_south_ddcc1ace",
36
+ "start_point": {
37
+ "x": 0.0,
38
+ "y": 0.0,
39
+ "z": 0.0
40
+ },
41
+ "end_point": {
42
+ "x": 3.5,
43
+ "y": 0.0,
44
+ "z": 0.0
45
+ },
46
+ "height": 2.7,
47
+ "thickness": 0.1,
48
+ "material": "room_a70fc429_wall"
49
+ },
50
+ {
51
+ "id": "wall_room_a70fc429_east_1585fcab",
52
+ "start_point": {
53
+ "x": 3.5,
54
+ "y": 0.0,
55
+ "z": 0.0
56
+ },
57
+ "end_point": {
58
+ "x": 3.5,
59
+ "y": 3.0,
60
+ "z": 0.0
61
+ },
62
+ "height": 2.7,
63
+ "thickness": 0.1,
64
+ "material": "room_a70fc429_wall"
65
+ },
66
+ {
67
+ "id": "wall_room_a70fc429_west_066e0baf",
68
+ "start_point": {
69
+ "x": 0.0,
70
+ "y": 0.0,
71
+ "z": 0.0
72
+ },
73
+ "end_point": {
74
+ "x": 0.0,
75
+ "y": 3.0,
76
+ "z": 0.0
77
+ },
78
+ "height": 2.7,
79
+ "thickness": 0.1,
80
+ "material": "room_a70fc429_wall"
81
+ }
82
+ ],
83
+ "doors": [
84
+ {
85
+ "id": "door_70ec0464",
86
+ "wall_id": "wall_room_a70fc429_east_1585fcab",
87
+ "position_on_wall": 0.5332121031795194,
88
+ "width": 0.9,
89
+ "height": 2.05,
90
+ "door_type": "entry/main/front",
91
+ "opens_inward": true,
92
+ "opening": false,
93
+ "door_material": "Door_6"
94
+ }
95
+ ],
96
+ "objects": [
97
+ {
98
+ "id": "room_a70fc429_vanity_aeb90470",
99
+ "room_id": "room_a70fc429",
100
+ "type": "vanity",
101
+ "description": "A countertop vanity with a curved countertop, organic asymmetrical design, featuring a smooth wooden top with flowing lines, inlaid with pastel stained\u2011glass accents and a sculpted low cabinet, finished in warm walnut with brass hardware.",
102
+ "position": {
103
+ "x": 1.25,
104
+ "y": 2.753229097256199,
105
+ "z": 0.0
106
+ },
107
+ "rotation": {
108
+ "x": 0,
109
+ "y": 0,
110
+ "z": 180
111
+ },
112
+ "dimensions": {
113
+ "width": 1.276983555747348,
114
+ "length": 0.35854180548760234,
115
+ "height": 0.7545137809662968
116
+ },
117
+ "source": "generation",
118
+ "source_id": "14d0c585",
119
+ "place_id": "floor",
120
+ "place_guidance": "Standard placement for the object",
121
+ "placement_constraints": [
122
+ [
123
+ 125.0,
124
+ 275.32290972561987
125
+ ],
126
+ 180,
127
+ [
128
+ [
129
+ 190.5991777873674,
130
+ 255.64581945123976
131
+ ],
132
+ [
133
+ 190.5991777873674,
134
+ 295.0
135
+ ],
136
+ [
137
+ 59.400822212632605,
138
+ 295.0
139
+ ],
140
+ [
141
+ 59.400822212632605,
142
+ 255.64581945123976
143
+ ]
144
+ ],
145
+ [
146
+ {
147
+ "type": "global",
148
+ "constraint": "edge"
149
+ }
150
+ ]
151
+ ],
152
+ "mass": 150.0,
153
+ "pbr_parameters": {
154
+ "metallic": 0.3,
155
+ "roughness": 0.4
156
+ }
157
+ },
158
+ {
159
+ "id": "room_a70fc429_tub_dd5b5447",
160
+ "room_id": "room_a70fc429",
161
+ "type": "tub",
162
+ "description": "A freestanding bathtub with a flowing curved silhouette, whiplash lines, and delicate floral motifs carved into the porcelain, finished in soft ivory with a glossy sheen, featuring an elegant elongated oval shape and a sculpted backrest.",
163
+ "position": {
164
+ "x": 2.85,
165
+ "y": 0.2863552912029174,
166
+ "z": 0.0
167
+ },
168
+ "rotation": {
169
+ "x": 0,
170
+ "y": 0,
171
+ "z": 0
172
+ },
173
+ "dimensions": {
174
+ "width": 0.9164929215460377,
175
+ "length": 0.4377105824058348,
176
+ "height": 0.4506388183107931
177
+ },
178
+ "source": "generation",
179
+ "source_id": "3b739aaa",
180
+ "place_id": "floor",
181
+ "place_guidance": "Standard placement for the object",
182
+ "placement_constraints": [
183
+ [
184
+ 285.0,
185
+ 28.635529120291743
186
+ ],
187
+ 0,
188
+ [
189
+ [
190
+ 332.5746460773019,
191
+ 5.0
192
+ ],
193
+ [
194
+ 332.5746460773019,
195
+ 52.27105824058349
196
+ ],
197
+ [
198
+ 237.42535392269812,
199
+ 52.27105824058349
200
+ ],
201
+ [
202
+ 237.42535392269812,
203
+ 5.0
204
+ ]
205
+ ],
206
+ [
207
+ {
208
+ "type": "global",
209
+ "constraint": "edge"
210
+ },
211
+ {
212
+ "type": "distance",
213
+ "constraint": "far",
214
+ "target": "room_a70fc429_vanity_aeb90470"
215
+ }
216
+ ]
217
+ ],
218
+ "mass": 150.0,
219
+ "pbr_parameters": {
220
+ "metallic": 0.0,
221
+ "roughness": 0.2
222
+ }
223
+ },
224
+ {
225
+ "id": "room_a70fc429_shower_44ab530e",
226
+ "room_id": "room_a70fc429",
227
+ "type": "shower",
228
+ "description": "A shower enclosure with a floral mosaic floor, composed of small colored glass tiles forming a blooming pattern, surrounded by a curved glass wall with subtle curvature, creating an organic, flowing space.",
229
+ "position": {
230
+ "x": 0.45,
231
+ "y": 0.25663810287936584,
232
+ "z": 0.0
233
+ },
234
+ "rotation": {
235
+ "x": 0,
236
+ "y": 0,
237
+ "z": 0
238
+ },
239
+ "dimensions": {
240
+ "width": 0.37840873815955206,
241
+ "length": 0.3782762057587317,
242
+ "height": 0.77986045862367
243
+ },
244
+ "source": "generation",
245
+ "source_id": "6f0c67b2",
246
+ "place_id": "floor",
247
+ "place_guidance": "Standard placement for the object",
248
+ "placement_constraints": [
249
+ [
250
+ 45.0,
251
+ 25.663810287936585
252
+ ],
253
+ 0,
254
+ [
255
+ [
256
+ 65.6704369079776,
257
+ 5.0
258
+ ],
259
+ [
260
+ 65.6704369079776,
261
+ 46.32762057587317
262
+ ],
263
+ [
264
+ 24.329563092022397,
265
+ 46.32762057587317
266
+ ],
267
+ [
268
+ 24.329563092022397,
269
+ 5.0
270
+ ]
271
+ ],
272
+ [
273
+ {
274
+ "type": "global",
275
+ "constraint": "edge"
276
+ },
277
+ {
278
+ "type": "distance",
279
+ "constraint": "far",
280
+ "target": "room_a70fc429_vanity_aeb90470"
281
+ },
282
+ {
283
+ "type": "distance",
284
+ "constraint": "far",
285
+ "target": "room_a70fc429_tub_dd5b5447"
286
+ }
287
+ ]
288
+ ],
289
+ "mass": 2.5,
290
+ "pbr_parameters": {
291
+ "metallic": 0.0,
292
+ "roughness": 0.4
293
+ }
294
+ },
295
+ {
296
+ "id": "room_a70fc429_toilet_7ef62319",
297
+ "room_id": "room_a70fc429",
298
+ "type": "toilet",
299
+ "description": "A ceramic toilet with ornate Art Nouveau detailing, featuring sinuous floral engravings on the tank, a gently tapered bowl, and a polished white glaze with subtle gold accents, showcasing a graceful curved profile.",
300
+ "position": {
301
+ "x": 0.476370487648268,
302
+ "y": 1.85,
303
+ "z": 0.0
304
+ },
305
+ "rotation": {
306
+ "x": 0,
307
+ "y": 0,
308
+ "z": 270
309
+ },
310
+ "dimensions": {
311
+ "width": 0.5062204190313975,
312
+ "length": 0.817740975296536,
313
+ "height": 1.0459104753158983
314
+ },
315
+ "source": "generation",
316
+ "source_id": "f6848bb9",
317
+ "place_id": "floor",
318
+ "place_guidance": "Standard placement for the object",
319
+ "placement_constraints": [
320
+ [
321
+ 47.6370487648268,
322
+ 185.0
323
+ ],
324
+ 270,
325
+ [
326
+ [
327
+ 90.2740975296536,
328
+ 157.93897904843013
329
+ ],
330
+ [
331
+ 90.2740975296536,
332
+ 212.06102095156987
333
+ ],
334
+ [
335
+ 5.0,
336
+ 212.06102095156987
337
+ ],
338
+ [
339
+ 5.0,
340
+ 157.93897904843013
341
+ ]
342
+ ],
343
+ [
344
+ {
345
+ "type": "global",
346
+ "constraint": "edge"
347
+ },
348
+ {
349
+ "type": "relative",
350
+ "constraint": "right of",
351
+ "target": "room_a70fc429_vanity_aeb90470"
352
+ },
353
+ {
354
+ "type": "distance",
355
+ "constraint": "near",
356
+ "target": "room_a70fc429_vanity_aeb90470"
357
+ },
358
+ {
359
+ "type": "distance",
360
+ "constraint": "far",
361
+ "target": "room_a70fc429_tub_dd5b5447"
362
+ }
363
+ ]
364
+ ],
365
+ "mass": 45.0,
366
+ "pbr_parameters": {
367
+ "metallic": 0.3,
368
+ "roughness": 0.2
369
+ }
370
+ },
371
+ {
372
+ "id": "room_a70fc429_bin_071e6a5f",
373
+ "room_id": "room_a70fc429",
374
+ "type": "bin",
375
+ "description": "A small waste bin with an Art Nouveau silhouette, featuring a curving, petal\u2011like lid, glazed in muted teal with a single stylized leaf engraving, compact and rounded.",
376
+ "position": {
377
+ "x": 0.2830817771315625,
378
+ "y": 1.05,
379
+ "z": 0.0
380
+ },
381
+ "rotation": {
382
+ "x": 0,
383
+ "y": 0,
384
+ "z": 270
385
+ },
386
+ "dimensions": {
387
+ "width": 0.4331222655066125,
388
+ "length": 0.431163554263125,
389
+ "height": 0.43346535522093216
390
+ },
391
+ "source": "generation",
392
+ "source_id": "7b0666dd",
393
+ "place_id": "floor",
394
+ "place_guidance": "Standard placement for the object",
395
+ "placement_constraints": [
396
+ [
397
+ 28.30817771315625,
398
+ 105.0
399
+ ],
400
+ 270,
401
+ [
402
+ [
403
+ 51.61635542631251,
404
+ 81.59388672466937
405
+ ],
406
+ [
407
+ 51.61635542631251,
408
+ 128.40611327533063
409
+ ],
410
+ [
411
+ 5.0,
412
+ 128.40611327533063
413
+ ],
414
+ [
415
+ 5.0,
416
+ 81.59388672466937
417
+ ]
418
+ ],
419
+ [
420
+ {
421
+ "type": "global",
422
+ "constraint": "edge"
423
+ },
424
+ {
425
+ "type": "distance",
426
+ "constraint": "close to",
427
+ "target": "room_a70fc429_toilet_7ef62319"
428
+ },
429
+ {
430
+ "type": "relative",
431
+ "constraint": "right of",
432
+ "target": "room_a70fc429_toilet_7ef62319"
433
+ },
434
+ {
435
+ "type": "distance",
436
+ "constraint": "near",
437
+ "target": "room_a70fc429_toilet_7ef62319"
438
+ },
439
+ {
440
+ "type": "distance",
441
+ "constraint": "far",
442
+ "target": "room_a70fc429_tub_dd5b5447"
443
+ }
444
+ ]
445
+ ],
446
+ "mass": 15.0,
447
+ "pbr_parameters": {
448
+ "metallic": 0.0,
449
+ "roughness": 0.3
450
+ }
451
+ },
452
+ {
453
+ "id": "room_a70fc429_succulent_9071d4ad",
454
+ "room_id": "room_a70fc429",
455
+ "type": "succulent",
456
+ "description": "A floor\u2011level succulent in a hand\u2011carved ceramic pot with a flowing, asymmetrical silhouette, the pot glazed in muted terracotta and accented with a subtle leaf\u2011like embossing",
457
+ "position": {
458
+ "x": 1.85,
459
+ "y": 0.24708391965996349,
460
+ "z": 0.0
461
+ },
462
+ "rotation": {
463
+ "x": 0,
464
+ "y": 0,
465
+ "z": 0
466
+ },
467
+ "dimensions": {
468
+ "width": 0.3128654016306189,
469
+ "length": 0.35916783931992696,
470
+ "height": 0.357284747148889
471
+ },
472
+ "source": "generation",
473
+ "source_id": "b505185e",
474
+ "place_id": "floor",
475
+ "place_guidance": "Standard placement for the object",
476
+ "placement_constraints": [
477
+ [
478
+ 185.0,
479
+ 24.70839196599635
480
+ ],
481
+ 0,
482
+ [
483
+ [
484
+ 202.39327008153094,
485
+ 5.0
486
+ ],
487
+ [
488
+ 202.39327008153094,
489
+ 44.4167839319927
490
+ ],
491
+ [
492
+ 167.60672991846906,
493
+ 44.4167839319927
494
+ ],
495
+ [
496
+ 167.60672991846906,
497
+ 5.0
498
+ ]
499
+ ],
500
+ [
501
+ {
502
+ "type": "global",
503
+ "constraint": "edge"
504
+ },
505
+ {
506
+ "type": "distance",
507
+ "constraint": "near",
508
+ "target": "existing-room_a70fc429_tub_dd5b5447"
509
+ },
510
+ {
511
+ "type": "direction",
512
+ "constraint": "face same as",
513
+ "target": "existing-room_a70fc429_tub_dd5b5447"
514
+ }
515
+ ]
516
+ ],
517
+ "mass": 2.5,
518
+ "pbr_parameters": {
519
+ "metallic": 0.0,
520
+ "roughness": 0.6
521
+ }
522
+ },
523
+ {
524
+ "id": "room_a70fc429_plantfloor_b1e000d1",
525
+ "room_id": "room_a70fc429",
526
+ "type": "plantfloor",
527
+ "description": "A small floor plant in a hand\u2011carved ceramic pot with flowing organic shapes, reflecting Art Nouveau aesthetics.",
528
+ "position": {
529
+ "x": 3.2710612034045297,
530
+ "y": 0.85,
531
+ "z": 0.0
532
+ },
533
+ "rotation": {
534
+ "x": 0,
535
+ "y": 0,
536
+ "z": 90
537
+ },
538
+ "dimensions": {
539
+ "width": 0.3123456909475153,
540
+ "length": 0.32287759319094156,
541
+ "height": 0.38788529329413335
542
+ },
543
+ "source": "generation",
544
+ "source_id": "6323e135",
545
+ "place_id": "floor",
546
+ "place_guidance": "Standard placement for the object",
547
+ "placement_constraints": [
548
+ [
549
+ 327.10612034045295,
550
+ 85.0
551
+ ],
552
+ 90,
553
+ [
554
+ [
555
+ 345.0,
556
+ 67.63271545262424
557
+ ],
558
+ [
559
+ 345.0,
560
+ 102.36728454737576
561
+ ],
562
+ [
563
+ 309.2122406809059,
564
+ 102.36728454737576
565
+ ],
566
+ [
567
+ 309.2122406809059,
568
+ 67.63271545262424
569
+ ]
570
+ ],
571
+ [
572
+ {
573
+ "type": "global",
574
+ "constraint": "edge"
575
+ },
576
+ {
577
+ "type": "distance",
578
+ "constraint": "near",
579
+ "target": "existing-room_a70fc429_tub_dd5b5447"
580
+ }
581
+ ]
582
+ ],
583
+ "mass": 2.5,
584
+ "pbr_parameters": {
585
+ "metallic": 0.0,
586
+ "roughness": 0.3
587
+ }
588
+ },
589
+ {
590
+ "id": "room_a70fc429_dispenser_52185526",
591
+ "room_id": "room_a70fc429",
592
+ "type": "dispenser",
593
+ "description": "A ceramic soap dispenser with flowing Art Nouveau lines, curved body and a floral motif etched near the spout, featuring a glossy ivory finish and a gently flared base",
594
+ "position": {
595
+ "x": 1.758966620047845,
596
+ "y": 2.760770136839663,
597
+ "z": 0.7568231943388921
598
+ },
599
+ "rotation": {
600
+ "x": -0.08819614606775074,
601
+ "y": -0.00691778153236901,
602
+ "z": -11.425714604490645
603
+ },
604
+ "dimensions": {
605
+ "width": 0.2140398398857962,
606
+ "length": 0.2389504173189028,
607
+ "height": 0.3093936510263647
608
+ },
609
+ "source": "generation",
610
+ "source_id": "f478305e",
611
+ "place_id": "room_a70fc429_vanity_aeb90470",
612
+ "place_guidance": "Standard placement for the object",
613
+ "placement_constraints": null,
614
+ "mass": 0.8,
615
+ "pbr_parameters": {
616
+ "metallic": 0.0,
617
+ "roughness": 0.3
618
+ }
619
+ },
620
+ {
621
+ "id": "room_a70fc429_holder_f4ab05bb",
622
+ "room_id": "room_a70fc429",
623
+ "type": "holder",
624
+ "description": "A sinuous metal toothbrush holder with a petal\u2011shaped base, wrought\u2011iron arches forming a graceful wave, finished in brushed bronze and accented with a tiny leaf detail",
625
+ "position": {
626
+ "x": 0.9406223534654753,
627
+ "y": 2.7213347877232597,
628
+ "z": 0.7563317583598494
629
+ },
630
+ "rotation": {
631
+ "x": -0.00903928092321775,
632
+ "y": -0.056466353455644235,
633
+ "z": 28.031173844286375
634
+ },
635
+ "dimensions": {
636
+ "width": 0.16562346543306772,
637
+ "length": 0.285497257961806,
638
+ "height": 0.3439787984403134
639
+ },
640
+ "source": "generation",
641
+ "source_id": "e8bffa72",
642
+ "place_id": "room_a70fc429_vanity_aeb90470",
643
+ "place_guidance": "Standard placement for the object",
644
+ "placement_constraints": null,
645
+ "mass": 1.5,
646
+ "pbr_parameters": {
647
+ "metallic": 0.1,
648
+ "roughness": 0.7
649
+ }
650
+ },
651
+ {
652
+ "id": "room_a70fc429_vase_1bee679c",
653
+ "room_id": "room_a70fc429",
654
+ "type": "vase",
655
+ "description": "A hand\u2011painted ceramic vase with whiplash curves, deep turquoise glaze and delicate lily motifs swirling up the surface, featuring a narrow neck that flares into a rounded belly",
656
+ "position": {
657
+ "x": 1.3602001275823685,
658
+ "y": 2.7643254804572672,
659
+ "z": 0.7565527281418643
660
+ },
661
+ "rotation": {
662
+ "x": 0.0699154767619283,
663
+ "y": -0.07786619711393968,
664
+ "z": -6.625915057111286
665
+ },
666
+ "dimensions": {
667
+ "width": 0.20730977054328403,
668
+ "length": 0.20741238315247879,
669
+ "height": 0.36117255085374683
670
+ },
671
+ "source": "generation",
672
+ "source_id": "4ca7697b",
673
+ "place_id": "room_a70fc429_vanity_aeb90470",
674
+ "place_guidance": "Standard placement for the object",
675
+ "placement_constraints": null,
676
+ "mass": 1.5,
677
+ "pbr_parameters": {
678
+ "metallic": 0.0,
679
+ "roughness": 0.2
680
+ }
681
+ },
682
+ {
683
+ "id": "room_a70fc429_dispenser_0554d2cc",
684
+ "room_id": "room_a70fc429",
685
+ "type": "dispenser",
686
+ "description": "A ceramic soap dispenser with flowing Art Nouveau lines, floral motifs, and a curved ceramic body.",
687
+ "position": {
688
+ "x": 1.5601216291628646,
689
+ "y": 2.8419724718530484,
690
+ "z": 0.7569047750123057
691
+ },
692
+ "rotation": {
693
+ "x": -0.07740113215676508,
694
+ "y": 0.04374423087751291,
695
+ "z": 141.81008070225343
696
+ },
697
+ "dimensions": {
698
+ "width": 0.1875085502904389,
699
+ "length": 0.18115174037772216,
700
+ "height": 0.4999739445180751
701
+ },
702
+ "source": "generation",
703
+ "source_id": "c56f3cbe",
704
+ "place_id": "room_a70fc429_vanity_aeb90470",
705
+ "place_guidance": "Standard placement for the object",
706
+ "placement_constraints": null,
707
+ "mass": 2.5,
708
+ "pbr_parameters": {
709
+ "metallic": 0.0,
710
+ "roughness": 0.6
711
+ }
712
+ },
713
+ {
714
+ "id": "room_a70fc429_holder_807d34bc",
715
+ "room_id": "room_a70fc429",
716
+ "type": "holder",
717
+ "description": "A metal toothbrush holder featuring a sinuous frame and a petal-shaped base, embodying Art Nouveau elegance.",
718
+ "position": {
719
+ "x": 1.166786818369863,
720
+ "y": 2.7924017783604924,
721
+ "z": 0.7567112252578566
722
+ },
723
+ "rotation": {
724
+ "x": -0.04857569376732385,
725
+ "y": 0.22516556268135818,
726
+ "z": 107.1772148334877
727
+ },
728
+ "dimensions": {
729
+ "width": 0.1662412359354562,
730
+ "length": 0.19474913505593205,
731
+ "height": 0.27405581407642865
732
+ },
733
+ "source": "generation",
734
+ "source_id": "b98836d2",
735
+ "place_id": "room_a70fc429_vanity_aeb90470",
736
+ "place_guidance": "Standard placement for the object",
737
+ "placement_constraints": null,
738
+ "mass": 0.2,
739
+ "pbr_parameters": {
740
+ "metallic": 0.0,
741
+ "roughness": 0.3
742
+ }
743
+ },
744
+ {
745
+ "id": "room_a70fc429_vase_ad3eda4a",
746
+ "room_id": "room_a70fc429",
747
+ "type": "vase",
748
+ "description": "A ceramic vase with whiplash curves and hand\u2011painted lilies, displaying the characteristic flowing lines of Art Nouveau.",
749
+ "position": {
750
+ "x": 0.7210095234280262,
751
+ "y": 2.7543851195928233,
752
+ "z": 0.7561058133724542
753
+ },
754
+ "rotation": {
755
+ "x": -0.05216717304802938,
756
+ "y": 0.018238768614425454,
757
+ "z": 136.86640107994614
758
+ },
759
+ "dimensions": {
760
+ "width": 0.2036654753783155,
761
+ "length": 0.2040135159104772,
762
+ "height": 0.4442175450534293
763
+ },
764
+ "source": "generation",
765
+ "source_id": "e8cd963e",
766
+ "place_id": "room_a70fc429_vanity_aeb90470",
767
+ "place_guidance": "Standard placement for the object",
768
+ "placement_constraints": null,
769
+ "mass": 2.5,
770
+ "pbr_parameters": {
771
+ "metallic": 0.0,
772
+ "roughness": 0.3
773
+ }
774
+ },
775
+ {
776
+ "id": "room_a70fc429_toothbrush_a65fc9b7",
777
+ "room_id": "room_a70fc429",
778
+ "type": "toothbrush",
779
+ "description": "A slender Art Nouveau toothbrush with a gently curved wooden handle, flowing floral engravings along the shaft, and a soft pastel finish",
780
+ "position": {
781
+ "x": 1.6751463426311284,
782
+ "y": 2.733163669527714,
783
+ "z": 0.7546985879921543
784
+ },
785
+ "rotation": {
786
+ "x": -0.9938264492572872,
787
+ "y": -6.648060789352867,
788
+ "z": -14.242082051087275
789
+ },
790
+ "dimensions": {
791
+ "width": 0.018362451436246627,
792
+ "length": 0.25088248346616404,
793
+ "height": 0.014895211671666724
794
+ },
795
+ "source": "generation",
796
+ "source_id": "3c19ac54",
797
+ "place_id": "room_a70fc429_vanity_aeb90470",
798
+ "place_guidance": "Standard placement for the object",
799
+ "placement_constraints": null,
800
+ "mass": 0.05,
801
+ "pbr_parameters": {
802
+ "metallic": 0.0,
803
+ "roughness": 0.6
804
+ }
805
+ },
806
+ {
807
+ "id": "room_a70fc429_toothbrush_c59556f5",
808
+ "room_id": "room_a70fc429",
809
+ "type": "toothbrush",
810
+ "description": "A slender Art Nouveau toothbrush with a curved wooden handle, flowing floral engravings, and a polished bristle head",
811
+ "position": {
812
+ "x": 1.5891243340403272,
813
+ "y": 2.7301820647797297,
814
+ "z": 0.7569345971254245
815
+ },
816
+ "rotation": {
817
+ "x": 0.15054288791475984,
818
+ "y": -0.17235858746792768,
819
+ "z": 86.8657753101707
820
+ },
821
+ "dimensions": {
822
+ "width": 0.1043260716664581,
823
+ "length": 0.03812663512084314,
824
+ "height": 0.7210802410568454
825
+ },
826
+ "source": "generation",
827
+ "source_id": "5ca95a7c",
828
+ "place_id": "room_a70fc429_vanity_aeb90470",
829
+ "place_guidance": "Standard placement for the object",
830
+ "placement_constraints": null,
831
+ "mass": 0.8,
832
+ "pbr_parameters": {
833
+ "metallic": 0.3,
834
+ "roughness": 0.5
835
+ }
836
+ },
837
+ {
838
+ "id": "room_a70fc429_toothbrush_2fa0b866",
839
+ "room_id": "room_a70fc429",
840
+ "type": "toothbrush",
841
+ "description": "A slender Art Nouveau toothbrush with a curved wooden handle, flowing floral engravings, and a polished bristle head",
842
+ "position": {
843
+ "x": 1.4646690358759118,
844
+ "y": 2.6358017604892545,
845
+ "z": 0.7565070519564826
846
+ },
847
+ "rotation": {
848
+ "x": -0.05087183073577497,
849
+ "y": 0.2995993162933633,
850
+ "z": -98.94146441088894
851
+ },
852
+ "dimensions": {
853
+ "width": 0.1043260716664581,
854
+ "length": 0.03812663512084314,
855
+ "height": 0.7210802410568454
856
+ },
857
+ "source": "generation",
858
+ "source_id": "5ca95a7c",
859
+ "place_id": "room_a70fc429_vanity_aeb90470",
860
+ "place_guidance": "Standard placement for the object",
861
+ "placement_constraints": null,
862
+ "mass": 0.8,
863
+ "pbr_parameters": {
864
+ "metallic": 0.3,
865
+ "roughness": 0.5
866
+ }
867
+ },
868
+ {
869
+ "id": "room_a70fc429_toothpaste_f291a4d9",
870
+ "room_id": "room_a70fc429",
871
+ "type": "toothpaste",
872
+ "description": "A decorative Art Nouveau toothpaste tube with an organic\u2011shaped body, flowing lines, and embossed floral patterns, finished in pastel enamel",
873
+ "position": {
874
+ "x": 1.349039977346809,
875
+ "y": 2.615164742020181,
876
+ "z": 0.7563742088232486
877
+ },
878
+ "rotation": {
879
+ "x": -0.20219093497350266,
880
+ "y": 0.3833548502888849,
881
+ "z": -1.3985036297722266
882
+ },
883
+ "dimensions": {
884
+ "width": 0.08098481865006524,
885
+ "length": 0.07903721882350803,
886
+ "height": 0.26351374496015967
887
+ },
888
+ "source": "generation",
889
+ "source_id": "47eeb633",
890
+ "place_id": "room_a70fc429_vanity_aeb90470",
891
+ "place_guidance": "Standard placement for the object",
892
+ "placement_constraints": null,
893
+ "mass": 0.15,
894
+ "pbr_parameters": {
895
+ "metallic": 0.0,
896
+ "roughness": 0.2
897
+ }
898
+ },
899
+ {
900
+ "id": "room_a70fc429_toothpaste_3d63bc23",
901
+ "room_id": "room_a70fc429",
902
+ "type": "toothpaste",
903
+ "description": "A decorative Art Nouveau toothpaste tube with an organic\u2011shaped body, flowing lines, and embossed floral patterns, finished in pastel enamel",
904
+ "position": {
905
+ "x": 1.2498703774725421,
906
+ "y": 2.648959064383773,
907
+ "z": 0.7564386562636212
908
+ },
909
+ "rotation": {
910
+ "x": -0.11079626330756238,
911
+ "y": 0.4372880369534778,
912
+ "z": -17.585475165038897
913
+ },
914
+ "dimensions": {
915
+ "width": 0.08098481865006524,
916
+ "length": 0.07903721882350803,
917
+ "height": 0.26351374496015967
918
+ },
919
+ "source": "generation",
920
+ "source_id": "47eeb633",
921
+ "place_id": "room_a70fc429_vanity_aeb90470",
922
+ "place_guidance": "Standard placement for the object",
923
+ "placement_constraints": null,
924
+ "mass": 0.15,
925
+ "pbr_parameters": {
926
+ "metallic": 0.0,
927
+ "roughness": 0.2
928
+ }
929
+ },
930
+ {
931
+ "id": "room_a70fc429_hairbrush_1d466807",
932
+ "room_id": "room_a70fc429",
933
+ "type": "hairbrush",
934
+ "description": "A hairbrush in Art Nouveau style, with a curved wooden handle, brass accents, and a gently flared bristle base featuring subtle vine\u2011like carvings",
935
+ "position": {
936
+ "x": 1.458589092499081,
937
+ "y": 2.7553488586370936,
938
+ "z": 0.7537564005547128
939
+ },
940
+ "rotation": {
941
+ "x": 2.219249395361992,
942
+ "y": -2.576387744077288,
943
+ "z": -5.963107866098779
944
+ },
945
+ "dimensions": {
946
+ "width": 0.03381646997891903,
947
+ "length": 0.19487371229406436,
948
+ "height": 0.028464016234283667
949
+ },
950
+ "source": "generation",
951
+ "source_id": "76e81ed7",
952
+ "place_id": "room_a70fc429_vanity_aeb90470",
953
+ "place_guidance": "Standard placement for the object",
954
+ "placement_constraints": null,
955
+ "mass": 0.05,
956
+ "pbr_parameters": {
957
+ "metallic": 0.6,
958
+ "roughness": 0.3
959
+ }
960
+ },
961
+ {
962
+ "id": "room_a70fc429_toothbrush_1df91629",
963
+ "room_id": "room_a70fc429",
964
+ "type": "toothbrush",
965
+ "description": "A pair of Art Nouveau toothbrushes with curved wooden handles and delicate floral engravings, featuring flowing lines and organic asymmetry",
966
+ "position": {
967
+ "x": 1.5376448094183424,
968
+ "y": 2.6044795510663485,
969
+ "z": 0.7566749174995325
970
+ },
971
+ "rotation": {
972
+ "x": -0.3924890593938519,
973
+ "y": -0.04859936997917254,
974
+ "z": -123.99941510180149
975
+ },
976
+ "dimensions": {
977
+ "width": 0.11336942937938661,
978
+ "length": 0.0029599973453979696,
979
+ "height": 0.11897348376312042
980
+ },
981
+ "source": "generation",
982
+ "source_id": "0d9ed50a",
983
+ "place_id": "room_a70fc429_vanity_aeb90470",
984
+ "place_guidance": "Standard placement for the object",
985
+ "placement_constraints": null,
986
+ "mass": 0.02,
987
+ "pbr_parameters": {
988
+ "metallic": 0.0,
989
+ "roughness": 0.7
990
+ }
991
+ },
992
+ {
993
+ "id": "room_a70fc429_toothbrushholder_441347b3",
994
+ "room_id": "room_a70fc429",
995
+ "type": "toothbrushholder",
996
+ "description": "A petal\u2011shaped toothbrush holder with delicate floral engravings, its rounded, low\u2011profile silhouette embodies the flowing character of Art Nouveau design.",
997
+ "position": {
998
+ "x": 0.9028385496701369,
999
+ "y": 2.891389682353787,
1000
+ "z": 0.756281458222885
1001
+ },
1002
+ "rotation": {
1003
+ "x": 0.08365970189616204,
1004
+ "y": -0.04891814122104851,
1005
+ "z": -4.216072574439223
1006
+ },
1007
+ "dimensions": {
1008
+ "width": 0.1815212427753005,
1009
+ "length": 0.06554916357923751,
1010
+ "height": 0.16700056015672485
1011
+ },
1012
+ "source": "generation",
1013
+ "source_id": "0e91a2bc",
1014
+ "place_id": "room_a70fc429_vanity_aeb90470",
1015
+ "place_guidance": "Standard placement for the object",
1016
+ "placement_constraints": null,
1017
+ "mass": 0.1,
1018
+ "pbr_parameters": {
1019
+ "metallic": 0.0,
1020
+ "roughness": 0.2
1021
+ }
1022
+ },
1023
+ {
1024
+ "id": "room_a70fc429_toothbrushholder_1991fc65",
1025
+ "room_id": "room_a70fc429",
1026
+ "type": "toothbrushholder",
1027
+ "description": "A petal\u2011shaped toothbrush holder with delicate floral engravings, featuring a low\u2011profile curved base and a polished brass finish",
1028
+ "position": {
1029
+ "x": 1.0616040405440452,
1030
+ "y": 2.720091511371445,
1031
+ "z": 0.756394247914232
1032
+ },
1033
+ "rotation": {
1034
+ "x": 0.06570285260209352,
1035
+ "y": -0.09878221052848361,
1036
+ "z": -34.47905232004413
1037
+ },
1038
+ "dimensions": {
1039
+ "width": 0.07356506925410396,
1040
+ "length": 0.08543052462845296,
1041
+ "height": 0.14467275129171558
1042
+ },
1043
+ "source": "generation",
1044
+ "source_id": "6990e0e8",
1045
+ "place_id": "room_a70fc429_vanity_aeb90470",
1046
+ "place_guidance": "Standard placement for the object",
1047
+ "placement_constraints": null,
1048
+ "mass": 0.15,
1049
+ "pbr_parameters": {
1050
+ "metallic": 0.0,
1051
+ "roughness": 0.4
1052
+ }
1053
+ },
1054
+ {
1055
+ "id": "room_a70fc429_candle_2cc68dfa",
1056
+ "room_id": "room_a70fc429",
1057
+ "type": "candle",
1058
+ "description": "A decorative candle with a floral\u2011based holder, featuring a slender cylindrical body and a delicate metal base adorned with leaf motifs",
1059
+ "position": {
1060
+ "x": 1.0288494835020499,
1061
+ "y": 2.8119009144794127,
1062
+ "z": 0.7563804978590642
1063
+ },
1064
+ "rotation": {
1065
+ "x": 0.005672632888790514,
1066
+ "y": -0.13686691408744972,
1067
+ "z": -66.16035761714257
1068
+ },
1069
+ "dimensions": {
1070
+ "width": 0.1113125902742097,
1071
+ "length": 0.11495605207730314,
1072
+ "height": 0.36434774477523646
1073
+ },
1074
+ "source": "generation",
1075
+ "source_id": "44ffac63",
1076
+ "place_id": "room_a70fc429_vanity_aeb90470",
1077
+ "place_guidance": "Standard placement for the object",
1078
+ "placement_constraints": null,
1079
+ "mass": 0.5,
1080
+ "pbr_parameters": {
1081
+ "metallic": 0.6,
1082
+ "roughness": 0.4
1083
+ }
1084
+ },
1085
+ {
1086
+ "id": "room_a70fc429_towelrack_1_cc4795f1",
1087
+ "room_id": "room_a70fc429",
1088
+ "type": "towelrack_1",
1089
+ "description": "A wall\u2011mounted towel rack with curved iron supports that swoop outward like vines, finished in dark patina and topped with a subtle floral engraving",
1090
+ "position": {
1091
+ "x": 1.19,
1092
+ "y": 2.8667259361636397,
1093
+ "z": 1.078291141515302
1094
+ },
1095
+ "rotation": {
1096
+ "x": 0,
1097
+ "y": 0,
1098
+ "z": 180
1099
+ },
1100
+ "dimensions": {
1101
+ "width": 0.5853274879604399,
1102
+ "length": 0.10654812767272051,
1103
+ "height": 0.9184177169693961
1104
+ },
1105
+ "source": "generation",
1106
+ "source_id": "727aaf41",
1107
+ "place_id": "wall",
1108
+ "place_guidance": "Mount one rack adjacent to the vanity at a height of 1.2\u202fm, the other beside the shower at a comparable height, both following the same flowing line motif",
1109
+ "placement_constraints": [
1110
+ [
1111
+ {
1112
+ "type": "alignment",
1113
+ "constraint": "on_top_of",
1114
+ "target": "room_a70fc429_vanity_aeb90470"
1115
+ }
1116
+ ]
1117
+ ],
1118
+ "mass": 5.0,
1119
+ "pbr_parameters": {
1120
+ "metallic": 0.3,
1121
+ "roughness": 0.7
1122
+ }
1123
+ },
1124
+ {
1125
+ "id": "room_a70fc429_towelrack_2_d04c0425",
1126
+ "room_id": "room_a70fc429",
1127
+ "type": "towelrack_2",
1128
+ "description": "A wall\u2011mounted towel rack with curved iron supports that swoop outward like vines, finished in dark patina and topped with a subtle floral engraving",
1129
+ "position": {
1130
+ "x": 0.5500000000000003,
1131
+ "y": 0.1172570600288304,
1132
+ "z": 0.9910383699147638
1133
+ },
1134
+ "rotation": {
1135
+ "x": 0,
1136
+ "y": 0,
1137
+ "z": 0
1138
+ },
1139
+ "dimensions": {
1140
+ "width": 0.5974102246348693,
1141
+ "length": 0.07451412005766077,
1142
+ "height": 0.8429232601704725
1143
+ },
1144
+ "source": "generation",
1145
+ "source_id": "0376484b",
1146
+ "place_id": "wall",
1147
+ "place_guidance": "Mount one rack adjacent to the vanity at a height of 1.2\u202fm, the other beside the shower at a comparable height, both following the same flowing line motif",
1148
+ "placement_constraints": [
1149
+ [
1150
+ {
1151
+ "type": "alignment",
1152
+ "constraint": "on_top_of",
1153
+ "target": "room_a70fc429_shower_44ab530e"
1154
+ }
1155
+ ]
1156
+ ],
1157
+ "mass": 3.0,
1158
+ "pbr_parameters": {
1159
+ "metallic": 0.7,
1160
+ "roughness": 0.4
1161
+ }
1162
+ },
1163
+ {
1164
+ "id": "room_a70fc429_mirror_2b7f2eb6",
1165
+ "room_id": "room_a70fc429",
1166
+ "type": "mirror",
1167
+ "description": "A single piece of thin and upright mirror framed with stained\u2011glass floral patterns, the frame composed of elongated glass panes in pastel hues that ripple like water",
1168
+ "position": {
1169
+ "x": 1.99,
1170
+ "y": 2.812962552573885,
1171
+ "z": 1.266753898887485
1172
+ },
1173
+ "rotation": {
1174
+ "x": 0,
1175
+ "y": 0,
1176
+ "z": 180
1177
+ },
1178
+ "dimensions": {
1179
+ "width": 0.3027850255507587,
1180
+ "length": 0.21407489485222958,
1181
+ "height": 0.5414922022250306
1182
+ },
1183
+ "source": "generation",
1184
+ "source_id": "b26bef58",
1185
+ "place_id": "wall",
1186
+ "place_guidance": "Center the mirror above the vanity at a height of 1.8\u202fm, ensuring the stained\u2011glass frame aligns with the vanity\u2019s width",
1187
+ "placement_constraints": [
1188
+ [
1189
+ {
1190
+ "type": "alignment",
1191
+ "constraint": "on_top_of",
1192
+ "target": "room_a70fc429_vanity_aeb90470"
1193
+ }
1194
+ ]
1195
+ ],
1196
+ "mass": 1.2,
1197
+ "pbr_parameters": {
1198
+ "metallic": 0.0,
1199
+ "roughness": 0.2
1200
+ }
1201
+ },
1202
+ {
1203
+ "id": "room_a70fc429_sconce_70cf162a",
1204
+ "room_id": "room_a70fc429",
1205
+ "type": "sconce",
1206
+ "description": "A wall sconce with a curved metal arm that curls like a tendril, supporting a frosted glass shade shaped like a petal, finished in brushed copper with a tiny enamel leaf inset",
1207
+ "position": {
1208
+ "x": 2.6299999999999994,
1209
+ "y": 2.783152528040175,
1210
+ "z": 1.6214049373965616
1211
+ },
1212
+ "rotation": {
1213
+ "x": 0,
1214
+ "y": 0,
1215
+ "z": 180
1216
+ },
1217
+ "dimensions": {
1218
+ "width": 0.49604160488011156,
1219
+ "length": 0.2736949439196501,
1220
+ "height": 0.5821901252068772
1221
+ },
1222
+ "source": "generation",
1223
+ "source_id": "38938411",
1224
+ "place_id": "wall",
1225
+ "place_guidance": "Mount one sconce on each side of the mirror at a height of 1.5\u202fm, ensuring the arms frame the mirror symmetrically",
1226
+ "placement_constraints": [
1227
+ [
1228
+ {
1229
+ "type": "alignment",
1230
+ "constraint": "on_top_of",
1231
+ "target": "room_a70fc429_mirror_2b7f2eb6"
1232
+ }
1233
+ ]
1234
+ ],
1235
+ "mass": 1.2,
1236
+ "pbr_parameters": {
1237
+ "metallic": 0.3,
1238
+ "roughness": 0.6
1239
+ }
1240
+ },
1241
+ {
1242
+ "id": "room_a70fc429_sconce_ddf73ad3",
1243
+ "room_id": "room_a70fc429",
1244
+ "type": "sconce",
1245
+ "description": "A wall sconce with a curved metal arm that curls like a tendril, supporting a frosted glass shade shaped like a petal, finished in brushed copper with a tiny enamel leaf inset",
1246
+ "position": {
1247
+ "x": 2.6299999999999994,
1248
+ "y": 2.783152528040175,
1249
+ "z": 0.7464049373965616
1250
+ },
1251
+ "rotation": {
1252
+ "x": 0,
1253
+ "y": 0,
1254
+ "z": 180
1255
+ },
1256
+ "dimensions": {
1257
+ "width": 0.49604160488011156,
1258
+ "length": 0.2736949439196501,
1259
+ "height": 0.5821901252068772
1260
+ },
1261
+ "source": "generation",
1262
+ "source_id": "38938411",
1263
+ "place_id": "wall",
1264
+ "place_guidance": "Mount one sconce on each side of the mirror at a height of 1.5\u202fm, ensuring the arms frame the mirror symmetrically",
1265
+ "placement_constraints": [
1266
+ [
1267
+ {
1268
+ "type": "alignment",
1269
+ "constraint": "on_top_of",
1270
+ "target": "room_a70fc429_vanity_aeb90470"
1271
+ }
1272
+ ]
1273
+ ],
1274
+ "mass": 1.2,
1275
+ "pbr_parameters": {
1276
+ "metallic": 0.3,
1277
+ "roughness": 0.6
1278
+ }
1279
+ },
1280
+ {
1281
+ "id": "room_a70fc429_towelrack_2c35f772",
1282
+ "room_id": "room_a70fc429",
1283
+ "type": "towelrack",
1284
+ "description": "A wall\u2011mounted towel rack with gracefully curved iron supports and organic floral engravings, reflecting Art Nouveau style.",
1285
+ "position": {
1286
+ "x": 2.3099999999999996,
1287
+ "y": 0.15773112376619036,
1288
+ "z": 0.6895921965428037
1289
+ },
1290
+ "rotation": {
1291
+ "x": 0,
1292
+ "y": 0,
1293
+ "z": 0
1294
+ },
1295
+ "dimensions": {
1296
+ "width": 0.780963406449432,
1297
+ "length": 0.1554622475323807,
1298
+ "height": 1.1958156069143928
1299
+ },
1300
+ "source": "generation",
1301
+ "source_id": "418dc020",
1302
+ "place_id": "wall",
1303
+ "place_guidance": "Mount on the wall adjacent to the vanity at a height of 1.2\u202fm, with curved iron supports.",
1304
+ "placement_constraints": [
1305
+ [
1306
+ {
1307
+ "type": "alignment",
1308
+ "constraint": "on_top_of",
1309
+ "target": "room_a70fc429_vanity_aeb90470"
1310
+ }
1311
+ ]
1312
+ ],
1313
+ "mass": 15.0,
1314
+ "pbr_parameters": {
1315
+ "metallic": 0.0,
1316
+ "roughness": 0.4
1317
+ }
1318
+ },
1319
+ {
1320
+ "id": "room_a70fc429_towelrack2_78e097e7",
1321
+ "room_id": "room_a70fc429",
1322
+ "type": "towelrack2",
1323
+ "description": "A wall\u2011mounted towel rack with gracefully curved iron supports and organic floral engravings, reflecting Art Nouveau style.",
1324
+ "position": {
1325
+ "x": 3.3389342768564525,
1326
+ "y": 0.6225,
1327
+ "z": 0.6512037329499458
1328
+ },
1329
+ "rotation": {
1330
+ "x": 0,
1331
+ "y": 0,
1332
+ "z": 90
1333
+ },
1334
+ "dimensions": {
1335
+ "width": 0.6511967278505684,
1336
+ "length": 0.16213144628709514,
1337
+ "height": 0.7725925341001086
1338
+ },
1339
+ "source": "generation",
1340
+ "source_id": "bb62aca6",
1341
+ "place_id": "wall",
1342
+ "place_guidance": "Mount on the wall beside the shower at a height of 1.2\u202fm, featuring floral engravings.",
1343
+ "placement_constraints": [
1344
+ [
1345
+ {
1346
+ "type": "alignment",
1347
+ "constraint": "on_top_of",
1348
+ "target": "room_a70fc429_shower_44ab530e"
1349
+ }
1350
+ ]
1351
+ ],
1352
+ "mass": 2.5,
1353
+ "pbr_parameters": {
1354
+ "metallic": 0.1,
1355
+ "roughness": 0.6
1356
+ }
1357
+ },
1358
+ {
1359
+ "id": "room_a70fc429_sconce_fd27a930",
1360
+ "room_id": "room_a70fc429",
1361
+ "type": "sconce",
1362
+ "description": "A wall\u2011mounted Art Nouveau sconce with curved metal arms and intricate floral detailing, providing ambient lighting.",
1363
+ "position": {
1364
+ "x": 1.35,
1365
+ "y": 0.2897050664298655,
1366
+ "z": 1.3125
1367
+ },
1368
+ "rotation": {
1369
+ "x": 0,
1370
+ "y": 0,
1371
+ "z": 0
1372
+ },
1373
+ "dimensions": {
1374
+ "width": 0.4384605589483245,
1375
+ "length": 0.419410132859731,
1376
+ "height": 0.45
1377
+ },
1378
+ "source": "generation",
1379
+ "source_id": "e7edc2f9",
1380
+ "place_id": "wall",
1381
+ "place_guidance": "Install two sconces on the wall flanking the mirror at a height of 1.5\u202fm, each with curved metal arms.",
1382
+ "placement_constraints": [
1383
+ [
1384
+ {
1385
+ "type": "alignment",
1386
+ "constraint": "on_top_of",
1387
+ "target": "room_a70fc429_mirror_2b7f2eb6"
1388
+ }
1389
+ ]
1390
+ ],
1391
+ "mass": 2.5,
1392
+ "pbr_parameters": {
1393
+ "metallic": 0.0,
1394
+ "roughness": 0.6
1395
+ }
1396
+ },
1397
+ {
1398
+ "id": "room_a70fc429_sconce_ae74dab1",
1399
+ "room_id": "room_a70fc429",
1400
+ "type": "sconce",
1401
+ "description": "A wall\u2011mounted Art Nouveau sconce with curved metal arms and intricate floral detailing, providing ambient lighting.",
1402
+ "position": {
1403
+ "x": 3.2102949335701343,
1404
+ "y": 0.48750000000000004,
1405
+ "z": 1.8125
1406
+ },
1407
+ "rotation": {
1408
+ "x": 0,
1409
+ "y": 0,
1410
+ "z": 90
1411
+ },
1412
+ "dimensions": {
1413
+ "width": 0.4384605589483245,
1414
+ "length": 0.419410132859731,
1415
+ "height": 0.45
1416
+ },
1417
+ "source": "generation",
1418
+ "source_id": "e7edc2f9",
1419
+ "place_id": "wall",
1420
+ "place_guidance": "Install two sconces on the wall flanking the mirror at a height of 1.5\u202fm, each with curved metal arms.",
1421
+ "placement_constraints": [
1422
+ [
1423
+ {
1424
+ "type": "alignment",
1425
+ "constraint": "on_top_of",
1426
+ "target": "room_a70fc429_vanity_aeb90470"
1427
+ }
1428
+ ]
1429
+ ],
1430
+ "mass": 2.5,
1431
+ "pbr_parameters": {
1432
+ "metallic": 0.0,
1433
+ "roughness": 0.6
1434
+ }
1435
+ }
1436
+ ],
1437
+ "windows": [],
1438
+ "floor_material": "room_a70fc429_floor",
1439
+ "ceiling_height": 2.7
1440
+ }
1441
+ ],
1442
+ "total_area": 10.5,
1443
+ "building_style": "Art Nouveau style residential bathroom with flowing natural lines, whiplash curves, floral motifs, and stained glass accents",
1444
+ "description": "Complete layout with doors/windows: Generate a single medium-sized bathroom (3.5m x 3m) in Art Nouveau style. The room should feature flowing natural lines, whiplash curves, floral motifs, stained glass windows, and organic asymmetry. Include: a freestanding bathtub with curved lines, a vanity with a curved countertop, a shower area with floral mosaic tiles, a stained glass window above the sink, a small cabinet with floral carvings, a toilet with ornate fixtures, and a curved door frame. Walls should have organic shapes with floral patterns. The layout must have asymmetrical placement of fixtures to emphasize the Art Nouveau style.; The scene requires a 3.5m x 3.0m bathroom designed in modern and bright style.",
1445
+ "created_from_text": "Generate a single medium-sized bathroom (3.5m x 3m) in Art Nouveau style. The room should feature flowing natural lines, whiplash curves, floral motifs, stained glass windows, and organic asymmetry. Include: a freestanding bathtub with curved lines, a vanity with a curved countertop, a shower area with floral mosaic tiles, a stained glass window above the sink, a small cabinet with floral carvings, a toilet with ornate fixtures, and a curved door frame. Walls should have organic shapes with floral patterns. The layout must have asymmetrical placement of fixtures to emphasize the Art Nouveau style.; The scene requires a 3.5m x 3.0m bathroom designed in modern and bright style.",
1446
+ "policy_analysis": {
1447
+ "scene_requirements": "The scene requires a 3.5m x 3.0m bathroom designed in modern and bright style. The room should include 6 floor-placed furniture and background objects: Curved freestanding tub placed on floor; Ornate ceramic toilet placed on floor; Curved countertop vanity placed on floor; Floral mosaic shower placed on floor; Low floral cabinet placed on floor; Small waste bin placed on floor. Wall decorations consist of 6 items: Wall mirror above vanity mounted on wall; Wall mounted towel rack mounted on wall; Wall mounted shelf mounted on wall; 2 Wall sconce lightings mounted on wall; Stained\u2011glass artwork mounted on wall; Decorative glass panel mounted on wall. Furniture surfaces should be decorated with 10 functional and decorative objects: Ceramic soap dispenser placed on vanity; Toothbrush holder placed on vanity; Potted ornamental plant placed on shelf; Woven storage basket placed on shelf; Table lamp on shelf placed on shelf; 2 Hand towels placed on towelrack; Perfume bottle placed on vanity; Shaving razor placed on vanity; 2 Shampoo bottles placed on shower; 2 Bar of soaps placed on shower. Each furniture surface such as tables, desks, shelves, and cabinets should have at least 2 or more decorative or functional objects placed on top to create a lived-in, realistic environment. Important constraints: Do not add rugs, mats, carpets, curtains, blankets, ceiling-hanging objects, or ceiling objects to the scene as these are either already installed or restricted. The complete scene must contain a minimum of 22 objects total following the placement proposals described above to achieve a complete, diverse, and realistic room environment.Must ensure that: i. The layout (position, rotation, and size) is believable, and common daily objects make the room feel lived-in. Rich of daily furniture and objects.ii. Contains the necessary furniture and setup for the specified function.iii. Each objects is in **reasonable size**, neatly placed, objects of the same category are well aglined, relationships are reasonable (e.g., chairs face desks), sufficient space exists for walking, and **orientations must** be correct. iv. All necessary large and small items are present. Has rich details. Each shelf is full of objects (>5) inside. Each supporter (e.g. table, desk, and shelf) has small objects on it. The room feels done.Must avoid that: i. Unusual objects or strange placements make the room unrealistic.ii. Missing key objects or contains mismatched furniture (e.g., no bed in a bedroom).iii. Floating objects, crowded floor, **abnormal size**, objects with collision, incorrect **orientation**, or large items placed oddly (e.g., sofa not against the wall). Large empty space. Blocker in front of furniture.iv. Room is sparse or empty, lacks decor or key elements."
1448
+ }
1449
+ }
SAGE10k/sage10k/scenes/20251213_065329_layout_6ac4858f/layout_6ac4858f.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_065423_layout_be99fefd/layout_be99fefd.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_070212_layout_deedb66c/layout_deedb66c.json ADDED
@@ -0,0 +1,1282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "layout_deedb66c",
3
+ "rooms": [
4
+ {
5
+ "id": "room_55020ff9",
6
+ "room_type": "museum_hall",
7
+ "position": {
8
+ "x": 0.0,
9
+ "y": 0.0,
10
+ "z": 0.0
11
+ },
12
+ "dimensions": {
13
+ "width": 6.0,
14
+ "length": 8.0,
15
+ "height": 2.7
16
+ },
17
+ "walls": [
18
+ {
19
+ "id": "wall_room_55020ff9_north_5f08d526",
20
+ "start_point": {
21
+ "x": 0.0,
22
+ "y": 8.0,
23
+ "z": 0.0
24
+ },
25
+ "end_point": {
26
+ "x": 6.0,
27
+ "y": 8.0,
28
+ "z": 0.0
29
+ },
30
+ "height": 2.7,
31
+ "thickness": 0.1,
32
+ "material": "room_55020ff9_wall"
33
+ },
34
+ {
35
+ "id": "wall_room_55020ff9_south_4ffde13e",
36
+ "start_point": {
37
+ "x": 0.0,
38
+ "y": 0.0,
39
+ "z": 0.0
40
+ },
41
+ "end_point": {
42
+ "x": 6.0,
43
+ "y": 0.0,
44
+ "z": 0.0
45
+ },
46
+ "height": 2.7,
47
+ "thickness": 0.1,
48
+ "material": "room_55020ff9_wall"
49
+ },
50
+ {
51
+ "id": "wall_room_55020ff9_east_7fd5d5e6",
52
+ "start_point": {
53
+ "x": 6.0,
54
+ "y": 0.0,
55
+ "z": 0.0
56
+ },
57
+ "end_point": {
58
+ "x": 6.0,
59
+ "y": 8.0,
60
+ "z": 0.0
61
+ },
62
+ "height": 2.7,
63
+ "thickness": 0.1,
64
+ "material": "room_55020ff9_wall"
65
+ },
66
+ {
67
+ "id": "wall_room_55020ff9_west_182c86fd",
68
+ "start_point": {
69
+ "x": 0.0,
70
+ "y": 0.0,
71
+ "z": 0.0
72
+ },
73
+ "end_point": {
74
+ "x": 0.0,
75
+ "y": 8.0,
76
+ "z": 0.0
77
+ },
78
+ "height": 2.7,
79
+ "thickness": 0.1,
80
+ "material": "room_55020ff9_wall"
81
+ }
82
+ ],
83
+ "doors": [
84
+ {
85
+ "id": "door_f9e9edc0",
86
+ "wall_id": "wall_room_55020ff9_north_5f08d526",
87
+ "position_on_wall": 0.24929655678607068,
88
+ "width": 0.95,
89
+ "height": 2.05,
90
+ "door_type": "entry/main/front",
91
+ "opens_inward": true,
92
+ "opening": false,
93
+ "door_material": "Door_3"
94
+ }
95
+ ],
96
+ "objects": [
97
+ {
98
+ "id": "room_55020ff9_exhibitcase_3799e8ae",
99
+ "room_id": "room_55020ff9",
100
+ "type": "exhibitcase",
101
+ "description": "A wooden exhibit case with a rectangular base, light wood finish and a smooth white glass top, featuring clean lines and a subtle tapered leg design.",
102
+ "position": {
103
+ "x": 1.25,
104
+ "y": 2.65,
105
+ "z": 0.0
106
+ },
107
+ "rotation": {
108
+ "x": 0,
109
+ "y": 0,
110
+ "z": 0
111
+ },
112
+ "dimensions": {
113
+ "width": 0.5278067297589384,
114
+ "length": 0.3721450770026015,
115
+ "height": 1.1399437232141918
116
+ },
117
+ "source": "generation",
118
+ "source_id": "04449a19",
119
+ "place_id": "floor",
120
+ "place_guidance": "Standard placement for the object",
121
+ "placement_constraints": [
122
+ [
123
+ 125,
124
+ 265
125
+ ],
126
+ 0,
127
+ [
128
+ [
129
+ 153.1403364879469,
130
+ 244.64274614986994
131
+ ],
132
+ [
133
+ 153.1403364879469,
134
+ 285.35725385013006
135
+ ],
136
+ [
137
+ 96.85966351205309,
138
+ 285.35725385013006
139
+ ],
140
+ [
141
+ 96.85966351205309,
142
+ 244.64274614986994
143
+ ],
144
+ [
145
+ 153.1403364879469,
146
+ 244.64274614986994
147
+ ]
148
+ ],
149
+ [
150
+ {
151
+ "type": "global",
152
+ "constraint": "middle"
153
+ }
154
+ ]
155
+ ],
156
+ "mass": 25.0,
157
+ "pbr_parameters": {
158
+ "metallic": 0.0,
159
+ "roughness": 0.3
160
+ }
161
+ },
162
+ {
163
+ "id": "room_55020ff9_receptiondesk_519a7d25",
164
+ "room_id": "room_55020ff9",
165
+ "type": "receptiondesk",
166
+ "description": "A front reception desk with a white countertop, rectangular shape, light wood base, clean lines, and a subtle beveled edge on the top.",
167
+ "position": {
168
+ "x": 5.25,
169
+ "y": 7.613174901950698,
170
+ "z": 0.0
171
+ },
172
+ "rotation": {
173
+ "x": 0,
174
+ "y": 0,
175
+ "z": 180
176
+ },
177
+ "dimensions": {
178
+ "width": 1.3078885498900938,
179
+ "length": 0.6386501960986031,
180
+ "height": 0.7852261966796764
181
+ },
182
+ "source": "generation",
183
+ "source_id": "e4d12747",
184
+ "place_id": "floor",
185
+ "place_guidance": "Standard placement for the object",
186
+ "placement_constraints": [
187
+ [
188
+ 525.0,
189
+ 761.3174901950698
190
+ ],
191
+ 180,
192
+ [
193
+ [
194
+ 592.1444274945047,
195
+ 727.6349803901396
196
+ ],
197
+ [
198
+ 592.1444274945047,
199
+ 795.0
200
+ ],
201
+ [
202
+ 457.8555725054953,
203
+ 795.0
204
+ ],
205
+ [
206
+ 457.8555725054953,
207
+ 727.6349803901396
208
+ ]
209
+ ],
210
+ [
211
+ {
212
+ "type": "global",
213
+ "constraint": "edge"
214
+ },
215
+ {
216
+ "type": "distance",
217
+ "constraint": "far",
218
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
219
+ }
220
+ ]
221
+ ],
222
+ "mass": 85.0,
223
+ "pbr_parameters": {
224
+ "metallic": 0.05,
225
+ "roughness": 0.4
226
+ }
227
+ },
228
+ {
229
+ "id": "room_55020ff9_coatrack_e3b1b634",
230
+ "room_id": "room_55020ff9",
231
+ "type": "coatrack",
232
+ "description": "A minimal coat rack with a natural wood finish, vertical slender post, three evenly spaced horizontal branches, and a sleek tapered base.",
233
+ "position": {
234
+ "x": 5.786927944818984,
235
+ "y": 7.05,
236
+ "z": 0.0
237
+ },
238
+ "rotation": {
239
+ "x": 0,
240
+ "y": 0,
241
+ "z": 90
242
+ },
243
+ "dimensions": {
244
+ "width": 0.30624712034424995,
245
+ "length": 0.29114411036203075,
246
+ "height": 1.1760106157586028
247
+ },
248
+ "source": "generation",
249
+ "source_id": "0b629444",
250
+ "place_id": "floor",
251
+ "place_guidance": "Standard placement for the object",
252
+ "placement_constraints": [
253
+ [
254
+ 578.6927944818984,
255
+ 705.0
256
+ ],
257
+ 90,
258
+ [
259
+ [
260
+ 595.0,
261
+ 687.9376439827874
262
+ ],
263
+ [
264
+ 595.0,
265
+ 722.0623560172126
266
+ ],
267
+ [
268
+ 562.3855889637969,
269
+ 722.0623560172126
270
+ ],
271
+ [
272
+ 562.3855889637969,
273
+ 687.9376439827874
274
+ ]
275
+ ],
276
+ [
277
+ {
278
+ "type": "global",
279
+ "constraint": "edge"
280
+ },
281
+ {
282
+ "type": "distance",
283
+ "constraint": "far",
284
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
285
+ }
286
+ ]
287
+ ],
288
+ "mass": 2.5,
289
+ "pbr_parameters": {
290
+ "metallic": 0.0,
291
+ "roughness": 0.7
292
+ }
293
+ },
294
+ {
295
+ "id": "room_55020ff9_storagecabinet_5294adf2",
296
+ "room_id": "room_55020ff9",
297
+ "type": "storagecabinet",
298
+ "description": "A low storage cabinet with a light wood finish, rectangular silhouette, flat front doors, and a narrow vertical slit for ventilation.",
299
+ "position": {
300
+ "x": 5.766313204650499,
301
+ "y": 6.25,
302
+ "z": 0.0
303
+ },
304
+ "rotation": {
305
+ "x": 0,
306
+ "y": 0,
307
+ "z": 90
308
+ },
309
+ "dimensions": {
310
+ "width": 0.726747493802845,
311
+ "length": 0.3323735906990026,
312
+ "height": 1.5949849423351805
313
+ },
314
+ "source": "generation",
315
+ "source_id": "aeb47ab1",
316
+ "place_id": "floor",
317
+ "place_guidance": "Standard placement for the object",
318
+ "placement_constraints": [
319
+ [
320
+ 576.6313204650498,
321
+ 625.0
322
+ ],
323
+ 90,
324
+ [
325
+ [
326
+ 595.0,
327
+ 586.9126253098577
328
+ ],
329
+ [
330
+ 595.0,
331
+ 663.0873746901423
332
+ ],
333
+ [
334
+ 558.2626409300997,
335
+ 663.0873746901423
336
+ ],
337
+ [
338
+ 558.2626409300997,
339
+ 586.9126253098577
340
+ ]
341
+ ],
342
+ [
343
+ {
344
+ "type": "global",
345
+ "constraint": "edge"
346
+ },
347
+ {
348
+ "type": "distance",
349
+ "constraint": "near",
350
+ "target": "room_55020ff9_coatrack_e3b1b634"
351
+ },
352
+ {
353
+ "type": "distance",
354
+ "constraint": "close to",
355
+ "target": "room_55020ff9_coatrack_e3b1b634"
356
+ },
357
+ {
358
+ "type": "direction",
359
+ "constraint": "face same as",
360
+ "target": "room_55020ff9_coatrack_e3b1b634"
361
+ }
362
+ ]
363
+ ],
364
+ "mass": 60.0,
365
+ "pbr_parameters": {
366
+ "metallic": 0.0,
367
+ "roughness": 0.6
368
+ }
369
+ },
370
+ {
371
+ "id": "room_55020ff9_bench_efa50138",
372
+ "room_id": "room_55020ff9",
373
+ "type": "bench",
374
+ "description": "A simple wooden bench with a straight rectangular seat, light oak finish, minimalist legs, and a subtle rounded front edge.",
375
+ "position": {
376
+ "x": 5.711703727289247,
377
+ "y": 0.65,
378
+ "z": 0.0
379
+ },
380
+ "rotation": {
381
+ "x": 0,
382
+ "y": 0,
383
+ "z": 90
384
+ },
385
+ "dimensions": {
386
+ "width": 1.0395674632802965,
387
+ "length": 0.44159254542150683,
388
+ "height": 0.4335003408397849
389
+ },
390
+ "source": "generation",
391
+ "source_id": "3c9e31a7",
392
+ "place_id": "floor",
393
+ "place_guidance": "Standard placement for the object",
394
+ "placement_constraints": [
395
+ [
396
+ 571.1703727289247,
397
+ 65.0
398
+ ],
399
+ 90,
400
+ [
401
+ [
402
+ 595.0,
403
+ 11.271626835985174
404
+ ],
405
+ [
406
+ 595.0,
407
+ 118.72837316401483
408
+ ],
409
+ [
410
+ 547.3407454578494,
411
+ 118.72837316401483
412
+ ],
413
+ [
414
+ 547.3407454578494,
415
+ 11.271626835985174
416
+ ]
417
+ ],
418
+ [
419
+ {
420
+ "type": "global",
421
+ "constraint": "edge"
422
+ },
423
+ {
424
+ "type": "distance",
425
+ "constraint": "far",
426
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
427
+ },
428
+ {
429
+ "type": "distance",
430
+ "constraint": "far",
431
+ "target": "room_55020ff9_receptiondesk_519a7d25"
432
+ }
433
+ ]
434
+ ],
435
+ "mass": 25.0,
436
+ "pbr_parameters": {
437
+ "metallic": 0.0,
438
+ "roughness": 0.6
439
+ }
440
+ },
441
+ {
442
+ "id": "room_55020ff9_bench_08acd691",
443
+ "room_id": "room_55020ff9",
444
+ "type": "bench",
445
+ "description": "A simple wooden bench with a straight rectangular seat, light oak finish, minimalist legs, and a subtle rounded front edge.",
446
+ "position": {
447
+ "x": 5.711703727289247,
448
+ "y": 1.85,
449
+ "z": 0.0
450
+ },
451
+ "rotation": {
452
+ "x": 0,
453
+ "y": 0,
454
+ "z": 90
455
+ },
456
+ "dimensions": {
457
+ "width": 1.0395674632802965,
458
+ "length": 0.44159254542150683,
459
+ "height": 0.4335003408397849
460
+ },
461
+ "source": "generation",
462
+ "source_id": "3c9e31a7",
463
+ "place_id": "floor",
464
+ "place_guidance": "Standard placement for the object",
465
+ "placement_constraints": [
466
+ [
467
+ 571.1703727289247,
468
+ 185.0
469
+ ],
470
+ 90,
471
+ [
472
+ [
473
+ 595.0,
474
+ 131.27162683598516
475
+ ],
476
+ [
477
+ 595.0,
478
+ 238.72837316401484
479
+ ],
480
+ [
481
+ 547.3407454578494,
482
+ 238.72837316401484
483
+ ],
484
+ [
485
+ 547.3407454578494,
486
+ 131.27162683598516
487
+ ]
488
+ ],
489
+ [
490
+ {
491
+ "type": "global",
492
+ "constraint": "edge"
493
+ },
494
+ {
495
+ "type": "distance",
496
+ "constraint": "far",
497
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
498
+ },
499
+ {
500
+ "type": "distance",
501
+ "constraint": "far",
502
+ "target": "room_55020ff9_receptiondesk_519a7d25"
503
+ },
504
+ {
505
+ "type": "relative",
506
+ "constraint": "right of",
507
+ "target": "room_55020ff9_bench_efa50138"
508
+ }
509
+ ]
510
+ ],
511
+ "mass": 25.0,
512
+ "pbr_parameters": {
513
+ "metallic": 0.0,
514
+ "roughness": 0.6
515
+ }
516
+ },
517
+ {
518
+ "id": "room_55020ff9_armchair_7364563d",
519
+ "room_id": "room_55020ff9",
520
+ "type": "armchair",
521
+ "description": "A wooden armchair with a curved backrest, white upholstered seat, low\u2011slung rectangular seat, slender legs, and a gentle sweep of the back.",
522
+ "position": {
523
+ "x": 1.25,
524
+ "y": 3.25,
525
+ "z": 0.0
526
+ },
527
+ "rotation": {
528
+ "x": 0,
529
+ "y": 0,
530
+ "z": 180
531
+ },
532
+ "dimensions": {
533
+ "width": 0.6665660954068611,
534
+ "length": 0.6786111376305648,
535
+ "height": 1.0616879633933034
536
+ },
537
+ "source": "generation",
538
+ "source_id": "ff8871fb",
539
+ "place_id": "floor",
540
+ "place_guidance": "Standard placement for the object",
541
+ "placement_constraints": [
542
+ [
543
+ 125,
544
+ 325
545
+ ],
546
+ 180,
547
+ [
548
+ [
549
+ 160.07830477034304,
550
+ 289.3194431184718
551
+ ],
552
+ [
553
+ 160.07830477034304,
554
+ 360.6805568815282
555
+ ],
556
+ [
557
+ 89.92169522965695,
558
+ 360.6805568815282
559
+ ],
560
+ [
561
+ 89.92169522965695,
562
+ 289.3194431184718
563
+ ],
564
+ [
565
+ 160.07830477034304,
566
+ 289.3194431184718
567
+ ]
568
+ ],
569
+ [
570
+ {
571
+ "type": "global",
572
+ "constraint": "middle"
573
+ },
574
+ {
575
+ "type": "distance",
576
+ "constraint": "close to",
577
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
578
+ },
579
+ {
580
+ "type": "relative",
581
+ "constraint": "in front of",
582
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
583
+ },
584
+ {
585
+ "type": "alignment",
586
+ "constraint": "center aligned",
587
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
588
+ },
589
+ {
590
+ "type": "direction",
591
+ "constraint": "face to",
592
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
593
+ },
594
+ {
595
+ "type": "distance",
596
+ "constraint": "far",
597
+ "target": "room_55020ff9_bench_efa50138"
598
+ }
599
+ ]
600
+ ],
601
+ "mass": 15.0,
602
+ "pbr_parameters": {
603
+ "metallic": 0.0,
604
+ "roughness": 0.6
605
+ }
606
+ },
607
+ {
608
+ "id": "room_55020ff9_armchair_e17a7a4b",
609
+ "room_id": "room_55020ff9",
610
+ "type": "armchair",
611
+ "description": "A wooden armchair with a curved backrest, white upholstered seat, low\u2011slung rectangular seat, slender legs, and a gentle sweep of the back.",
612
+ "position": {
613
+ "x": 1.25,
614
+ "y": 2.05,
615
+ "z": 0.0
616
+ },
617
+ "rotation": {
618
+ "x": 0,
619
+ "y": 0,
620
+ "z": 0
621
+ },
622
+ "dimensions": {
623
+ "width": 0.6665660954068611,
624
+ "length": 0.6786111376305648,
625
+ "height": 1.0616879633933034
626
+ },
627
+ "source": "generation",
628
+ "source_id": "ff8871fb",
629
+ "place_id": "floor",
630
+ "place_guidance": "Standard placement for the object",
631
+ "placement_constraints": [
632
+ [
633
+ 125,
634
+ 205
635
+ ],
636
+ 0,
637
+ [
638
+ [
639
+ 160.07830477034304,
640
+ 169.31944311847175
641
+ ],
642
+ [
643
+ 160.07830477034304,
644
+ 240.68055688152825
645
+ ],
646
+ [
647
+ 89.92169522965695,
648
+ 240.68055688152825
649
+ ],
650
+ [
651
+ 89.92169522965695,
652
+ 169.31944311847175
653
+ ],
654
+ [
655
+ 160.07830477034304,
656
+ 169.31944311847175
657
+ ]
658
+ ],
659
+ [
660
+ {
661
+ "type": "global",
662
+ "constraint": "middle"
663
+ },
664
+ {
665
+ "type": "distance",
666
+ "constraint": "close to",
667
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
668
+ },
669
+ {
670
+ "type": "alignment",
671
+ "constraint": "center aligned",
672
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
673
+ },
674
+ {
675
+ "type": "direction",
676
+ "constraint": "face to",
677
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
678
+ },
679
+ {
680
+ "type": "distance",
681
+ "constraint": "far",
682
+ "target": "room_55020ff9_bench_08acd691"
683
+ }
684
+ ]
685
+ ],
686
+ "mass": 15.0,
687
+ "pbr_parameters": {
688
+ "metallic": 0.0,
689
+ "roughness": 0.6
690
+ }
691
+ },
692
+ {
693
+ "id": "room_55020ff9_sidetable_f48105a4",
694
+ "room_id": "room_55020ff9",
695
+ "type": "sidetable",
696
+ "description": "A small side table with a light wood surface, square top, compact rectangular base, and a single recessed drawer for a clean look.",
697
+ "position": {
698
+ "x": 4.05,
699
+ "y": 7.65,
700
+ "z": 0.0
701
+ },
702
+ "rotation": {
703
+ "x": 0,
704
+ "y": 0,
705
+ "z": 180
706
+ },
707
+ "dimensions": {
708
+ "width": 0.5520767103848745,
709
+ "length": 0.5332707088935807,
710
+ "height": 0.6475641010240569
711
+ },
712
+ "source": "generation",
713
+ "source_id": "546333d4",
714
+ "place_id": "floor",
715
+ "place_guidance": "Standard placement for the object",
716
+ "placement_constraints": [
717
+ [
718
+ 405,
719
+ 765
720
+ ],
721
+ 180,
722
+ [
723
+ [
724
+ 434.3538355192437,
725
+ 736.586464555321
726
+ ],
727
+ [
728
+ 434.3538355192437,
729
+ 793.413535444679
730
+ ],
731
+ [
732
+ 375.6461644807563,
733
+ 793.413535444679
734
+ ],
735
+ [
736
+ 375.6461644807563,
737
+ 736.586464555321
738
+ ],
739
+ [
740
+ 434.3538355192437,
741
+ 736.586464555321
742
+ ]
743
+ ],
744
+ [
745
+ {
746
+ "type": "global",
747
+ "constraint": "middle"
748
+ },
749
+ {
750
+ "type": "distance",
751
+ "constraint": "near",
752
+ "target": "room_55020ff9_receptiondesk_519a7d25"
753
+ },
754
+ {
755
+ "type": "relative",
756
+ "constraint": "right of",
757
+ "target": "room_55020ff9_receptiondesk_519a7d25"
758
+ },
759
+ {
760
+ "type": "distance",
761
+ "constraint": "close to",
762
+ "target": "room_55020ff9_receptiondesk_519a7d25"
763
+ },
764
+ {
765
+ "type": "direction",
766
+ "constraint": "face same as",
767
+ "target": "room_55020ff9_receptiondesk_519a7d25"
768
+ },
769
+ {
770
+ "type": "distance",
771
+ "constraint": "far",
772
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
773
+ }
774
+ ]
775
+ ],
776
+ "mass": 12.0,
777
+ "pbr_parameters": {
778
+ "metallic": 0.0,
779
+ "roughness": 0.6
780
+ }
781
+ },
782
+ {
783
+ "id": "room_55020ff9_infokiosk_88650950",
784
+ "room_id": "room_55020ff9",
785
+ "type": "infokiosk",
786
+ "description": "An interactive info kiosk with a light wood base, rectangular screen, slim profile, and a discreet touch panel integrated into the top surface.",
787
+ "position": {
788
+ "x": 3.25,
789
+ "y": 7.65,
790
+ "z": 0.0
791
+ },
792
+ "rotation": {
793
+ "x": 0,
794
+ "y": 0,
795
+ "z": 180
796
+ },
797
+ "dimensions": {
798
+ "width": 0.6220627743905826,
799
+ "length": 0.4576055504235692,
800
+ "height": 1.7383458799636267
801
+ },
802
+ "source": "generation",
803
+ "source_id": "ef689a17",
804
+ "place_id": "floor",
805
+ "place_guidance": "Standard placement for the object",
806
+ "placement_constraints": [
807
+ [
808
+ 325,
809
+ 765
810
+ ],
811
+ 180,
812
+ [
813
+ [
814
+ 357.8531387195291,
815
+ 740.3697224788216
816
+ ],
817
+ [
818
+ 357.8531387195291,
819
+ 789.6302775211784
820
+ ],
821
+ [
822
+ 292.1468612804709,
823
+ 789.6302775211784
824
+ ],
825
+ [
826
+ 292.1468612804709,
827
+ 740.3697224788216
828
+ ],
829
+ [
830
+ 357.8531387195291,
831
+ 740.3697224788216
832
+ ]
833
+ ],
834
+ [
835
+ {
836
+ "type": "global",
837
+ "constraint": "middle"
838
+ },
839
+ {
840
+ "type": "distance",
841
+ "constraint": "near",
842
+ "target": "room_55020ff9_sidetable_f48105a4"
843
+ },
844
+ {
845
+ "type": "relative",
846
+ "constraint": "right of",
847
+ "target": "room_55020ff9_sidetable_f48105a4"
848
+ },
849
+ {
850
+ "type": "distance",
851
+ "constraint": "close to",
852
+ "target": "room_55020ff9_sidetable_f48105a4"
853
+ },
854
+ {
855
+ "type": "direction",
856
+ "constraint": "face same as",
857
+ "target": "room_55020ff9_sidetable_f48105a4"
858
+ },
859
+ {
860
+ "type": "distance",
861
+ "constraint": "far",
862
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
863
+ }
864
+ ]
865
+ ],
866
+ "mass": 50.0,
867
+ "pbr_parameters": {
868
+ "metallic": 0.0,
869
+ "roughness": 0.4
870
+ }
871
+ },
872
+ {
873
+ "id": "room_55020ff9_plant_757b2de4",
874
+ "room_id": "room_55020ff9",
875
+ "type": "plant",
876
+ "description": "A small potted plant in a minimalist white ceramic pot, slender green foliage, compact and natural, Scandinavian style",
877
+ "position": {
878
+ "x": 5.25,
879
+ "y": 0.2023553894624336,
880
+ "z": 0.0
881
+ },
882
+ "rotation": {
883
+ "x": 0,
884
+ "y": 0,
885
+ "z": 0
886
+ },
887
+ "dimensions": {
888
+ "width": 0.30992088100493437,
889
+ "length": 0.26971077892486717,
890
+ "height": 0.44514514264873584
891
+ },
892
+ "source": "generation",
893
+ "source_id": "62cc371d",
894
+ "place_id": "floor",
895
+ "place_guidance": "Standard placement for the object",
896
+ "placement_constraints": [
897
+ [
898
+ 525.0,
899
+ 20.23553894624336
900
+ ],
901
+ 0,
902
+ [
903
+ [
904
+ 542.2460440502467,
905
+ 5.0
906
+ ],
907
+ [
908
+ 542.2460440502467,
909
+ 35.47107789248672
910
+ ],
911
+ [
912
+ 507.7539559497533,
913
+ 35.47107789248672
914
+ ],
915
+ [
916
+ 507.7539559497533,
917
+ 5.0
918
+ ]
919
+ ],
920
+ [
921
+ {
922
+ "type": "global",
923
+ "constraint": "edge"
924
+ },
925
+ {
926
+ "type": "distance",
927
+ "constraint": "far",
928
+ "target": "existing-room_55020ff9_receptiondesk_519a7d25"
929
+ },
930
+ {
931
+ "type": "distance",
932
+ "constraint": "far",
933
+ "target": "existing-room_55020ff9_infokiosk_88650950"
934
+ },
935
+ {
936
+ "type": "distance",
937
+ "constraint": "far",
938
+ "target": "existing-room_55020ff9_armchair_e17a7a4b"
939
+ },
940
+ {
941
+ "type": "distance",
942
+ "constraint": "far",
943
+ "target": "existing-room_55020ff9_armchair_7364563d"
944
+ }
945
+ ]
946
+ ],
947
+ "mass": 2.5,
948
+ "pbr_parameters": {
949
+ "metallic": 0.0,
950
+ "roughness": 0.6
951
+ }
952
+ },
953
+ {
954
+ "id": "room_55020ff9_plant_bd1ced8d",
955
+ "room_id": "room_55020ff9",
956
+ "type": "plant",
957
+ "description": "A small potted plant in a minimalist white ceramic pot, slender green foliage, compact and natural, Scandinavian style",
958
+ "position": {
959
+ "x": 4.85,
960
+ "y": 0.2023553894624336,
961
+ "z": 0.0
962
+ },
963
+ "rotation": {
964
+ "x": 0,
965
+ "y": 0,
966
+ "z": 0
967
+ },
968
+ "dimensions": {
969
+ "width": 0.30992088100493437,
970
+ "length": 0.26971077892486717,
971
+ "height": 0.44514514264873584
972
+ },
973
+ "source": "generation",
974
+ "source_id": "62cc371d",
975
+ "place_id": "floor",
976
+ "place_guidance": "Standard placement for the object",
977
+ "placement_constraints": [
978
+ [
979
+ 485.0,
980
+ 20.23553894624336
981
+ ],
982
+ 0,
983
+ [
984
+ [
985
+ 502.2460440502467,
986
+ 5.0
987
+ ],
988
+ [
989
+ 502.2460440502467,
990
+ 35.47107789248672
991
+ ],
992
+ [
993
+ 467.7539559497533,
994
+ 35.47107789248672
995
+ ],
996
+ [
997
+ 467.7539559497533,
998
+ 5.0
999
+ ]
1000
+ ],
1001
+ [
1002
+ {
1003
+ "type": "global",
1004
+ "constraint": "edge"
1005
+ },
1006
+ {
1007
+ "type": "distance",
1008
+ "constraint": "far",
1009
+ "target": "existing-room_55020ff9_receptiondesk_519a7d25"
1010
+ },
1011
+ {
1012
+ "type": "distance",
1013
+ "constraint": "far",
1014
+ "target": "existing-room_55020ff9_infokiosk_88650950"
1015
+ },
1016
+ {
1017
+ "type": "distance",
1018
+ "constraint": "far",
1019
+ "target": "existing-room_55020ff9_armchair_e17a7a4b"
1020
+ },
1021
+ {
1022
+ "type": "distance",
1023
+ "constraint": "far",
1024
+ "target": "existing-room_55020ff9_armchair_7364563d"
1025
+ }
1026
+ ]
1027
+ ],
1028
+ "mass": 2.5,
1029
+ "pbr_parameters": {
1030
+ "metallic": 0.0,
1031
+ "roughness": 0.6
1032
+ }
1033
+ },
1034
+ {
1035
+ "id": "room_55020ff9_plantcorner_639a952e",
1036
+ "room_id": "room_55020ff9",
1037
+ "type": "plantcorner",
1038
+ "description": "A small potted plant in a minimalist white pot, featuring slender green foliage and a compact cylindrical shape",
1039
+ "position": {
1040
+ "x": 0.25,
1041
+ "y": 7.757845237482716,
1042
+ "z": 0.0
1043
+ },
1044
+ "rotation": {
1045
+ "x": 0,
1046
+ "y": 0,
1047
+ "z": 180
1048
+ },
1049
+ "dimensions": {
1050
+ "width": 0.3183234054602937,
1051
+ "length": 0.3493095250345696,
1052
+ "height": 0.46759094676687984
1053
+ },
1054
+ "source": "generation",
1055
+ "source_id": "f41b8c84",
1056
+ "place_id": "floor",
1057
+ "place_guidance": "Standard placement for the object",
1058
+ "placement_constraints": [
1059
+ [
1060
+ 25.0,
1061
+ 775.7845237482716
1062
+ ],
1063
+ 180,
1064
+ [
1065
+ [
1066
+ 42.666170273014686,
1067
+ 756.5690474965431
1068
+ ],
1069
+ [
1070
+ 42.666170273014686,
1071
+ 795.0
1072
+ ],
1073
+ [
1074
+ 7.333829726985314,
1075
+ 795.0
1076
+ ],
1077
+ [
1078
+ 7.333829726985314,
1079
+ 756.5690474965431
1080
+ ]
1081
+ ],
1082
+ [
1083
+ {
1084
+ "type": "global",
1085
+ "constraint": "edge"
1086
+ },
1087
+ {
1088
+ "type": "distance",
1089
+ "constraint": "far",
1090
+ "target": "room_55020ff9_cushionfloor_6f64dc8c"
1091
+ },
1092
+ {
1093
+ "type": "distance",
1094
+ "constraint": "far",
1095
+ "target": "room_55020ff9_cushionfloor_a0690a7c"
1096
+ },
1097
+ {
1098
+ "type": "distance",
1099
+ "constraint": "far",
1100
+ "target": "existing-room_55020ff9_armchair_e17a7a4b"
1101
+ }
1102
+ ]
1103
+ ],
1104
+ "mass": 3.5,
1105
+ "pbr_parameters": {
1106
+ "metallic": 0.0,
1107
+ "roughness": 0.7
1108
+ }
1109
+ },
1110
+ {
1111
+ "id": "room_55020ff9_plantcorner_0a472825",
1112
+ "room_id": "room_55020ff9",
1113
+ "type": "plantcorner",
1114
+ "description": "A small potted plant in a minimalist white pot, featuring slender green foliage and a compact cylindrical shape",
1115
+ "position": {
1116
+ "x": 5.757845237482716,
1117
+ "y": 5.65,
1118
+ "z": 0.0
1119
+ },
1120
+ "rotation": {
1121
+ "x": 0,
1122
+ "y": 0,
1123
+ "z": 90
1124
+ },
1125
+ "dimensions": {
1126
+ "width": 0.3183234054602937,
1127
+ "length": 0.3493095250345696,
1128
+ "height": 0.46759094676687984
1129
+ },
1130
+ "source": "generation",
1131
+ "source_id": "f41b8c84",
1132
+ "place_id": "floor",
1133
+ "place_guidance": "Standard placement for the object",
1134
+ "placement_constraints": [
1135
+ [
1136
+ 575.7845237482716,
1137
+ 565.0
1138
+ ],
1139
+ 90,
1140
+ [
1141
+ [
1142
+ 595.0,
1143
+ 547.3338297269853
1144
+ ],
1145
+ [
1146
+ 595.0,
1147
+ 582.6661702730147
1148
+ ],
1149
+ [
1150
+ 556.5690474965431,
1151
+ 582.6661702730147
1152
+ ],
1153
+ [
1154
+ 556.5690474965431,
1155
+ 547.3338297269853
1156
+ ]
1157
+ ],
1158
+ [
1159
+ {
1160
+ "type": "global",
1161
+ "constraint": "edge"
1162
+ },
1163
+ {
1164
+ "type": "distance",
1165
+ "constraint": "far",
1166
+ "target": "room_55020ff9_cushionfloor_6f64dc8c"
1167
+ },
1168
+ {
1169
+ "type": "distance",
1170
+ "constraint": "far",
1171
+ "target": "room_55020ff9_cushionfloor_a0690a7c"
1172
+ },
1173
+ {
1174
+ "type": "distance",
1175
+ "constraint": "far",
1176
+ "target": "existing-room_55020ff9_armchair_7364563d"
1177
+ },
1178
+ {
1179
+ "type": "distance",
1180
+ "constraint": "far",
1181
+ "target": "room_55020ff9_plantcorner_639a952e"
1182
+ }
1183
+ ]
1184
+ ],
1185
+ "mass": 3.5,
1186
+ "pbr_parameters": {
1187
+ "metallic": 0.0,
1188
+ "roughness": 0.7
1189
+ }
1190
+ },
1191
+ {
1192
+ "id": "room_55020ff9_wallcase_fe110c40",
1193
+ "room_id": "room_55020ff9",
1194
+ "type": "wallcase",
1195
+ "description": "A wall-mounted display case with a thin rectangular frame of light wood, single piece of thin and upright mounting, showcasing a sleek glass shelf, with a minimalist profile.",
1196
+ "position": {
1197
+ "x": 0.2442685517221022,
1198
+ "y": 2.6525,
1199
+ "z": 0.8674276025687893
1200
+ },
1201
+ "rotation": {
1202
+ "x": 0,
1203
+ "y": 0,
1204
+ "z": 270
1205
+ },
1206
+ "dimensions": {
1207
+ "width": 0.4962168691096116,
1208
+ "length": 0.3285371034442044,
1209
+ "height": 1.3401447948624217
1210
+ },
1211
+ "source": "generation",
1212
+ "source_id": "9bda5a0f",
1213
+ "place_id": "wall",
1214
+ "place_guidance": "Mount one on each side of the central exhibit case, centered vertically on the long walls, symmetrically spaced and keeping 2\u202fm clearance from the nearest floor objects.",
1215
+ "placement_constraints": [
1216
+ [
1217
+ {
1218
+ "type": "alignment",
1219
+ "constraint": "on_top_of",
1220
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
1221
+ }
1222
+ ]
1223
+ ],
1224
+ "mass": 25.0,
1225
+ "pbr_parameters": {
1226
+ "metallic": 0.0,
1227
+ "roughness": 0.6
1228
+ }
1229
+ },
1230
+ {
1231
+ "id": "room_55020ff9_wallcase_5944f18c",
1232
+ "room_id": "room_55020ff9",
1233
+ "type": "wallcase",
1234
+ "description": "A wall-mounted display case with a thin rectangular frame of light wood, single piece of thin and upright mounting, showcasing a sleek glass shelf, with a minimalist profile.",
1235
+ "position": {
1236
+ "x": 0.2442685517221022,
1237
+ "y": 1.8824999999999998,
1238
+ "z": 0.8674276025687893
1239
+ },
1240
+ "rotation": {
1241
+ "x": 0,
1242
+ "y": 0,
1243
+ "z": 270
1244
+ },
1245
+ "dimensions": {
1246
+ "width": 0.4962168691096116,
1247
+ "length": 0.3285371034442044,
1248
+ "height": 1.3401447948624217
1249
+ },
1250
+ "source": "generation",
1251
+ "source_id": "9bda5a0f",
1252
+ "place_id": "wall",
1253
+ "place_guidance": "Mount one on each side of the central exhibit case, centered vertically on the long walls, symmetrically spaced and keeping 2\u202fm clearance from the nearest floor objects.",
1254
+ "placement_constraints": [
1255
+ [
1256
+ {
1257
+ "type": "alignment",
1258
+ "constraint": "on_top_of",
1259
+ "target": "room_55020ff9_exhibitcase_3799e8ae"
1260
+ }
1261
+ ]
1262
+ ],
1263
+ "mass": 25.0,
1264
+ "pbr_parameters": {
1265
+ "metallic": 0.0,
1266
+ "roughness": 0.6
1267
+ }
1268
+ }
1269
+ ],
1270
+ "windows": [],
1271
+ "floor_material": "room_55020ff9_floor",
1272
+ "ceiling_height": 2.7
1273
+ }
1274
+ ],
1275
+ "total_area": 48.0,
1276
+ "building_style": "Scandinavian modern bright style museum interior",
1277
+ "description": "Complete layout with doors/windows: Generate a single medium-sized museum_hall with Scandinavian style. The room features light wood floors, white walls, functional furniture, cozy textiles (cushions, throws, and woolen rugs), and 'hygge' simplicity. Include a central display area with a large exhibit case, 2 wall-mounted display cases, 4 seating areas (2 armchairs + 2 benches), 3 large windows for natural light, 1 side table for visitor materials, and minimalistic decor. The room must maintain clean lines, warm lighting, and uncluttered space while feeling inviting and functional.; The scene requires a 6.0m x 8.0m museum_hall designed in Scandinavian modern bright style.",
1278
+ "created_from_text": "Generate a single medium-sized museum_hall with Scandinavian style. The room features light wood floors, white walls, functional furniture, cozy textiles (cushions, throws, and woolen rugs), and 'hygge' simplicity. Include a central display area with a large exhibit case, 2 wall-mounted display cases, 4 seating areas (2 armchairs + 2 benches), 3 large windows for natural light, 1 side table for visitor materials, and minimalistic decor. The room must maintain clean lines, warm lighting, and uncluttered space while feeling inviting and functional.; The scene requires a 6.0m x 8.0m museum_hall designed in Scandinavian modern bright style.",
1279
+ "policy_analysis": {
1280
+ "scene_requirements": "The scene requires a 6.0m x 8.0m museum_hall designed in Scandinavian modern bright style. Furniture surfaces should be decorated with 22 functional and decorative objects: Central wooden exhibit case placed on floor||floor; 2 Wall\u2011mounted display cases placed on wall||wall; 2 Light\u2011wood armchairs placed on floor||floor; 2 Simple wooden benchs placed on floor||floor; Small side table placed on floor||floor; Front reception desk placed on floor||floor; Low storage cabinet placed on floor||floor; Minimal coat rack placed on floor||floor; Interactive info kiosk placed on floor||floor; 2 Directional sign boards placed on wall||wall; Brochure holder placed on sidetable||sidetable; 2 Warm floor lamps placed on floor||floor; 2 Potted indoor plants placed on sidetable||sidetable; 3 Large wall paintings placed on wall||wall; 2 Floating wall shelfs placed on wall||wall; 4 Small display plinths placed on exhibitcase||exhibitcase; 2 Discrete security cameras placed on wall||wall; Mounted fire extinguisher placed on wall||wall; 3 Acoustic wall panels placed on wall||wall; 4 Soft seat cushions placed on armchair||armchair; 2 Cozy fabric throws placed on bench||bench; Minimal wall clock placed on wall||wall. Each furniture surface such as tables, desks, shelves, and cabinets should have at least 2 or more decorative or functional objects placed on top to create a lived-in, realistic environment. Important constraints: Do not add rugs, mats, carpets, curtains, blankets, ceiling-hanging objects, or ceiling objects to the scene as these are either already installed or restricted. The complete scene must contain a minimum of 22 objects total following the placement proposals described above to achieve a complete, diverse, and realistic room environment.Must ensure that: i. The layout (position, rotation, and size) is believable, and common daily objects make the room feel lived-in. Rich of daily furniture and objects.ii. Contains the necessary furniture and setup for the specified function.iii. Each objects is in **reasonable size**, neatly placed, objects of the same category are well aglined, relationships are reasonable (e.g., chairs face desks), sufficient space exists for walking, and **orientations must** be correct. iv. All necessary large and small items are present. Has rich details. Each shelf is full of objects (>5) inside. Each supporter (e.g. table, desk, and shelf) has small objects on it. The room feels done.Must avoid that: i. Unusual objects or strange placements make the room unrealistic.ii. Missing key objects or contains mismatched furniture (e.g., no bed in a bedroom).iii. Floating objects, crowded floor, **abnormal size**, objects with collision, incorrect **orientation**, or large items placed oddly (e.g., sofa not against the wall). Large empty space. Blocker in front of furniture.iv. Room is sparse or empty, lacks decor or key elements."
1281
+ }
1282
+ }
SAGE10k/sage10k/scenes/20251213_070419_layout_889a0ed0/layout_889a0ed0.json ADDED
The diff for this file is too large to render. See raw diff
 
SAGE10k/sage10k/scenes/20251213_071547_layout_90a11d2d/layout_90a11d2d.json ADDED
The diff for this file is too large to render. See raw diff