Skip to content

Commit 6fc17cd

Browse files
committed
Add scene save/load, remove sequencer, bug fixes
1 parent 965e6ec commit 6fc17cd

21 files changed

Lines changed: 2525 additions & 959 deletions

File tree

assets/scenes/caustics.json

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
{
2+
"format": "vkrt.scene",
3+
"version": 1,
4+
"meshImports": ["../models/plane.glb", "../models/sphere.glb", "../models/suzanne.glb"],
5+
"textureImports": [],
6+
"materials": [{
7+
"index": 1,
8+
"name": "floor",
9+
"material": {
10+
"baseColor": [1, 0.37000000476837158, 0],
11+
"roughness": 1,
12+
"diffuseRoughness": 1
13+
}
14+
}, {
15+
"index": 2,
16+
"name": "light",
17+
"material": {
18+
"baseColor": [0, 0, 0],
19+
"roughness": 1,
20+
"emissionLuminance": 8000,
21+
"diffuseRoughness": 1
22+
}
23+
}, {
24+
"index": 3,
25+
"name": "suzanne",
26+
"material": {
27+
"baseColor": [1, 1, 1],
28+
"roughness": 0,
29+
"transmission": 1
30+
}
31+
}],
32+
"meshes": [{
33+
"name": "floor",
34+
"materialIndex": 1,
35+
"hasMaterialAssignment": true,
36+
"renderBackfaces": false,
37+
"opacity": 1,
38+
"importIndex": 0,
39+
"importLocalIndex": 0
40+
}, {
41+
"name": "light",
42+
"materialIndex": 2,
43+
"hasMaterialAssignment": true,
44+
"renderBackfaces": false,
45+
"opacity": 1,
46+
"importIndex": 1,
47+
"importLocalIndex": 0
48+
}, {
49+
"name": "suzanne",
50+
"materialIndex": 3,
51+
"hasMaterialAssignment": true,
52+
"renderBackfaces": false,
53+
"opacity": 1,
54+
"importIndex": 2,
55+
"importLocalIndex": 0
56+
}],
57+
"sceneObjects": [{
58+
"name": "floor",
59+
"parentIndex": null,
60+
"meshIndex": 0,
61+
"localPosition": [0, 0, 0],
62+
"localRotation": [0, 0, 0],
63+
"localScale": [1000, 1000, 1]
64+
}, {
65+
"name": "light",
66+
"parentIndex": null,
67+
"meshIndex": 1,
68+
"localPosition": [4.04099988937378, -0.88300001621246338, 2.1210000514984131],
69+
"localRotation": [0, 0, 0],
70+
"localScale": [0.10000000149011612, 0.10000000149011612, 0.10000000149011612]
71+
}, {
72+
"name": "suzanne",
73+
"parentIndex": null,
74+
"meshIndex": 2,
75+
"localPosition": [0.18600000441074371, 0.00999999977648258, 0.5],
76+
"localRotation": [-36.299999237060547, 0, 125.30000305175781],
77+
"localScale": [1, 1, 1]
78+
}],
79+
"sceneSettings": {
80+
"camera": {
81+
"position": [0.79292559623718262, 6.79802942276001, 3.060741662979126],
82+
"target": [-0.18434619903564453, -0.20318904519081116, 0.41767531633377075],
83+
"up": [0, 0, 1],
84+
"vfov": 26.899999618530273
85+
},
86+
"samplesPerPixel": 1,
87+
"rrMinDepth": 4,
88+
"rrMaxDepth": 8,
89+
"toneMappingMode": 1,
90+
"exposure": 1,
91+
"autoExposureEnabled": false,
92+
"autoSPPEnabled": true,
93+
"environmentColor": [0, 0, 0],
94+
"environmentStrength": 0,
95+
"debugMode": 0,
96+
"misNeeEnabled": true,
97+
"selectedMeshIndex": 2
98+
}
99+
}

