Commit graph

1184 commits

Author SHA1 Message Date
amantley
d231a35dfa changes to get spine2 and neck to work almost there 2018-11-05 08:35:01 -08:00
amantley
5392d21b1c loading test file to check rotation offsets 2018-11-02 17:59:18 -07:00
sabrina-shanman
cbca77b12f Rename HFMGeometry to HFMModel and adjust related variables 2018-11-01 17:17:48 -07:00
amantley
64d8fa6875 added the const argument to the AnimSkeleton constructor that allows the offset rotations to be passed in 2018-11-01 13:33:03 -07:00
amantley
f1d9ab76b4 Merge remote-tracking branch 'luis/readRotationOffsetsFromFst' into avatarPipelineOffsets
merging code from luis case #19420 for getting the rotations from the
fst into the rig class
2018-10-31 10:29:58 -07:00
luiscuenca
c070bce2ec Read joint rotation offsets from .fst 2018-10-31 08:39:35 -07:00
amantley
e24f10a125 debugging offset vector 2018-10-30 17:33:28 -07:00
sabrina-shanman
becee7f010 Re-name FBXGeometry to HFMGeometry and do the same for related classes 2018-10-30 17:28:42 -07:00
amantley
339ecb1faa adding the offsets to the AnimSkeleton.cpp 2018-10-30 16:54:34 -07:00
Jeff Clinton
eb383b1d09
Merge pull request #14040 from hyperlogic/feature/acceleration-limit-filter
Quality Improvements to Avatars driven by Vive Trackers
2018-10-25 08:51:59 -07:00
Jeff Clinton
67fe43ebb1
Merge pull request #14243 from hyperlogic/bug-fix/small-jumping-avatars
Small avatars now have a minimum jump height of 0.25 meters
2018-10-24 17:08:28 -07:00
luiscuenca
fa67e1b269 Remove logs and magic numbers 2018-10-23 11:51:15 -07:00
luiscuenca
afc76fec72 Added overrideNetworkAnimation and restoreNetworkAnimation methods 2018-10-22 15:20:32 -07:00
Luis Cuenca
e1c760b566
Merge branch 'master' into transitAddAnimation 2018-10-20 15:30:23 -07:00
luiscuenca
f8d67d124f Hold flickering fixed and refactor 2018-10-20 15:22:25 -07:00
Seth Alves
2ce8ed25f8
Merge pull request #14125 from Atlante45/fix/mac-warnings
Fix new Mac warnings
2018-10-20 13:40:53 -07:00
Sam Gateau
6005b934ad
Merge pull request #13979 from AndrewMeadows/game-loop-optimizations-001
minor bug fix and optimization in ModelEntity animation
2018-10-19 17:02:48 -07:00
luiscuenca
31d099907a Fix warnings 2018-10-19 14:00:52 -07:00
Anthony Thibault
ef74014075 Small avatars now have a minimum jump height of 0.25 meters
This should improve the quality of the jump animation and improve the mobility of small avatars.
2018-10-19 13:55:56 -07:00
John Conklin II
4dec304d66
Merge pull request #14162 from luiscuenca/cleanElbowPoleVectorSmooth
Clean up elbow smoothing code
2018-10-18 19:16:32 -07:00
luiscuenca
bb5c042f16 Blend network animation 2018-10-18 17:51:20 -07:00
Anthony Thibault
3e68a1d5a5 Merge branch 'master' into feature/acceleration-limit-filter 2018-10-18 16:51:57 -07:00
Sam Gondelman
e3543cf098
Merge branch 'master' into scriptvec3 2018-10-17 13:10:29 -07:00
Andrew Meadows
148944814b consolidate two bad string checks into one 2018-10-17 11:45:39 -07:00
luiscuenca
078baa86e4 Sitting abort post transit animation 2018-10-16 13:16:01 -07:00
luiscuenca
7da5fa9ea7 Transit animations won't play, they just get sent over the network 2018-10-16 11:33:58 -07:00
Anthony Thibault
640ed6a32a Added "Developer > Avatar > Show Tracked Objects" menu 2018-10-15 12:42:07 -07:00
Anthony Thibault
c0ceb713ec Spine2 IKTarget now smoothly interpolates when ik target is disabled.
Also all smooth ik interpolations use easeInExpo instead of linear curves.
2018-10-09 16:48:28 -07:00
Clement
8983fe2bcf Fix new Mac warnings 2018-10-09 12:11:55 -07:00
Anthony Thibault
4e75123740 Blend between non-estimated and estimated hips in Rig 2018-10-09 10:51:03 -07:00
Anthony Thibault
0283c9fbdc Added CriticallyDampedSpringPoseHelper to help smooth out hips. 2018-10-09 10:51:02 -07:00
unknown
1172e29d95 Clean up elbow smoothing code 2018-10-08 13:21:47 -07:00
SamGondelman
4024f2a180 fix various resourcecache bugs 2018-10-04 11:29:22 -07:00
Sam Gondelman
5b6e7b2566
Merge branch 'master' into scriptvec3 2018-10-02 08:58:04 -07:00
Anthony Thibault
b0cde2afcc Small addition to Anim Stats
* During a state machine interp the previous state now shows up in AlphaValues panel, with parentheses around the name.
* Added 3 new fields
  * Position - in world coordinate frame.
  * Heading - the facing angle in the world corrdinate frame.
  * Local Vel - the velocity of the character in the local coordinate frame. (left, forward, up).
