Commit graph

44 commits

Author SHA1 Message Date
Anthony J. Thibault
8e5785cdf8 Avatar animations are now stored locally
Improves FTUE, by no longer going over the network to download default avatar animations.
This also includes support for relative animation urls within the animation.json
2016-04-19 16:11:14 -07:00
Atlante45
05895f628a Revert to using a Resource 2016-04-12 13:51:11 -07:00
Atlante45
5eb4f63573 Use ResourceManager in anim loader 2016-04-12 13:51:11 -07:00
Atlante45
afdfef1482 Make sure we don't use raw resource ptr 2016-04-12 13:51:11 -07:00
Zach Pomerantz
aad40f5de0 Drop network data after processing 2016-03-25 09:58:34 -07:00
Brad Hefta-Gaub
eebf6f8883 Merge pull request #7021 from hyperlogic/tony/animation-mirror-support
AnimClip: Animation mirror support
2016-02-05 19:25:01 -08:00
Anthony J. Thibault
a8e092272c AnimStateMachine: added new State parameter interpType
interpType defines how the interpolation between two states is performed.

   * SnapshotBoth: Stores two snapshots, the previous animation before interpolation begins and the target state at the
     interTarget frame.  Then during the interpolation period the two snapshots are interpolated to produce smooth motion between them.
   * SnapshotPrev: Stores a snapshot of the previous animation before interpolation begins.  However the target state is
     evaluated dynamically.  During the interpolation period the previous snapshot is interpolated with the target pose
     to produce smooth motion between them.  This mode is useful for interping into a blended animation where the actual
     blend factor is not known at the start of the interp or is might change dramatically during the interp.
2016-02-04 10:32:58 -08:00
Anthony J. Thibault
03d5bc885b AnimClip: added mirrorFlag anim var 2016-02-02 17:10:15 -08:00
Anthony J. Thibault
e6abc026c8 AnimClip: mirror animation support 2016-02-02 17:02:29 -08:00
Anthony J. Thibault
80eb247b9c WIP checkin
* AnimManipulator: added absolute and relative position and translation support
* Rig: added _overrideFlags and _overridePoses for script overrides.
2015-11-16 18:49:47 -08:00
Anthony J. Thibault
936c55a94e New MyAvatar animation JS interface
JavaScript changes:

* removed MyAvatar.playAnimation
* removed MyAvatar.stopAnimation
* removed MyAVatar.getGetAnimationDetails
* removed MyAvatar.startAnimationByRole
* removed MyAvatar.stopAnimationByRole
* removed MyAVatar.getGetAnimationDetailsByRole
* removed MyAVatar.clearJointPriorities

* added MyAvatar.overrideAnimation(url, fps, loop, firstFrame, lastFrame)
* added MyAvatar.restoreAnimation()
* added MyAvatar.getAnimationRoles()
* added MyAvatar.overrideRoleAnimation(role, url, fps, loop, firstFrame, lastFrame)
* added MyAvatar.restoreRoleAnimation(role)
* added MyAvatar.prefetchAnimation(url)

* update kneel.js with new api.
* added theBird.js to test role override api.

C++ changes:

* Added getParent() and replaceChild() to AnimNode
* Added findByName() and traverse() to AnimNode
* Changed AnimStateMachine to hold nodes by childIndex instead of smart pointer.
  This allows script to replace nodes dynamically via overrideRoleAnimation
2015-11-10 16:34:38 -08:00
Anthony J. Thibault
8689170415 Removed sync and timescale from AnimBlendLinear node.
AnimBlendLinearMove will now be used instead.
2015-10-22 16:40:53 -07:00
Anthony J. Thibault
a66f31bb20 Added AnimBlendLinearMove node
AnimBlendLinearMove is now in use by forward, backward and strafe movements.
Tuned rig moving average speeds to be more sensitive.
2015-10-22 16:33:31 -07:00
Anthony J. Thibault
11f2d29bf8 AnimBlendLinear: bugfixes for sync flag added timeScale 2015-10-20 10:36:37 -07:00
Anthony J. Thibault
9b9bd7fe26 AnimNodeLoader: Fix for crash condition
When a node with children had an error loading, it would
lead to a nullptr dereference.
2015-10-19 15:49:50 -07:00
Anthony J. Thibault
2b4788929f AnimBlendLinear: Untested implementation of sync flag.
Move accumulateTime into AnimUtil.
2015-10-19 15:49:49 -07:00
Andrew Meadows
17e3e9394f allow head translation for 3rd person screenie IK 2015-09-24 12:38:46 -07:00
Anthony J. Thibault
bef136d811 AnimGraph: prefer QString over std::string 2015-09-17 11:21:14 -07:00
Anthony J. Thibault
5aeebba90e Renamed AnimController to AnimManipulator, Removed offsets on IK targets 2015-09-16 15:49:47 -07:00
Anthony J. Thibault
90f46ba2c8 Added hand state machines to AnimGraph.
* Application: Forward trigger values to the MyAvatar's PalmData
* SkeletonModel: Pass PalmData to Rig via updateRigFromHandData() this is more explicit then
  the Rig::inverseKinematics methods.