assets/scenes/cornell.json

Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
{
2+
"format": "vkrt.scene",
3+
"version": 1,
4+
"meshImports": ["../models/plane.glb", "../models/plane.glb", "../models/plane.glb", "../models/plane.glb", "../models/plane.glb", "../models/sphere.glb", "../models/dragon.glb", "../models/sphere.glb"],
5+
"textureImports": [],
6+
"materials": [{
7+
"index": 1,
8+
"name": "cornell_floor",
9+
"material": {
10+
"roughness": 1
11+
}
12+
}, {
13+
"index": 2,
14+
"name": "cornell_ceiling",
15+
"material": {
16+
"roughness": 1
17+
}
18+
}, {
19+
"index": 3,
20+
"name": "cornell_back_wall",
21+
"material": {
22+
"roughness": 1
23+
}
24+
}, {
25+
"index": 4,
26+
"name": "cornell_left_wall",
27+
"material": {
28+
"baseColor": [0.800000011920929, 0.14000000059604645, 0.119999997317791],
29+
"roughness": 1
30+
}
31+
}, {
32+
"index": 5,
33+
"name": "cornell_right_wall",
34+
"material": {
35+
"baseColor": [0.12999999523162842, 0.699999988079071, 0.15999999642372131],
36+
"roughness": 1
37+
}
38+
}, {
39+
"index": 6,
40+
"name": "cornell_light",
41+
"material": {
42+
"roughness": 1,
43+
"emissionLuminance": 30
44+
}
45+
}, {
46+
"index": 7,
47+
"name": "dragon",
48+
"material": {
49+
"baseColor": [0.740000009536743, 0.73000001907348633, 0.72000002861022949],
50+
"roughness": 0
51+
}
52+
}, {
53+
"index": 8,
54+
"name": "sphere",
55+
"material": {
56+
"baseColor": [1, 1, 1],
57+
"roughness": 0,
58+
"metallic": 1
59+
}
60+
}],
61+
"meshes": [{
62+
"name": "cornell_floor",
63+
"materialIndex": 1,
64+
"hasMaterialAssignment": true,
65+
"renderBackfaces": false,
66+
"opacity": 1,
67+
"importIndex": 0,
68+
"importLocalIndex": 0
69+
}, {
70+
"name": "cornell_ceiling",
71+
"materialIndex": 2,
72+
"hasMaterialAssignment": true,
73+
"renderBackfaces": false,
74+
"opacity": 1,
75+
"importIndex": 1,
76+
"importLocalIndex": 0
77+
}, {
78+
"name": "cornell_back_wall",
79+
"materialIndex": 3,
80+
"hasMaterialAssignment": true,
81+
"renderBackfaces": false,
82+
"opacity": 1,
83+
"importIndex": 2,
84+
"importLocalIndex": 0
85+
}, {
86+
"name": "cornell_left_wall",
87+
"materialIndex": 4,
88+
"hasMaterialAssignment": true,
89+
"renderBackfaces": false,
90+
"opacity": 1,
91+
"importIndex": 3,
92+
"importLocalIndex": 0
93+
}, {
94+
"name": "cornell_right_wall",
95+
"materialIndex": 5,
96+
"hasMaterialAssignment": true,
97+
"renderBackfaces": false,
98+
"opacity": 1,
99+
"importIndex": 4,
100+
"importLocalIndex": 0
101+
}, {
102+
"name": "cornell_light",
103+
"materialIndex": 6,
104+
"hasMaterialAssignment": true,
105+
"renderBackfaces": false,
106+
"opacity": 1,
107+
"importIndex": 5,
108+
"importLocalIndex": 0
109+
}, {
110+
"name": "dragon",
111+
"materialIndex": 7,
112+
"hasMaterialAssignment": true,
113+
"renderBackfaces": false,
114+
"opacity": 1,
115+
"importIndex": 6,
116+
"importLocalIndex": 0
117+
}, {
118+
"name": "sphere",
119+
"materialIndex": 8,
120+
"hasMaterialAssignment": true,
121+
"renderBackfaces": false,
122+
"opacity": 1,
123+
"importIndex": 7,
124+
"importLocalIndex": 0
125+
}],
126+
"sceneObjects": [{
127+
"name": "cornell_floor",
128+
"parentIndex": null,
129+
"meshIndex": 0,
130+
"localPosition": [0, 0, -1],
131+
"localRotation": [180, -5.0089556680177338e-06, 89.999992370605469],
132+
"localScale": [1, 1, 0.99999994039535522]
133+
}, {
134+
"name": "cornell_ceiling",
135+
"parentIndex": null,
136+
"meshIndex": 1,
137+
"localPosition": [0, 0, 1],
138+
"localRotation": [0, 0, -90],
139+
"localScale": [1, 1, 0.99999994039535522]
140+
}, {
141+
"name": "cornell_back_wall",
142+
"parentIndex": null,
143+
"meshIndex": 2,
144+
"localPosition": [0, 1, 0],
145+
"localRotation": [90, 90, 0],
146+
"localScale": [0.99999994039535522, 0.99999994039535522, 1]
147+
}, {
148+
"name": "cornell_left_wall",
149+
"parentIndex": null,
150+
"meshIndex": 3,
151+
"localPosition": [-1, 0, 0],
152+
"localRotation": [-90, 0, -90],
153+
"localScale": [0.99999994039535522, 0.99999994039535522, 1]
154+
}, {
155+
"name": "cornell_right_wall",
156+
"parentIndex": null,
157+
"meshIndex": 4,
158+
"localPosition": [1, 0, 0],
159+
"localRotation": [90, 0, -90],
160+
"localScale": [0.99999994039535522, 0.99999994039535522, 1]
161+
}, {
162+
"name": "cornell_light",
163+
"parentIndex": null,
164+
"meshIndex": 5,
165+
"localPosition": [0, 0, 1],
166+
"localRotation": [0, 0, 0],
167+
"localScale": [0.20000000298023224, 0.20000000298023224, 0.05000000074505806]
168+
}, {
169+
"name": "dragon",
170+
"parentIndex": null,
171+
"meshIndex": 6,
172+
"localPosition": [-0.10000000149011612, 0.31999999284744263, -1.4500000476837158],
173+
"localRotation": [90, 0, 35.000007629394531],
174+
"localScale": [7.9999995231628418, 8, 8]
175+
}, {
176+
"name": "sphere",
177+
"parentIndex": null,
178+
"meshIndex": 7,
179+
"localPosition": [0.41999998688697815, -0.15000000596046448, -0.699999988079071],
180+
"localRotation": [0, 0, 0],
181+
"localScale": [0.300000011920929, 0.300000011920929, 0.300000011920929]
182+
}],
183+
"sceneSettings": {
184+
"camera": {
185+
"position": [0, -5.1700000762939453, 0],
186+
"target": [0, 0, 0],
187+
"up": [0, 0, 1],
188+
"vfov": 26.899999618530273
189+
},
190+
"samplesPerPixel": 1,
191+
"rrMinDepth": 4,
192+
"rrMaxDepth": 8,
193+
"toneMappingMode": 1,
194+
"exposure": 1,
195+
"autoExposureEnabled": false,
196+
"autoSPPEnabled": true,
197+
"environmentColor": [0.25, 0.25, 0.25],
198+
"environmentStrength": 1,
199+
"debugMode": 0,
200+
"misNeeEnabled": true,
201+
"selectedMeshIndex": null
202+
}
203+
}

0 commit comments

Comments
 (0)