Commit graph

452 commits

Author SHA1 Message Date
Seth Alves
f99812a903 adjust method names to fit convention 2015-12-07 14:31:08 -08:00
Anthony J. Thibault
fd4ed29405 MyAvatar.clearJointData bug fix
MyAvatar.setJointRotation() now works properly after MyAvatar.clearJointData()
2015-12-07 09:03:40 -08:00
Seth Alves
a948ae5f19 children of avatar joints might be right, now 2015-12-06 10:48:00 -08:00
Anthony J. Thibault
7abfc93ff9 Avatar::getJointRotation and getJointTranslation is thread-safe
It can be called from script with minimal blocking,
because it inspects a copy of the joint values from the Rig, which is updated atomically.
This copy occurs in Rig::updateAnimations()
2015-12-04 16:16:17 -08:00
Anthony J. Thibault
ba001ef4b0 Rig: split Poses into internal and external sets.
In preparation for making some accessors thread safe.
2015-12-04 15:15:18 -08:00
Anthony J. Thibault
9c0b4bc2a2 Fix for model entities with non-uniform scaled mesh
Logic which extracted rotations from a non-uniformly scaled matrices was sometimes incorrect.

This should fix the roads in Qbit as well as the blocks in toybox.
2015-12-02 14:09:47 -08:00
Anthony J. Thibault
e2d9e37eb8 Fix for head offset for models with no eyes
This was causing in correct body poses while wearing an HMD.
2015-11-30 14:08:21 -08:00
Anthony J. Thibault
5072339a22 Warning fix 2015-11-25 14:04:01 -08:00
Anthony J. Thibault
23def8d173 Merge branch 'master' into tony/remove-joint-states 2015-11-25 13:55:23 -08:00
Anthony J. Thibault
97a2eb62d4 Fix for incorrect avatar bounds after changing avatars 2015-11-25 12:06:50 -08:00
Anthony J. Thibault
868cf83b48 Fix for attachments and MyAvatar::getDefaultEyePosition() 2015-11-25 10:07:29 -08:00
Anthony Thibault
527199bc69 Merge pull request #1 from AndrewMeadows/fix-avatar-capsule
compute bounding capsule of avatars
2015-11-25 09:39:18 -08:00
Andrew Meadows
2cc1dfe819 getRootAbsoluteBindPoseByChildName() is deprecated 2015-11-24 20:39:26 -08:00
Andrew Meadows
3ae082f09c compute bounding capsule of avatars 2015-11-24 20:28:39 -08:00
Anthony J. Thibault
386dad7aff Fixes hand IK for some avatars
Specifically:

   https://hifi-content.s3.amazonaws.com/ozan/dev/avatars/hifi_team/ryan/_test/ryan.fst
   https://hifi-content.s3.amazonaws.com/ozan/dev/avatars/hifi_team/brad/brad.fst
   https://s3.amazonaws.com/hifi-public/tony/blackmery/blackmery.fst

These avatars have "Hips" joints that are NOT the root of the skeleton.
This would cause the getRootAbsoluteBindPoseByChildName() to return (0,0,0).
Causing the IK targets to be lower then they should have.
2015-11-24 18:57:35 -08:00
Anthony J. Thibault
76034d62d5 Eye tracking fixes 2015-11-24 16:57:26 -08:00
Anthony J. Thibault
f120e10ff4 Merge branch 'master' into tony/remove-joint-states 2015-11-24 15:00:05 -08:00
Anthony J. Thibault
e07e1c5c92 Fix for avatar eye tracking
When computing a full eye to world matrix, the translations need to be the geometry coordinate frame, not scaled into meters.
2015-11-24 14:01:01 -08:00
Anthony J. Thibault
14189ac909 Move Y_180 flip rotation out of Rig
This Y_180 flip is defined in skeletonModel not in the rig.
This is important if we wish to use the Rig for both Avatars (180 flip) and Entity models (no 180 flip).

We can hide this 180 flip from script, if we wish, by including it in all the accessors to and from
MyAvatar -> skeletalModel -> Rig.

Added Quaternions::Y_180 to GLMHelpers.
2015-11-23 19:31:27 -08:00
Anthony J. Thibault
8f46b8a765 Added USE_PRE_ROT_FROM_ANIM option to AnimClip
This will allow us in the future to pull preRotations from
animations instead of the model skeleton.  It is disabled
by default because our current animations preRotations are
not correct for the left hand.
2015-11-23 15:58:18 -08:00
Anthony J. Thibault
8252bbed9b AnimSkeleton: added pre rotation accessor methods 2015-11-23 13:50:14 -08:00
Anthony J. Thibault
db21db3cbc Rig.h: more coordinate space comments 2015-11-22 16:34:06 -08:00
Anthony J. Thibault
dc169dc0aa Rig.h: updated comments with coordinate spaces 2015-11-22 16:21:22 -08:00
Anthony J. Thibault
fe683edb66 Avatar Debug Draw Default Pose now works 2015-11-21 10:53:24 -08:00
Anthony J. Thibault
6cfd831a5a Menu: Added Developer > Avatar > Debug Draw Position
Also renamed "Debug Draw Bind Pose" to "Debug Draw Default Pose"
2015-11-21 09:50:56 -08:00
Anthony J. Thibault
995958a8f0 Rig: normalized index bounds checking. 2015-11-20 18:45:53 -08:00
Anthony J. Thibault
54408a9c87 AnimVars are now in avatar/rig space
This makes it much simpler for code out side of the rig to manipulate AnimVars