2018-09-14 15:05:17 -07:00
SamGondelman
c522d1bc93 merge with master 2018-09-14 00:57:13 -07:00
Anthony Thibault
5a059e9318 Fix for build failure on linux and android. 2018-09-07 09:44:19 -07:00
Anthony Thibault
acc7f1f168 Moved AnimStats into its own qml panels.
Added state machine tracking as well.
2018-09-06 16:18:58 -07:00
Anthony Thibault
3a3ffcc98c First pass at improving anim stats. 2018-09-05 18:14:06 -07:00
SamGondelman
589e88af4a Merge remote-tracking branch 'upstream/master' into scriptvec3 2018-09-04 17:54:45 -07:00
SamGondelman
9b75c7e07f trying to separate colors and vectors 2018-09-04 17:20:05 -07:00
Anthony Thibault
e210fadc7c Fix for glitch when entering inAir state from takeoff.
This was due to a frame lag of blend factor used for inAir blending.  So the first frame the upward velocity would be 0, followed by 3.5 m/s the next frame.
This is fixed by using the workingVelocity instead of _lastVelocity to drive the blend.
2018-09-04 14:36:56 -07:00
Cristian Luis Duarte
4f3a730d6d Android - Handshake implementation - two important notes - IK was disabled on android and this enables it (needs a well thought review) - TouchscreenVirtualPadDevice buttons code does not scale well, it needs a refactor 2018-08-29 18:53:14 -03:00
amantley
671bf32d58 removed whitespace 2018-08-23 17:36:35 -07:00
amantley
884be2f99d removed comment and whitespace 2018-08-23 17:30:03 -07:00
amantley
0cc302f68c set phase to 0.0 2018-08-23 17:28:38 -07:00
amantley
220dbf586f set the phase to 0.0 when it is negative 2018-08-23 16:46:58 -07:00
SamGondelman
283c0c0311 s i m p l i f y 2018-08-23 11:47:56 -07:00
Sam Gondelman
f0986a7f5a Merge branch 'master' into scriptvec3 2018-08-20 10:56:45 -07:00
John Conklin II
644ff1eafa
Merge pull request #13655 from amantley/animationBlendChanges
New Default Strafe Animations Plus Animation Tuning Support
2018-08-10 15:03:30 -07:00
Anthony J. Thibault
3fa3cd8cfd In CCD IK chains, remove the LeftHand and RightHand constraint completely.
When used in combination with the elbow pole vector, this was causing the hand to never properly reach its rotation target.
It was also having side effects causing the elbow to never straighten properly to reach its position target.

