Commit graph

264 commits

Author SHA1 Message Date
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
Sam Gateau
5a8e20ec77 merging 2015-08-21 16:34:13 -07:00
Anthony J. Thibault
1b3d7fabc8 ResourceCache, NetworkGeometry and Model refactoring and optimizations.
* Removed validation logic from Resource class, Qt does this internally and is more
  standards compliant.  This should result in more accurate caching and faster resource
  fetching when cache is stale and validation fails.
* Added loaded and failed slots to Resource class, so it does not have to be polled.

* NetworkGeometry now uses multiple Resource objects to download
  the fst/mapping file and the fbx/obj models.
* NetworkGeometry is no longer a subclass of Resource
* NetworkGeometry now has signals for success and failure, you no longer
  have to poll it to determine when loading is complete (except for textures *sigh*)

Some functionality was removed

* NetworkGeometry no longer has a fallback
* NetworkGeometry no longer loads LODs or has lod logic.
* The number of FBXGeometry copies is greatly reduced.

* Model::setURL no supports fallback URL, delayLoad or retainCurrent option.
  This can result in a pop when switching avatars, and there's no longer a default
  if avatar loading fails.
2015-08-20 18:59:51 -07:00
ZappoMan
f4c3c30f6a quick optimization to RenderableModelEntityItem::render() 2015-08-07 12:49:48 -07:00
Sam Gateau
95682e6270 Introducing the Normal fitting algorithm for better normal in the deferred buffer 2015-08-05 17:17:00 -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
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
Seth Alves
5ae15d46b4 add some javascript callable stuff back to MyAvatar 2015-07-27 16:42:54 -07:00
Howard Stearns
1bb734aec0 Kill warnings. 2015-07-27 15:26:03 -07:00
Howard Stearns
ef52c0703f Merge pull request #8 from AndrewMeadows/cadmium
remove unused legacy Shapes from Model and friends
2015-07-27 13:20:41 -07:00
Howard Stearns
990f0d6d07 Pass correct position/velocity/orientation to Rig simulation. 2015-07-27 12:57:39 -07:00
Andrew Meadows
73ac941230 remove unused legacy Shapes from Model and friends 2015-07-27 11:15:33 -07:00
Seth Alves
1e19e46aa6 Merge branch 'master' of github.com:highfidelity/hifi into rig 2015-07-23 15:14:19 -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
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
ZappoMan
c2113ea96b remove non-batch versions of GeometryCache renderXYZ() methods 2015-07-23 07:42:58 -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
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
Seth Alves
cdc26526b4 merge from upstream 2015-07-21 09:51:16 -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
Brad Davis
d68618e206 Removing GL headers from most files, and some naked GL from application.cpp 2015-07-18 00:46:09 -07:00
Seth Alves
d287817829 give SkeletonModel created by MyAvatar a Rig pointer 2015-07-17 14:52:37 -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
Sam Gateau
9657d146f7 Clearing Model.cpp from naked gl call references 2015-07-15 16:09:53 -07:00
Atlante45
8fb69ecc96 Merge branch 'master' of https://github.com/highfidelity/hifi into clear_cache_and_restart 2015-07-14 13:50:58 -07:00
David Rowe
8ecefdfe39 If an external texture isn't found, still display the model
If the texture is present the next Interface is run then it will be used.
2015-07-10 16:03:27 -07:00
Atlante45
49993695a5 Made geometry refresh safe 2015-07-10 15:20:19 -07:00
Sam Gateau
be8fe25338 Trying to finalize the look and behavior of th estatus indicators 2015-07-02 15:06:07 -07:00
Sam Gateau
2f04a9d3da refining the shader pipeline and trying to pass a Status Getter from the model and fails 2015-07-01 07:47:46 -07:00
Anthony J. Thibault
99a03bac21 Render a different model when in first person view.
Currently this model is identical to the third person model, except
that the head bones have been 'cauterized' by applying a zero scale transform.
This allows us to set the near clip back to a reasonable value.
2015-06-24 16:10:47 -07:00
ZappoMan
5abd608ccc fix typo 2015-06-16 15:55:37 -07:00
ZappoMan
1beb95cfe7 fix FPS while still maintaining ray picking 2015-06-16 15:38:16 -07:00
ZappoMan
e06422825a mostly getting attachments working again 2015-06-10 15:46:54 -07:00
ZappoMan
2c6ebcb06a remove a bunch of cruft from Model 2015-06-09 12:57:14 -07:00
ZappoMan
ba0cecb356 remove attachments from Model - only supported at avatar layer 2015-06-09 12:32:37 -07:00
Atlante45
90c9a82aeb Remove unnecesary debug 2015-06-09 15:27:08 +02:00
samcake
5e351c0328 FIxing the transparent rendering on Mac 2015-06-08 18:36:12 +02:00
Ryan Huffman
b22ed34825 Merge pull request #5051 from ZappoMan/team-teaching-optimize-offset
TEAM TEACHING - improvements to avatar part clipping
2015-06-05 09:26:45 -07:00
ZappoMan
5146e51d9f improvements to avatar part clipping 2015-06-04 16:44:46 -07:00
Ryan Huffman
cafc5b7a7c Merge pull request #5049 from ZappoMan/team-teaching-optimize-offset
TEAM TEACHING - avatar changing model URLs
2015-06-04 14:29:44 -07:00
Brad Hefta-Gaub
5e6771d91a Merge pull request #5048 from huffman/entity-visible
Team Teaching - Update entity payload items to not render when entity.visible == false
2015-06-04 14:12:49 -07:00
Ryan Huffman
5af52048ec Add render/Scene.h include to Model.h 2015-06-04 13:45:10 -07:00
ZappoMan
56ac987c9b handle url reloading at the model level, this addresses avatars changing their models 2015-06-04 13:40:43 -07:00
Ryan Huffman
a62b55fcb2 Update entity payload items to correctly hide when not visible 2015-06-04 13:25:40 -07:00
ZappoMan
3593afea3b optimize part offset calculation 2015-06-04 11:37:02 -07:00
ZappoMan
c4756f4816 remove dead code 2015-06-04 08:49:26 -07:00
ZappoMan
7fde574a2a make model overlays acutally use sub mesh payload items 2015-06-03 16:33:58 -07:00
ZappoMan
7c40b666e8 Merge branch 'master' of https://github.com/highfidelity/hifi into team-teaching-scene-api 2015-06-03 09:52:40 -07:00
ZappoMan
647d132d57 store part boxes in model space and translate to world space on request 2015-06-02 21:50:33 -07:00
ZappoMan
4ce27f1483 first cut at rendering avatars as individual model items 2015-06-02 16:54:47 -07:00
ZappoMan
1e2d2a2a99 calculate the actual bounding box for the mesh parts 2015-06-01 13:31:42 -07:00
ZappoMan
dc62052a3c more hacking on models 2015-05-29 11:07:25 -07:00
ZappoMan
eb19b93433 render models in scene checkpoint 2015-05-28 17:19:30 -07:00
Eric Levin
72af4e4e67 latest pointer 2015-05-28 10:44:44 -07:00
Ryan Huffman
822ae800c5 Update Model::endScene to require RenderArgs 2015-05-22 16:17:01 -07:00
Ryan Huffman
8380eec03b Update Model::renderCore to use RenderArgs 2015-05-22 16:10:43 -07:00
Ryan Huffman
3f22b5f8b3 Add RenderArgs to more render methods 2015-05-22 15:25:53 -07:00
Sam Gateau
ce09f73b5c Merge branch 'master' of https://github.com/highfidelity/hifi into orange 2015-05-18 14:36:29 -07:00
Howard Stearns
7e1b6a48c5 Merge branch 'master' of https://github.com/highfidelity/hifi into grab-picking-crash 2015-05-18 13:35:28 -07:00
Howard Stearns
f2a66f3106 Simplest fix for the grab crash that occurs with animated complex models.
(e.g., clicking on air hockey props in front of a spinning windmill).
2015-05-18 13:08:11 -07:00
Sam Cake
ad99a0f053 Improving the quality of the normals with a better packing algorithm in th edeferred 2015-05-17 16:57:32 -07:00
Atlante45
591548dc38 Missing comma 2015-05-07 20:15:40 +02:00
Atlante45
863280300e Fix pickMeshList incorrect arguments 2015-05-05 22:37:00 +02:00
Atlante45
e0f3a8212f Add wireframe arg to render fct 2015-05-05 17:23:10 +02:00
Atlante45
bc04685dbf Add isWireframe to RenderKey 2015-05-05 15:15:18 +02:00
Atlante45
0e3061f052 Add isWireframe to model class 2015-05-05 15:14:29 +02:00
Brad Hefta-Gaub
50eecb15b3 Merge pull request #4712 from Atlante45/compound_zones_fix
Compound zones fix
2015-04-28 09:48:05 -07:00
Atlante45
b7263eeacf Added a more efficient convexHullContains to Model
New version computes each submesh's bounding box once and checks against it
before checking against triangles.
2015-04-28 17:05:38 +02:00
Andrew Meadows
79cb55eabc rename setJointStates() --> initJointStates() 2015-04-24 13:26:26 -07:00
Sam Gateau
edb388ed83 Fixing the function with no implementation 2015-04-17 11:32:05 -07:00
Sam Gateau
f06556ba12 migrate the various list to sort the rendering from explicit names to a more generic key based map 2015-04-16 14:37:39 -07:00
Sam Gateau
07e7f6ea1d FIx review comments 2015-04-06 15:40:29 -07:00
Sam Gateau
00817ab64f MErging with origin/orange, brinign the fix for shadows 2015-04-05 18:36:39 -07:00
Sam Gateau
6f5c411a46 Fixing a few issues and syntax, trying to understand why the shadows are not rendering correctly 2015-04-03 10:32:20 -07:00
Seth Alves
78af7f900e don't need _collisionGeometryScale 2015-04-01 18:23:25 -07:00
Seth Alves
8940ba0c2a new member variables related to rendering collision hulls 2015-04-01 17:52:18 -07:00
Sam Gateau
0d721ec1e9 merging 2015-03-31 17:47:05 -07:00
Sam Gateau
9b63739a72 Trying to clen up the REnderMode usage in connection with the needed gpu::State for all the different variations 2015-03-31 17:35:34 -07:00
ZappoMan
a889191916 never cull mesh parts for avatars 2015-03-31 14:27:34 -07:00
samcake
1a18719031 and make it compile on mac... remove the field map from state just because it's unecessary 2015-03-30 21:53:59 -07:00
Seth Alves
7da87d6e15 set up a way to request ResourceCache downloads from a non-networking thread. 2015-03-26 18:37:55 -07:00
Sam Gateau
c9377d0811 the model renderer now uses the map of renderPIpeline and the pipeline object of gpu, yeah. fixed the state to do the basics glState stuff correctly 2015-03-25 10:16:18 -07:00
Sam Gateau
6284159892 Revisiting the rendering pipeline pick and trying to use our brand new gpu::Pipeline 2015-03-24 14:58:41 -07:00
Sam Gateau
d857a36557 Merge branch 'master' of https://github.com/highfidelity/hifi into temp1 2015-03-23 22:37:38 -07:00
Sam Gateau
19a96c4815 Adding the State to gpu and wiring the pipeline in glBackend to potentially make it work soon :) 2015-03-23 22:33:25 -07:00
ZappoMan
b705d76336 total hack to ignore frustum culling in case of avatar mesh parts with no transform 2015-03-23 10:43:21 -07:00
ZappoMan
fe8ad9517f added debugging for model mesh boxes 2015-03-23 10:08:08 -07:00
Sam Gateau
1babf53643 Merge branch 'master' of https://github.com/highfidelity/hifi into temp1 2015-03-20 11:55:30 -07:00
Sam Gateau
65727dd613 clean up code 2015-03-19 15:23:50 -07:00
Sam Gateau
dc27bfb6ef Merge branch 'master' of https://github.com/highfidelity/hifi into temp1 2015-03-18 15:59:50 -07:00
Sam Gateau
0bd78be7f4 Transition model shaders to gpu:Shader 2015-03-18 15:57:01 -07:00
Seth Alves
9161cc8b83 attempt to handle collision models in the same way as render models 2015-03-18 13:00:09 -07:00
Seth Alves
87cc710efc more merge madness, calculate 2nd PhysicsEngine hash with qChecksum if url is set 2015-03-13 18:43:24 -07:00
Seth Alves
bf1cb951a3 move PhysicsEntity so that ModelEntityItem can initiate a model download 2015-03-11 18:34:27 -07:00
Seth Alves
20a22ff42c Merge branch 'master' of github.com:highfidelity/hifi into avatars-can-collide 2015-03-11 07:17:19 -07:00
Seth Alves
1c73f50dbc started to hook up geometry downloader to ShapeInfo 2015-03-11 07:17:13 -07:00
Seth Alves
844085b514 started on hull collisions 2015-03-10 15:30:08 -07:00
Sam Gateau
23a6326aa1 testing the shader features in Model and refining the shader making workflow 2015-03-08 10:53:29 -07:00