# HG changeset patch # User Robert McIntyre # Date 1395727710 14400 # Node ID ea0bcd47d55b165fdf4acbd4d9a96f913098c839 # Parent d3c5f9b705742649fde12ebe532eb77cf13a3b21 redo worm and floor textures for final thesis render, with the wonderful help of Dylan. diff -r d3c5f9b70574 -r ea0bcd47d55b assets/Models/worm/touch-profile.png Binary file assets/Models/worm/touch-profile.png has changed diff -r d3c5f9b70574 -r ea0bcd47d55b assets/Models/worm/touch-profile.xcf Binary file assets/Models/worm/touch-profile.xcf has changed diff -r d3c5f9b70574 -r ea0bcd47d55b assets/Models/worm/worm.blend Binary file assets/Models/worm/worm.blend has changed diff -r d3c5f9b70574 -r ea0bcd47d55b assets/Textures/aurellem.png Binary file assets/Textures/aurellem.png has changed diff -r d3c5f9b70574 -r ea0bcd47d55b images/aurellem.xcf Binary file images/aurellem.xcf has changed diff -r d3c5f9b70574 -r ea0bcd47d55b org/worm_learn.clj --- a/org/worm_learn.clj Tue Mar 25 00:20:01 2014 -0400 +++ b/org/worm_learn.clj Tue Mar 25 02:08:30 2014 -0400 @@ -261,7 +261,22 @@ (defn record-experience! [experiences data] (swap! experiences #(conj % data))) +(defn enable-shadows [world] + (let [bsr (doto + (BasicShadowRenderer. (asset-manager) 512) + (.setDirection (.normalizeLocal (Vector3f. 1 -1 -1))))] + (.addProcessor (.getViewPort world) bsr))) +(defn enable-good-shadows [world] + (let [pssm + (doto (PssmShadowRenderer. (asset-manager) 1024 3) + (.setDirection (.normalizeLocal (Vector3f. -1 -3 -1))) + (.setLambda (float 0.55)) + (.setShadowIntensity (float 0.6)) + (.setCompareMode PssmShadowRenderer$CompareMode/Software) + (.setFilterMode PssmShadowRenderer$FilterMode/Bilinear))] + (.addProcessor (.getViewPort world) pssm))) + (defn worm-world [& {:keys [record motor-control keybindings view experiences @@ -278,15 +293,22 @@ prop-display (view-proprioception) muscle-display (view-movement) - floor (box 10 1 10 :position (Vector3f. 0 -10 0) - :color ColorRGBA/Gray :mass 0 - :texture "Textures/greenGrid.png") + floor + (box 5 1 5 :position (Vector3f. 0 -10 0) + :mass 0 + :texture "Textures/aurellem.png" + :material "Common/MatDefs/Misc/Unshaded.j3md") timer (IsoTimer. 60)] (world - (nodify [worm floor]) + (nodify [worm floor]) (merge standard-debug-controls keybindings) (fn [world] + (enable-good-shadows world) + (.setShadowMode worm RenderQueue$ShadowMode/CastAndReceive) + (.setShadowMode floor RenderQueue$ShadowMode/Receive) + + (.setBackgroundColor (.getViewPort world) (ColorRGBA/White)) (.setDisplayStatView world false) (.setDisplayFps world false) (position-camera world view) @@ -297,7 +319,8 @@ world (dir! (File. record "main-view")))) (speed-up world) - (light-up-everything world)) + ;;(light-up-everything world) + ) (fn [world tpf] (if (and end-frame (> (.getTime timer) end-frame)) (.stop world))