Commit graph

264 commits

Author SHA1 Message Date
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
Anthony J. Thibault
6b5b272cd7 Added SoftAttachmentModel class.
Is a subclass of Model, it overrides the updateClusterMatrices so it will pull
the actual joint matrices from a different rig override.

For the avatar soft attachment system, this override will be the Avatar::_skeletonModel rig.
This will give us the ability for an avatar to "wear" non-rigid attachments, such as clothing.
2015-12-18 09:52:11 -08:00
Anthony J. Thibault
3f0cdb3c02 Merge branch 'master' into tony/js-avatar-default-pose 2015-12-14 11:19:24 -08:00
Atlante45
ce51350b65 Fix warnings on windows 64bit 2015-12-11 15:42:15 -08:00
samcake
5805cc8f2b Adding the AABox transform features (from Extents) adn introducing a simple MeshPartPayload to render simple geometry 2015-12-10 14:59:04 -08:00
Anthony J. Thibault
652ce5501f Expose Avatar default pose to JavaScript
New JavaScript API to get the avatar's default pose.

   MyAvatar.getDefaultJointRotation(index);
   MyAvatar.getDefaultJointTranslation(index);

See `examples/tPose.js` for example usage
2015-12-10 13:57:31 -08:00
Seth Alves
f99812a903 adjust method names to fit convention 2015-12-07 14:31:08 -08:00
Seth Alves
a948ae5f19 children of avatar joints might be right, now 2015-12-06 10:48:00 -08:00
Seth Alves
b7ebe5b92b merge from upstream 2015-11-30 16:59:52 -08:00
Seth Alves
f013f95e9b merge from upstream 2015-11-21 08:43:00 -08:00
Anthony J. Thibault
a77ea8da43 Removed JointStates! You won't be missed. 2015-11-20 14:15:37 -08:00
Anthony J. Thibault
55adedcec8 Merge branch 'master' into tony/remove-joint-states 2015-11-16 11:22:44 -08:00
Anthony J. Thibault
e698d3c1e8 Isolate JointStates within the Rig class
Except for SkeletalModel::computeBounds() JointStates are now completly
encapsulated by the Rig.  Now we can start using AnimPoses instead and
in parallel with the JointState implementation. Then we can assert that
they are identical, before removing JointStates.

This check in has many comments with the AJT tag.
Each one of these cases will need to be revisitied and fixed.
In particular // AJT: LEGACY will be used to enclose all code
in the Rig which manipulates the _jointState QVector.
2015-11-11 18:23:58 -08:00
Anthony J. Thibault
11440f92f4 Removed rig animations
* Deleted AnimationHandle class
* Removed enableAnimGraph and anableRigAnimations from Menu.
* Removed *some* references to old IK system.
  But it is still used when computing collision bounding volumes
2015-11-11 15:32:57 -08:00
Seth Alves
d535109caf attempt to fix render-collision hull feature 2015-11-10 09:49:31 -08:00
Seth Alves
6cb195b335 Merge branch 'master' of github.com:highfidelity/hifi into parents 2015-10-20 15:53:56 -07:00
Seth Alves
bc99ef778c change how render engine is told about model position changes 2015-10-20 12:04:29 -07:00
Seth Alves
a70ba4cd5a add some accessors 2015-10-15 11:42:53 -07:00
samcake
0a351a8a0c FIx the problem with cauterizedClusterMatrices in the case rear view mirror is used. Clean the way to define the depth stencil format for texture 2015-10-07 14:26:33 -07:00
samcake
c92a6d58ab Dispatch classes in their properly named files to appease the coding standard gods 2015-10-06 09:46:32 -07:00
samcake
59afbf1a04 Remove the renderPart call from model.cpp and put the code path in the MeshPartPayload::render() 2015-10-06 01:15:53 -07:00
samcake
12fedb6ff0 Move skinning shader features in its own slh and get ready for moving cluster matrices to uniform buffer 2015-10-05 18:31:05 -07:00
samcake
9e393ced46 MOving rednering code of Model into ModelRenderPayload.h/cpp 2015-10-05 09:17:16 -07:00
Anthony J. Thibault
fc7b6dee84 Merge branch 'master' into transmit-joint-translation 2015-10-02 11:40:33 -07:00
Andrew Meadows
09ac01a5e7 remove cruft from old verlet avatar simulation 2015-10-01 13:44:50 -07:00
Seth Alves
d0a1e206ca Merge branch 'master' of github.com:highfidelity/hifi into transmit-joint-translation 2015-09-29 13:55:13 -07:00
samcake
202d2944ab Merge branch 'master' of https://github.com/highfidelity/hifi into calvin 2015-09-28 17:24:59 -07:00
samcake
95ea874d43 Minor fixes to the way the specular color is interpreted 2015-09-28 12:43:15 -07:00
Brad Hefta-Gaub
430cbcca7e first cut at adding surface normals to ray intersection 2015-09-27 21:57:50 -07:00
Seth Alves
50dd8eba45 Relay joint translations across network. Apply animation's root-joint translation to avatar. 2015-09-26 11:40:39 -07:00
Brad Hefta-Gaub
efda121619 fix a bunch of warnings on windows 2015-09-22 16:40:17 -07:00
Brad Hefta-Gaub
5bcce50b98 Merge pull request #5846 from bob-long/master
Display the face blend coefficients and update the value in real time.
2015-09-22 14:56:56 -07:00
BOB LONG
a23a90bf5f Code simplification
Simplify the code a bit as suggested:

