-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added input file reading and support for meshes.
- Scenes can now be read from XML files, three examples are included. - Geometry objects (shapes) can be specified from OBJ files. Parsing materials from OBJ is not currently supported. - PugiXML added as additional, external dependency. Tiny OBJ Loader is included directly, as source code. - Lambertien material fixed.
- Loading branch information
Philip Abernethy
committed
Sep 20, 2015
1 parent
4d37a3f
commit 12e2cac
Showing
46 changed files
with
1,771 additions
and
128 deletions.
There are no files selected for viewing
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,42 @@ | ||
<?xml version="1.0" standalone="no" ?> | ||
<!DOCTYPE scene SYSTEM "scene.dtd"> | ||
|
||
<scene output_file="example1.png"> | ||
<background_color r="0.0" g="0.0" b="0.0"/> | ||
<camera type="perspective"> | ||
<position x="0.0" y="0.0" z="1.0"/> | ||
<lookat x="0.0" y="0.0" z="-2.5"/> | ||
<up x="0.0" y="1.0" z="0.0"/> | ||
<horizontal_fov angle="45"/> | ||
<resolution horizontal="512" vertical="512"/> | ||
<max_bounces n="8"/> | ||
</camera> | ||
<lights> | ||
<ambient_light> | ||
<color r="1.0" g="1.0" b="1.0"/> | ||
</ambient_light> | ||
</lights> | ||
<surfaces> | ||
<sphere radius="1.0"> | ||
<position x="-2.1" y="0.0" z="-3.0"/> | ||
<material type="phong"> | ||
<color r="0.17" g="0.18" b="0.50"/> | ||
<phong ka="0.3" kd="0.9" ks="1.0" exponent="200"/> | ||
</material> | ||
</sphere> | ||
<sphere radius="1.0"> | ||
<position x="0.0" y="0.0" z="-3.0"/> | ||
<material type="phong"> | ||
<color r="0.5" g="0.17" b="0.18"/> | ||
<phong ka="0.3" kd="0.9" ks="1.0" exponent="200"/> | ||
</material> | ||
</sphere> | ||
<sphere radius="1.0"> | ||
<position x="2.1" y="0.0" z="-3.0"/> | ||
<material type="phong"> | ||
<color r="0.18" g="0.50" b="0.17"/> | ||
<phong ka="0.3" kd="0.9" ks="1.0" exponent="200"/> | ||
</material> | ||
</sphere> | ||
</surfaces> | ||
</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,46 @@ | ||
<?xml version="1.0" standalone="no" ?> | ||
<!DOCTYPE scene SYSTEM "scene.dtd"> | ||
|
||
<scene output_file="example2.png"> | ||
<background_color r="0.0" g="0.0" b="0.0"/> | ||
<camera type="perspective"> | ||
<position x="0.0" y="0.0" z="1.0"/> | ||
<lookat x="0.0" y="0.0" z="-2.5"/> | ||
<up x="0.0" y="1.0" z="0.0"/> | ||
<horizontal_fov angle="45"/> | ||
<resolution horizontal="512" vertical="512"/> | ||
<max_bounces n="8"/> | ||
</camera> | ||
<lights> | ||
<ambient_light> | ||
<color r="1.0" g="1.0" b="1.0"/> | ||
</ambient_light> | ||
<parallel_light> | ||
<color r="1.0" g="1.0" b="1.0"/> | ||
<direction x="0.0" y="-3.0" z="-1.0"/> | ||
</parallel_light> | ||
</lights> | ||
<surfaces> | ||
<sphere radius="1.0"> | ||
<position x="-2.1" y="0.0" z="-3.0"/> | ||
<material type="phong"> | ||
<color r="0.17" g="0.18" b="0.50"/> | ||
<phong ka="0.3" kd="0.9" ks="1.0" exponent="200"/> | ||
</material> | ||
</sphere> | ||
<sphere radius="1.0"> | ||
<position x="0.0" y="0.0" z="-3.0"/> | ||
<material type="phong"> | ||
<color r="0.5" g="0.17" b="0.18"/> | ||
<phong ka="0.3" kd="0.9" ks="1.0" exponent="200"/> | ||
</material> | ||
</sphere> | ||
<sphere radius="1.0"> | ||
<position x="2.1" y="0.0" z="-3.0"/> | ||
<material type="phong"> | ||
<color r="0.18" g="0.50" b="0.17"/> | ||
<phong ka="0.3" kd="0.9" ks="1.0" exponent="200"/> | ||
</material> | ||
</sphere> | ||
</surfaces> | ||
</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,52 @@ | ||
<?xml version="1.0" standalone="no" ?> | ||
<!DOCTYPE scene SYSTEM "scene.dtd"> | ||
|
||
<scene output_file="example3.png"> | ||
<background_color r="0.0" g="0.0" b="0.0"/> | ||
<camera type="perspective"> | ||
<position x="0.0" y="0.0" z="1.0"/> | ||
<lookat x="0.0" y="0.0" z="-2.5"/> | ||
<up x="0.0" y="1.0" z="0.0"/> | ||
<horizontal_fov angle="45"/> | ||
<resolution horizontal="512" vertical="512"/> | ||
<max_bounces n="8"/> | ||
</camera> | ||
<lights> | ||
<ambient_light> | ||
<color r="1.0" g="1.0" b="1.0"/> | ||
</ambient_light> | ||
<parallel_light> | ||
<color r="1.0" g="1.0" b="1.0"/> | ||
<direction x="0.0" y="-3.0" z="-1.0"/> | ||
</parallel_light> | ||
</lights> | ||
<surfaces> | ||
<sphere radius="1.0"> | ||
<position x="-2.1" y="0.0" z="-3.0"/> | ||
<material type="phong"> | ||
<color r="0.17" g="0.18" b="0.50"/> | ||
<phong ka="0.3" kd="0.9" ks="1.0" exponent="200"/> | ||
</material> | ||
</sphere> | ||
<sphere radius="1.0"> | ||
<position x="0.0" y="0.0" z="-3.0"/> | ||
<material type="lambertian"> | ||
<color r="0.5" g="0.17" b="0.18"/> | ||
<lambertian ka="0.3" kd="0.9"/> <!--ks="1.0" exponent="200"/>--> | ||
</material> | ||
</sphere> | ||
<sphere radius="1.0"> | ||
<position x="2.1" y="0.0" z="-3.0"/> | ||
<material type="phong"> | ||
<color r="0.18" g="0.50" b="0.17"/> | ||
<phong ka="0.3" kd="0.9" ks="1.0" exponent="200"/> | ||
</material> | ||
</sphere> | ||
<mesh name="open_room.obj"> | ||
<material type="phong"> | ||
<color r="0.5" g="0.5" b="0.5"/> | ||
<phong ka="0.3" kd="0.9" ks="1.0" exponent="20"/> | ||
</material> | ||
</mesh> | ||
</surfaces> | ||
</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
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
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
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.