Skip to content

Commit

Permalink
Complete texture and bogus bump mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
dluisnothere committed Oct 7, 2022
1 parent 3e5a967 commit 5a544d3
Show file tree
Hide file tree
Showing 21 changed files with 535 additions and 75 deletions.
Binary file added img/completeMario2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/cubeNormal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/nobump.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/yesBumpmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added objs/Trimm_Curvature.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions objs/Trimm_Textures_Map.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Blender MTL File: 'Trimm_Textures_Map.blend'
# Material Count: 2

newmtl Dark
Ns 225.000000
Ka 0.791045 0.791045 0.791045
Kd 0.015995 0.015995 0.015995
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 3

newmtl Unity_Material
Ns 162.623844
Ka 0.732459 0.732459 0.732459
Kd 0.173025 0.173025 0.173025
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 3
map_Bump -bm 2.000000 Trimm_Normal_OpenGL.png
Binary file added objs/textures/bump1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added objs/textures/bump1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added objs/textures/grid.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added objs/textures/grid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added objs/textures/wahooFlippedHorizontal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
168 changes: 168 additions & 0 deletions scenes/bump.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
// Emissive material (light)
MATERIAL 0
RGB 1 1 1
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 5

// Diffuse white
MATERIAL 1
RGB .98 .98 .98
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Diffuse red
MATERIAL 2
RGB .85 .35 .35
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Diffuse green
MATERIAL 3
RGB .35 .85 .35
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Specular white
MATERIAL 4
RGB .98 .98 .98
SPECEX 0
SPECRGB .98 .98 .98
REFL 1
REFR 0
REFRIOR 0
EMITTANCE 0

// Refractive glass
MATERIAL 5
RGB .98 .98 .98
SPECEX 0
SPECRGB .98 .98 .98
REFL 0
REFR 1
REFRIOR 1.52
EMITTANCE 0

// Diffuse lilac
MATERIAL 6
RGB .6 .6 1
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Diffuse yellow
MATERIAL 7
RGB 1 .9 .5
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Box texture
TEXTURE 0
PATH ../Project3-CUDA-Path-Tracer/objs/textures/bump1.png

// Camera
CAMERA
RES 800 800
FOVY 45
ITERATIONS 5000
DEPTH 8
FILE cornell
EYE 0.0 5 10.5
LOOKAT 0 5 0
UP 0 1 0


// Ceiling light
OBJECT 0
cube
material 0
TRANS 0 10 0
ROTAT 0 0 0
SCALE 3 .3 3

// Ceiling light
OBJECT 1
cube
material 0
TRANS -5 10 0
ROTAT 0 0 0
SCALE 3 .3 3

// Ceiling light
OBJECT 2
cube
material 0
TRANS 5 10 0
ROTAT 0 0 0
SCALE 3 .3 3

// Floor
OBJECT 3
cube
material 1
TRANS 0 0 0
ROTAT 0 0 0
SCALE 20 .01 10

// Ceiling
OBJECT 4
cube
material 1
TRANS 0 10 0
ROTAT 0 0 90
SCALE .01 20 10

// Back wall
OBJECT 5
cube
material 1
TRANS 0 5 -5
ROTAT 0 90 0
SCALE .01 10 20

// Left wall
OBJECT 6
cube
material 6
TRANS -10 5 0
ROTAT 0 0 0
SCALE .01 10 10

// Right wall
OBJECT 7
cube
material 7
TRANS 10 5 0
ROTAT 0 0 0
SCALE .01 10 10

// texture obj
OBJECT 8
../Project3-CUDA-Path-Tracer/objs/box.obj
material 4
TRANS 0 2 0
ROTAT -30 0 0
SCALE 3 3 3
TEXTURE 0
6 changes: 3 additions & 3 deletions scenes/textureBox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ EMITTANCE 0

// Box texture
TEXTURE 0
PATH ../Project3-CUDA-Path-Tracer/objs/textures/wahooRotatedFlipped.png
PATH ../Project3-CUDA-Path-Tracer/objs/textures/boxOutline.png

// Camera
CAMERA
Expand Down Expand Up @@ -104,9 +104,9 @@ SCALE .01 10 10

// texture obj
OBJECT 6
../Project3-CUDA-Path-Tracer/objs/wahoo.obj
../Project3-CUDA-Path-Tracer/objs/box.obj
material 1
TRANS 0 2 0
ROTAT -45 0 0
ROTAT 0 0 0
SCALE 1 1 1
TEXTURE 0
168 changes: 168 additions & 0 deletions scenes/wahoo.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,168 @@
// Emissive material (light)
MATERIAL 0
RGB 1 1 1
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 5

// Diffuse white
MATERIAL 1
RGB .98 .98 .98
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Diffuse red
MATERIAL 2
RGB .85 .35 .35
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Diffuse green
MATERIAL 3
RGB .35 .85 .35
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Specular white
MATERIAL 4
RGB .98 .98 .98
SPECEX 0
SPECRGB .98 .98 .98
REFL 1
REFR 0
REFRIOR 0
EMITTANCE 0

// Refractive glass
MATERIAL 5
RGB .98 .98 .98
SPECEX 0
SPECRGB .98 .98 .98
REFL 0
REFR 1
REFRIOR 1.52
EMITTANCE 0

// Diffuse lilac
MATERIAL 6
RGB .6 .6 1
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Diffuse yellow
MATERIAL 7
RGB 1 .9 .5
SPECEX 0
SPECRGB 0 0 0
REFL 0
REFR 0
REFRIOR 0
EMITTANCE 0

// Box texture
TEXTURE 0
PATH ../Project3-CUDA-Path-Tracer/objs/textures/wahooFlippedVertical.png

// Camera
CAMERA
RES 800 800
FOVY 45
ITERATIONS 5000
DEPTH 8
FILE cornell
EYE 0.0 5 10.5
LOOKAT 0 5 0
UP 0 1 0


// Ceiling light
OBJECT 0
cube
material 0
TRANS 0 10 0
ROTAT 0 0 0
SCALE 3 .3 3

// Ceiling light
OBJECT 1
cube
material 0
TRANS -5 10 0
ROTAT 0 0 0
SCALE 3 .3 3

// Ceiling light
OBJECT 2
cube
material 0
TRANS 5 10 0
ROTAT 0 0 0
SCALE 3 .3 3

// Floor
OBJECT 3
cube
material 1
TRANS 0 0 0
ROTAT 0 0 0
SCALE 20 .01 10

// Ceiling
OBJECT 4
cube
material 1
TRANS 0 10 0
ROTAT 0 0 90
SCALE .01 20 10

// Back wall
OBJECT 5
cube
material 1
TRANS 0 5 -5
ROTAT 0 90 0
SCALE .01 10 20

// Left wall
OBJECT 6
cube
material 6
TRANS -10 5 0
ROTAT 0 0 0
SCALE .01 10 10

// Right wall
OBJECT 7
cube
material 7
TRANS 10 5 0
ROTAT 0 0 0
SCALE .01 10 10

// texture obj
OBJECT 8
../Project3-CUDA-Path-Tracer/objs/wahoo.obj
material 1
TRANS 0 2 0
ROTAT -30 0 0
SCALE 0.75 0.75 0.75
TEXTURE 0
Loading

0 comments on commit 5a544d3

Please sign in to comment.