Commit graph

261 commits

Author SHA1 Message Date
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
Anthony J. Thibault
253e4cbb73 validate arguments to MyAvatar.addAnimationStateHandler()
Also validate arguments to MyAvatar.removeAnimationStateHandler() and the return result from the user provided callback function.
2016-04-14 16:25:17 -07:00
Anthony J. Thibault
a1bbb63ec4 Rig: save and restore user animations across resets 2016-04-12 14:51:17 -07:00
Anthony J. Thibault
80dfed77d7 Fix for flickering eyeballs
Calling glm::axis() on an identity quaternion does not result in a normalized vector.
This vector was used within Rig::updateEyeJoint() to limit the rotation of the eye balls,
to prevent the eyes from rolling back into the avatar's head.

If the avatar was looking straight ahead, this could result in bad quaternions in the eye ball
joint matrices, which in turn would cause the eye ball mesh or any mesh influenced by the eyeball joints
not to render.
2016-03-29 10:01:10 -07:00
Anthony Thibault
50ac101d56 Avatar and Rig NSIGHT instrumentation 2016-03-22 10:36:32 -07:00
Anthony Thibault
9f30556084 libraries/animation: cppcheck fixes
* Fix for potential bug in AnimLoop due to _maxFrameIndexHint being uninitialized.
* made more single argument constructors explicit.
2016-03-13 17:17:34 -07:00
Anthony J. Thibault
9351d5edca Rig: warning fix & comments 2016-03-10 12:55:01 -08:00
Anthony J. Thibault
4a78300607 MyAvatar: Allow user to raise hands directly overhead.
Previously we were using a infinitely tall vertical cylinder
to push hand IK targets out of the body, this had the
side-effect of preventing the hands from being raised over
the head.  Now, we collide against the same 3d capsule
used by the physics system for avatar collisions.
2016-03-10 10:20:17 -08:00
Anthony J. Thibault
3cde972174 Rig: issue warnings for missing joints
Also, Removed Rig::computeEyesInRigFrame, it was causing warnings because it was looking up
Eye and Head joints for all models, not just avatars.
2016-03-01 11:07:22 -08:00
Anthony J. Thibault
460582239a Avatar eye look at fixes for HMDs
There were three things that were causing issues with eye look at vectors while wearing an HMD.

1) The matrix returned by AvatarUpdate->getHeadPose() was in the wrong space, it should be in avatar space.
   it was actually returning a matrix in sensor/room space.
2) The lookAtPosition was incorrect while wearing an HMD and with no avatars to look at.
3) The eye rotation limits in Rig::updateEyeJoint were relative to the model's zero orientation, NOT relative to the head.
   this was causing the eyes to hit limits when the avatar head turned.
2016-02-29 18:02:50 -08:00
Anthony J. Thibault
613b60658e Rig: prevent normalization of a zero vector 2016-02-18 10:24:36 -08:00
Anthony J. Thibault
73ac47724a Rig: Prevent the hand IK targets from entering the body.
Use a 2d circle/circle intersection test to keep the hands outside of the body.
2016-02-17 16:23:18 -08:00
Andrew Meadows
d6a716a1aa only head and torso for bounding capsule radius 2016-02-15 10:29:29 -08:00
Anthony J. Thibault
2667fe3c24 Merge branch 'master' into tony/avatar-on-moving-platform 2016-02-08 14:32:46 -08:00
Anthony J. Thibault
20a38f613e Rig: remove position delta based velocity.
In general, the physics body velocity is MUCH more behaved now.
2016-02-08 14:30:28 -08:00
Philip Rosedale
63afa8c1ed Merge pull request #7040 from hyperlogic/tony/landing-animation
MyAvatar: added standing and run landing animations
2016-02-08 11:38:12 -08: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
d24a024726 MyAvatar: added standing and run landing animations 2016-02-05 17:53:50 -08:00
Anthony J. Thibault
8ca8550f26 MyAvatar: Standing Takeoff and In-Air Animations
Now there are two sets of of jump takeoff and in-air animations.
* Run - Used when the character jumps or falls with a small forward velocity.
* Standing - Used when the character jumps or falls in-place or backward.

CharacterController
* increased takeoff duration to 250 ms
* increased takeoff to fly duration to 1100 ms
* added standing jump and in-air animations
* added 250 milisecond delay between ground and hover, to prevent going into hover when walking over cracks.
* take-off to in-air transitions now use the new snapshotPrev interp type for a smoother tweening.
2016-02-04 17:56:07 -08:00
Anthony J. Thibault
e6abc026c8 AnimClip: mirror animation support 2016-02-02 17:02:29 -08:00