1) Use unsigned int instead of signed int, so we can avoid checking the
negative case
2) Merge two lines into a single line so we can inline the
implementation

Correct the js sample file header.

testing done:
- Build locally
- Pass -1 as index from js and the code still can correctly handle the
input.
2015-09-21 19:11:13 -07:00
samcake
910038cf82 Merging 2015-09-21 17:47:23 -07:00
samcake
21f53f1bbd debugging the lighting issue on the craps table 2015-09-21 16:57:55 -07:00
Brad Hefta-Gaub
dc9c774eb5 merge model part quads and triangles together to reduce the number of draw calls 2015-09-21 13:09:43 -07:00
Sam Gateau
d45547aa1a Merge and update 2015-09-16 13:46:07 -07:00
BOB LONG
efc321bc10 Display face blend coefficients
Display the face blend coefficients and update the value in real time.
2015-09-16 00:40:26 -07:00
Brad Davis
3f688f92d3 Don't do an O(N^2) operation on cluster matrices 2015-09-15 08:04:17 -07:00
Brad Hefta-Gaub
70fcdbf2fd Revert "Fix over-calculation of cluster matrices" 2015-09-14 21:20:11 -07:00
Brad Davis
35e4440c4f Don't do an O(N^2) operation on cluster matrices 2015-09-14 16:09:13 -07:00
Sam Gateau
c37cdce750 Merging back with master 2015-09-10 17:53:50 -07:00
Howard Stearns
eb67254e54 Merge branch 'master' of https://github.com/highfidelity/hifi into decouple-avatar-updates 2015-09-08 16:54:14 -07:00
Howard Stearns
27f4bca0a4 Cleanup: This appears to be complete and working -- EXCEPT for loading animations on the update thread!
Until I figure that out, the answer is to turn off Developer->Avatar->"Enable Avatar Update Threading", run through forward/back/left/right/strafeLeft/strafeRight, and then turn "Enable Avatar Update Threading" back on.
2015-09-08 14:49:58 -07:00
Howard Stearns
8cf71f285d Merge branch 'master' of https://github.com/highfidelity/hifi into decouple-avatar-updates 2015-09-01 16:03:40 -07:00
Stephen Birarda
33f6933544 Merge branch 'master' of https://github.com/highfidelity/hifi into protocol 2015-09-01 14:36:16 -06:00
Sam Gateau
85f230bf17 Getting rid of the NetworkMEshPart and simplifying the thinking around the MOdel regarding its RenderItems 2015-08-28 08:12:50 -07:00
Andrew Meadows
d3f06af892 remove PhysicsEntity class 2015-08-27 18:22:12 -07:00
Stephen Birarda
8ee27bca2b remove urlAsString from Model 2015-08-27 16:00:21 -07:00
Sam Gateau
f6953f8e02 REfining th eTextureMap design but still with the issue of the lightmapped model 2015-08-27 09:52:07 -07:00
Howard Stearns
475331a97d Sprinkle locks everywhere. 2015-08-26 16:08:07 -07:00
Sam Gateau
a388ba7b00 fix conflicts 2015-08-21 16:45:52 -07:00