Commit graph

435 commits

Author SHA1 Message Date
Stephen Birarda
5d3e125a06 make failed geomtetry request not hold physics 2016-08-02 16:32:41 -07:00
Andrew Meadows
d876251f1e release geometry refs in Model::deleteGeometry() 2016-07-24 19:17:39 -07:00
Andrew Meadows
3e43859139 setCollisionModelURL() more symmetric with setURL() 2016-07-13 15:13:35 -07:00
Andrew Meadows
4bebb682dc namechange: fetchResource --> getGeometryResource 2016-07-13 15:13:35 -07:00
Andrew Meadows
9f7d2cf263 NetworkGeometry --> GeometryResourceWatcher
Model class gets render and collision geometries with watchers
also changed names for readability
2016-07-13 15:00:12 -07:00
Seth Alves
11542aeca2 pick against avatar's capsule and then against the T-pose mesh 2016-07-07 16:36:25 -07:00
Seth Alves
5f9c7b6ea5 trying to take joint information into account when raypicking against models 2016-06-29 17:02:49 -07:00
Seth Alves
d53c7ae5d8 experimenting 2016-06-29 12:39:04 -07:00
Andrew Meadows
5d5dc2837b fix comment 2016-06-20 17:29:20 -07:00
Andrew Meadows
c73757f740 use many colors for collision hull rendering 2016-06-03 10:47:54 -07:00
Brad Hefta-Gaub
06cb625d09 Merge pull request #7959 from hyperlogic/tony/improved-avatar-mixer-precision
Improved Avatar Mixer Rotation Precision
2016-05-25 17:14:12 -07:00
Seth Alves
40e862cf9e quiet gcc 5 warnings 2016-05-21 16:53:01 -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
Anthony Thibault
865a77ae20 Model: fixed two crash issues when changing avatars
* When the GeometryReader has the last ref to the GeometryResource ptr
  It needs to hold on to the reference until invokeMethod is completed.
  Otherwise, invokeMethod will call a method on a deleted object, leading
  to memory corruption or crashes.

* When the Model URL is changed, the clusterMatrices are invalided and the
  RenderItemsSets are cleared.  However, there still might be renderItems in
  the scene pending changes list that might refer to those RenderItems and their
  clusterMatrices.  We need to guard against this access to prevent reading from
  memory that was previously freed.

Both of these issues were uncovered using the [avatar-thrasher](https://gist.github.com/hyperlogic/d82a61d141df43d576428501a82c5ee6) test script.
2016-04-02 21:48:22 -07:00
Anthony J. Thibault
5e81cccc6c Merge branch 'master' into tony/culling-fixes 2016-04-01 09:29:46 -07:00
Anthony J. Thibault
bc967f0ab0 Model: update renderItems when items are added to the scene.
* Renamed enqueueLocationChange to updateRenderItems
* Call updateRenderItems when models are added to the scene.

This will fix entity render bounds being incorrect when they are first added to the scene,
then later being correct after a position update.

* Renamed getMeshPartBound to getRenderableMeshBound.
* Avatar now uses getRenderableMeshBound() to do boundingRadius vs frustum check.
* Model::getRenderableMeshBound now returns a more accurate bound, because it is the same one used for rendering.

This will fix avatar freezing, when they are in the corner of your frustum.
This was due to matrices not being updated because the avatar had to a small bounding sphere.
2016-03-31 14:59:27 -07:00
Zach Pomerantz
e4cba14333 Avoid recreating model items when adding to scene 2016-03-31 10:46:51 -07:00
Zach Pomerantz
3de5f73a1f Fixup model on tex load 2016-03-31 10:46:51 -07:00
Brad Hefta-Gaub
a7f93aa75c Merge pull request #7519 from zzmp/fix/avatar-crash
Fix crash from updating/resetting avatar
2016-03-30 21:31:17 -07:00
Anthony Thibault
26b9469df5 Merge pull request #7516 from hyperlogic/tony/show-collision-geometry-crash-fix
Model: fix for crash when displaying collision mesh
2016-03-30 16:48:07 -07:00
Zach Pomerantz
6e0d6ee45b Guard updateClusterMatrices from unloaded geo 2016-03-30 16:04:00 -07:00
Zach Pomerantz
00db095306 Guard against reset model geo on scene update 2016-03-30 15:49:45 -07:00
Anthony J. Thibault
f6344c34e7 Model: Fix for equipped models not updating their matrices 2016-03-30 15:19:35 -07:00
Anthony J. Thibault
103257493c Model: fix for crash when displaying collision mesh.
This was due to a default constructed PayloadPointer being sent to the scene via resetItem.

The fix is to A) not do that anymore, B) make resetItem more robust and not crash if this happens.
2016-03-30 14:24:28 -07:00
Anthony J. Thibault
24ca5b3d60 Update after merge changes to NetworkGeometry.
Also cleaned up API for ModelMeshPartPayload::updateTransformForSkinnedMesh() to pass a QVector const ref, instead of a raw pointer and a size.
2016-03-28 20:29:02 -07:00
Anthony J. Thibault
940f3e636d Merge branch 'master' into tony/animated-culling 2016-03-28 19:58:38 -07:00
Anthony J. Thibault
115fd607a0 Address performance issues introduced with this PR.
* Prevent clusterMatrices from being invalidated and re-computed in each updateItem lambda.
  We do this by not setting _model->_needsUpdateClusterMatrices = true;
