Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed numerical problem with photon radiance calculation.
- Loading branch information
Showing
13 changed files
with
330 additions
and
32 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
<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="0.6" g="0.9" b="1.0" /> | ||
</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="colored_glass" reflectance="1" specular_reflectance="1" transmissivity="1" refraction_index="1.6" diffuse_roughness="0"> | ||
<color_diffuse r="0.5" g="1" b="0.7" /> | ||
<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="diffuse_gray" reflectance="0.8" specular_reflectance="0" transmissivity="0" refraction_index="1" diffuse_roughness="0"> | ||
<color_diffuse r="0.5" g="0.5" b="0.5" /> | ||
<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_cyan" file_path="../data/meshes/dragon.obj"> | ||
<transform type="scale"> | ||
<v x="1.2" y="1.2" z="1.2"/> | ||
</transform> | ||
<transform type="rotate" angle="-2.7"> | ||
<v x="0" y="1" z="0"/> | ||
</transform> | ||
<transform type="translate"> | ||
<v x="0" y="-1" z="0.5"/> | ||
</transform> | ||
</object3D> | ||
<object3D type="sphere" material_id="glass" radius="0.1"> | ||
<position x="0.4" y="0.6" z="0.9" /> | ||
</object3D> | ||
<object3D type="sphere" material_id="glass" radius="0.1"> | ||
<position x="-1.0" y="-0.6" z="1.3" /> | ||
</object3D> | ||
<object3D type="sphere" material_id="glass" radius="0.2"> | ||
<position x="0.9" y="0.2" z="0.9" /> | ||
</object3D> | ||
<object3D type="sphere" material_id="mirror" radius="0.3"> | ||
<position x="0.9" y="-0.7" z="1.1" /> | ||
</object3D> | ||
<object3D type="sphere" material_id="mirror" radius="0.2"> | ||
<position x="-1.0" y="0.7" z="1.1" /> | ||
</object3D> | ||
</scene> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
<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/suzanne.obj"> | ||
<transform type="scale"> | ||
<v x="0.8" y="0.8" z="0.8"/> | ||
</transform> | ||
<transform type="orientation"> | ||
<normal x="-0.4" y="0.8" z="-0.3"/> | ||
<up x="0" y="1" z="0"/> | ||
</transform> | ||
<transform type="translate"> | ||
<v x="0.0" y="-0.4" z="0.3"/> | ||
</transform> | ||
</object3D> | ||
</scene> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.