Commit graph

1374 commits

Author SHA1 Message Date
Andrew Meadows
a38c1c82d1 use glm::clamp() instead if std::max() and min() 2015-08-10 23:08:36 -07:00
Andrew Meadows
80b36f9f12 fix typo 2015-08-10 15:11:00 -07:00
Seth Alves
b26d6d2b9c Merge pull request from ZappoMan/RenderableModelEntityItemOptimization
Renderable model entity item optimizations
2015-08-10 15:10:12 -07:00
Andrew Meadows
43bf4a85d2 add RotationConstraint and friends 2015-08-10 14:48:22 -07:00
Howard Stearns
964d04d24f Restore correct space for eye joint rotations.
Also, do not correct for camera position on my avatar. (That will be done by zero or one receivers.)
2015-08-10 12:34:01 -07:00
ZappoMan
ae958dd42d Merge branch 'master' of https://github.com/highfidelity/hifi into RenderableModelEntityItemOptimization 2015-08-10 09:59:45 -07:00
ZappoMan
668778cfd9 optimize JointState::setRotationInConstrainedFrameInternal() to short cut cases where targetRotation matches previous targetRotation 2015-08-09 16:55:43 -07:00
Brad Davis
64fcd2da96 Merge pull request from ZappoMan/RenderableModelEntityItemOptimization
optimizations to RenderableModelEntityItem::render()
2015-08-07 15:32:07 -07:00
Seth Alves
b1e69537f3 Merge pull request from howard-stearns/cleanup-jointstate
Clean Up JointState
2015-08-07 13:50:02 -07:00
ZappoMan
cec0f8ed1d optimize ModelEntityItem::getAnimationFrame() 2015-08-07 13:43:57 -07:00
Howard Stearns
145b730f80 Clean up instantiation. 2015-08-07 12:27:26 -07:00
Howard Stearns
a840a17106 Change name originalRotation defaultRotation. 2015-08-06 19:45:58 -07:00
Howard Stearns
42cc34cd64 JointState has our own copy of any ivars we want from FBXJoint, instead of keeping a reference to the fbx. 2015-08-06 16:54:09 -07:00
Howard Stearns
02f57286e4 Don't let individual startAnimation get messed up by blend/fade. 2015-08-06 11:30:18 -07:00
Anthony J. Thibault
c3fc37df18 Added true boneSets to AnimOverlay. 2015-08-05 18:07:56 -07:00
Anthony J. Thibault
1f8c8adbd6 Added AnimOverlay node, moved blend sub-routine into AnimUtil. 2015-08-05 17:05:53 -07:00
Anthony J. Thibault
2d0315978e Fix for compilation on linux. 2015-08-05 12:32:15 -07:00
Anthony J. Thibault
2154f76202 Added some comments to AnimNode, AnimClip & AnimBlendLinear. 2015-08-05 12:03:20 -07:00
Howard Stearns
bb974edf7f Add assert on mix range. 2015-08-05 11:09:04 -07:00
Howard Stearns
f51b5be167 Simplify fade normalization, eliminating a loop. 2015-08-05 11:00:40 -07:00
Howard Stearns
653e46fdd3 const methods. 2015-08-05 10:51:26 -07:00
Howard Stearns
2f2b59b6b6 Merge branch 'master' of https://github.com/highfidelity/hifi into smooth-faded-animations 2015-08-05 10:05:05 -07:00
Howard Stearns
a1f86cc7b8 Make MSVC happy. 2015-08-04 19:49:12 -07:00
Anthony J. Thibault
5d83976e2a Added AnimBlendLinear + tests.
MyAvatar now does a sine wave blend between a walk
and a walk animation.
2015-08-04 18:14:50 -07:00
Anthony J. Thibault
559367db4a Got to the bottom of the bind pose question.
When TRUST_BIND_TRANSFORM is defined in AnimSkeleton, the bind pose is taken
from the FBXJoint::bindTransform field, which is correct for all joints
bound to actual geometry.  Basically it's not trust worthy for bones NOT bound to anything.

