Commit graph

380 commits

Author SHA1 Message Date
Anthony J. Thibault
1cdc0071f3 Fixed issue with hips and chest not ramping off properly. 2017-07-10 16:17:25 -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
Anthony J. Thibault
06d512dab9 Warning fixes 2017-07-05 10:43:24 -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
Sam Gateau
f7a3b3a411 Experimenting faster getters on Avatar for scripts 2017-06-29 15:55:47 +02: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
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
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
David Rowe
3e126c0517 Smoothly ease hands from uncontrolled to controlled positions 2017-06-12 17:14:13 +12: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
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
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
David Rowe
47e65e942e Gradually relax hands from controlled positions when lose tracking 2017-06-01 23:42:08 +12:00
Anthony J. Thibault
cff42ab9b0 Working spline spline. 2017-05-30 19:01:52 -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
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
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
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
84aa86b464 Added animVar support for IK solutionSource. 2017-05-08 18:07:45 -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
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
dc3803a225 Re-enable IK _hipsOffset computation when no hips IK target is present. 2017-04-24 13:59:02 -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
0ebaba7cf8 Now supports sensorConfig with hips and chest sensors 2017-04-14 17:00:46 -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
Anthony J. Thibault
c58fdb590a Fix for sliding feet when leaning in HMD mode. 2017-04-04 11:00:34 -07:00
ZappoMan
53c439ffba add foot IK targets as actions 2017-03-30 19:11:16 -07:00
Anthony J. Thibault
49a95089d1 Remove hacks for debug rendering of IK targets
A AnimContext class was introduced.  This context is passed into every node during evaluation/overlay.
It holds non-animVar "global" data passed from the application.

(cherry picked from commit a028d3ba58)
2017-03-24 16:27:27 -07:00
Anthony J. Thibault
dd17b2e2f3 Added developer option to draw IK targets in world.
(cherry picked from commit 7e7803c648)
2017-03-24 16:20:52 -07:00
Triplelexx
c2cff55427 rename fronts to forwards 2017-03-22 18:41:06 +00:00
Triplelexx
b7980569cc change all references of IDENTITY_FRONT to IDENTITY_FORWARD 2017-03-21 22:13:33 +00:00
Andrew Meadows
30d7ffb303 fix warning about signed unsigned compare 2017-03-08 17:17:49 -08:00
Andrew Meadows
5847f86db8 fix crash when unpacking too many joints 2017-03-08 16:12:03 -08:00
Andrew Meadows
a55ab94cd9 other avatars use jointData no Rig animation 2017-03-02 07:52:02 -08:00
Andrew Meadows
c6730f7c58 Merge pull request #9745 from AndrewMeadows/faster-avatar-updates
Faster avatar updates
2017-02-28 10:55:21 -08:00
Atlante45
187cd0d5cf Get IK error and stand up based on it 2017-02-27 16:38:55 -08:00
Atlante45
6821c8621f More sit work 2017-02-27 16:38:54 -08:00
Andrew Meadows
faa272c67c don't blend animations for otherAvatars 2017-02-23 17:36:45 -08:00
Thijs Wenker
13b2b6086f Fix recorder.js playback in interface 2017-02-21 19:47:26 +01:00
Andrew Meadows
08bba5f45f add and remove some profile data points 2017-01-26 08:35:25 -08:00
Brad Davis
1dd2747ef9 Push some tracing into 'detail' categories for easy filtering. Add new tracing categories, add counter change tracking. 2017-01-10 10:44:04 -08:00
Brad Davis
171440f70b PR feedback 2016-12-30 17:47:21 -08:00
Brad Davis
e5e9ab42ea Encapsulate AnimPose members for easier optimizations 2016-12-28 12:11:24 -08:00
Andrew Meadows
e674be9c8c fix animated entities 2016-12-27 15:15:11 -08:00
Andrew Meadows
4161775673 restore context around lock 2016-12-22 10:54:58 -08:00
Andrew Meadows
890e35e96e cleanup unnecessary scope and swap if-check order 2016-12-21 15:37:23 -08:00
Andrew Meadows
3830649990 remove debugging and profiling 2016-12-21 10:55:59 -08:00
Andrew Meadows
b937eff582 more faster math copying JointData 2016-12-21 10:55:59 -08:00
Andrew Meadows
3f687887b9 faster math when unpacking JointData rotations 2016-12-21 10:55:59 -08:00
Andrew Meadows
8ab6974233 optimizations for processing avatar joint data 2016-12-21 10:55:59 -08:00
Brad Davis
30a9961362 tracing polish 2016-12-16 14:02:27 -08:00
Andrew Meadows
ee6a9f4506 adding profile stats relating to avatar CPU costs 2016-12-16 13:41:31 -08:00
Ryan Huffman
7bb2755913 Add chrome tracing support 2016-12-16 01:14:01 -08:00
Atlante45
3035d43772 Merge branch 'master' of https://github.com/highfidelity/hifi into fix/settings 2016-11-21 13:05:08 -08:00
Seth Alves
51f6b5af78 code review 2016-11-05 10:35:21 -07:00
Seth Alves
e41fa94958 implement RenderableModelEntityItem::setAbsoluteJointRotationInObjectFrame and RenderableModelEntityItem::setAbsoluteJointTranslationInObjectFrame 2016-11-04 11:42:31 -07:00
Atlante45
d5429e76da Warnings fixes and cleanup 2016-10-12 10:20:19 -07:00
Brad Davis
ecfe56085d GLM update and GLI integration 2016-09-09 10:18:15 -07:00
Anthony J. Thibault
837b19ed1b fix for pushing avatar into floor when exiting away mode.
* Removed MyAvatar.reset() access from JavaScript
* Added HMD.centerUI() to JavaScript, which can be used to reset the 3D UI sphere around the current HMD orientation.
* Added MyAvatar.clearIKJOintLimitHistory() which can be used to reset any remembered IK joint limit history.
* Added MyAvatar.centerBody() which can be used to instantly re-orient the avatar's so that the hips and toes
  are facing the same direction as the current HMD orientation.

