Skip to content

Commit 96fa61f

Browse files
committed
-Dev: Sponza scene added and touchs in scene loader
1 parent 0b25d2b commit 96fa61f

File tree

10 files changed

+449
-23
lines changed

10 files changed

+449
-23
lines changed

examples/resources/scenes/scene.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@
5353
<area value="0.5" />
5454
</Shadow>
5555
</Light>
56+
<Light type="point" name="Light">
57+
<Transform>
58+
<translate x="5.0" y="5.0" z="5.0" />
59+
</Transform>
60+
61+
<intensity value="2.0" />
62+
<color r="1" g="1" b="1" />
63+
<influence value="30.0" />
64+
65+
<Shadow type="rt">
66+
<samples value="4" />
67+
<area value="0.5" />
68+
</Shadow>
69+
</Light>
5670
<!-- ENVIROMENT -->
5771
<Enviroment type="skybox">
5872
<Filename value="textures/cloudy.hdr" />
Lines changed: 371 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,371 @@
1+
<!-- VULKAN ENGINE SPONZA SCENE EXPECIFICATION -->
2+
<Scene>
3+
4+
<!-- assets are in gitignore doe to heavy files. If needed they can be download from here: -->
5+
<Resources path="C:/Dev/Vulkan-Engine/examples/sponza/assets/" />
6+
7+
<!-- CAMERA -->
8+
<Camera type="perspective" fov="70" near="0.1" far="50">
9+
<Transform>
10+
<translate x="0.0" y="0.0" z="-13.0" />
11+
</Transform>
12+
</Camera>
13+
14+
<!-- MESHES -->
15+
<Mesh type="file" name="Sponza">
16+
17+
<Filename value="meshes/walls.obj" />
18+
19+
<Transform>
20+
<translate x="0.0" y="-2.0" z="0.0" />
21+
</Transform>
22+
23+
<Material type="physical">
24+
<albedo r="0.5" g="0.5" b="0.5" />
25+
<Textures>
26+
<albedo path="textures/Walls/Bricks_Diffuse.png" />
27+
<normals path="textures/Walls/Bricks_Normal.png" />
28+
<!-- <mask path="textures/Walls/Bricks_MaskMap.png" type="UnityHDRP" /> -->
29+
</Textures>
30+
</Material>
31+
32+
<Children>
33+
<Mesh type="file" name="Arcs">
34+
<Filename value="meshes/arcs.obj" />
35+
<Material type="physical">
36+
<albedo r="0.5" g="0.5" b="0.5" />
37+
<Textures>
38+
<albedo path="textures/Arches/Arches_Diffuse.png" />
39+
<normals path="textures/Arches/Arches_Normal.png" />
40+
<!-- <mask path="textures/Arches/Arches_MaskMap.png" type="UnityHDRP" /> -->
41+
</Textures>
42+
</Material>
43+
</Mesh>
44+
<Mesh type="file" name="Domes">
45+
<Filename value="meshes/boves.obj" />
46+
<Material type="physical">
47+
<albedo r="0.5" g="0.5" b="0.5" />
48+
<Textures>
49+
<albedo path="textures/Vaults/Ceiling_Diffuse.png" />
50+
<normals path="textures/Vaults/Ceiling_Normal.png" />
51+
<!-- <mask path="textures/Vaults/Ceiling_MaskMap.png" type="UnityHDRP" /> -->
52+
</Textures>
53+
</Material>
54+
</Mesh>
55+
<Mesh type="file" name="Columns 2">
56+
<Filename value="meshes/columns2.obj" />
57+
<Material type="physical">
58+
<albedo r="0.5" g="0.5" b="0.5" />
59+
<Textures>
60+
<albedo path="textures/Columns/Column_C_Diffuse.png" />
61+
<normals path="textures/Columns/Column_C_Normal.png" />
62+
<!-- <mask path="textures/Columns/Column_C_MaskMap.png" type="UnityHDRP" /> -->
63+
</Textures>
64+
</Material>
65+
</Mesh>
66+
<Mesh type="file" name="Columns Bottom">
67+
<Filename value="meshes/columnsBottom.obj" />
68+
<Material type="physical">
69+
<albedo r="0.5" g="0.5" b="0.5" />
70+
<Textures>
71+
<albedo path="textures/Columns/Column_A_Diffuse.png" />
72+
<normals path="textures/Columns/Column_A_Normal.png" />
73+
<!-- <mask path="textures/Columns/Column_A_MaskMap.png" type="UnityHDRP" /> -->
74+
</Textures>
75+
</Material>
76+
</Mesh>
77+
<Mesh type="file" name="Columns Top">
78+
<Filename value="meshes/columnsTop.obj" />
79+
<Material type="physical">
80+
<albedo r="0.5" g="0.5" b="0.5" />
81+
<Textures>
82+
<albedo path="textures/Columns/Column_B_Diffuse.png" />
83+
<normals path="textures/Columns/Column_B_Normal.png" />
84+
<!-- <mask path="textures/Columns/Column_B_MaskMap.png" type="UnityHDRP" /> -->
85+
</Textures>
86+
</Material>
87+
</Mesh>
88+
<Mesh type="file" name="Doors">
89+
<Filename value="meshes/doors.obj" />
90+
<Material type="physical">
91+
<albedo r="0.5" g="0.5" b="0.5" />
92+
<Textures>
93+
<albedo path="textures/Doors/Details_Diffuse.png" />
94+
<normals path="textures/Doors/Details_Normal.png" />
95+
<!-- <mask path="textures/Doors/Details_MaskMap.png" type="UnityHDRP" /> -->
96+
</Textures>
97+
</Material>
98+
</Mesh>
99+
<Mesh type="file" name="Floor">
100+
<Filename value="meshes/floor.obj" />
101+
<Material type="physical">
102+
<albedo r="0.5" g="0.5" b="0.5" />
103+
<Textures>
104+
<albedo path="textures/Floor/Floor_Diffuse.png" />
105+
<normals path="textures/Floor/Floor_Normal.png" />
106+
<!-- <mask path="textures/Floor/Floor_MaskMap.png" type="UnityHDRP" /> -->
107+
</Textures>
108+
</Material>
109+
</Mesh>
110+
<Mesh type="file" name="Fountains">
111+
<Filename value="meshes/fountains.obj" />
112+
<Material type="physical">
113+
<albedo r="0.5" g="0.5" b="0.5" />
114+
<Textures>
115+
<albedo path="textures/Vase/Vase_Octagonal_Diffuse.png" />
116+
<normals path="textures/Vase/Vase_Octagonal_Normal.png" />
117+
<!-- <mask path="textures/Vase/Vase_Octagonal_MaskMap.png" type="UnityHDRP"
118+
/> -->
119+
</Textures>
120+
</Material>
121+
</Mesh>
122+
<Mesh type="file" name="Lion">
123+
<Filename value="meshes/lion.obj" />
124+
<Material type="physical">
125+
<albedo r="0.5" g="0.5" b="0.5" />
126+
<Textures>
127+
<albedo path="textures/Lion/Lion_Head_Diffuse.png" />
128+
<normals path="textures/Lion/Lion_Head_Normal.png" />
129+
<!-- <mask path="textures/Lion/Lion_Head_MaskMap.png" type="UnityHDRP"/> -->
130+
</Textures>
131+
</Material>
132+
</Mesh>
133+
<Mesh type="file" name="Lion Base">
134+
<Filename value="meshes/lionBase.obj" />
135+
<Material type="physical">
136+
<albedo r="0.5" g="0.5" b="0.5" />
137+
<Textures>
138+
<albedo path="textures/Lion/Lion_Shield_Diffuse.png" />
139+
<normals path="textures/Lion/Lion_Shield_Normal.png" />
140+
<!-- <mask path="textures/Lion/Lion_Shield_MaskMap.png" type="UnityHDRP"/> -->
141+
</Textures>
142+
</Material>
143+
</Mesh>
144+
<Mesh type="file" name="Pols">
145+
<Filename value="meshes/pols.obj" />
146+
<Material type="physical">
147+
<albedo r="0.5" g="0.5" b="0.5" />
148+
<roughness value="0.4" />
149+
<metalness value="0.7" />
150+
<Textures>
151+
<albedo path="textures/Poles/FlagPoles_Diffuse.png" />
152+
<normals path="textures/Poles/FlagPoles_Normal.png" />
153+
<!-- <mask path="textures/Poles/FlagPoles_MaskMap.png" type="UnityHDRP" /> -->
154+
</Textures>
155+
</Material>
156+
</Mesh>
157+
<Mesh type="file" name="Roof">
158+
<Filename value="meshes/roof.obj" />
159+
<Material type="physical">
160+
<Textures>
161+
<albedo path="textures/Roof/Roof_Diffuse.png" />
162+
<normals path="textures/Roof/Roof_Normal.png" />
163+
<!-- <mask path="textures/Floor/Floor_Mask.png" type="UnityHDRP" /> -->
164+
</Textures>
165+
<albedo r="0.5" g="0.5" b="0.5" />
166+
</Material>
167+
</Mesh>
168+
<Mesh type="file" name="Round Vases">
169+
<Filename value="meshes/smallFountains.obj" />
170+
<Material type="physical">
171+
<Textures>
172+
<albedo path="textures/Vase/Vase_Round_Diffuse.png" />
173+
<normals path="textures/Vase/Vase_Round_Normal.png" />
174+
<!-- <mask path="textures/Floor/Floor_Mask.png" type="UnityHDRP" /> -->
175+
</Textures>
176+
<albedo r="0.5" g="0.5" b="0.5" />
177+
</Material>
178+
</Mesh>
179+
<!-- <Mesh type="file" name="Leaves" alphaTest="true">
180+
<Filename value="meshes/leaves.obj" />
181+
<Material type="physical">
182+
<Textures>
183+
<albedo path="textures/Leaves/Ivy_Diffuses.png" />
184+
<normals path="textures/Leaves/Ivy_Diffuse_Normal.png" />
185+
</Textures>
186+
<albedo r="0.5" g="0.5" b="0.5" />
187+
</Material>
188+
</Mesh> -->
189+
<Mesh type="file" name="Vase Leaves" alphaTest="true">
190+
<Filename value="meshes/leaves2.obj" />
191+
<Material type="physical">
192+
<Textures>
193+
<albedo path="textures/Leaves/Vase_Round_Plants_Diffuse.png" />
194+
<normals path="textures/Leaves/Vase_Round_Plants_Normal.png" />
195+
<!-- <mask path="textures/Floor/Floor_Mask.png" type="UnityHDRP" /> -->
196+
</Textures>
197+
<albedo r="0.5" g="0.5" b="0.5" />
198+
</Material>
199+
</Mesh>
200+
<Mesh type="file" name="Lamp">
201+
<Filename value="meshes/lamps.obj" />
202+
<Material type="physical">
203+
<roughness value="0.3" />
204+
<metalness value="0.9" />
205+
<Textures>
206+
<albedo path="textures/Lamps/Vase_Hanging_Diffuse.png" />
207+
<normals path="textures/Lamps/Vase_Hanging_Normal.png" />
208+
<!-- <mask path="textures/Floor/Floor_Mask.png" type="UnityHDRP" /> -->
209+
</Textures>
210+
<albedo r="0.5" g="0.5" b="0.5" />
211+
</Material>
212+
</Mesh>
213+
<Mesh type="file" name="Lamp Hang" alphaTest="true">
214+
<Filename value="meshes/lampsHold.obj" />
215+
<Material type="physical">
216+
<roughness value="0.3" />
217+
<metalness value="0.9" />
218+
<Textures>
219+
<albedo path="textures/Lamps/Vase_Hanging_Chain_Diffuse.png" />
220+
<normals path="textures/Lamps/Vase_Hanging_Chain_Normal.png" />
221+
<!-- <mask path="textures/Floor/Floor_Mask.png" type="UnityHDRP" /> -->
222+
</Textures>
223+
<albedo r="0.5" g="0.5" b="0.5" />
224+
</Material>
225+
</Mesh>
226+
<Mesh type="file" name="Knight">
227+
<Filename value="meshes/knight.obj" />
228+
<Transform>
229+
<translate x="0.0" y="0.0" z="-5.0" />
230+
<scale x="1.2" y="1.2" z="1.2" />
231+
<rotate x="0.0" y="-225.0" z="0.0" />
232+
</Transform>
233+
<Material type="physical">
234+
<roughness value="0.4"></roughness>
235+
236+
<Textures>
237+
<albedo path="textures/Knight/Armor_Mat_albedo.jpeg" />
238+
<normals path="textures/Knight/Armor_Mat_Normal.png" />
239+
<metalness path="textures/Knight/Armor_Mat_metallic.png" />
240+
</Textures>
241+
<albedo r="0.5" g="0.5" b="0.5" />
242+
</Material>
243+
</Mesh>
244+
<Mesh type="file" name="Statue">
245+
<Filename value="meshes/apollon_daphne.obj" />
246+
<Transform>
247+
<translate x="8.5" y="0.0" z="5.5" />
248+
<scale x="2" y="2" z="2" />
249+
<rotate x="0.0" y="-90.0" z="0.0" />
250+
</Transform>
251+
<Material type="physical">
252+
253+
<Textures>
254+
<albedo path="textures/Apollo/apollo_diffuse.jpg" />
255+
<normals path="textures/Apollo/apollo_normal.jpg" />
256+
<roughness path="textures/Apollo/apollo_roughness.jpg" />
257+
</Textures>
258+
<albedo r="0.5" g="0.5" b="0.5" />
259+
</Material>
260+
</Mesh>
261+
262+
</Children>
263+
</Mesh>
264+
265+
266+
<!-- IF DAY -->
267+
<!-- <Light type="directional" name="Sun">
268+
<Transform>
269+
<translate x="0.0" y="50.0" z="0.0" />
270+
</Transform>
271+
272+
<intensity value="15.0" />
273+
<color r="1.0" g="0.9" b="0.8" />
274+
<direction x="2.0" y="20.0" z="5.0" />
275+
276+
<Shadow type="rt">
277+
<samples value="2" />
278+
<area value="0.1" />
279+
</Shadow>
280+
</Light>
281+
282+
<Enviroment type="skybox">
283+
<Filename value="textures/cloudy.hdr" />
284+
<intensity value="0.5" />
285+
</Enviroment> -->
286+
287+
288+
<!-- IF NIGHT -->
289+
<Light type="directional" name="Moon">
290+
<Transform>
291+
<translate x="0.0" y="50.0" z="0.0" />
292+
</Transform>
293+
294+
<intensity value="0.45" />
295+
<color r="0.14" g="0.37" b="0.58" />
296+
<direction x="2.0" y="20.0" z="5.0" />
297+
298+
<Shadow type="rt">
299+
<samples value="2" />
300+
<area value="0.1" />
301+
</Shadow>
302+
</Light>
303+
<Light type="point" name="Light">
304+
<Transform>
305+
<translate x="-2.8" y="0.5" z="-8.6" />
306+
</Transform>
307+
308+
<intensity value="0.3" />
309+
<color r="0.75" g="0.45" b="0.15" />
310+
311+
<influence value="25"></influence>
312+
<Shadow type="rt">
313+
<samples value="4" />
314+
<area value="0.050" />
315+
</Shadow>
316+
</Light>
317+
<Light type="point" name="Light">
318+
<Transform>
319+
<translate x="-2.8" y="0.5" z="8.6" />
320+
</Transform>
321+
322+
<intensity value="0.3" />
323+
<color r="0.75" g="0.45" b="0.15" />
324+
<influence value="25"></influence>
325+
326+
<Shadow type="rt">
327+
<samples value="4" />
328+
<area value="0.050" />
329+
</Shadow>
330+
</Light>
331+
<Light type="point" name="Light">
332+
<Transform>
333+
<translate x="2.8" y="0.5" z="-8.6" />
334+
</Transform>
335+
336+
<intensity value="0.3" />
337+
<color r="0.75" g="0.45" b="0.15" />
338+
<influence value="25"></influence>
339+
340+
<Shadow type="rt">
341+
<samples value="4" />
342+
<area value="0.050" />
343+
</Shadow>
344+
</Light>
345+
<Light type="point" name="Light">
346+
<Transform>
347+
<translate x="2.8" y="0.5" z="8.6" />
348+
</Transform>
349+
350+
<intensity value="0.3" />
351+
<color r="0.75" g="0.45" b="0.15" />
352+
<influence value="25"></influence>
353+
354+
<Shadow type="rt">
355+
<samples value="4" />
356+
<area value="0.050" />
357+
</Shadow>
358+
</Light>
359+
<Enviroment type="skybox">
360+
<Filename value="textures/moon.hdr" />
361+
<intensity value="0.3" />
362+
<color r="0.14" g="0.37" b="0.58" />
363+
</Enviroment>
364+
365+
366+
<!-- FOG -->
367+
<Fog intensity="30.0">
368+
<color r="1" g="1" b="1" />
369+
</Fog>
370+
371+
</Scene>

0 commit comments

Comments
 (0)