summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2019-10-28 17:18:50 -0400
committerDavid Thompson <dthompson2@worcester.edu>2019-10-28 17:20:52 -0400
commit573b23023b36d5b30377db8b78f464c9eddba3b2 (patch)
treec7fcbf74dd2b092587854a5e274425c99279f58d
parentc128c2e53e054c9eb18c7e17acbb895660e5ee36 (diff)
render: model: Suppress warnings for some deliberately ignored .obj data.
-rw-r--r--chickadee/render/model.scm30
1 files changed, 19 insertions, 11 deletions
diff --git a/chickadee/render/model.scm b/chickadee/render/model.scm
index 7771127..0b2b306 100644
--- a/chickadee/render/model.scm
+++ b/chickadee/render/model.scm
@@ -247,39 +247,45 @@
(match (delete "" (string-split line char-set:whitespace))
((or () ("#" . _)) ; ignore comments and blank lines
(loop opts))
- (("Ka" r g b)
+ (("d" d) ; ignore dissolve for now
+ (loop opts))
+ (("illum" n) ; ignore illumation model for now
+ (loop opts))
+ (("Ka" r g b) ; ambient factor
(let ((new-ambient (vec3 (string->number r)
(string->number g)
(string->number b))))
(loop (cons (cons 'ambient new-ambient) opts))))
- (("Ka" r)
+ (("Ka" r) ; ambient factor
(let ((new-ambient (vec3 (string->number r)
(string->number r)
(string->number r))))
(loop (cons (cons 'ambient new-ambient) opts))))
- (("Kd" r g b)
+ (("Kd" r g b) ; diffuse factor
(let ((new-diffuse (vec3 (string->number r)
(string->number g)
(string->number b))))
(loop (cons (cons 'diffuse new-diffuse) opts))))
- (("Kd" r)
+ (("Kd" r) ; diffuse factor
(let ((new-diffuse (vec3 (string->number r)
(string->number r)
(string->number r))))
(loop (cons (cons 'diffuse new-diffuse) opts))))
- (("Ks" r g b)
+ (("Ks" r g b) ; specular factor
(let ((new-specular (vec3 (string->number r)
(string->number g)
(string->number b))))
(loop (cons (cons 'specular new-specular) opts))))
- (("Ks" r)
+ (("Ks" r) ; specular factor
(let ((new-specular (vec3 (string->number r)
(string->number r)
(string->number r))))
(loop (cons (cons 'specular new-specular) opts))))
- (("Ns" n)
+ (("Ni" i) ; ignore optical density for now
+ (loop opts))
+ (("Ns" s) ; specular exponent (shininess)
;; Force specular exponent to be a float.
- (let ((new-shininess (* (string->number n) 1.0)))
+ (let ((new-shininess (* (string->number s) 1.0)))
(loop (cons (cons 'shininess new-shininess) opts))))
(("map_Ka" . args) ; ambient map
(let* ((ambient-opts (parse-map-args args))
@@ -301,7 +307,7 @@
(loop (cons* (cons 'diffuse-map texture)
(cons 'use-diffuse-map? #t)
opts))))
- (("map_Ks" . args)
+ (("map_Ks" . args) ; specular map
(let* ((specular-opts (parse-map-args args))
(file (scope-file (assq-ref specular-opts
'file-name)))
@@ -490,12 +496,14 @@
(("f" . args)
(parse-face args material)
(loop material))
- (("g" . _) ; ignore
+ (("g" . _) ; ignore group name for now
(loop material))
(("mtllib" mtl-file-name)
(load-mtl (scope-file mtl-file-name))
(loop material))
- (("s" . _) ; ignore
+ (("o" . _) ;ignore object name for now
+ (loop material))
+ (("s" . _) ; ignore smoothing group for now
(loop material))
(("usemtl" new-material)
(loop new-material))