/
cornell_boxes.xml
98 lines (95 loc) · 3.63 KB
/
cornell_boxes.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<scene>
<!-- Define all materials used in the scene -->
<material id="mirror" reflectance="1" specular_reflectance="1" transmissivity="0" refraction_index="1" diffuse_roughness="0">
<color_diffuse r="0.2" g="0.2" b="0.8" />
<color_specular r="1" g="0.95" b="0.9" />
</material>
<material id="glass" reflectance="1" specular_reflectance="1" transmissivity="1" refraction_index="1.6" diffuse_roughness="0">
<color_diffuse r="1" g="1" b="1" />
<color_specular r="1" g="1" b="1" />
</material>
<material id="diffuse_red" reflectance="0.8" specular_reflectance="0" transmissivity="0" refraction_index="1" diffuse_roughness="0">
<color_diffuse r="1" g="0.2" b="0.2" />
<color_specular r="1" g="1" b="1" />
</material>
<material id="diffuse_green" reflectance="0.8" specular_reflectance="0" transmissivity="0" refraction_index="1" diffuse_roughness="0">
<color_diffuse r="0.2" g="1" b="0.2" />
<color_specular r="1" g="1" b="1" />
</material>
<material id="diffuse_blue" reflectance="0.8" specular_reflectance="0" transmissivity="0" refraction_index="1" diffuse_roughness="0">
<color_diffuse r="0.6" g="0.6" b="1" />
<color_specular r="1" g="1" b="1" />
</material>
<material id="diffuse_cyan" reflectance="0.8" specular_reflectance="0" transmissivity="0" refraction_index="1" diffuse_roughness="0">
<color_diffuse r="0.5" g="0.8" b="0.8" />
<color_specular r="1" g="1" b="1" />
</material>
<material id="diffuse_white" reflectance="0.8" specular_reflectance="0" transmissivity="0" refraction_index="1" diffuse_roughness="0">
<color_diffuse r="1" g="1" b="1" />
<color_specular r="1" g="1" b="1" />
</material>
<material id="bunny_material" reflectance="0.8" specular_reflectance="0" transmissivity="0" refraction_index="1" diffuse_roughness="0">
<color_diffuse r="1" g="1" b="1" />
<color_specular r="1" g="1" b="1" />
</material>
<!-- Back wall -->
<object3D type="plane" material_id="diffuse_white">
<P0 x="-1.5" y="-1" z="-1" />
<P1 x="1.5" y="-1" z="-1" />
<P2 x="-1.5" y="1" z="-1" />
</object3D>
<!-- Left wall -->
<object3D type="plane" material_id="diffuse_red">
<P0 x="-1.5" y="-1" z="-1" />
<P1 x="-1.5" y="1" z="-1" />
<P2 x="-1.5" y="-1" z="4" />
</object3D>
<!-- Right wall -->
<object3D type="plane" material_id="diffuse_green">
<P0 x="1.5" y="-1" z="-1" />
<P1 x="1.5" y="-1" z="4" />
<P2 x="1.5" y="1" z="-1" />
</object3D>
<!-- Roof -->
<object3D type="plane" material_id="diffuse_white">
<P0 x="-1.5" y="1" z="-1" />
<P1 x="1.5" y="1" z="-1" />
<P2 x="-1.5" y="1" z="4" />
</object3D>
<!-- Floor -->
<object3D type="plane" material_id="diffuse_white">
<P0 x="-1.5" y="-1" z="-1" />
<P1 x="-1.5" y="-1" z="4" />
<P2 x="1.5" y="-1" z="-1" />
</object3D>
<!-- Light source -->
<light_source type="lamp_plane" flux="8">
<P0 x="-0.3" y="0.9999" z="1.2" />
<P1 x="0.3" y="0.9999" z="1.2" />
<P2 x="-0.3" y="0.9999" z="1.8" />
<color r="1" g="1" b="1" />
</light_source>
<!-- Objects in scene -->
<object3D type="mesh" material_id="diffuse_white" file_path="../data/meshes/cube.obj">
<transform type="scale">
<v x="0.4" y="0.4" z="0.4"/>
</transform>
<transform type="rotate" angle="-2.7">
<v x="0.2" y="1" z="0"/>
</transform>
<transform type="translate">
<v x="-0.5" y="-0.25" z="0.4"/>
</transform>
</object3D>
<object3D type="mesh" material_id="diffuse_white" file_path="../data/meshes/cube.obj">
<transform type="scale">
<v x="0.3" y="0.3" z="0.3"/>
</transform>
<transform type="rotate" angle="-2.7">
<v x="0" y="1" z="0.5"/>
</transform>
<transform type="translate">
<v x="0.65" y="-0.1" z="0.3"/>
</transform>
</object3D>
</scene>