Commit graph

313 commits

Author SHA1 Message Date
Anthony J. Thibault
485e36d824 Bug fix for hand IK when using the Owen avatar.
The IK was assiming that the "Hips" bone index was always 0.
This was not the case for Owen.  Now we lookup the Hips index
and cache it for use during the hipsOffset computation.
2015-10-26 17:17:46 -07:00
Andrew Meadows
341bc3666f Merge pull request #6093 from sethalves/hold-action-changes
Hold action changes
2015-10-20 09:19:48 -07:00
Andrew Meadows
917bfbf64e hack to reduce hand influence of hips in HMD mode 2015-10-19 15:19:32 -07:00
Seth Alves
462918ffcf cleanups 2015-10-15 14:55:17 -07:00
Seth Alves
4903db45b1 give other avatars an anim-skeleton 2015-10-15 14:21:06 -07:00
Seth Alves
a70ba4cd5a add some accessors 2015-10-15 11:42:53 -07:00
Anthony J. Thibault
e484a904a2 Rotate the avatar to align with the HMD while moving
MyAvatar: refactored updateFromHMDSensorMatrix() a bit by splitting it into several methods, because
it was getting quite large and becoming hard to follow.

* beginStraighteningLean() - can be called when we would like to trigger a re-centering action.
* shouldBeginStraighteningLean() - contains some of the logic to decide if we should begin a re-centering action.
  for now it encapulates the capsule check.
* processStraighteningLean() - performs the actual re-centering calculation.

New code was added to MyAvatar::updateFromHMDSensorMatrix() to trigger re-centering when the avatar speed rises
over a threshold.

Secondly the Rig::computeMotionAnimationState() state machine for animGraph added a state change hysteresis
of 100ms.  This hysteresis should help smooth over two issues.

1) When the delta position is 0, because the physics timestep was not evaluated.
2) During re-centering due to desired motion, the avatar velocity can fluctuate causing undesired animation state fluctuation.
2015-10-13 17:36:00 -07:00
Andrew Meadows
8ebdd25b71 more cleanup 2015-10-12 14:07:23 -07:00
Andrew Meadows
22786dea7d cleanup 2015-10-12 13:35:26 -07:00
Andrew Meadows
44243aaa52 remove some debug code 2015-10-12 11:39:54 -07:00
U-GAPOS\andrew
f01847de14 experimental HMD hips tracking 2015-10-12 11:39:54 -07:00
Andrew Meadows
35d2a5b5ea track tipRotation for HmdHead target 2015-10-12 11:39:54 -07:00
Andrew Meadows
5f1068c404 cleanup and optimization of IK loop 2015-10-12 11:39:54 -07:00
Andrew Meadows
6a96d5f0c5 don't bother to create targets with bad types 2015-10-12 11:39:54 -07:00
Andrew Meadows
bc48f70877 move IKTarget into its own files 2015-10-12 11:39:54 -07:00
Andrew Meadows
56f038d5a7 simpler logic for tracking hips offset 2015-10-12 11:39:54 -07:00
Andrew Meadows
03eaa95258 initial hip translation from IK
works for 2D 3rd person but probably not well for HMD
2015-10-12 11:39:54 -07:00
Anthony J. Thibault
1c2f86f8b7 Fix for sending translation for non-animated joints.
Only the JointState._defaultTranslation needs to be multiplied
by the unitScale in JointState::translationIsDefault().  This
was incorrectly flagging some non-animated joints as animated.
2015-10-08 17:50:22 -07:00
Andrew Meadows
6c2a94fddb remove unused method declarations 2015-10-07 14:17:21 -07:00
Brad Hefta-Gaub
7a85e5b7a7 rename frameIndex to currentFrame 2015-10-07 13:02:58 -07:00
Brad Hefta-Gaub
ef054ffc6d Merge branch 'master' of https://github.com/highfidelity/hifi into animationGroupSettings
Conflicts:
	libraries/networking/src/udt/PacketHeaders.cpp
	libraries/networking/src/udt/PacketHeaders.h
