summaryrefslogtreecommitdiffstats
path: root/examples/model-viewer/cube.obj
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2018-08-10 22:21:44 -0700
committerGitHub <noreply@github.com>2018-08-10 22:21:44 -0700
commit56d8a752d84e984afab20de5980edf10fe6c06f5 (patch)
treeeb1491b940daebc6afd200202347191d77f76112 /examples/model-viewer/cube.obj
parent73ff6907d723003d30e400f661876e7960de574f (diff)
Improve model-viewer support for lights (#626)
* Improve model-viewer support for lights The main visible change here is that the model-viewer example supports multiple light sources, with a basic UI for adding new light sources to the scene, and for manipulating the ones that are there. Along the way I also refactored the `IMaterial` decomposition to be a bit less naive, while still only including a completely naive Blinn-Phong implementation. I also went ahead and spruced up the `cube.obj` file so that it has multiple materials, although it is still a completely uninteresting asset. * Fixup: Windows SDK version
Diffstat (limited to 'examples/model-viewer/cube.obj')
-rw-r--r--examples/model-viewer/cube.obj33
1 files changed, 26 insertions, 7 deletions
diff --git a/examples/model-viewer/cube.obj b/examples/model-viewer/cube.obj
index 7226aaa77..2f7de8a92 100644
--- a/examples/model-viewer/cube.obj
+++ b/examples/model-viewer/cube.obj
@@ -14,11 +14,30 @@ vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000
-usemtl Material
+
+v -10 -1 -10
+v 10 -1 -10
+v 10 -1 10
+v -10 -1 10
+vn 0 1 0
+
+usemtl Red
s off
-f 1//1 2//1 3//1 4//1
-f 5//2 8//2 7//2 6//2
-f 1//3 5//3 6//3 2//3
-f 2//4 6//4 7//4 3//4
-f 3//5 7//5 8//5 4//5
-f 5//6 1//6 4//6 8//6
+f 2//3 6//3 5//3 1//3
+f 4//5 8//5 7//5 3//5
+
+usemtl Green
+s off
+f 4//1 3//1 2//1 1//1
+f 6//2 7//2 8//2 5//2
+
+usemtl Blue
+s off
+f 3//4 7//4 6//4 2//4
+f 8//6 4//6 1//6 5//6
+
+o Ground
+usemtl Ground
+s off
+f 9//7 10//7 11//7 12//7
+