* Prevent redundant work if Model::enqueueLocationChange is called multiple times per frame.
  We do this by introducing a preRenderLambdas map in the Application class.
  Instead of adding work directly to the scene PendingChanges queue Model::enqueueLocationChange
  adds a lambda to the Application preRenderLambdas map.  The Application ensures that only one lambda will
  be invoked for each model per frame.
2016-03-28 19:47:30 -07:00
Anthony J. Thibault
f5a86666a1 Model: fix for collision mesh rendering 2016-03-28 09:56:15 -07:00
Zach Pomerantz
d6640ac520 Update Model::_hasTransparentTextures 2016-03-27 16:38:45 -07:00
Anthony J. Thibault
49a4d104a6 Minimize diff with master 2016-03-26 13:27:05 -07:00
Anthony J. Thibault
bf433487fa Dynamic bound update for skinned mesh
* Use all cluster matrices to compute bound for skinned mesh.
  This is far less expensive then doing per-vertex work, but it's not free, for avatars especially.
* Remove skinnedMeshBound, compute it instead.
* Compute clusterMatrices in render update, because we need them to update bounds.
2016-03-26 12:22:02 -07:00
Anthony J. Thibault
b4e70d9101 WIP: checkpoint
* bug fix in AABox::operator+=
* added AABox::emiggen
* Avatar now has a default bound for it's skinned mesh.
* WIP: AABox tests;  NEED MORE
* Model: split collision and model mesh render items.
  Because ModelMeshRenderItems need special handling to update bounds for animated joints.
* Model: dynamically update the bound for rigidly bound animated meshes
* Rig: added access to geometryToRigTransform
* RenderableModelEntityItem: try to update bounds for skinned mesh to be the entity dimentions (this doesn't seem to be working)
* Geometry.cpp: removed unused bounds parameter in evalPartBounds
* ModelMeshPartPayload: bounds updating
   * non-animated: use existing _localBound
   * rigid bound mesh: use _localBound transformed by clusterMatrix joint transform
   * fully skinned mesh: use _skinnedMeshBound provided by the application.
2016-03-25 21:29:20 -07:00
Zach Pomerantz
3402635f99 Lock geometry on blender 2016-03-24 18:50:43 -07:00
Zach Pomerantz
3e9e083df5 Update users of NetworkGeometry 2016-03-24 11:35:41 -07:00
Brad Hefta-Gaub
9f0084dbb1 make Blender keep a shared pointer to the model it's blending 2016-03-22 16:01:31 -07:00
Brad Hefta-Gaub
513138ca98 one more crack at fixing the blender 2016-03-21 18:28:26 -07:00
Chris Collins
6324d0e3be Merge pull request #7393 from ZappoMan/protectMeshBoxes
Fix for crash in recalculateMeshBoxes()
2016-03-21 15:46:28 -07:00
Brad Hefta-Gaub
d28db7bec6 fix typo 2016-03-21 14:47:53 -07:00
Brad Hefta-Gaub
2389295217 actually properly remove pending blendshapes 2016-03-21 13:04:37 -07:00
Brad Hefta-Gaub
492e71345a Revert "Revert "Fix ModelBlender crash""
This reverts commit f274cdcc7f.
2016-03-21 11:42:25 -07:00
Brad Hefta-Gaub
f274cdcc7f Revert "Fix ModelBlender crash" 2016-03-21 10:47:31 -07:00
Andrew Meadows
cd802a6549 Merge pull request #7406 from hyperlogic/tony/transparent-texture-fix
Model: fix for avatars with late loaded transparent textures.
2016-03-21 09:19:33 -07:00
Anthony Thibault
b06f027f2e Model: fix for avatars with late loaded transparent textures. 2016-03-20 18:20:03 -07:00
Brad Hefta-Gaub
925d5d36ac clean up the recalculateMeshBoxes() calls in findRayIntersectionAgainstSubMeshes() 2016-03-18 12:20:45 -07:00
Brad Hefta-Gaub
eb8a6527c6 change ModelBlender to use a set<WeakPointers> to safely handle model lifetime 2016-03-17 19:44:42 -07:00
Zach Pomerantz
a89a76dc4b Require model fixup if tex is transparent 2016-03-11 14:33:19 -08:00
samcake
ae6e625894 Merge branch 'master' of https://github.com/highfidelity/hifi into orange 2016-02-24 17:30:40 -08:00
Zach Pomerantz
7c9022fb3e Fix model overlay scaling 2016-02-23 10:40:47 -08:00
samcake
377ee5a486 Merge branch 'master' of https://github.com/highfidelity/hifi into orange 2016-02-22 09:23:14 -08:00