changeset 444:ea0bcd47d55b

redo worm and floor textures for final thesis render, with the wonderful help of Dylan.
author Robert McIntyre <rlm@mit.edu>
date Tue, 25 Mar 2014 02:08:30 -0400
parents d3c5f9b70574
children 47cfbe84f00e
files assets/Models/worm/touch-profile.png assets/Models/worm/touch-profile.xcf assets/Models/worm/worm.blend assets/Textures/aurellem.png images/aurellem.xcf org/worm_learn.clj
diffstat 6 files changed, 28 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
     1.1 Binary file assets/Models/worm/touch-profile.png has changed
     2.1 Binary file assets/Models/worm/touch-profile.xcf has changed
     3.1 Binary file assets/Models/worm/worm.blend has changed
     4.1 Binary file assets/Textures/aurellem.png has changed
     5.1 Binary file images/aurellem.xcf has changed
     6.1 --- a/org/worm_learn.clj	Tue Mar 25 00:20:01 2014 -0400
     6.2 +++ b/org/worm_learn.clj	Tue Mar 25 02:08:30 2014 -0400
     6.3 @@ -261,7 +261,22 @@
     6.4  (defn record-experience! [experiences data]
     6.5    (swap! experiences #(conj % data)))
     6.6  
     6.7 +(defn enable-shadows [world]
     6.8 +  (let [bsr (doto
     6.9 +                (BasicShadowRenderer. (asset-manager) 512)
    6.10 +              (.setDirection (.normalizeLocal (Vector3f. 1 -1 -1))))]
    6.11 +    (.addProcessor (.getViewPort world) bsr)))
    6.12  
    6.13 +(defn enable-good-shadows [world]
    6.14 +  (let [pssm
    6.15 +        (doto (PssmShadowRenderer. (asset-manager) 1024 3)
    6.16 +          (.setDirection  (.normalizeLocal (Vector3f. -1 -3 -1)))
    6.17 +          (.setLambda (float 0.55))
    6.18 +          (.setShadowIntensity (float 0.6))
    6.19 +          (.setCompareMode PssmShadowRenderer$CompareMode/Software)
    6.20 +          (.setFilterMode  PssmShadowRenderer$FilterMode/Bilinear))]
    6.21 +    (.addProcessor (.getViewPort world) pssm)))
    6.22 +        
    6.23  
    6.24  (defn worm-world
    6.25    [& {:keys [record motor-control keybindings view experiences
    6.26 @@ -278,15 +293,22 @@
    6.27          prop-display   (view-proprioception)
    6.28          muscle-display (view-movement)
    6.29          
    6.30 -        floor (box 10 1 10 :position (Vector3f. 0 -10 0)
    6.31 -                   :color ColorRGBA/Gray :mass 0
    6.32 -                   :texture "Textures/greenGrid.png")
    6.33 +        floor
    6.34 +        (box 5 1 5 :position (Vector3f. 0 -10 0)
    6.35 +             :mass 0
    6.36 +             :texture "Textures/aurellem.png"
    6.37 +             :material "Common/MatDefs/Misc/Unshaded.j3md")
    6.38          timer (IsoTimer. 60)]
    6.39  
    6.40      (world
    6.41 -       (nodify [worm floor])
    6.42 +     (nodify [worm floor])
    6.43         (merge standard-debug-controls keybindings)
    6.44         (fn [world]
    6.45 +         (enable-good-shadows world)
    6.46 +         (.setShadowMode worm RenderQueue$ShadowMode/CastAndReceive)
    6.47 +         (.setShadowMode floor RenderQueue$ShadowMode/Receive)
    6.48 +                  
    6.49 +         (.setBackgroundColor (.getViewPort world) (ColorRGBA/White))
    6.50           (.setDisplayStatView world false)
    6.51           (.setDisplayFps world false)
    6.52           (position-camera world view)
    6.53 @@ -297,7 +319,8 @@
    6.54              world
    6.55              (dir! (File. record "main-view"))))
    6.56           (speed-up world)
    6.57 -         (light-up-everything world))
    6.58 +         ;;(light-up-everything world)
    6.59 +         )
    6.60         (fn [world tpf]
    6.61           (if (and end-frame (> (.getTime timer) end-frame))
    6.62             (.stop world))