Browse Source

Added Animation section, cleaned up models

* Removed unused .mesh files and added Sphere to auto-export
* Renamed animations
pitch-detection
Macoy Madson 11 months ago
parent
commit
8c9c556809
  1. 7
      ReadMe.org
  2. BIN
      test/assets/Monkey.blend
  3. BIN
      test/data/Models/Sphere.mesh
  4. BIN
      test/data/Models/Suzanne.mesh
  5. 9
      test/src/VocalGame.cake

7
ReadMe.org

@ -80,7 +80,14 @@ cd Dependencies/ogre-next/build/Debug/bin
#+END_SRC
Run this after you've made an attempted export from the Blender OGRE plugin.
** Animations
- Rig your mesh as you would normally in Blender
- Open the Dope Sheet, and switch mode to Action Editor
- Use the New button to create an action. The name you use here will be the name needed for the code (the animation name)
- Create the action's keyframes
- Open the NLA editor, and click ~Push Down Action~ to create an NLA track. Blender2Ogre uses NLA tracks to determine which animations to export
The name of the skeleton comes from the name of the Object which has the armature modifier's mesh. This may mean shared skeletons will be created in duplicate due to having different object mesh names.
* Terms
GameLib is copyright (C) 2020 Macoy Madson ~<macoy@macoy.me>~.

BIN
test/assets/Monkey.blend

Binary file not shown.

BIN
test/data/Models/Sphere.mesh

Binary file not shown.

BIN
test/data/Models/Suzanne.mesh

Binary file not shown.

9
test/src/VocalGame.cake

@ -311,7 +311,7 @@
(set monkey-node (ogre-node-from-item monkey-mesh))
;; TODO: How to change this animation's name?
(set monkey-anim-handle
(ogre-attach-animation monkey-mesh "Monkey_Mesh.skeleton" "my_animation")) ;; Monkey_RaiseChin
(ogre-attach-animation monkey-mesh "Monkey_Mesh.skeleton" "Monkey_AngleChin"))
(set g-light-node (ogre-create-light))
@ -485,8 +485,9 @@
127.f)))
(var audio-pos vec3 (array audio-read-head-to-world 0.f audio-volume-to-world))
(var final-pos vec3 (vec3-scale-add-vec3 delta-position delta-time
(vec3-add tracker-position audio-pos)))
(var final-pos vec3 (vec3-scale-add-vec3 delta-position delta-time tracker-position))
;; (var final-pos vec3 (vec3-scale-add-vec3 delta-position delta-time
;; (vec3-add tracker-position audio-pos)))
(ogre-node-set-position (addr monkey-node) (vec-xyz final-pos))
(ogre-animation-add-time monkey-anim-handle delta-time)
@ -542,7 +543,7 @@
(Logf "Asset-Building: could not make directory %s absolute\n" model-relative-dir)
(return false))
(var model-assets ([] (* (const char))) (array "Monkey"))
(var model-assets ([] (* (const char))) (array "Monkey" "MaterialSphere"))
(var i int 0)
(while (< i (array-size model-assets))
(var blend-asset ([] MAX_PATH_LENGTH char) (array 0))

Loading…
Cancel
Save