Skip to content

Collin Boots Project 1 Updates #18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 69 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
edb0122
Updated project to run in visual studio 2012. Also fixed project conf…
cboots Sep 10, 2013
5c9f4b3
Added comment for my own clarification.
cboots Sep 10, 2013
e2110c6
Implemented cube intersect function.
cboots Sep 13, 2013
9788c00
Implemented random sphere point.
cboots Sep 13, 2013
75b89a1
Implemented random sphere points and direction and fixed some bugs in…
cboots Sep 13, 2013
2f41981
Fixed bug in uniform distribution
cboots Sep 13, 2013
39f16c5
Implemented raycastCameraKernel helper function.
cboots Sep 13, 2013
5ae66e6
Removed redundant operation in camera casting.
cboots Sep 13, 2013
48728ab
Added quick visualization to test raycasting. Appears to work just fine.
cboots Sep 13, 2013
854e9c8
Added minimum positive value macro
cboots Sep 13, 2013
abe3e90
Fixed bug with radians/degrees mix up.
cboots Sep 13, 2013
4eb0093
Fixed bug in ray-cube collision function. Collisions and normals now …
cboots Sep 14, 2013
a02b208
Added cube mesh to use as a test later.
cboots Sep 14, 2013
bcd9c99
Reconfigured functions so I could pass in materials and rendering opt…
cboots Sep 15, 2013
929ef30
Implemented a simple keyboard interface that switches between renderi…
cboots Sep 15, 2013
5db6bbb
Formating corrections
cboots Sep 15, 2013
4207c0b
Added simple color rendering with perfect color transfer.
cboots Sep 16, 2013
3a0b58e
Implemented diffuse and specular illumination.
cboots Sep 16, 2013
c1b6b73
Fixed floating point error with box wall.
cboots Sep 16, 2013
d79a061
Adjusted constants
cboots Sep 16, 2013
7bad1f8
Refactored rendering kernel to extract the ray tracing logic from the…
cboots Sep 16, 2013
a4a3cb7
Added options for rendering.
cboots Sep 16, 2013
a9c5f38
Changed to parallel anti-aliasing. Didn't improve performance much if…
cboots Sep 17, 2013
c2fe644
Revert "Changed to parallel anti-aliasing. Didn't improve performance…
cboots Sep 17, 2013
32baf25
Implemented AA again with adaptive sampling. Some indexing bug is cau…
cboots Sep 17, 2013
58056ee
Adaptive anti-aliasing works now, but the debug mode creates a really…
cboots Sep 17, 2013
10f39de
I wasn't thinking 4th dimensionally!!!
cboots Sep 17, 2013
ac06e4d
Added a bit more ambient light and improved the random number generat…
cboots Sep 18, 2013
bf0af5b
Fixed gamma divider issue.
cboots Sep 19, 2013
122c1b7
Removed gamma function altogether
cboots Sep 19, 2013
95c8cbe
Discovered problem with random point on sphere, does not appear to hi…
cboots Sep 19, 2013
0dfac0e
Implemented adaptive soft shadows. Not very good implementation but f…
cboots Sep 20, 2013
4207406
Reduced number of shadow feelers.
cboots Sep 20, 2013
22d54e7
Soft shadows now work when anti-aliasing disabled.
cboots Sep 20, 2013
ba1aae1
Fixed bug with incorrect random point on sphere.
cboots Sep 20, 2013
a149b86
Implemented frame filtering
cboots Sep 20, 2013
f9c9c23
Added ability to change number of shadow rays at runtime.
cboots Sep 20, 2013
b648e6a
Reduced number of shadow rays to improve performance. Added nice rend…
cboots Sep 20, 2013
ac9b767
Added another render with everything on.
cboots Sep 20, 2013
8f3aae4
Moved renders
cboots Sep 20, 2013
4869380
Merge branch 'master' of github.com:cboots/Project1-RayTracer
cboots Sep 20, 2013
985ed49
Moved renderings.
cboots Sep 20, 2013
091eba0
Added option to turn on global randomized shadow calculations.
cboots Sep 20, 2013
e30e81a
adaptive shadows impossible to turn off.
cboots Sep 20, 2013
1470727
Implemented reflection.
cboots Sep 20, 2013
9e187b8
Added hall of mirrors.
cboots Sep 20, 2013
7ec9156
Added a deep iteration for reflections.
cboots Sep 21, 2013
a479669
Added a refraction scene.
cboots Sep 21, 2013
466bd6c
Fixed bug with refraction. Not quite working perfectly yet but roughl…
cboots Sep 21, 2013
769fbfe
Added some more rendered images.
cboots Sep 21, 2013
e907082
Restored sample scene.
cboots Sep 21, 2013
97a6576
Added ability to move camera left and right.
cboots Sep 21, 2013
30d82b1
Update README.md
cboots Sep 21, 2013
cbb6238
Added best image at top of readme
cboots Sep 21, 2013
5149b0b
Added screenshots for debug modes.
cboots Sep 21, 2013
c2efff6
Merge branch 'master' of github.com:cboots/Project1-RayTracer
cboots Sep 21, 2013
6bcc3fa
Added screenshots of debug mode
cboots Sep 21, 2013
b9be93f
Added youtube video
cboots Sep 21, 2013
c89711f
Added a bunch of screenshots
cboots Sep 21, 2013
c115f64
Update README.md
cboots Sep 21, 2013
1afecaf
Added check against lower end of shadow count
cboots Sep 21, 2013
f0b48f9
Merge branch 'master' of github.com:cboots/Project1-RayTracer
cboots Sep 21, 2013
94e994d
Added a performance measurement
cboots Sep 21, 2013
b7260bf
Added adaptive aliasing screenshot
cboots Sep 21, 2013
889caeb
Merge branch 'master' of github.com:cboots/Project1-RayTracer
cboots Sep 21, 2013
7d168e5
Added performance metrics about anti-aliasing
cboots Sep 21, 2013
cdf8dd9
Fixed bug with spheres not self shadowing.
cboots Sep 23, 2013
d8cd932
Improved refraction code a bit. Still buggy. Will start over on path …
cboots Sep 24, 2013
3a84754
Moved refracting sphere around. Bug is more evident now.
cboots Sep 26, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions PROJ1_WIN/565Raytracer/565Raytracer.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cameraUtils.h" />
<ClInclude Include="..\..\src\cudaMat4.h" />
<ClInclude Include="..\..\src\glslUtility.h" />
<ClInclude Include="..\..\src\image.h" />
Expand All @@ -33,6 +34,7 @@
<ClInclude Include="..\..\src\utilities.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\cameraUtils.cpp" />
<ClCompile Include="..\..\src\glslUtility.cpp" />
<ClCompile Include="..\..\src\image.cpp" />
<ClCompile Include="..\..\src\main.cpp" />
Expand All @@ -55,27 +57,31 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug (v5.5)|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release (v5.5)|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v110</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="..\Build\CUDA 4.0.props" />
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 5.5.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
Expand Down Expand Up @@ -200,6 +206,6 @@
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\Build\CUDA 4.0.targets" />
<Import Project="$(VCTargetsPath)\BuildCustomizations\CUDA 5.5.targets" />
</ImportGroup>
</Project>
2 changes: 2 additions & 0 deletions PROJ1_WIN/565Raytracer/565Raytracer.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<ClCompile Include="..\..\src\stb_image\stb_image_write.c">
<Filter>stb_image</Filter>
</ClCompile>
<ClCompile Include="..\..\src\cameraUtils.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\cudaMat4.h" />
Expand All @@ -30,6 +31,7 @@
<ClInclude Include="..\..\src\stb_image\stb_image.h">
<Filter>stb_image</Filter>
</ClInclude>
<ClInclude Include="..\..\src\cameraUtils.h" />
</ItemGroup>
<ItemGroup>
<CudaCompile Include="..\..\src\raytraceKernel.cu" />
Expand Down
2 changes: 1 addition & 1 deletion PROJ1_WIN/565Raytracer/565Raytracer.vcxproj.user
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug (v5.5)|Win32'">
<LocalDebuggerCommandArguments>scene=../../scenes/sampleScene.txt</LocalDebuggerCommandArguments>
<LocalDebuggerCommandArguments>scene=../../scenes/hallofmirrors.txt</LocalDebuggerCommandArguments>
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
Expand Down
315 changes: 121 additions & 194 deletions README.md