There is possibly a bug in how this tip constraint is enforced and I've verified that there are no ill effects in removing it.
2018-08-08 13:56:47 -07:00
amantley
1353406254 more whitespace 2018-08-07 12:56:28 -07:00
amantley
4ad73fd821 removed whitespace 2018-08-07 12:51:23 -07:00
amantley
a61909446a Merge remote-tracking branch 'upstream/master' into animationBlendChanges 2018-08-07 10:40:22 -07:00
amantley
84619e7adc cleaned up to match coding standards 2018-08-07 10:40:11 -07:00
amantley
1ad6b041cd updated the elipes equation code for determining the forward speed of the avatar. We can now set the max forward == walkSpeed, max side and backwards == walkBackwardsSpeed and the sprint speed == sprintSpeed 2018-08-06 18:36:32 -07:00
Anthony Thibault
079b276c2b
Merge pull request #13733 from luiscuenca/fixElbowPoleVector3
Elbow pole vectors improvements
2018-08-06 17:33:03 -07:00
amantley
f1990378fd merged the json from the ik 2 bone pr into the new animation json 2018-08-06 14:27:09 -07:00
Angus Antley
a63b213d65 fixed the weight calculation for the hand overlays. to do: check the blends in hmd mode 2018-08-06 15:18:17 +01:00
amantley
bac9d195be working on the hand blend alphas, something is wrong with the print out 2018-08-03 17:56:49 -07:00
amantley
375d726535 added the new animations for strafe and walk to the resource file and updated the avatar-animation.json file 2018-08-03 16:48:43 -07:00
Sam Gondelman
7772e8adf2
Merge branch 'master' into scriptvec3 2018-08-03 14:57:49 -07:00
amantley
76b182f03b added the hmd strafe to the rig code 2018-08-03 12:12:01 -07:00
amantley
096cb0db81 working on strafe left and right transitions 2018-08-02 13:32:06 -07:00
amantley
bd88d5f15b merging with ik leg fix code in master 2018-08-02 09:48:04 -07:00
amantley
6b2c67e5bd more doug support 2018-08-01 18:22:51 -07:00
John Conklin II
fd1a431729
Merge pull request #13689 from ctrlaltdavid/M15244
Move scriptable caches' APIs into scripting interfaces
2018-08-01 11:50:13 -07:00
luiscuenca
fde77add79 Elbow pole vectors fixes 2018-08-01 11:49:18 -07:00
Anthony J. Thibault
fd780845bb Code review feedback 2018-07-31 18:25:04 -07:00
SamGondelman
2ca217eb4a merge with master 2018-07-30 17:43:15 -07:00
amantley
541d2deed5 added the parent alpha into the child animation weight, removed extra hand overlay print outs 2018-07-30 14:45:25 -07:00
Anthony J. Thibault
58f95bd07b assert fix 2018-07-30 13:14:32 -07:00
Anthony J. Thibault
6a6ece8910 Warning fixes and whitespace cleanup 2018-07-30 11:49:44 -07:00
Anthony J. Thibault
401995fb06 Leg IK fixes
Fixes for raising legs and sometimes squatting while in HMD mode.
2018-07-30 10:55:52 -07:00
amantley
637a214165 added the anim stack print out static object for the list of motion and weights 2018-07-27 17:25:00 -07:00
amantley
b28ce40f09 adding the anim stack print out feature half way done 2018-07-27 08:46:40 -07:00
David Rowe
9a9d190918 Remove unnecessary duplicate function 2018-07-26 20:26:13 +12:00
David Rowe
baf88ab508 Revise scriptable resource caches' interfaces 2018-07-26 16:12:16 +12:00
amantley
fee05b6b8d debug of anim state machine tree traversal 2018-07-25 17:46:19 -07:00
David Rowe
16e06de9cd Move scriptable caches into scripting interfaces
Removed non-working getResource() API functions.
2018-07-25 22:10:14 +12:00
amantley
b91df1b2d4 cleaned up stray files and old hud code 2018-07-24 17:25:27 -07:00
amantley
04dbafeedc removed the hard coded reference speeds in Rig.cpp. we now use the characteristic speeds from the avatar-animation.json file for blending. the computation of the blend alphas takes place in AnimBlendLinearMove.cpp 2018-07-24 17:13:57 -07:00
luiscuenca
e7d70a832d Pole Vectors always calculated when arms are crossed 2018-07-24 08:58:17 -07:00
amantley
aa92865b21 added the code to display the alphas for the motion blends 2018-07-23 17:45:24 -07:00
luiscuenca
8f547d9bdd fix warnings 2018-07-23 16:37:25 -07:00
luiscuenca
94bb8fc917 More unused code 2018-07-23 15:29:42 -07:00
luiscuenca
4a27189913 function consistancy 2018-07-23 14:27:55 -07:00
luiscuenca
2adb334034 unused code deleted 2018-07-23 14:25:30 -07:00
luiscuenca
9d2d7c3aa4 Redesign and enable hand's Pole Vectors for elbow simulation 2018-07-23 13:16:11 -07:00
amantley
65160e4513 changed the middle reference speed for forward movement so that run doesn't get blended into walk 2018-07-20 14:07:24 -07:00
amantley
6db108e78e added a third reference speed to the lateral speeds in rig.cpp 2018-07-19 15:27:57 -07:00
SamGondelman
9929529f30 vec3 conversion 2018-07-11 14:18:22 -07:00
Anthony Thibault
f56c0a3a3f
Merge pull request #13502 from luiscuenca/eyelidFix
Fix closed eyelids when head is tilted down
2018-07-05 08:50:22 -07:00
Anthony J. Thibault
3a88582f42 Bug fix for feet poleVector smoothing.
This bug was introduced when I renamed the variable from poleVector to sensorPoleVector for readablity.
2018-07-02 15:16:47 -07:00
Anthony J. Thibault
fff4348a0f Bug fix for poleVector smoothing
Needs to occur in sensor space rather then avatar space.
2018-06-29 17:54:21 -07:00
luiscuenca
24d03ace4c Changes from CR and decreased looking at angle to mitigate freaky eyes 2018-06-29 14:34:17 -07:00
Andrew Meadows
6331395a89 remove crash mode in invokable methods 2018-06-15 10:27:35 -07:00
Anthony J. Thibault
94c39bc4af Better fix for looking down at your own body. 2018-06-05 14:43:33 -07:00
Anthony J. Thibault
c3d1daf855 Merge branch 'master' into nativeCGCode 2018-06-04 09:32:38 -07:00
David Rowe
e44e7ca35f Fix up Resource and resource cache APIs' JSDoc 2018-05-21 11:57:16 +12:00
Anthony J. Thibault
ec638d9d91 Avatar can now look straight down without spinning 180.
Also, come code clean up and removal of unnecessary Y_180 flips.
2018-05-14 13:48:04 -07:00
Clement
da9fb9c751 Fix non self-sufficient headers 2018-05-04 16:26:41 -07:00
David Rowe
e95c38d939 Merge branch 'master' into 21856-g
# Conflicts:
#	libraries/model-networking/src/model-networking/TextureCache.h
2018-05-03 21:03:14 +12:00
David Rowe
48632be3c2 Fix up cache APIs' JSDoc 2018-05-02 16:12:48 +12:00
David Rowe
1aa28b7f54 Merge remote-tracking branch 'upstream/master' into 21856-d
# Conflicts:
#	interface/src/LODManager.h
2018-05-02 07:50:55 +12:00
Oren Hurvitz
69b97b423f Added a missing 'break' in AnimExpression::evalUnaryMinus() 2018-04-30 15:42:45 +03:00
David Rowe
2cc3ed6287 List which contexts each namespace and object is available in 2018-04-28 20:00:28 +12:00
David Rowe
08dc9b133f Docs to JSDoc review 2018-04-26 21:10:28 +12:00
milad nazeri
23d07fa292 fixed spacing issue 2018-04-24 13:14:55 -07:00
milad nazeri
1121fe8da0 fix tabs 2018-04-23 21:47:53 -07:00
milad nazeri
4ac06fe99f Updating previous jsdocs 2018-04-22 22:22:33 -07:00
milad nazeri
e9b9c05b5d removed cruft 2018-04-22 08:51:47 -07:00
Anthony Thibault
dc9c9fd0ee
Merge pull request #12683 from hyperlogic/bug-fix/reduce-elbow-flapping
Reduce avatar elbow fluttering by disabling pole vectors
2018-04-02 10:51:28 -07:00
John Conklin II
563ff61325
Merge pull request #12661 from SamGondelman/android
Android: Stats, disable IK, reduce impact of InputRecorder
2018-03-23 11:08:50 -07:00
Anthony J. Thibault
f19b1d9890 Fix for character walk animations in desktop mode. 2018-03-20 18:12:55 -07:00
Anthony J. Thibault
69f462baeb Disable elbow pole vectors, solve from joint limit centers. 2018-03-19 18:53:00 -07:00
SamGondelman
06c0b3afd3 disable IK on android, input recorder doesn't do anything if off 2018-03-16 16:52:12 -07:00
Anthony J. Thibault
f6c4f6b9c4 Fix for arm IK jitter
When in HMD mode, holding your hand controller in front of your face, would often result in a 1-2 mm pop in wrist position.
This was due to a problem in the IK elbow constraint.
When the swing rotation out of the elbow's reference frame was close to but not exactly identity it would not be properly constrainted.
But when the magnitude of that swing became big enough the constraint would engage.
This small change in swing rotation was noticable as a 1-2 mm movement in the wrist.
2018-03-15 13:06:27 -07:00
David Rowe
75189e292d Fix OSX / Linux warning 2018-03-13 10:22:50 +13:00
David Rowe
945858876e Use std::vector<> instead of QVector 2018-03-13 09:53:25 +13:00
David Rowe
5acc605ba0 Fix OSX / Linux warning 2018-03-12 16:03:31 +13:00
David Rowe
957d39b0b1 Fix rotation and position of meshes attached to eye joints 2018-03-11 14:49:23 +13:00
Seth Alves
bf73df1265 more logging for fogbugz 11748 2018-02-20 15:45:47 -08:00
John Conklin II
309c2ecba1
Merge pull request #12239 from druiz17/fix-camera-update
Do not override sensorToWorldMatrix if animGraph is loading or failed to load
2018-02-13 15:10:13 -08:00
John Conklin II
d084e58f48
Merge pull request #12328 from Atlante45/fix/misc-bugs
Misc bug fixes
2018-02-12 14:31:38 -08:00
Dante Ruiz
d381beb213 cleaning up code 2018-02-12 10:53:42 -08:00
Dante Ruiz
0c5c4679fb Merge branch 'master' of github.com:highfidelity/hifi into fix-camera-update 2018-02-05 14:25:54 -08:00
Anthony Thibault
819af96fcc
Merge pull request #12331 from ctrlaltdavid/21732
Fix scaling of avatar submeshes attached to joints
2018-02-05 10:19:18 -08:00
David Rowe
9818674549 Fix scaling of avatar submeshes attached to joints 2018-02-03 15:06:47 +13:00
Dante Ruiz
d593e7107c fix merge conflict 2018-02-02 13:29:31 -08:00
Atlante45
8ebb3e52d8 Misc bug fixes 2018-02-02 13:10:49 -08:00
John Conklin II
cbdbf51ccd
Merge pull request #12317 from hyperlogic/feature/remove-ik-hips-offset
Removal of hips offset shifting from AnimInverseKinematics node
2018-02-01 15:30:08 -08:00
Anthony J. Thibault
b23f98b311 Removal of hips offset shifting from AnimInverseKinematics node
With the addition of the hips IK target, the hips offset shifting code is no longer necessary.
This PR should not effect any behavior, but it removes this unused code from the animation system.
2018-01-31 17:56:33 -08:00
Anthony J. Thibault
ed67a5b408 Fix avatars with extra joints during mirrored animations
When the avatar is rotated it will play a mirrored and non mirrored versions of the rotation animation.
The mirrored version would also mirror extra joints on the model, yielding unexpected results.
This refines the logic that determines which joints are NOT mirrored, so that extra joints
remain unaffected by the mirrored animation playback.
2018-01-30 16:51:39 -08:00
Seth Alves
b6f7d2eb89 print warnings if head position contains not-a-number 2018-01-25 15:15:59 -08:00
Dante Ruiz
b7ba7862aa give animGrapgh loader a high priority 2018-01-24 11:18:42 -08:00
Anthony J. Thibault
cd4d9255bd Added defaultPoseFlags to avatar protocol
Change rotationSet to rotationIsDefaultPose for JointData
Also for translation.  Fixed all code to flip boolean value.
Created EntityJointData so that the ModelEntity stuff doesn't need to change.
2018-01-19 15:34:27 -08:00
Anthony J. Thibault
bc587bf6d8 Removal of legacy Rig methods 2018-01-16 18:19:35 -08:00
Anthony J. Thibault
576273efe3 Remove Rig::restoreJointPosition and references to it. 2018-01-16 18:01:58 -08:00
Anthony J. Thibault
1027025b5c remove bind poses from AnimSkeleton. 2018-01-16 17:41:25 -08:00
Anthony J. Thibault
51ea2632c0 Remove Avatar UseAnimPreAndPostRotations option.
This should always be true and can lead to hard to diagnose bugs if it is ever set to false.
2018-01-16 17:27:19 -08:00
Anthony Thibault
0a54241fe3
Merge pull request #12092 from hyperlogic/feature/dual-quat
Fix tootsie roll wrists and shoulders with dual quaternion skinning
2018-01-12 16:30:03 -08:00
Anthony J. Thibault
bfd18e3696 unused variable warning fix 2018-01-12 09:07:50 -08:00
Anthony J. Thibault
983e1fe075 warning fixes: removed unused variable. 2018-01-11 17:57:58 -08:00
Anthony J. Thibault
4e4ac6c54d Merge branch 'master' into bug-fix/elbow-glitch-fix 2018-01-11 17:57:41 -08:00
Anthony J. Thibault
7753b8a0b5 Merge branch 'master' into feature/dual-quat 2018-01-11 17:31:29 -08:00
Anthony J. Thibault
467a7eaf2d Fix for elbow glitches
The pole vector constraint calculation within the IK system would sometimes compute the incorrect rotations.
This would be visible as an instantaneous snap of the elbow joint as the bicep was curled.