* AnimNodeLoader & AnimOverlay: add support for LeftHand and RightHand bone sets
* Rig::updateRigFromHandData() read the triggers and set stateMachine trigger vars
* avatar.json - udpated with new hand state machine with temporary animations
2015-09-14 18:54:12 -07:00
Anthony J. Thibault
9a9838fd0d Clean up of AnimNodeLoader after merge from master. 2015-09-10 11:47:41 -07:00
Anthony J. Thibault
663e37da66 Merge branch 'master' into tony/ik-and-controllers 2015-09-10 11:37:47 -07:00
Anthony Thibault
e8ede3ad00 Merge pull request #5731 from ChristophHaag/master
build fixes
2015-09-10 11:36:45 -07:00
Anthony J. Thibault
756eb54a0a AnimNodeLoader support for InverseKinematics node. 2015-09-09 15:28:21 -07:00
Anthony J. Thibault
146836452f Merge remote-tracking branch 'andrew/europium' into tony/ik-and-controllers 2015-09-09 09:40:55 -07:00
Anthony J. Thibault
75ecf0020d WIP commit, added AnimController node. 2015-09-08 20:34:21 -07:00
Andrew Meadows
c3e16d33c1 add InverseKinematics type 2015-09-08 18:18:50 -07:00
Stephen Birarda
c670c9a0d5 fix for AnimNodeLoader use of Resource loaded 2015-09-08 15:31:37 -07:00
Christoph Haag
ddcee763ca extend macros to take return value if necessary 2015-09-08 19:10:15 +02:00
Christoph Haag
fa221fa7e3 In gcc5 nullptr can't be directly used as bool
See https://gcc.gnu.org/gcc-5/porting_to.html
"Converting std::nullptr_t to bool"
2015-09-08 10:07:06 +02:00
Anthony J. Thibault
91fbbf7d4e Updated copyright boiler plate. 2015-09-02 13:35:26 -07:00
Anthony J. Thibault
df26f18222 Fix for compilation errors on linux 2015-09-02 13:29:29 -07:00
Anthony J. Thibault
fea030b9a0 Compile and warning fixes for MacOSX. 2015-09-02 12:18:17 -07:00
Anthony J. Thibault
1ae22268ac Added comment to AnimStateMachine header. 2015-09-02 11:04:52 -07:00
Anthony J. Thibault
9d983e0614 Bug fix to AnimNode::setSkeletonModel and AnimNodeLoader.
Also updated avatar.json to test nested graphs under a SM.
2015-08-28 17:16:32 -07:00
Anthony J. Thibault
3286a32afc Initial version of AnimStateMachine.
No interpolation support, but basic avatar.json is working
with two states and two transitions between them.
2015-08-27 20:41:53 -07:00
Anthony J. Thibault
0c02a338f2 Added support for setting Variants in the json file.
For example: the avatar.json file was updated to use the "sine" Variant
to drive the Overlay alpha parameter.
2015-08-25 20:57:01 -07:00
Anthony J. Thibault
7a2ca047cb Added network resource download support to AnimNodeLoader. 2015-08-24 19:00:12 -07:00
Anthony J. Thibault
c3fc37df18 Added true boneSets to AnimOverlay. 2015-08-05 18:07:56 -07:00
Anthony J. Thibault
1f8c8adbd6 Added AnimOverlay node, moved blend sub-routine into AnimUtil. 2015-08-05 17:05:53 -07:00
Anthony J. Thibault
5d83976e2a Added AnimBlendLinear + tests.
MyAvatar now does a sine wave blend between a walk
and a walk animation.
2015-08-04 18:14:50 -07:00
Anthony J. Thibault
f5dee717a1 Added fbx loading via animation cache.
* added AnimPose::copyFromNetworkAnim() which
  should, re-map bone ids to match the current
  skeleton, and fill in missing bones with bind
  pose frames.
* added ability to set a skeleton on a node.
  I might need to add a recursive version of this.
* it compiles!
* tests run!
2015-08-04 18:14:46 -07:00
Anthony J. Thibault
da809efcd6 WIP commit, DOES NOT BUILD.
* Added AnimSkeleton class
* Attempt to copy animation frames when _networkAnimation has
  finished loading.  Fill in the holes with bind pose.
2015-08-04 18:14:46 -07:00
Anthony J. Thibault
343b2ccf9d Added AnimNodeLoader which loads AnimClip nodes from json
* added tests and sample json file
2015-08-04 18:14:45 -07:00