Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2011-07-26 10:10:05 +0400
committerMitchell Stokes <mogurijin@gmail.com>2011-07-26 10:10:05 +0400
commit1f65b3b1a8f5ccc54a794ed0d6f8cf2d3e2c5a36 (patch)
tree236c1d8475709b45962fd5efa901626a78fedbe0 /source/gameengine/Converter/BL_ArmatureObject.h
parent1e0e0ff5c4e88f2ee21c849b151a1899ae4c714f (diff)
BGE Animations: Adding a new choice for vertex deformation for armatures, which can be found in the Armature's Skeleton panel by the Deform options. Before only Blender's armature_deform_verts() was used. Now users can choose a vertex deformation function that is optimized for the BGE. At the moment it is mostly a copy of armature_deform_verts() with various chunks of code removed, and the BLI_math code was replaced with Eigen2. In my test scene, the new function offered about a 40% improvement over armature_deform_verts() (17~19ms rasterizer to 11~12ms). The only current limitation that I'm aware of if that B-Bone segments are not supported in the BGE version, and I will probably leave it out. I would like to also limit the BGE version to 4 weights to make things easier for a GPU version, but this may just make things slower (sorting weights to find the top 4).
Diffstat (limited to 'source/gameengine/Converter/BL_ArmatureObject.h')
-rw-r--r--source/gameengine/Converter/BL_ArmatureObject.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/gameengine/Converter/BL_ArmatureObject.h b/source/gameengine/Converter/BL_ArmatureObject.h
index 2c3ca7404b3..1467f05c1bd 100644
--- a/source/gameengine/Converter/BL_ArmatureObject.h
+++ b/source/gameengine/Converter/BL_ArmatureObject.h
@@ -69,7 +69,8 @@ public:
void* sgReplicationInfo,
SG_Callbacks callbacks,
Object *armature,
- Scene *scene
+ Scene *scene,
+ int vert_deform_type
);
virtual ~BL_ArmatureObject();
@@ -90,6 +91,8 @@ public:
Object* GetArmatureObject() {return m_objArma;}
+ int GetVertDeformType() {return m_vert_deform_type;}
+
// for constraint python API
void LoadConstraints(KX_BlenderSceneConverter* converter);
size_t GetConstraintNumber() const { return m_constraintNumber; }
@@ -136,6 +139,7 @@ protected:
double m_timestep; // delta since last pose evaluation.
class BL_ActionActuator *m_activeAct;
short m_activePriority;
+ int m_vert_deform_type;
size_t m_constraintNumber;
size_t m_channelNumber;
// store the original armature object matrix