away.js now uses the above new API's instead of MyAvatar.reset()
2016-07-19 14:42:24 -07:00
SamGondelman
caf4a9fa34 got rid of comparison warning 2016-06-17 14:17:32 -07:00
SamGondelman
59b785a33b trying to debug 2016-06-15 16:55:34 -07:00
Anthony J. Thibault
9292a9ce0b Added MyAvatar.hmdLeanRecenterEnabled property
Used to disable the 'room-scale' avatar re-centering code.
Disabling this can prevent sliding when the avatar is supposed to be sitting or mounted on a stationary object.

Also, removed a bunch of old, unused leaning and torso twisting code.
2016-06-03 13:56:32 -07:00
Anthony J. Thibault
a251b9e3df Moved translations back into parent relative frame. 2016-05-16 17:48:54 -07:00
Anthony J. Thibault
d86a608825 Properly convert from absolute rig frame to relative geom frame 2016-05-16 17:48:53 -07:00
Anthony J. Thibault
36c175d4cc Ensure that JointData is in the absolute rig coordinate frame. 2016-05-16 17:48:52 -07:00
Anthony J. Thibault
55b0060df9 Convert JointData from relative frame to absolute. 2016-05-16 17:48:52 -07:00
Anthony J. Thibault
641e152699 Eye tracking bug fix and debug rendering improvement
* Bug fix for eye tracking in HMD, the "up" orientation of your eyes now match your head.
* DebugDraw: added drawRay method.
* Application: Renamed preRender to postUpdate
* AvatarManager: added postUpdate method that iterates over all avatars.
* MyAvatar: Renamed preRender to preDisplaySide
* MyAvatar: split preRender code into postUpdate and preDisplaySide.
* Removed "Show who is looking at me", "Render focus indicator" and "Render lookat target" debug draw.
* Split "Show Look At Vectors" into "Show My Look At Vectors" and "Show Other Look At Vectors", to make it easier to debug eye tracking.
* "Show Look at Vectors" now draws the right eye red and the left eye blue.
* Removed Avatar and MyAvatar renderBody
* Removed look at rendering from head.
* GLMHelpers: Bugfix for generateBasisVectors when up primary and secondary axis were orthogonal
2016-05-08 16:20:32 -07:00
Zach Pomerantz
e3131d2098 Rm prefetchAnimation from avatar/rig 2016-04-20 20:14:15 -07:00
Anthony J. Thibault
1f383680aa Rig: removed unnecessary emitOnLoadComplete method 2016-04-18 13:35:13 -07:00
Anthony J. Thibault
1682598be7 Added onLoadComplete signal to MyAvatar
This can be used in javaScript to detect when the model has finished loading because the url has changed or the model has been reset.
2016-04-18 11:37:02 -07:00
Brad Hefta-Gaub
a7b5ea50d7 Merge pull request #7670 from hyperlogic/tony/validate-anim-state-handler-args
Validate arguments to MyAvatar.addAnimationStateHandler()
2016-04-15 14:26:22 -07:00
Anthony J. Thibault
38418d0169 Moved isListOfStrings into shared/ScriptValueUtils
Also fixed some single line ifs.
2016-04-15 13:47:30 -07:00