1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 10:49:57 +00:00
Commit graph

143 commits

Author SHA1 Message Date
Chris Robinson
08d43fe217 Make the getHeadNode method more general 2013-04-08 05:48:52 -07:00
Chris Robinson
7baca30a1d Only get the non-accum root's keyframe when updating positions
The actual animation pose is now handled by the controllers, based on the
current animation time.
2013-04-07 16:21:45 -07:00
Chris Robinson
261ea1fe5e Implement a KeyframeController 2013-04-07 14:56:23 -07:00
Chris Robinson
f69a8259e1 Update animation source controller targets 2013-04-07 13:51:04 -07:00
Chris Robinson
2362e920f3 Use an unconnected object list for animation sources
We'll want the controllers, as the plan is to use their keyframe controllers
to animate the actual skeleton used for the meshes.
2013-04-07 12:41:27 -07:00
Chris Robinson
80a1abd48a Clear the old text keys when setting new animation sources 2013-04-07 11:09:55 -07:00
Chris Robinson
be419bc891 Handle NiCamera nodes 2013-04-07 02:28:15 -07:00
Chris Robinson
2db72ae607 Rename EntityList to ObjectList 2013-04-07 01:52:35 -07:00
Chris Robinson
59f1d4b047 Add support for NiUVController on meshes 2013-04-06 09:44:10 -07:00
Chris Robinson
0631b28646 Prepare for supporting controller objects 2013-04-05 10:13:54 -07:00
Chris Robinson
af2a38db38 Fix looping anims that dont have "loop start" 2013-04-05 08:27:26 -07:00
Chris Robinson
77ba0fbe73 Prepare for creating particles
This adds a vector of ParticleSystems to the EntityList, and modifies
corresponding code to handle it. It also loads the ParticleFX plugin so
particles can be created (although they aren't yet).
2013-04-04 05:10:52 -07:00
Chris Robinson
bfe80bb8dc Avoid duplicating skeletons due to casing issues
Manually created resource names are apparently always case sensitive, causing
some skeletons to get loaded multiple times.
2013-02-27 12:33:36 -08:00
Chris Robinson
8e59ea4941 Use a separate method to handle animation events 2013-02-23 14:39:01 -08:00
Chris Robinson
d77d035d3a Handle the "sound" events in runAnimation 2013-02-23 14:15:11 -08:00
Chris Robinson
d208422ca7 Add a method to update an Animation's Ptr object 2013-02-23 10:12:36 -08:00
Chris Robinson
0d0e75fe0b Don't set animation sources for models that don't have a skeleton 2013-02-23 07:36:11 -08:00
Chris Robinson
e6da9dfae5 Specify the animation key to stop playing at 2013-02-23 05:15:10 -08:00
Chris Robinson
b8f5813609 Set all animation sources at once 2013-02-23 03:34:03 -08:00
Chris Robinson
9dee2a72cd Use a separate method to calculate animation velocity 2013-02-22 09:22:06 -08:00
Chris Robinson
617158afcd Ensure updated skeleton bone placement matches in world space
Objects attached to actors (shirts, robes, etc) do not require the same node
hierarchy as the character root. So to ensure proper placement, we need to set
the bone target's derived transformation using the source bone's derived
transformation (which in turn means we need to work up from the root, to ensure
the bone's parents are properly placed).
2013-02-20 02:41:46 -08:00
Chris Robinson
8196694c08 Avoid applying the animation when resetting it 2013-02-19 06:04:25 -08:00
Chris Robinson
f8349a04bf Use the looping portion of the animation to calculate the velocity 2013-02-19 05:26:58 -08:00
Chris Robinson
1399a06c76 Update animation looping when setting the same state 2013-02-19 04:01:33 -08:00
Chris Robinson
ff0099fa6e Scale the animation speed based on the animation velocity and movement speed
This may not be totoally correct since it takes the whole animation into
account, rather than just the looping portion. But it's good enough for now.
2013-02-15 02:15:39 -08:00
Chris Robinson
4ee5857bae Filter accumulation axis for mLastPosition as needed 2013-02-09 19:09:56 -08:00
Chris Robinson
8d6f017f17 Remove an unneeded Animation field 2013-02-09 13:25:39 -08:00
Chris Robinson
18b7008409 Better fix some scaling issues 2013-02-05 18:25:09 -08:00
Chris Robinson
8b1e7b95ba Attempt to load the skeleton source if it doesn't yet exist 2013-02-05 17:55:12 -08:00
Chris Robinson
054ef3113a Check existing skeleton sources if the current one has no animation root 2013-02-05 17:15:40 -08:00
Chris Robinson
16933e3926 Scale the accumulation root translation 2013-02-05 16:59:20 -08:00
Chris Robinson
600fe06f00 Use a vector of skeletons to handle animation sources 2013-02-05 16:29:51 -08:00
Chris Robinson
23acf4b130 Don't break right away when the animation time remaining is 0 2013-02-03 01:38:42 -08:00
Chris Robinson
fc7590694d Revert "Revert "Use a child scene node for the accumulation root""
This reverts commit 376dfed15b.

I was wrong. It's needed at least for NPCs since they're attaching multiple
animated skeletons to an object, and they all need to be offset correctly.

Would be nice to use a Node, Bone, or TagPoint instead of a hefty SceneNode,
though.
2013-02-02 05:43:37 -08:00
Chris Robinson
376dfed15b Revert "Use a child scene node for the accumulation root"
This reverts commit d6f923f274.

We don't need it for any of the NIFs we're currently handling. As long as
there's no NIF files that would break it, we should require a stationary root
if an animation wants to accumulate. If we must, a better idea may be to inject
an extra bone into the skeleton instance and make that the accumulation root.
2013-02-01 08:50:32 -08:00
Chris Robinson
d6f923f274 Use a child scene node for the accumulation root 2013-01-30 22:28:18 -08:00
Chris Robinson
b6354c6282 Don't share skeleton instances between bounded parts on an NPC
However, a skeleton instance will still be shared between entities in an entity
list.
2013-01-30 09:29:16 -08:00
Chris Robinson
5c3a7f7d52 Avoid handling animation states
We don't need them anymore
2013-01-30 07:34:07 -08:00
Chris Robinson
360f7bfac8 Apply animations to bones manually
Couple reasons for this:

* This paves the way for allowing animations specified in other skeletons to
be applied to the character (NPCs and certain creatures can have multiple
animation sources, but Ogre is incredibly strict when it comes to sharing
animations between skeletons).

* It will allow for entities to be animated based on the character's skeleton,
without having to duplicate the mesh for each skeleton it can be used on.

This doesn't impact Ogre's ability to efficiently deform skinned meshes, nor
does it get in the way of hardware skinning.
2013-01-30 07:04:18 -08:00
Chris Robinson
99efe4e494 Remove an unnecessary class member 2013-01-29 01:02:55 -08:00
Chris Robinson
879359f39d Set the animation state loop flag as appropriate 2013-01-29 00:50:52 -08:00
Chris Robinson
92d0c55f32 Add a flag to specify if an animation should be playing 2013-01-29 00:43:42 -08:00
Chris Robinson
7df4d0d19f Remove an unnecessary cast 2013-01-28 21:41:51 -08:00
Chris Robinson
b1ffdf855f Reset the initial state of animated nodes on the skeleton instances
This is so the animation specifies node keyframe data based on the node's
parent. This will also be necessary for applying animations from different
skeleton sources, as they can have different binding positions (even native
.skeleton resources will need to specify animation data this way).
2013-01-26 04:48:53 -08:00
Chris Robinson
05f8b8c283 Specify the text key to reset animations to 2013-01-22 00:31:45 -08:00
Chris Robinson
37fe1bd3f0 Handle looping in the Animation object 2013-01-21 22:51:13 -08:00
Chris Robinson
536f8104e6 Do not create an 'all' animation. 2013-01-20 17:24:43 -08:00
Chris Robinson
e1e76bde76 Combine a loop into another where it's used 2013-01-20 15:39:43 -08:00
Chris Robinson
85ca1e993f Properly check if an animation exists before playing it 2013-01-19 21:55:04 -08:00
Chris Robinson
0b68953f0d Scale animation speed using the direction length
The direction length doesn't currently give a good speed, but it's something.
2013-01-18 21:40:47 -08:00