2015-10-07 11:27:50 -07:00
Brad Hefta-Gaub
6eeb64b032 CR feedback 2015-10-07 11:23:24 -07:00
Andrew Meadows
224fc55033 put IK targets in skeleton's model-frame 2015-10-06 16:49:29 -07:00
Brad Hefta-Gaub
016bf4011d cleanup 2015-10-06 16:07:36 -07:00
Brad Hefta-Gaub
1319642a59 fix frame jumping behavior on restart 2015-10-06 15:59:35 -07:00
Brad Hefta-Gaub
be79101a93 Merge branch 'master' of https://github.com/highfidelity/hifi into animationGroupSettings 2015-10-06 15:20:37 -07:00
Anthony J. Thibault
75849db867 Changed (float)fabs() to fabsf() 2015-10-05 12:00:02 -07:00
Brad Hefta-Gaub
f618a2adfa gak - get streaming working again 2015-10-02 17:06:32 -07:00
Anthony J. Thibault
b6b57de1c6 animation lib warning fixes 2015-10-02 16:42:50 -07:00
Brad Hefta-Gaub
57bf69cc48 Merge branch 'master' of https://github.com/highfidelity/hifi into animationGroupSettings
Conflicts:
	libraries/entities/src/ModelEntityItem.cpp
	libraries/networking/src/udt/PacketHeaders.cpp
2015-10-02 14:19:15 -07:00
Brad Hefta-Gaub
02536a5ab9 remove animationSettings from particles, add isEmitting 2015-10-02 14:17:01 -07:00
Brad Hefta-Gaub
e6fb587a8c Merge branch 'master' of https://github.com/highfidelity/hifi into animationGroupSettings 2015-10-02 13:04:14 -07:00
Brad Hefta-Gaub
b27396606b fix first run 2015-10-02 12:34:46 -07:00
Anthony J. Thibault
c0be32d359 Fix for model offset when using Rig Animations. 2015-10-02 11:40:46 -07:00
Anthony J. Thibault
fc7b6dee84 Merge branch 'master' into transmit-joint-translation 2015-10-02 11:40:33 -07:00
Anthony J. Thibault
a1b54945d6 Compute the model offset in the rig, using the bind pose of the hips. 2015-10-02 10:34:34 -07:00
Brad Hefta-Gaub
cf2693e712 working fistFrame lastFrame 2015-10-02 08:31:22 -07:00
Anthony J. Thibault
fa864d29f9 Merge branch 'master' into transmit-joint-translation 2015-10-01 16:55:24 -07:00
Howard Stearns
53e7d5fd7c Merge pull request #5975 from AndrewMeadows/cleanup-legacy-constraints
remove cruft relating to old verlet avatar skeleton simulation
2015-10-01 16:48:33 -07:00
Anthony J. Thibault
fe5ea471a1 AnimClip: read in translations from fbx file and pre-process them
Do the following things to the translations

  1. scale by the model offset, this should move the translations into the correct units (meters).
  2. compute the ratio between the bone length in the animation and the skeleton.
  3. subtract the anim translation from the first translation frame in the animation
     effectively turning it into a bind pose delta translation.
  4. apply bone length ratio to the resulting delta.
  5. set the final translation to be the skeleton rel bind pose + this scaled delta translation
2015-10-01 16:10:33 -07:00
Brad Hefta-Gaub
afe5075e10 Merge pull request #5971 from howard-stearns/AnimVariant-warning-squash
Squash compiler warning in AnimVariant.
2015-10-01 14:41:40 -07:00
Howard Stearns
739545794f Merge pull request #5944 from AndrewMeadows/ik-repairs-007
fix bug: IK attenuates fast underpose animations
2015-10-01 14:27:21 -07:00
Andrew Meadows
09ac01a5e7 remove cruft from old verlet avatar simulation 2015-10-01 13:44:50 -07:00
Brad Hefta-Gaub
91a27e3adf get animation to actually run again 2015-10-01 13:29:07 -07:00
Seth Alves
25cbebb66c Merge branch 'transmit-joint-translation' of github.com:sethalves/hifi into transmit-joint-translation 2015-10-01 13:24:04 -07:00
Seth Alves
8453043038 remove unused variable 2015-10-01 13:23:51 -07:00
Brad Hefta-Gaub
aca25bd76e connect up AnimationPropertyGroup to AnimationLoop 2015-10-01 11:05:16 -07:00
Howard Stearns
335d87134b Squash compiler warning in AnimVariant. 2015-10-01 10:58:31 -07:00
Anthony J. Thibault
d993d39718 Bug fix for deriveBodyFromHMDSensor calculations
The calculation that determined where the body position relative to the HMD
was incorrect, one of the components was in the wrong coordinate frame.

Now use the skeleton's bind pose to compute the proper avatar offsets for the eyes, neck and hips.
Use these offsets to calculate where the hips should be given a specific hmd position and orientation.

Also, added a bug fix for Rig, which would cause a -1 index deference when an avatar was missing
certain named joints, such as, "LeftEye", "Neck" and "Head".
2015-09-30 16:28:33 -07:00
Andrew Meadows
b192d0a9cd make neck IK target type same as head 2015-09-29 17:39:17 -07:00