When applying pole vector constraints, there needs to be two methods of determining the current orientation of the elbow joint.
One for when the arm/elbow joint is bent, and one for when the arm/elbow is straight.
Previously, the way we would switch between these two solutions could cause a large rotation delta to accur between very small angles.
Now we use the more accurate method (1) more often, and we smoothly blend between the solutions as the joint gets straighter.
2018-01-11 15:40:53 -08:00
Anthony J. Thibault
ae997928c1 Bug fix to prevent wrists entering the avatar's torso.
This was inadvertently disabled in PR #11978.
2018-01-10 11:51:44 -08:00
Anthony J. Thibault
d08f94a74d Code review feedback
* Removed AnimPose::fuzzyEqual
* Fixed DualQuaternion ctor
2018-01-08 13:36:23 -08:00
Anthony J. Thibault
515d13a4c1 WIP checkpoint 2018-01-04 16:09:08 -08:00
Anthony J. Thibault
565875e823 WIP first attempt at dual quat skinning 2018-01-04 16:09:02 -08:00
Anthony J. Thibault
e2df9e29e2 Fix for crash in AnimSkeleton::getNumJoints()
When initAnimGraph is called it asynchronously loads the Animation graph in the background.
If the model url is changed, or the Model is deleted in between the initial load and it's completion,
It's possible to access a bad Rig::_animSkeleton pointer.
The fix is to hold onto the _animSkeleton pointer via a weak ref.
2017-12-15 16:46:27 -08:00
Anthony J. Thibault
9f54ce55f3 Change domain setting from min/max avatar scale to min/max avatar height
* Domain settings version has been bumped from version 2.0 to 2.1
* Old domain settings for avatar scale will be auto-converted to avatar height
* Avatar code has been changed so that limitDomainScale() works with the new height limits
* Avatar getUnscaledEyeHeight() was added to C++.
* MyAvatar.getHeight() was added to JS.
2017-11-21 13:25:47 -08:00
luiscuenca
bf0d55aa98 9267 Fix not restoring animations after changing view modes 2017-11-15 15:04:24 -07:00
Anthony J. Thibault
4169e11e77 Merge branch 'master' into bug-fix/div-by-zero 2017-11-10 10:15:26 -08:00
Anthony J. Thibault
9724a5e5b8 Fix for address sanitizer warning
This fixes a potential null pointer dereference.
2017-11-09 10:53:36 -08:00
luiscuenca
81509b3e92 coding standard 2017-11-02 10:34:57 -07:00
luiscuenca
9e0e1ab5a5 erase comment 2017-11-01 19:56:16 -07:00
luiscuenca
e201e82ec2 formatting 2017-11-01 19:45:56 -07:00
luiscuenca
6a2dc38fdd restoring previous roles 2017-11-01 19:38:37 -07:00
luiscuenca
da63e85699 Bug 8270 fixed 2017-11-01 09:17:04 -07:00
Andrew Meadows
c79bf3bc04 cleanup WANT_DETAILED_PROFILING 2017-10-19 14:31:50 -07:00
Andrew Meadows
339edc67c8 ifdef out more per-frame-per-entity profiling 2017-10-16 17:27:53 -07:00
Anthony J. Thibault
fe57a20979 div by zero fix 2017-10-10 16:22:49 -07:00
Anthony J. Thibault
18d723b6b4 div by zero fixes, detected by address sanitizer 2017-10-10 16:17:39 -07:00
SamGondelman
a6f2545511 fix local t pose 2017-10-03 12:51:37 -07:00
SamGondelman
b8ea6c22fa no tpose when switching avatars
(cherry picked from commit fcfac9efc0)
2017-09-29 13:47:09 -07:00
SamGondelman
306cf883fe don't reload animGraph if url didn't change 2017-09-26 18:18:41 -07:00
Anthony J. Thibault
573985c7c9 Merge branch 'master' into feature/ant-man 2017-08-28 09:27:04 -07:00
Anthony J. Thibault
5042b90052 Rig: Fix for debug mode assert 2017-08-24 10:47:48 -07:00
Brad Hefta-Gaub
afce8b547a Merge pull request #11197 from hyperlogic/bug-fix/prevent-rig-crash-in-lambda
Rig: Use a registry to prevent use after free crashes/corruption
2017-08-23 15:09:28 -07:00
Anthony J. Thibault
aef19c6f97 Rig: Use a registry to prevent use after free crashes/corruption
Create a global registry to hold all the currently active Rig instances.
Use this registry and it's mutex to prevent accessing the rig after it has already been destroyed,
or is in the process of being destroyed on the main thread.
2017-08-15 18:28:51 -07:00
Anthony J. Thibault
e9b8e5431d Fix for incorrectly scaled bounding volumes when switching avatars
Make sure to explicitly set the _geometryToRigTransform in Rig::initJointStates().