When TRUST_BIND_TRANSFORM is not defined, the bind pose is taken from the other
FBXJoint fields.  Unfortunatly these poses are NOT the bind pose, but instead
are taken from the FBX files 'resting' pose. i.e. frame 0.
2015-08-04 18:14:49 -07:00
Anthony J. Thibault
d8a20340a0 Found and fix source of memory corruption.
std::vector.reserve() and raw access do not mix.
raw access will only work if you push_back elements onto the vector
first.  However this worked fine on MacOSX, probably due to differences
in STL implementations.

Some code clean up and some commented out debugging lines.

Debug rendering of animaions of fight club model is not working.
Not sure what frame these transformations are in.
2015-08-04 18:14:49 -07:00
Anthony J. Thibault
55da34f713 Better debug rendering of animations.
* added mat4 cast and mat4 ctors to AnimPose.
2015-08-04 18:14:48 -07:00
Anthony J. Thibault
df79463750 WIP, animNode rendering 2015-08-04 18:14:48 -07:00
Anthony J. Thibault
d1fdbe32d2 optimizations for debug rendering of AnimSkeleton 2015-08-04 18:14:47 -07:00
Anthony J. Thibault
b8bae7cc3f Debug rendering of MyAvatar’s skeletonModel skeleton 2015-08-04 18:14:47 -07:00
Anthony J. Thibault
f5dee717a1 Added fbx loading via animation cache.
* added AnimPose::copyFromNetworkAnim() which
  should, re-map bone ids to match the current
  skeleton, and fill in missing bones with bind
  pose frames.
* added ability to set a skeleton on a node.
  I might need to add a recursive version of this.
* it compiles!
* tests run!
2015-08-04 18:14:46 -07:00
Anthony J. Thibault
da809efcd6 WIP commit, DOES NOT BUILD.
* Added AnimSkeleton class
* Attempt to copy animation frames when _networkAnimation has
  finished loading.  Fill in the holes with bind pose.
2015-08-04 18:14:46 -07:00
Anthony J. Thibault
343b2ccf9d Added AnimNodeLoader which loads AnimClip nodes from json
* added tests and sample json file
2015-08-04 18:14:45 -07:00
Anthony J. Thibault
35196a0059 bare-bones AnimClip implementation with tests!
It accumulates time and handles looping, and should handle
onDone and onLoop events in the future.
2015-08-04 18:14:45 -07:00
Anthony J. Thibault
836cdeb103 Baby steps toward new animation system
* AnimNode pure virtual base class for all animation nodes.
* AnimClip playback of a single FBX animation.
2015-08-04 18:14:44 -07:00
Howard Stearns
731bcba956 Merge branch 'master' of https://github.com/highfidelity/hifi into smooth-faded-animations 2015-08-04 17:27:23 -07:00
Howard Stearns
61198a658c Smooth fading of animations in and out.
Also, turn on the secret rig animations from Javascript with MyAvatar.setEnableRigAnimations(true). (persists)
2015-08-04 17:04:15 -07:00
Seth Alves
9171033f21 Merge branch 'master' of github.com:highfidelity/hifi into rig 2015-08-04 16:06:38 -07:00
Eric Levin
f506e58687 Merge pull request from howard-stearns/restart-animations-at-specified-parameters
restart animations at specified parameters
2015-08-04 15:09:11 -07:00
Howard Stearns
61afc362e7 For startAnimation (but not startAnimationByRole), use the specified parameters even if the animation
was already playing.  This fixes the behavior exercised by the squeezeHands.js script.
Fixes https://app.asana.com/0/32622044445063/44025709513292
2015-08-03 17:00:39 -07:00
Ryan Huffman
027adf73bb Merge branch 'master' of github.com:highfidelity/hifi into asset-server 2015-08-03 16:41:24 -07:00
Ryan Huffman
2d938f2d0a Update AnimationCache to use new ResourceCache 2015-08-03 16:27:48 -07:00
Howard Stearns
2e5142e9bb Fix end of idle. 2015-08-03 16:09:48 -07:00
Howard Stearns
cdb697760f Remove some debug. 2015-08-03 15:51:07 -07:00
Howard Stearns
4c1d1a65d5 Provide initial fight club animations and use them in rig.
Still only active when you do Settings.setValue('enableRig', true) and restart.
(Will be more exposed after fadein/fadeout is implemented.)
2015-08-03 15:41:15 -07:00
Seth Alves
241e767ab6 move setHandPosition from SkeletonModel to AvatarRig. Tell Rig::initJointStates joint-indexes for hands and elbows and shoulders 2015-07-30 18:44:09 -07:00
Seth Alves
c80516a051 Merge branch 'rig' of github.com:howard-stearns/hifi into rig 2015-07-30 18:39:09 -07:00
Seth Alves
c1f777e18f move setHandPosition from SkeletonModel to AvatarRig. Tell Rig::initJointStates joint-indexes for hands and elbows and shoulders 2015-07-30 18:39:01 -07:00
Howard Stearns
78a900c866 Prototype blend. Just equal weighting for now. 2015-07-30 17:01:48 -07:00
Anthony J. Thibault
7a10b31dd9 Clear translation on root joint.
Also, delete/rename all instances of updateJointState except for the one in Rig
and derived classes.
2015-07-30 15:04:27 -07:00
Howard Stearns
06aa107762 Merge branch 'master' of https://github.com/highfidelity/hifi into rig 2015-07-30 09:57:02 -07:00
Anthony J. Thibault
4bb415fd0d Fix for torso twist.
Off by one error, 0 is a valid parent bone index.
2015-07-30 09:31:23 -07:00
Brad Hefta-Gaub
b95e4e1e93 Merge pull request from MarcelEdward/20605
Removed the  line where the directory is stripped off the RelativeFile
2015-07-30 07:30:01 -07:00
Howard Stearns
dc34c025bd whitespace 2015-07-29 18:54:05 -07:00
Anthony J. Thibault
c2934bdb5d Fix avatar head, eye and torso twist.
* Updated SkeletionModel::updateRig to explicitly pass a set of HeadParameters
  to the rig to do procedural animation.