Large diffs are not rendered by default.

Binary file added renders/badshadow.0.bmp
Binary file not shown.
Binary file added renders/combined.0.bmp
Binary file not shown.
Binary file added renders/combined.1.bmp
Binary file not shown.
Binary file added renders/framefiltered.0.bmp
Binary file not shown.
Binary file added renders/hallofmirrors.0.bmp
Binary file not shown.
Binary file added renders/hallofmirrorsdeep.0.bmp
Binary file not shown.
Binary file added renders/multisource.0.bmp
Binary file not shown.
Binary file added renders/refraction.0.bmp
Binary file not shown.
Binary file added renders/refractionwithmirrors.0.bmp
Binary file not shown.
Binary file added renders/test.0.bmp
Binary file not shown.
28 changes: 28 additions & 0 deletions scenes/cube.obj
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
v -0.5 -0.5 -0.5
v -0.5 -0.5 0.5
v -0.5 0.5 0.5
v -0.5 0.5 -0.5
v 0.5 0.5 -0.5
v 0.5 0.5 0.5
v 0.5 -0.5 0.5
v 0.5 -0.5 -0.5

vn 1 0 0
vn 0 1 0
vn 0 0 1
vn -1 0 0
vn 0 -1 0
vn 0 0 -1

f 1//4 2//4 4//4
f 4//4 2//4 3//4
f 8//6 1//6 5//6
f 5//6 1//6 4//6
f 4//2 3//2 5//2
f 5//2 3//2 6//2
f 5//1 6//1 8//1
f 8//1 6//1 7//1
f 2//3 7//3 3//3
f 3//3 7//3 6//3
f 8//5 7//5 1//5
f 1//5 7//5 2//5
259 changes: 259 additions & 0 deletions scenes/hallofmirrors.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,259 @@
MATERIAL 0 //white diffuse
RGB 1 1 1
SPECEX 0
SPECRGB 1 1 1
REFL 0
REFR 0
REFRIOR 0
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0