This should fix small bounding volume when switching from the Gamebot avatar (which has 0.008 scaling)
to another avatar (which ususally have 0.01 scaling).
2017-08-15 17:26:51 -07:00
Anthony J. Thibault
f46198c2fd Simplified/Improved avatar capsule calculation
IK is no longer performed during capsule calculation, This fixes an issue with the mannequin avatar in the marketplace.
Specifically, it was causing the hips to rise during IK which would result in an incorrectly sized and offset capsule.
2017-08-15 13:48:10 -07:00
Anthony J. Thibault
04006a9f76 code review feedback 2017-08-15 11:19:41 -07:00
Anthony J. Thibault
cd57c0706a more warning fixes 2017-08-11 17:46:50 -07:00
Anthony J. Thibault
9e1218b4a4 Use k-dop collision to prevent hands from entering body. 2017-08-11 14:50:00 -07:00
Anthony J. Thibault
25b5cb4762 Switch order of precondition and setSecondaryTargets 2017-08-01 13:17:33 -07:00
Anthony J. Thibault
2a45c6d3dc Removed eigen dependency, fixed Debug Draw IK Chains
Also, clarified for special case for secondary shoulder joint look-at constraint.
2017-07-26 16:55:12 -07:00
Anthony J. Thibault
c81875a280 Improved shoulder calibration using hard-coded measured shoulder width 2017-07-25 15:50:44 -07:00
Anthony J. Thibault
33a1d6e225 Merge branch 'master' into feature/secondary-pose-support 2017-07-24 17:27:33 -07:00
Anthony J. Thibault
9f6641ed10 Shoulder puck calibration work in progress
* AnimInverseKinematics: debug draw for secondary targets
* AnimInverseKienmatics: better clean up of ik target debug draw
* GeometryUtil: added findPlaneFromPoints()
* ViveControllerManager: external dependency on eigen
* ViveControllerManager: record history of left/right hand controllers
* ViveControllerManager: use history to determine user shoulder location for better calibration
* ViveControllerManager: pass defaultToReferenceMat by const ref to calibrate functions.
* CMake: added external depenency to eigen linear algebra library.
2017-07-24 17:22:48 -07:00
Andrew Meadows
5a4f56388b Merge pull request #10881 from hyperlogic/feature/smooth-ik-chains
Smooth IK when trackers are disabled / enabled.
2017-07-14 16:59:30 -07:00
Anthony J. Thibault
de199bff9d code review feedback 2017-07-14 09:47:37 -07:00
Anthony J. Thibault
c85e187c61 first stab at secondary target pose support 2017-07-13 18:12:33 -07:00
Anthony J. Thibault
b0177c2522 remove comment, it does indeed work 2017-07-10 16:25:37 -07:00
Anthony J. Thibault
1cdc0071f3 Fixed issue with hips and chest not ramping off properly. 2017-07-10 16:17:25 -07:00
Anthony J. Thibault
bd8d6280a8 Interpolate out of ik chains when they are disabled 2017-07-07 09:29:57 -07:00
Seth Alves
15d379cc5a coding style 2017-07-06 17:36:28 -07:00
Seth Alves
24c8267030 in Rig joint accessors, if on the Rig's thread use internalPoseSet, else use external 2017-07-06 13:22:14 -07:00
Seth Alves
e9bdbd7715 Merge branch 'calvin' of github.com:samcake/hifi into faster-getters-on-avatar-for-scripts 2017-07-06 11:09:38 -07:00
Anthony J. Thibault
06d512dab9 Warning fixes 2017-07-05 10:43:24 -07:00
Anthony J. Thibault
56cd31e92d Merge branch 'master' into feature/smooth-ik-chains 2017-07-05 09:33:22 -07:00
Anthony J. Thibault
1a24d4d8ec added safeLerp, shortest angle quat lerp with post normalize 2017-07-05 09:31:02 -07:00
Anthony J. Thibault
7ed1382ac9 ik level interpolation of incoming targets 2017-07-03 16:32:46 -07:00
Anthony J. Thibault
2f6a37ee53 Removed interpolation of hand controllers 2017-07-03 16:31:05 -07:00
Anthony J. Thibault
aba164b26e more clean up of Rig::computeAvatarBoundingCapsule 2017-06-30 13:27:53 -07:00
Anthony J. Thibault
237872e477 sizes and order of IKTargetVarVec and IKTargetVec are now the same.
Also, A change in how the bone name to bone index lookup occurs exposed a bug
in Rig::computeAvatarBoundingCapsule(), basically it was not actually preforming IK,
and the ik targets were in the wrong coordinate frame.  So when IK was actually
performed it would give bad results.  This bug is now fixed.
2017-06-30 12:47:01 -07:00
Brad Davis
6fc82bb351 Switch to preprocessor macro for blocking invokes to capture function information 2017-06-30 11:36:24 -07:00
Anthony J. Thibault
75e1a4a1e6 Refactor of JointChainInfo data structure 2017-06-30 09:28:39 -07:00
Anthony J. Thibault
c7e4bf931b WIP: first steps toward smoothing ik chains 2017-06-30 09:28:38 -07:00
Brad Davis
b52dd7b822 Don't use blocking connections on the main thread 2017-06-29 20:45:17 -07:00
Sam Gateau
f7a3b3a411 Experimenting faster getters on Avatar for scripts 2017-06-29 15:55:47 +02:00
Clément Brisset
a2c15c9794 Merge pull request #10770 from jherico/fix_deps_1
Cleanup entity dependencies
2017-06-28 10:48:58 -07:00
Brad Davis
8130a91b8c Cleanup entity dependencies 2017-06-27 19:15:49 -07:00
Anthony J. Thibault
d4122cff5a warning fix 2017-06-27 11:29:08 -07:00
Anthony J. Thibault
2814c94582 Hips should no longer waggle when feet are active 2017-06-26 17:43:51 -07:00
Anthony J. Thibault
8602d57a57 Eliminated to wiggle while pucks are enabled.
* Added new anim node AnimDefaultPose
* AnimNodeLoader was changed to support the addition of the AnimDefaultPose node
* Edited default avatar-animation.json to insert an AnimOverlay and AnimDefaultPose between the IK node and the rest of the "underPose".
* Rig uses this to fade in default pose for the toes when the hip/feet puck are active.
  This effectively deadens the toe animations, without effecting the hand animations.