* Moved torso lean procedural animation from SkeletonModel into Rig.
* Moved eye tracking procedural animation from HeadModel into Rig.
* Moved neck procedural animation from HeadModel into Rig.
2015-07-29 17:35:29 -07:00
Howard Stearns
a9f76324b5 Merge branch 'rig' of https://github.com/sethalves/hifi into sethalves-rig2 2015-07-29 10:49:27 -07:00
Anthony J. Thibault
b06485c266 Remove cauterize code from Rig and move it back into Model.
* cauterize code is used as at render time and is not dependent on
  the jointStates.
* MyAvatar now initialize the bone set used for cauterization and
  makes the decision to perform cauterization or not in preRender.
2015-07-28 17:45:33 -07:00
Howard Stearns
4754615159 Fix NPC animations. 2015-07-28 12:34:10 -07:00
Seth Alves
6e5aca6da4 merge from upstream 2015-07-27 16:52:36 -07:00
Howard Stearns
1bb734aec0 Kill warnings. 2015-07-27 15:26:03 -07:00
Howard Stearns
146ddd2240 Cleanup false starts. 2015-07-27 13:42:18 -07:00
Howard Stearns
990f0d6d07 Pass correct position/velocity/orientation to Rig simulation. 2015-07-27 12:57:39 -07:00
Seth Alves
a3c6a4b9bc merge from upstream 2015-07-27 09:29:18 -07:00
Howard Stearns
dac6667ee6 Start of state. 2015-07-27 09:21:24 -07:00
Howard Stearns
8b5f24e4df Keep list of animations in Rig, not MyAvatar. 2015-07-24 22:02:39 -07:00
Howard Stearns
05dda1220e Add logging. 2015-07-24 22:01:55 -07:00
Howard Stearns
4e298d815d Add the joint mapping necessary for playing animations in the rig. 2015-07-24 14:07:32 -07:00
Seth Alves
d5400e2b9d Merge branch 'rig' of github.com:howard-stearns/hifi into rig 2015-07-23 15:14:23 -07:00
Seth Alves
33c97a1833 get rid of _firstPersonSkeletonModel in MyAvatar. add flag in Rig for joints being dirty so Model knows when to recompute meshes 2015-07-23 15:14:10 -07:00
Howard Stearns
9593668110 Bring animation file headers up to date. 2015-07-23 15:08:22 -07:00
Seth Alves
4566d16402 move Model's AnimationHandles to Rig. Move a bunch of Model methods from public to protected 2015-07-23 13:03:38 -07:00
Howard Stearns
a1a10ad08e Merge branch 'rig' of https://github.com/sethalves/hifi into sethalves-rig 2015-07-22 21:08:57 -07:00
Howard Stearns
5a0c1a9402 Checkpoint testing stuff. 2015-07-22 21:03:48 -07:00
Seth Alves
ee334ff826 JointStates are owned by Rig objects. Model, FaceModel, SkeletonModel call into their Rig pointer to access JointStates. 2015-07-22 18:43:10 -07:00
Seth Alves
47965bc39c merge from upstream 2015-07-22 13:48:19 -07:00
Seth Alves
7c8d52cbd1 back out some changes to Model.cpp, change how rig pointer is delivered to model initilizer 2015-07-22 13:41:31 -07:00
Marcel Verhagen
8f0893ba21 Added fileOnUrl to check if a texture exist at the location. It return the correct filename of where the texture lives.
Added the url of the fix file to extractFBXGeometry and readFBX and updated the calls to readFBX to include the url of the fix file.

