Commit graph

215 commits

Author SHA1 Message Date
Anthony J. Thibault
26a5b5ed91 Fix for rendering of tablet ModelEntity in desktop mode.
The Model pendingChanges.updateItem() lambda now directly calls into StaticallyNestable.  This is late enough
in the update loop to have the most up-to-date camera transform used for rendering.
2017-01-11 18:37:57 -08:00
samcake
c435afb728 Introducing a fix for the overlayered model drawn in front 2016-12-19 13:17:56 -08:00
Ryan Huffman
c683c82817 Fix setting textures in model overlays 2016-10-04 16:24:43 -07:00
David Rowe
68499f49ad Fix count of textures 2016-09-10 10:15:13 +12:00
Brad Hefta-Gaub
e1845e2c3f add support for renderInfo properties to model entities 2016-08-31 15:00:21 -07:00
Andrew Meadows
c337cc92e5 remove crufty comment 2016-08-25 08:51:53 -07:00
Andrew Meadows
2f16aca114 remove cruft and fix typo in rebase 2016-08-24 22:26:56 -07:00
Andrew Meadows
68dd66daec create collision render geometry only when needed 2016-08-24 22:26:56 -07:00
Andrew Meadows
b0a0293e6e move compoundResource out of Model class 2016-08-24 22:26:56 -07:00
Andrew Meadows
fe4198530f don't render raw compound collision geometry 2016-08-24 22:26:56 -07:00
Andrew Meadows
329c5432ed _showCollisionHull --> _showCollisionGeometry 2016-08-24 22:26:56 -07:00
Andrew Meadows
6b0ae654ba cleanup logic around creating RenderItems 2016-08-24 22:26:56 -07:00
Andrew Meadows
d8fa0d1dd1 segregateMeshGroups() --> createRenderItems() 2016-08-24 22:25:45 -07:00
Andrew Meadows
726928c14c creae collision Geometry from mesh 2016-08-24 22:25:45 -07:00
SamGondelman
328d3128fa merge from master 2016-08-08 13:30:39 -07:00
SamGondelman
f311907982 fix merge mistake 2016-08-08 11:08:01 -07:00
Ryan Huffman
2a071c4329 Fix improperly formatted floats 2016-08-08 10:39:06 -07:00
Ryan Huffman
4f9be2ae72 Fix camera position not being set for angular loading 2016-08-08 08:53:06 -07:00
Ryan Huffman
77e993510e Cleanup implementation of angular loading 2016-08-08 08:53:05 -07:00
Ryan Huffman
c594dcdf9f Add priority loading for model entities 2016-08-08 08:52:29 -07:00
SamGondelman
dd51e0e38f merge from master 2016-08-05 17:04:45 -07:00
Brad Hefta-Gaub
83280aa3f2 implement support for updating the render items of models when they finish their fade 2016-08-05 10:11:07 -07:00
Seth Alves
ad4fc8c656 merge from upstream, don't hold up enabling of physics if a collision hull fails to load 2016-08-03 10:42:15 -07:00
Stephen Birarda
5d3e125a06 make failed geomtetry request not hold physics 2016-08-02 16:32:41 -07:00
Seth Alves
b953e6f0ff when an avatar URL fails, switch to the default 2016-08-01 18:12:30 -07:00
Andrew Meadows
2afd65467a fix bug where model is not yet ready for col shape 2016-07-19 18:01:22 -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
Anthony J. Thibault
55b0060df9 Convert JointData from relative frame to absolute. 2016-05-16 17:48:52 -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
d99dcf5450 Merge pull request #7487 from hyperlogic/tony/animated-culling
Improved render bounding boxes for animated models
2016-03-30 09:27:43 -07:00
Zach Pomerantz
29dedd5524 Update model URL on render thread 2016-03-29 10:42:40 -07:00
Anthony J. Thibault
940f3e636d Merge branch 'master' into tony/animated-culling 2016-03-28 19:58:38 -07:00
Zach Pomerantz
d6640ac520 Update Model::_hasTransparentTextures 2016-03-27 16:38:45 -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
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
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
Brad Hefta-Gaub
eb8a6527c6 change ModelBlender to use a set<WeakPointers> to safely handle model lifetime 2016-03-17 19:44:42 -07:00
Brad Hefta-Gaub
7483b8546b remove FaceModel, make Model support shared_from_this() so we can ave shared and weak pointers to it 2016-03-17 17:05:35 -07:00
Zach Pomerantz
a89a76dc4b Require model fixup if tex is transparent 2016-03-11 14:33:19 -08:00
Zach Pomerantz
7c9022fb3e Fix model overlay scaling 2016-02-23 10:40:47 -08:00
howard-stearns
2e7f1cbb3f Align avatar animation with LOD visibility. 2016-01-26 11:59:18 -08:00
Zach Pomerantz
4ff2b85e1a Replace ShapePipelineLib abstract with ShapePlumber instanced class 2016-01-11 16:00:08 -08:00