MATERIAL 1 //red diffuse
RGB .63 .06 .04
SPECEX 0
SPECRGB 1 1 1
REFL 0
REFR 0
REFRIOR 0
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0

MATERIAL 2 //green diffuse
RGB .15 .48 .09
SPECEX 0
SPECRGB 1 1 1
REFL 0
REFR 0
REFRIOR 0
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0

MATERIAL 3 //red glossy
RGB .63 .06 .04
SPECEX 5
SPECRGB 1 1 1
REFL 0
REFR 0
REFRIOR 2
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0

MATERIAL 4 //white glossy
RGB 1 1 1
SPECEX 10
SPECRGB 1 1 1
REFL 0
REFR 0
REFRIOR 2
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0

MATERIAL 5 //glass
RGB 0 0 0
SPECEX 0
SPECRGB 1 1 1
REFL 0
REFR 1
REFRIOR 2.2
SCATTER 0
ABSCOEFF .02 5.1 5.7
RSCTCOEFF 13
EMITTANCE 0

MATERIAL 6 //green glossy
RGB .15 .48 .09
SPECEX 10
SPECRGB 1 1 1
REFL 0
REFR 0
REFRIOR 2.6
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0

MATERIAL 7 //light
RGB 1 1 1
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 1

MATERIAL 8 //light
RGB 0 1 0
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0.65


MATERIAL 9 //light
RGB 1 0 0
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0.75

MATERIAL 10 //bronze mirror
RGB 0.8 0.5 0.195
SPECEX 0
SPECRGB 1 1 1
REFL 1
REFR 0
REFRIOR 0
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0

MATERIAL 11 //Pure mirror
RGB 1 1 1
SPECEX 0
SPECRGB 1 1 1
REFL 1
REFR 0
REFRIOR 0
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0


MATERIAL 12 //blueish mirror
RGB 0.75 0.75 1
SPECEX 0
SPECRGB 1 1 1
REFL 1
REFR 0
REFRIOR 0
SCATTER 0
ABSCOEFF 0 0 0
RSCTCOEFF 0
EMITTANCE 0



CAMERA
RES 800 800
FOVY 25
ITERATIONS 500
FILE hallofmirrors.bmp
frame 0
EYE 0 4.5 4.9
VIEW 0 0 -1
UP 0 1 0

OBJECT 0
cube
material 0
frame 0
TRANS 0 0 0
ROTAT 0 0 90
SCALE .01 10 10

OBJECT 1
cube
material 12
frame 0
TRANS 0 5 -5
ROTAT 0 90 0
SCALE .01 10 10

OBJECT 2
cube
material 0
frame 0
TRANS 0 10 0
ROTAT 0 0 90
SCALE .01 10 10

OBJECT 3
cube
material 1
frame 0
TRANS -5 5 0
ROTAT 0 0 0
SCALE .01 10 10

OBJECT 4
cube
material 2
frame 0
TRANS 5 5 0
ROTAT 0 0 0
SCALE .01 10 10

OBJECT 5
sphere
material 10
frame 0
TRANS 0 2 -1
ROTAT 0 180 0
SCALE 3 3 3

OBJECT 6
sphere
material 11
frame 0
TRANS 2 5 1
ROTAT 0 180 0
SCALE 2.5 2.5 2.5

OBJECT 7
sphere
material 6
frame 0
TRANS -2 5 -3
ROTAT 0 180 0
SCALE 3 3 3


OBJECT 8
sphere
material 7
frame 0
TRANS 0 9.5 2
ROTAT 0 0 90
SCALE 0.5 2 2

OBJECT 9
sphere
material 9
frame 0
TRANS -4 1.5 3
ROTAT 0 0 90
SCALE 1 1 1


OBJECT 10
cube
material 11
frame 0
TRANS 0 5 5
ROTAT 0 90 0
SCALE .01 10 10
Loading