So it now does not break existing content.

Found a second place in the FBXReader.cpp where the RelativeFileName stripped out the dir location.
2015-07-22 22:34:45 +02:00
Howard Stearns
a161f527c4 Comments documenting direction and questions. 2015-07-22 11:41:24 -07:00
Seth Alves
abfe60aa20 whenever Model class uses _jointState, use the Rig version if there is a Rig. 2015-07-20 18:31:42 -07:00
Howard Stearns
ed815a0573 Reflect dependencies in unit test setup. 2015-07-17 16:53:41 -07:00
Seth Alves
bcd6b30ec3 move AnimationHandle from render-utils to animation. give Rig some jointstates and animation lists 2015-07-17 13:31:48 -07:00
Howard Stearns
6ca458b624 Instantiated in MyAvatar 2015-07-15 15:59:24 -07:00
Howard Stearns
5312993e56 Hmm, last was missing some emptiness. 2015-07-15 15:30:34 -07:00
Howard Stearns
bbb5f832a2 Empty Rig. 2015-07-15 15:11:16 -07:00
Atlante45
22f0dbdefb CR 2015-07-14 15:16:00 -07:00
Atlante45
c11864acf3 Merge branch 'master' of https://github.com/highfidelity/hifi into clear_cache_and_restart 2015-07-10 15:57:40 -07:00
ZappoMan
1dd40af162 fix AnimationLoop::setRunning() to not constantly reset the frame when the running state doesn't actually change 2015-07-10 12:43:35 -07:00
Atlante45
6c591131ba Made Animations safe for resource reload 2015-07-10 12:01:51 -07:00
Stephen Birarda
b2e587dbbd remove use of include_dependency_includes and use cmake 2015-02-18 14:12:05 -08:00
Atlante45
f77fab2fe0 Merge branch 'master' of https://github.com/highfidelity/hifi into applications_diet_cpp11 2015-01-13 20:38:52 -08:00
Atlante45
38729c5790 Made dependencies inherit from Dependency 2015-01-13 20:38:01 -08:00
Atlante45
2a82ff9768 Merge branch 'master' of https://github.com/highfidelity/hifi into applications_diet_cpp11
Conflicts:
	assignment-client/src/voxels/VoxelServer.cpp
	interface/src/Application.cpp
	interface/src/Audio.cpp
	interface/src/DatagramProcessor.cpp
	interface/src/Menu.cpp
	interface/src/Util.cpp
	interface/src/avatar/MyAvatar.cpp
	interface/src/ui/ApplicationOverlay.cpp
	interface/src/ui/PreferencesDialog.cpp
	libraries/networking/src/NodeList.cpp
	libraries/shared/src/DependencyManager.h
