Browse Source

Write morph tangents as Vector3's in OgreImporter.
Fixed example particle system description files using wrong attribute name for sorting.
Clarified vertex weight threshold for bone hitbox calculation.

Lasse Öörni 12 years ago
parent
commit
da953b8aa7

+ 1 - 1
Bin/Data/Particle/Smoke.xml

@@ -6,7 +6,7 @@
     <activetime value="2" />
     <activetime value="2" />
     <inactivetime value="0" />
     <inactivetime value="0" />
     <emissionrate value="13.333" />
     <emissionrate value="13.333" />
-    <sorting enable="true" />
+    <sorted enable="true" />
     <rotationspeed min="-60" max="60" />
     <rotationspeed min="-60" max="60" />
     <direction min="-0.15 1 -0.15" max="0.15 1 0.15" />
     <direction min="-0.15 1 -0.15" max="0.15 1 0.15" />
     <velocity min="1" max="1.3" />
     <velocity min="1" max="1.3" />

+ 1 - 1
Bin/Data/Particle/SnowExplosion.xml

@@ -5,7 +5,7 @@
     <activetime value="0.1" />
     <activetime value="0.1" />
     <inactivetime value="0" />
     <inactivetime value="0" />
     <emissionrate value="50" />
     <emissionrate value="50" />
-    <sorting enable="true" />
+    <sorted enable="true" />
     <direction min="-1 0 -1" max="1 1 1" />
     <direction min="-1 0 -1" max="1 1 1" />
     <velocity min="0.5" max="1" />
     <velocity min="0.5" max="1" />
     <particlesize value="0.25 0.25" />
     <particlesize value="0.25 0.25" />

+ 1 - 1
Bin/Data/Particle/SnowExplosionBig.xml

@@ -7,7 +7,7 @@
     <activetime value="0.2" />
     <activetime value="0.2" />
     <inactivetime value="0" />
     <inactivetime value="0" />
     <emissionrate value="50" />
     <emissionrate value="50" />
-    <sorting enable="true" />
+    <sorted enable="true" />
     <direction min="-1 0.5 -1" max="1 1 1" />
     <direction min="-1 0.5 -1" max="1 1 1" />
     <velocity min="2" max="3" />
     <velocity min="2" max="3" />
     <particlesize value="0.6 0.6" />
     <particlesize value="0.6 0.6" />

+ 1 - 1
Bin/Data/Particle/SnowExplosionFade.xml

@@ -5,7 +5,7 @@
     <activetime value="0.1" />
     <activetime value="0.1" />
     <inactivetime value="0" />
     <inactivetime value="0" />
     <emissionrate value="50" />
     <emissionrate value="50" />
-    <sorting enable="true" />
+    <sorted enable="true" />
     <direction min="-1 0 -1" max="1 1 1" />
     <direction min="-1 0 -1" max="1 1 1" />
     <velocity min="0.5" max="1" />
     <velocity min="0.5" max="1" />
     <particlesize value="0.25 0.25" />
     <particlesize value="0.25 0.25" />

+ 1 - 1
Docs/Reference.dox

@@ -1015,7 +1015,7 @@ Like with skeletal animations, there are two ways to play back node animations:
 
 
 The ParticleEmitter class derives from BillboardSet to implement a particle system that updates automatically.
 The ParticleEmitter class derives from BillboardSet to implement a particle system that updates automatically.
 
 
-The particle system's properties can be set through a XML description file, see \ref ParticleEmitter::Load "Load()".
+The particle system's properties can also be set through a XML description file, see \ref ParticleEmitter::Load "Load()".
 
 
 Most of the parameters can take either a single value, or minimum and maximum values to allow for random variation. See below for all supported parameters:
 Most of the parameters can take either a single value, or minimum and maximum values to allow for random variation. See below for all supported parameters:
 
 

+ 1 - 0
Tools/AssetImporter/AssetImporter.cpp

@@ -610,6 +610,7 @@ void BuildBoneCollisionInfo(OutModel& model)
             for (unsigned k = 0; k < bone->mNumWeights; ++k)
             for (unsigned k = 0; k < bone->mNumWeights; ++k)
             {
             {
                 float weight = bone->mWeights[k].mWeight;
                 float weight = bone->mWeights[k].mWeight;
+                // Require skinning weight to be sufficiently large before vertex contributes to bone hitbox
                 if (weight > 0.33f)
                 if (weight > 0.33f)
                 {
                 {
                     aiVector3D vertexBoneSpace = bone->mOffsetMatrix * mesh->mVertices[bone->mWeights[k].mVertexId];
                     aiVector3D vertexBoneSpace = bone->mOffsetMatrix * mesh->mVertices[bone->mWeights[k].mVertexId];

+ 1 - 0
Tools/OgreImporter/OgreImporter.cpp

@@ -450,6 +450,7 @@ void LoadMesh(const String& inputFileName, bool generateTangents, bool splitSubM
                     {
                     {
                         subGeometryLodLevel.boneWeights_[vertex].Push(assign);
                         subGeometryLodLevel.boneWeights_[vertex].Push(assign);
                         
                         
+                        // Require skinning weight to be sufficiently large before vertex contributes to bone hitbox
                         if (assign.weight_ > 0.33f)
                         if (assign.weight_ > 0.33f)
                         {
                         {
                             // Check distance of vertex from bone to get bone max. radius information
                             // Check distance of vertex from bone to get bone max. radius information

+ 1 - 1
Tools/OgreImporter/OgreImporterUtils.h

@@ -180,7 +180,7 @@ struct ModelMorph
                 if (elementMask & MASK_NORMAL)
                 if (elementMask & MASK_NORMAL)
                     dest.WriteVector3(j->second_.normal_);
                     dest.WriteVector3(j->second_.normal_);
                 if (elementMask & MASK_TANGENT)
                 if (elementMask & MASK_TANGENT)
-                    dest.WriteVector4(j->second_.tangent_);
+                    dest.WriteVector3(Vector3(j->second_.tangent_.x_, j->second_.tangent_.y_, j->second_.tangent_.z_));
             }
             }
         }
         }
     }
     }