Skip to content

Commit b6295a0

Browse files
committed
normal mapping + demo scene
1 parent fdbcf3d commit b6295a0

19 files changed

+148
-133
lines changed

img/abnormal_normal.png

2.58 MB
Loading

img/alien_space.png

872 KB
Loading

img/bvh.png

246 KB
Loading

img/cracked.png

13.8 MB
Loading

img/cracked_pos.png

-465 KB
Binary file not shown.

img/demo_1.png

2.67 MB
Loading

img/disordered.png

23.4 MB
Loading

img/first_decent.png

-2.36 MB
Binary file not shown.

scenes/cornell.txt

Lines changed: 119 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,146 @@
1-
// Emissive Material (light)
2-
Material 0
3-
BaseColor 1 1 1
1+
Camera
2+
Resolution 1280 960
3+
FovY 22
4+
LensRadius 0.1
5+
FocalDist 11
6+
Sample 5000
7+
Depth 8
8+
File Cornell
9+
Eye 0 0 10
10+
LookAt 0 0 0
11+
Up 0 1 0
12+
13+
Material Light
14+
BaseColor 8 8 8
415
Type Light
516
Metallic 0
617
Roughness 1
718
Ior 0
8-
Emittance 1
19+
NormalMap Null
920

10-
// Diffuse white
11-
Material 1
21+
Material White
1222
Type Lambertian
1323
BaseColor .98 .98 .98
1424
Metallic 0
1525
Roughness 1
1626
Ior 0
17-
Emittance 0
27+
NormalMap Null
1828

19-
// Diffuse red
20-
Material 2
29+
Material Red
2130
Type Lambertian
22-
BaseColor .85 .35 .35
31+
BaseColor .85 .25 .25
2332
Metallic 0
2433
Roughness 1
2534
Ior 0
26-
Emittance 0
35+
NormalMap Null
2736

28-
// Diffuse green
29-
Material 3
37+
Material Green
3038
Type Lambertian
31-
BaseColor .35 .85 .35
39+
BaseColor .25 .85 .25
3240
Metallic 0
3341
Roughness 1
3442
Ior 0
35-
Emittance 0
43+
NormalMap Null
3644

37-
// Specular white
38-
Material 4
39-
Type Lambertian
45+
Material Metal
46+
Type MetallicWorkflow
4047
BaseColor .98 .98 .98
48+
Metallic 1.0
49+
Roughness 0.2
50+
Ior 1.1
51+
NormalMap Null
52+
53+
Material Plastic
54+
Type MetallicWorkflow
55+
BaseColor .2 .3 .8
56+
Metallic 1
57+
Roughness 0.15
58+
Ior 1
59+
NormalMap Null
60+
61+
Material Glass
62+
Type Dielectric
63+
BaseColor 1 1 1
4164
Metallic 0
42-
Roughness 1
43-
Ior 0
44-
Emittance 0
65+
Roughness 0
66+
Ior 1.5
67+
NormalMap Null
4568

46-
// Camera
47-
Camera
48-
Resolution 800 800
49-
FovY 45
50-
LensRadius 0
51-
FocalDist 1
52-
Sample 5000
53-
Depth 2
54-
File Cornell
55-
Eye 0.0 5 10.5
56-
LookAt 0 5 0
57-
Up 0 1 0
69+
Material AlienMetal
70+
Type MetallicWorkflow
71+
BaseColor texture/sci-fi-panel1-albedo.png
72+
Metallic 1
73+
Roughness 0.3
74+
Ior 0
75+
NormalMap texture/sci-fi-panel1-normal.png
5876

77+
Material Textured2
78+
Type Lambertian
79+
BaseColor texture/fleshy_granite1_albedo.png
80+
Metallic 0
81+
Roughness 0.2
82+
Ior 0
83+
NormalMap Null
84+
85+
Object Light
86+
model/square.obj
87+
Material Light
88+
Translate 0 2.98 0
89+
Rotate 0 0 0
90+
Scale 1 1 1
91+
92+
Object Left
93+
model/square.obj
94+
Material Red
95+
Translate -4 0 0
96+
Rotate 0 0 -90
97+
Scale 3 3 3
5998

60-
// Ceiling light
61-
Object 0
62-
Cube
63-
Material 0
64-
Translate 0 10 0
65-
Rotate 0 0 0
66-
Scale 3 .3 3
67-
68-
// Floor
69-
Object 1
70-
Cube
71-
Material 1
72-
Translate 0 0 0
73-
Rotate 0 0 0
74-
Scale 10 .01 10
75-
76-
// Ceiling
77-
Object 2
78-
Cube
79-
Material 1
80-
Translate 0 10 0
81-
Rotate 0 0 90
82-
Scale .01 10 10
83-
84-
// Back wall
85-
Object 3
86-
Cube
87-
Material 1
88-
Translate 0 5 -5
89-
Rotate 0 90 0
90-
Scale .01 10 10
91-
92-
// Left wall
93-
Object 4
94-
Cube
95-
Material 2
96-
Translate -5 5 0
97-
Rotate 0 0 0
98-
Scale .01 10 10
99-
100-
// Right wall
101-
Object 5
102-
Cube
103-
Material 3
104-
Translate 5 5 0
105-
Rotate 0 0 0
106-
Scale .01 10 10
107-
108-
// Sphere
109-
Object 6
110-
Sphere
111-
Material 4
112-
Translate -1 4 -1
113-
Rotate 0 0 0
99+
Object Right
100+
model/square.obj
101+
Material Green
102+
Translate 4 0 0
103+
Rotate 0 0 90
114104
Scale 3 3 3
105+
106+
Object Back
107+
model/square.obj
108+
Material Textured2
109+
Translate 0 0 -3
110+
Rotate 90 0 0
111+
Scale 4 3 3
112+
113+
Object Floor
114+
model/square.obj
115+
Material White
116+
Translate 0 -3 0
117+
Rotate 0 0 0
118+
Scale 4 3 3
119+
120+
Object Ceiling
121+
model/square.obj
122+
Material White
123+
Translate 0 3 0
124+
Rotate 180 0 0
125+
Scale 4 3 3
126+
127+
Object Bunny
128+
model/bunny.obj
129+
Material Plastic
130+
Translate 0.5 -2 0
131+
Rotate 0 0 0
132+
Scale 1 1 1
133+
134+
Object Teapot
135+
model/teapot_ori.obj
136+
Material Glass
137+
Translate 2 0 -2
138+
Rotate 45 45 0
139+
Scale .3 .3 .3
140+
141+
Object Cube
142+
model/cube.obj
143+
Material AlienMetal
144+
Translate -2 1 -1
145+
Rotate 0 45 10
146+
Scale 1.1 1.1 1.1

scenes/sphere.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)