* Removed mat4 type from AnimVars
* AnimVariantMap now has a _rigToGeometryTransform matrix
  used to transform positions and rotations into the correct coordinate frame.
* Moved AnimPose code to extract a quat from a scaled matrix into GLMHelpers
2015-11-20 18:29:17 -08:00
Anthony J. Thibault
4f8cd6930d Rig: Fixes for initializing _absolutePoses during initJointStates 2015-11-20 15:13:16 -08:00
Anthony J. Thibault
2f37335d77 Warning fixes 2015-11-20 14:50:42 -08:00
Anthony J. Thibault
30087ef0bd Removed dead code 2015-11-20 14:37:53 -08:00
Anthony J. Thibault
cb89f09635 Removed EntityRig and AvatarRig. One Rig to rule them all. 2015-11-20 14:27:01 -08:00
Anthony J. Thibault
a77ea8da43 Removed JointStates! You won't be missed. 2015-11-20 14:15:37 -08:00
Anthony J. Thibault
a4116e633a Removed last consumer of JointState class
Removed option to render IK constraints used by old animation system
2015-11-20 11:26:54 -08:00
Anthony J. Thibault
df7ca3bc38 Rig: getJointRotation and getJointTranslation use _relativePoses 2015-11-20 10:36:40 -08:00
Anthony J. Thibault
923d60e452 Rig: Bug fix for copyJointsIntoJointData 2015-11-20 10:30:12 -08:00
Anthony J. Thibault
ad4b8e0001 Avatar transmission fixes, moved JointData into shared
* Moved JointData into shared library
* added methods to the rig to copy into and out of JointData
* JointData translations must be in meters this is so the
  fixed point compression wont overflow, also, it's a
  consistent wire format.
2015-11-20 10:24:24 -08:00
Anthony J. Thibault
27685e0425 Bug fixes for other Avatar root translation 2015-11-20 09:33:57 -08:00
Anthony J. Thibault
c2ae6f0c8e Fix for remote Avatar
Make sure to copy the correct data to and from AvatarData::JointData
2015-11-20 09:20:41 -08:00
Anthony J. Thibault
302b6f7e26 Mac and Debug build fixes 2015-11-19 18:28:15 -08:00
Anthony J. Thibault
9e36a79155 Rig: hooked up script overridePoses 2015-11-19 18:14:04 -08:00
Anthony J. Thibault
46d23a9f38 head IK and controller IK work again! 2015-11-19 17:30:56 -08:00
Anthony J. Thibault
982e2c06a9 Rig: Switched over to use AnimPoses instead of JointStates
* fixed debug rendering
* improved jointState/animPose diff detection code.
2015-11-19 12:14:04 -08:00
Anthony J. Thibault
721da29432 WIP checkpoint
* No longer normalizing scale in AnimSkeleton and AnimClip
  This means graph is animating in 'geometry' coordinates
  before unit scale is even applied.  This is necessary to
  properly work with both Avatar based models and ModelEntity
  based models

Many things are broken.
  * debug rendering (translations are x100)
  * IK hand targets
  * follow cam
  * I did not even dare to try HMD mode
2015-11-18 18:47:33 -08:00
Anthony J. Thibault
b054ef1488 Rig: fixes for rigs used for ModelEntities. 2015-11-18 16:04:34 -08:00
Anthony J. Thibault
3a74d188b0 AnimSkeleton: Added default poses 2015-11-18 16:03:28 -08:00
Anthony J. Thibault
5ffef7f41a AnimPose: bug fix for extracting rotations from matrices with large scale 2015-11-18 16:02:30 -08:00
Anthony J. Thibault
b481d7c73d Merge branch 'master' into tony/remove-joint-states 2015-11-18 09:38:21 -08:00
Anthony J. Thibault
9a39da9050 new absolutePoses work for avatars, but not for model entities. 2015-11-17 18:53:38 -08:00
Anthony J. Thibault
e93b5c5838 Bug fixes for avatars with no eyes
Changed default eye position to 1.9 meters because
the hifi_team avatars are 2.0 meters tall.

Also, prevent array access with negative indices when eye bones are missing.

ಠ_ಠ
2015-11-17 14:02:27 -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