Added BlendTree that stores and blends multiple animations

This commit is contained in:
viktorljung
2016-02-22 15:58:38 +01:00
parent 3c9c95cff4
commit abd36c81f8
20 changed files with 641 additions and 453 deletions
+3
View File
@@ -39,4 +39,7 @@
<xs:include schemaLocation="Components/Sprite.xsd"/>
<xs:include schemaLocation="Components/Shielded.xsd"/>
<xs:include schemaLocation="Components/CapturePointHUD.xsd"/>
<xs:include schemaLocation="Components/BlendOverride.xsd"/>
<xs:include schemaLocation="Components/Blend.xsd"/>
<xs:include schemaLocation="Components/BlendAdditive.xsd"/>
</xs:schema>
+5 -21
View File
@@ -1,24 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Animation xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Animation.xsd">
<AnimationName1></AnimationName1>
<BlendType1><Blend/></BlendType1>
<Level1>0</Level1>
<Weight1>1.0</Weight1>
<Time1>0</Time1>
<Speed1>0</Speed1>
<Loop1>true</Loop1>
<AnimationName2></AnimationName2>
<BlendType2><Blend/></BlendType2>
<Level2>0</Level2>
<Weight2>1.0</Weight2>
<Time2>0</Time2>
<Speed2>0</Speed2>
<Loop2>true</Loop2>
<AnimationName3></AnimationName3>
<BlendType3><Blend/></BlendType3>
<Level3>0</Level3>
<Weight3>1.0</Weight3>
<Time3>0</Time3>
<Speed3>0</Speed3>
<Loop3>true</Loop3>
<AnimationName></AnimationName>
<Time>0</Time>
<Speed>0</Speed>
<Loop>true</Loop>
<Additive>false</Additive>
</Animation>
+5 -38
View File
@@ -2,48 +2,15 @@
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:complexType name="BlendEnum" mixed="true">
<xs:complexContent>
<xs:extension base="t:enum">
<xs:choice>
<xs:element name="Additive" type="xs:integer" fixed="0" minOccurs="0"/>
<xs:element name="Blend" type="xs:integer" fixed="1" minOccurs="0"/>
<xs:element name="Override" type="xs:integer" fixed="2" minOccurs="0"/>
</xs:choice>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="Animation">
<xs:complexType>
<xs:all>
<xs:element name="AnimationName1" type="t:string" minOccurs="0"/>
<xs:element name="BlendType1" type="BlendEnum" minOccurs="0"/>
<xs:element name="Level1" type="t:int" minOccurs="0"/>
<xs:element name="Weight1" type="t:double" minOccurs="0"/>
<xs:element name="Time1" type="t:double" minOccurs="0"/>
<xs:element name="Speed1" type="t:double" minOccurs="0"/>
<xs:element name="Loop1" type="t:bool" minOccurs="0"/>
<xs:element name="AnimationName2" type="t:string" minOccurs="0"/>
<xs:element name="BlendType2" type="BlendEnum" minOccurs="0"/>
<xs:element name="Level2" type="t:int" minOccurs="0"/>
<xs:element name="Weight2" type="t:double" minOccurs="0"/>
<xs:element name="Time2" type="t:double" minOccurs="0"/>
<xs:element name="Speed2" type="t:double" minOccurs="0"/>
<xs:element name="Loop2" type="t:bool" minOccurs="0"/>
<xs:element name="AnimationName3" type="t:string" minOccurs="0"/>
<xs:element name="BlendType3" type="BlendEnum" minOccurs="0"/>
<xs:element name="Level3" type="t:int" minOccurs="0"/>
<xs:element name="Weight3" type="t:double" minOccurs="0"/>
<xs:element name="Time3" type="t:double" minOccurs="0"/>
<xs:element name="Speed3" type="t:double" minOccurs="0"/>
<xs:element name="Loop3" type="t:bool" minOccurs="0"/>
<xs:element name="AnimationName" type="t:string" minOccurs="0"/>
<xs:element name="Time" type="t:double" minOccurs="0"/>
<xs:element name="Speed" type="t:double" minOccurs="0"/>
<xs:element name="Loop" type="t:bool" minOccurs="0"/>
<xs:element name="Additive" type="t:bool" minOccurs="0"/>
</xs:all>
<xs:attribute name="replicated" type="xs:boolean" fixed="true"/>
</xs:complexType>
</xs:element>
</xs:schema>
+6
View File
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Blend xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Blend.xsd">
<Pose1></Pose1>
<Pose2></Pose2>
<Weight>0.5</Weight>
</Blend>
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="Blend">
<xs:complexType>
<xs:all>
<xs:element name="Pose1" type="t:string" minOccurs="0"/>
<xs:element name="Pose2" type="t:string" minOccurs="0"/>
<xs:element name="Weight" type="t:double" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<BlendAdditive xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BlendAdditive.xsd">
<Adder></Adder>
<Receiver></Receiver>
</BlendAdditive>
@@ -0,0 +1,13 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="BlendAdditive">
<xs:complexType>
<xs:all>
<xs:element name="Adder" type="t:string" minOccurs="0"/>
<xs:element name="Receiver" type="t:string" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<BlendOverride xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="BlendOverride.xsd">
<Master></Master>
<Slave></Slave>
<Weight>1.0</Weight>
</BlendOverride>
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="types">
<xs:import schemaLocation="../Types.xsd" namespace="types"/>
<xs:element name="BlendOverride">
<xs:complexType>
<xs:all>
<xs:element name="Master" type="t:string" minOccurs="0"/>
<xs:element name="Slave" type="t:string" minOccurs="0"/>
<xs:element name="Weight" type="t:double" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
+69 -87
View File
@@ -26,42 +26,6 @@
</Components>
<Children/>
</Entity>
<Entity name="Running">
<Components>
<c:Animation>
<AnimationName1>Run</AnimationName1>
<Speed1>1</Speed1>
<AnimationName2>StrafeRight</AnimationName2>
<Weight1>0.5</Weight1>
<Time1>0.98334510030765165</Time1>
<Weight2>0.5</Weight2>
<Time2>0.97153983043137671</Time2>
<Speed2>1</Speed2>
<Time3>0.093923612201312068</Time3>
<Speed3>1</Speed3>
</c:Animation>
<c:Model>
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="-1" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity>
<Components>
<c:PointLight>
@@ -99,35 +63,19 @@
</Components>
<Children/>
</Entity>
<Entity>
<Entity name="Assault">
<Components>
<c:Animation>
<AnimationName1>Run</AnimationName1>
<Speed1>1</Speed1>
<AnimationName2>StrafeRight</AnimationName2>
<Weight1>0.5</Weight1>
<Time1>0.98334510030765165</Time1>
<Weight2>0.5</Weight2>
<Time2>0.89665639003541542</Time2>
<Speed2>1</Speed2>
<AnimationName3>ShootFastRifle</AnimationName3>
<BlendType3>
<Override/>
</BlendType3>
<Time3>0.099759525382621339</Time3>
<Speed3>1</Speed3>
</c:Animation>
<c:AnimationOffset>
<AnimationName>AimRifle</AnimationName>
<Time>0.68999981880187988</Time>
</c:AnimationOffset>
<c:Blend>
<Pose1>BlendOverride</Pose1>
<Pose2>AimAdditive</Pose2>
</c:Blend>
<c:Model>
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
</c:Model>
<c:Transform/>
</Components>
<Children>
<Entity>
<Entity name="WeaponAttachment">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
@@ -136,45 +84,79 @@
<Resource>Models/Weapons/Blue/AssaultWeaponBlue.mesh</Resource>
</c:Model>
<c:Transform>
<Position X="0.146727413" Y="1.15066242" Z="-0.195905238"/>
<Scale X="1.00000012" Y="1" Z="1.00000012"/>
<Orientation X="0.38856402" Y="0.017387826" Z="0.0776973143"/>
</c:Transform>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity>
<Components>
<c:Animation>
<AnimationName1>AimRifle</AnimationName1>
<Speed1>0.5</Speed1>
<AnimationName2>Ru</AnimationName2>
<Time1>0.57926159055711501</Time1>
</c:Animation>
<c:Model>
<Resource>Models/Characters/Assault/AssaultAnimations.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Transform>
<Position X="1" Y="0" Z="0"/>
</c:Transform>
</Components>
<Children>
<Entity>
<Entity name="AimAdditive">
<Components>
<c:BoneAttachment>
<BoneName>R_Arm_Weapon_Joint</BoneName>
</c:BoneAttachment>
<c:Model>
<Resource>Models/Weapons/Red/AssaultWeaponRed.mesh</Resource>
<Transparent>true</Transparent>
</c:Model>
<c:Animation>
<AnimationName>AimRifle</AnimationName>
<Time>0.1120316470564493</Time>
<Speed>0.5</Speed>
<Additive>true</Additive>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="BlendOverride">
<Components>
<c:BlendOverride>
<Master>ShootRifleAnimation</Master>
<Slave>BlendWalkRun</Slave>
</c:BlendOverride>
<c:Transform/>
</Components>
<Children>
<Entity name="BlendWalkRun">
<Components>
<c:Blend>
<Pose1>RunAnimtaion</Pose1>
<Pose2>WalkAnimation</Pose2>
<Weight>1</Weight>
</c:Blend>
<c:Transform/>
</Components>
<Children>
<Entity name="RunAnimtaion">
<Components>
<c:Animation>
<AnimationName>Run</AnimationName>
<Time>0.22406329411289949</Time>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
<Entity name="WalkAnimation">
<Components>
<c:Animation>
<AnimationName>Walk</AnimationName>
<Time>0.22406329411289949</Time>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
<Entity name="ShootRifleAnimation">
<Components>
<c:Animation>
<AnimationName>ShootFastRifle</AnimationName>
<Time>0.024060340702750871</Time>
<Speed>1</Speed>
</c:Animation>
<c:Transform/>
</Components>
<Children/>
</Entity>
</Children>
</Entity>
</Children>
</Entity>
</Children>
+3
View File
@@ -43,6 +43,9 @@
<xs:element ref="c:Shield" minOccurs="0"/>
<xs:element ref="c:Shielded" minOccurs="0"/>
<xs:element ref="c:CapturePointHUD" minOccurs="0"/>
<xs:element ref="c:BlendOverride" minOccurs="0"/>
<xs:element ref="c:Blend" minOccurs="0"/>
<xs:element ref="c:BlendAdditive" minOccurs="0"/>
</xs:all>
</xs:complexType>
</xs:element>