* Also, the rig was changed to use the LimitCenter solution when the feet are enabled but the hips are not.
2017-06-26 14:09:10 -07:00
Anthony J. Thibault
b8c638b2b7 warning fixes 2017-06-23 14:36:59 -07:00
Anthony J. Thibault
f320610681 opened up shoulder constraint + other fixes
* bent elbows will be away from the body a bit more.
* sped up smoothing of pole vectors
2017-06-23 14:06:00 -07:00
Anthony J. Thibault
54af6af651 Fix for pole vector stability and knee pole vector computation 2017-06-23 10:38:21 -07:00
Anthony J. Thibault
0f51236fb0 Rig.cpp: take avatar scale into account when computing elbow pole vector 2017-06-21 14:36:42 -07:00
Anthony J. Thibault
1979ed7f3a Disable elbow pole vector if arm/shoulder pucks are enabled 2017-06-19 16:58:11 -07:00
Anthony J. Thibault
c236afe68c Simplify passing data from MySkeletonModel to Rig 2017-06-19 16:54:39 -07:00
Anthony J. Thibault
6bbc5bfbea formatting on initializers 2017-06-19 13:42:39 -07:00
Anthony J. Thibault
3f5aba2655 improved elbow pole vector calculation
Also, pole vectors are blended spherical linearly, this might help fast moving
pole vectors from rotating too quickly.
2017-06-19 13:21:12 -07:00
Anthony J. Thibault
81852cd91c warning fixes 2017-06-16 18:15:41 -07:00
Anthony J. Thibault
323dc62ef2 Merge branch 'master' into feature/pole-vector 2017-06-16 17:37:11 -07:00
Anthony J. Thibault
e7991579ef Enabled elbow pole vectors
There are still some issues with rotations of the elbow pole vectors.
* When the (hand - shoulder) vector approaches the normal vector used in Rig::calculateElbowPoleVector() unexpected twists can occur.
* Also, when the (hand - shoulder) vector approaches zero, the IK system starts to flutter between two states.
* The shoulder twist constraint probably needs to be opened up for more natural range of motion.
2017-06-16 17:29:56 -07:00
Anthony J. Thibault
cdfba52488 precondition initial solution before solving to reduce limb locking. 2017-06-15 15:02:42 -07:00
Anthony J. Thibault
fac21033e7 Fixed matthew sitting pose by opening up UpLeg twist constraint to +- 90 degrees. 2017-06-14 11:53:54 -07:00
Anthony J. Thibault
10f94c2d60 Fixed pole vectors on straight limbs by using reference vector 2017-06-14 11:35:53 -07:00
David Rowe
570ec8457d Refactor 2017-06-14 10:45:30 +12:00
Anthony J. Thibault
f20c03fa6e Pole vectors can be controlled via anim vars. 2017-06-13 15:36:05 -07:00
David Rowe
5eee2d8352 Code review 2017-06-13 12:39:46 +12:00
Anthony J. Thibault
7521d6124e WIP: added blend between hips and foot for knee pole vector 2017-06-12 17:23:23 -07:00
Anthony J. Thibault
0cde22d937 Bug fix for pole constraint on legs 2017-06-12 12:13:03 -07:00
David Rowe
3e126c0517 Smoothly ease hands from uncontrolled to controlled positions 2017-06-12 17:14:13 +12:00
Anthony J. Thibault
e8ca1a3060 WIP: added magnitude to damping rotation near singularities.
Also knee pole constraints don't work..  why?
2017-06-09 18:09:38 -07:00
Anthony J. Thibault
bb45fe0388 WIP, straight arm still rotates.. 2017-06-09 09:48:03 -07:00
Anthony J. Thibault
02f06d4d4e WIP pole vectors work.. but still have issues... 2017-06-09 09:48:02 -07:00
Anthony J. Thibault
6564cfd5d1 WIP 2017-06-09 09:48:00 -07:00
Anthony Thibault
e3c342aa77 Merge pull request #10595 from hyperlogic/feature/spine-spline
Spline IK target support
2017-06-08 18:09:55 -07:00
Anthony J. Thibault
8334dff610 compute rotation from derivative of spline
This should fix bad rotation values for the spine during bowing/touching toes.
2017-06-08 15:00:12 -07:00
Anthony J. Thibault
606c6415ae Merge branch 'master' into feature/spine-spline 2017-06-07 10:53:46 -07:00
David Rowe
5cb1918b80 Simplify code 2017-06-06 13:26:16 +12:00
David Rowe
ad848706ec Merge branch 'master' into 21202 2017-06-06 11:18:31 +12:00
Andrew Meadows
793ed1313d change variable name for more readable code 2017-06-05 10:30:52 -07:00
Andrew Meadows
1621d31a8e cleanup usage of GLMHelpers::generateBasisVectors() 2017-06-05 08:54:05 -07:00
Anthony J. Thibault
2422c7e1bb code review feedback 2017-06-02 15:47:51 -07:00
Anthony J. Thibault
551426f46e Made computeSplineJointInfosForIKTarget more general
It should now work for non-vertical oriented splines.
2017-06-01 13:56:06 -07:00
Anthony J. Thibault
f99b579c14 added some docs 2017-06-01 13:38:18 -07:00
Anthony J. Thibault
226855b2b9 Bug fixes and cleanup
* Bug fix for problem when chest target is enabled but hips target is not.
* centralized the two computeSplineFromTipAndBase functions into one.
* Removed dead code
2017-06-01 13:20:50 -07:00
Anthony J. Thibault
813feeb8fd Limit spine spline compression/stretch to 15% 2017-06-01 08:56:42 -07:00
David Rowe
47e65e942e Gradually relax hands from controlled positions when lose tracking 2017-06-01 23:42:08 +12:00
David Rowe
95aab28e91 Disable unused code
Keep for future experimentation per other commented-out code in method
2017-06-01 18:13:57 +12:00
Anthony J. Thibault
d3ca34956d Fix spline interpolation the wrong way when bending backward. 2017-05-31 16:58:17 -07:00
Anthony J. Thibault
cff42ab9b0 Working spline spline. 2017-05-30 19:01:52 -07:00
Anthony J. Thibault
d4dbd94a35 Compute defaultSpineSplineto defaultPose offset 2017-05-30 14:25:32 -07:00
Anthony J. Thibault
39c23bfe2f revision of spine spline rotation calculation 2017-05-30 14:25:30 -07:00
Anthony J. Thibault
fc12d7547a Addition of CubicHermiteSpline helper classes. 2017-05-30 14:25:29 -07:00
Dante Ruiz
d317d9236f made requested changes 2017-05-26 16:40:21 +01:00
Dante Ruiz
0fdf136251 got the shoulders working 2017-05-24 19:31:48 +01:00
Dante Ruiz
ac3c9655ec added arms 2017-05-24 01:28:08 +01:00
Anthony J. Thibault
06c26f029a Merge branch 'master' into feature/faster-ik-iterations 2017-05-23 09:10:17 -07:00
Andrew Meadows
7b879a7964 Model has a Rig rather than a RigPointer 2017-05-19 13:24:16 -07:00
Anthony J. Thibault
621d94eb91 removed temp comments 2017-05-19 10:38:16 -07:00
Anthony J. Thibault
e99001d86c debug draw ik chains, bug fix for flex coef on tips
And opened up hip constraints.
2017-05-18 16:29:55 -07:00
Anthony J. Thibault
87adeb0565 apply flexCoeff to tip of joint chain as well. 2017-05-18 11:26:49 -07:00
Anthony J. Thibault
abe19310da WIP: checkpoint of ik changes 2017-05-18 11:26:48 -07:00
Anthony J. Thibault
0018224fef moar warning fixes 2017-05-17 16:23:39 -07:00
Anthony J. Thibault
78dd30f656 macosx warning fix 2017-05-17 15:22:39 -07:00
Anthony J. Thibault
be7a9a2383 warning fixes 2017-05-16 11:00:25 -07:00
Anthony J. Thibault
1e276d113c Added support for weights per target 2017-05-15 09:26:24 -07:00
Anthony J. Thibault
67fbb15faa WIP: initial implementation of flexCoefficients 2017-05-15 09:26:23 -07:00
Anthony J. Thibault
a14fa5dab9 code review feedback 2017-05-11 10:54:15 -07:00
Anthony J. Thibault
e63dc52ec9 moar warning fixes 2017-05-09 13:59:07 -07:00
Anthony J. Thibault
d7f195bc42 warning fix 2017-05-09 13:17:06 -07:00
Anthony J. Thibault
0bcc3c023e warning fixes 2017-05-09 13:07:06 -07:00
Anthony J. Thibault
7b35e8c7fd Bug fix for hands, reduced elbow angle to 60 degrees from horizontal. 2017-05-09 11:57:41 -07:00
Anthony J. Thibault
fe69f58174 Bug fix centerLimit rot for LeftArm, also, lower arms in centerLimit pose
Lowering the arms in centerLimit poses will help keep the elbows relaxed on the side of the body.
2017-05-09 09:47:26 -07:00
Anthony J. Thibault
5a4b21c0a9 Removed debug code 2017-05-08 18:10:56 -07:00
Anthony J. Thibault
84aa86b464 Added animVar support for IK solutionSource. 2017-05-08 18:07:45 -07:00
Anthony J. Thibault
2166d8c159 Added setSolutionSource to AnimInverseKinematics node. 2017-05-08 15:06:31 -07:00
Anthony J. Thibault
712fcbe27a Removed cruft/debug code & comments 2017-05-08 15:06:30 -07:00
Anthony J. Thibault
7af93f9fea Hooked up IK constraint rendering 2017-05-08 15:06:29 -07:00
Anthony J. Thibault
e992d6703a WIP: debug render joint constraints. 2017-05-08 15:06:28 -07:00
Anthony J. Thibault
a260163aee WIP commit, first pass at generating limit center joints + debug draw 2017-05-08 15:06:27 -07:00
Anthony J. Thibault
108cd80bb5 Merge branch 'master' into feature/head-standard-action 2017-04-28 10:41:29 -07:00
Anthony J. Thibault
c61e6a8a9e AnimInverseKinematics: reduce number of magic constants 2017-04-27 18:24:21 -07:00
Anthony J. Thibault
764f6c69ea Head input action will override the HMD for IK. 2017-04-27 17:39:25 -07:00
Anthony J. Thibault
1fc9f4c93d Hips and Spine are routed thru input system properly 2017-04-25 17:22:47 -07:00
Anthony J. Thibault
dc19f37726 input/controller routing thru skeleton model and rig. 2017-04-25 15:04:47 -07:00
Anthony J. Thibault
4336e22f5a clang warning fix 2017-04-24 17:06:02 -07:00
Anthony J. Thibault
937f308ba8 code cleanup 2017-04-24 17:04:16 -07:00
Anthony J. Thibault
8adbe34c27 added comment 2017-04-24 14:36:56 -07:00
Anthony J. Thibault
deca26e9eb Fix for HMDHead tip constraint 2017-04-24 14:33:14 -07:00
Anthony J. Thibault
1cd0f03242 Restore master version of computeHipsOffset() and special case for HeadHMD target type 2017-04-24 14:19:06 -07:00
Anthony J. Thibault
dc3803a225 Re-enable IK _hipsOffset computation when no hips IK target is present. 2017-04-24 13:59:02 -07:00
Anthony J. Thibault
47e51493e8 dynamicallyAdjustLimits on the underPoses not the relaxed poses. 2017-04-24 09:56:10 -07:00
Anthony J. Thibault
22e79504bb Elliptical swing targets for the spine, Bug fix for debug draw 2017-04-14 17:00:50 -07:00
Anthony J. Thibault
b49760cee2 Remove hand IK target collision with body capsule 2017-04-14 17:00:49 -07:00
Anthony J. Thibault
d464020577 Adjust min angle of knee constraint to prevent leg locks 2017-04-14 17:00:48 -07:00
Anthony J. Thibault
0ebaba7cf8 Now supports sensorConfig with hips and chest sensors 2017-04-14 17:00:46 -07:00
Anthony J. Thibault
adaf7dda7c Check in viveMotionCapture test script. 2017-04-14 17:00:45 -07:00
Anthony J. Thibault
a10b157aff First pass at having an explicit Hips IK target.
Also, AnimManipulator nodes support setting position and rotation on a single joint.
2017-04-14 17:00:44 -07:00
Stephen Birarda
e86db26224 Revert "fix relative/absolute path handling for external FBX textures" 2017-04-10 14:31:02 -07:00
Seth Alves
05bf1930ca Merge pull request #10169 from hyperlogic/feature/absolute-default-joints-in-object-frame
Added accessor to get Avatar default pose in avatar space
2017-04-10 12:55:02 -07:00
Anthony J. Thibault
a06df1a400 Bug fix for passing quats from script to C++ via the animationStateHandler 2017-04-07 14:13:00 -07:00
Chris Collins
4e9e3cccea Merge pull request #10116 from birarda/bug/rel-ext-textures
fix relative/absolute path handling for external FBX textures
2017-04-06 15:58:02 -07:00