2015-01-13 11:03:14 -08:00
Atlante45
8415098fc2 Set different caches size depending on cache type 2015-01-12 15:36:36 -08:00
ZappoMan
a0ec2ddfe9 clamp frame index between 0 and 100,000 2014-12-29 21:07:04 -08:00
Atlante45
327daacecd Merge branch 'master' of https://github.com/highfidelity/hifi into applications_diet_cpp11
Conflicts:
	interface/src/Application.cpp
	interface/src/devices/OculusManager.cpp
	libraries/networking/src/NodeList.cpp
2014-12-22 13:34:18 -08:00
Sam Gateau
4c670ac17a merging with upstream master and origin temp0 2014-12-22 10:38:11 -08:00
Sam Gateau
967c6dbc4b Add the Model library 2014-12-19 16:19:06 -08:00
Stephen Birarda
114e3bb2ff rename cmake macro to represent actual purpose 2014-12-18 16:51:20 -08:00
Atlante45
296c0025de Switched to auto and changed macro 2014-12-18 15:42:38 -08:00
Atlante45
ce7f72d2cd Update macro 2014-12-17 15:26:47 -08:00
Atlante45
b2dac6f53f DM users update 2014-12-16 15:32:11 -08:00
ZappoMan
660bf2720e convert AnimationCache to DependencyManager 2014-12-15 19:48:15 -08:00
ZappoMan
5c2cc20313 fixes the stutter in animation when observer moves 2014-11-28 17:36:55 -08:00
ZappoMan
ef17659ea2 cleanup 2014-11-12 16:57:42 -08:00
ZappoMan
dd22683672 fixing up animation loop issues 2014-11-12 16:53:16 -08:00
ZappoMan
ba79f40007 add some debug 2014-11-12 16:12:34 -08:00
ZappoMan
6ff8abcbdd sepearate looping logic from AnimationHandle 2014-11-12 14:47:10 -08:00
ZappoMan
68bd6c23d9 sepearate looping logic from AnimationHandle 2014-11-12 14:47:02 -08:00
Stephen Birarda
b1310c065c remove TARGET_NAME from cmake macros where it is not required 2014-08-08 13:17:54 -07:00
Stephen Birarda
26f7b1ba62 add macro to link shared dependencies to target 2014-08-08 13:17:54 -07:00
Stephen Birarda
c9f8433a2d tweak setup_hifi_library to bubble up full path of Qt modules 2014-08-08 13:17:54 -07:00
Stephen Birarda
17df6484d4 remove ssize_t and replace with size_t or int where appropriate 2014-08-08 13:17:53 -07:00
Stephen Birarda
93b6f167f5 change more CMakeLists to use simplified hifi library linker 2014-08-08 13:17:53 -07:00
Stephen Birarda
892e30c5e1 get past assignment-client build after cmake auditing 2014-08-08 13:17:53 -07:00
Stephen Birarda
2bb37f2d64 more Qt module dependencies sorted out for libraries 2014-08-08 13:17:53 -07:00
Stephen Birarda
b5c8a4d2c6 fix requirement of networking in audio library 2014-08-08 13:17:52 -07:00
Stephen Birarda
fa26957b23 more CMakeLists cleanup for sub-dependencies 2014-08-08 13:17:52 -07:00
Stephen Birarda
2796f71419 library cleanup to suppress warnings on cmake 3.0 2014-07-30 15:06:15 -07:00
ZappoMan
8755e2d42e CR feedback 2014-07-03 13:38:52 -07:00
ZappoMan
a53d007c33 add support for getting current animation details for running avatar animations 2014-07-03 11:59:18 -07:00
Stephen Birarda
a9c2e3fe71 put back ssize_t definition 2014-05-20 11:56:06 -07:00
Stephen Birarda
0e7615391c don't look for GnuTLS from cmake 2014-05-20 10:35:04 -07:00
ZappoMan
d8488b34ef first cut at animations in models 2014-05-09 16:08:16 -07:00
ZappoMan
106c8bffd8 first cut at animations in models 2014-05-09 16:08:06 -07:00