Commit graph

41 commits

Author SHA1 Message Date
Anthony J. Thibault
73ad9051a4 Shapes now render at the correct size. 2017-09-18 15:27:58 -07:00
Brad Davis
e817d3ced4 Threaded rendering & entity rendering refactor 2017-08-24 13:34:34 -07:00
Sam Gateau
79f3be1efe Merge pull request #11021 from Zvork/fade2
Fade dissolve effect  JUST AVATARS
2017-08-10 13:48:30 -07:00
LaShonda Hopper
0b79809f54 [WL21389] PR1 Feedback: Small change missed last commit (details below).
Until they're properly implemented, default the hedrons and polygons to
SHAPE_TYPE_ELLIPSOID within RenderableShapeEntity::computeShapeInfo.

Changes committed:
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
2017-07-31 17:08:30 -04:00
Olivier Prat
e85bb6fd08 Fixed compilation warnings on Mac 2017-07-31 19:19:00 +02:00
Olivier Prat
0415364c0e Removed fade transition on shape entities. Fixed broken custom shaders on shapes 2017-07-31 12:29:11 +02:00
LaShonda Hopper
cc4fbc97cd [WL21389] PR1 Update based on code review discussion & feedback (details below).
* Removed some left overs from prior approach.
* Moved _collisionShapeType & getShapeType override from ShapeEntityItem to
  RenderableShapeEntityItem (see thread: https://github.com/highfidelity/hifi/pull/11048#discussion_r130154903)
* Switched _collisionShapeType default from SHAPE_TYPE_NONE to SHAPE_TYPE_ELLIPSOID
** see thread: https://github.com/highfidelity/hifi/pull/11048#discussion_r129982909

Note(s):
* Retested and the cylinder behaves as expected along with the Box & Sphere shapes
  save from the previously mentioned caveats in the PR notes (https://github.com/highfidelity/hifi/pull/11048)
* Confirmed that currently unsupported shapes (hedrons, polygons, & cone) fallback to
  ellipsoid behavior given default change.

Changes Committed:
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.h
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/shared/src/ShapeInfo.cpp
2017-07-28 15:59:17 -04:00
LaShonda Hopper
ef1e426273 [WL21389] Some code and todo cleanup in prep for PR1.
Changes to be committed:
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/shared/src/ShapeInfo.cpp
2017-07-25 15:27:02 -04:00
Leander Hasty
d155c02640 [WL21389] wip and modifications based on comments
https://github.com/highfidelity/hifi/pull/11024#pullrequestreview-51611518

Cleans up tabs, moves new functionality out of ShapeFactory directly to
RenderableShapeEntityItem's computeShapeInfo override, begins to break down
where we will need pointlists.

Still need to determine how rotation is handled for pointlists, and check
for axis alignment on cylinders before deciding on a shape.

Changes to be committed:
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.h
	modified:   libraries/entities/CMakeLists.txt
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/physics/src/ShapeFactory.h
	modified:   libraries/shared/src/ShapeInfo.cpp
	modified:   scripts/developer/tests/basicEntityTest/entitySpawner.js
2017-07-25 15:20:35 -04:00
LaShonda Hopper
75403124b6 [WL21389] Addresses physics library dependency and has some other fixes (details below).
* Addresses physics library dependency by moving computeShapeInfo override from
ShapeEntityItem (which is within Entities Library) to RenderableShapeEntityItem
(which is in Entities-Renderer Library).
** Entities-Renderer library already links against the physic library.
** Per discussion with Andrew Meadows: In order to ShapeEntityItem to be
utilized the library dependency between the Entity and Physics library
would need to be resolved to avoid the cyclical reliance which isn't in
the scope of this ticket.
* Updates shapeSpawner test script from the default clone of basicEntityTest\entitySpawner.js
** Objects now have a finite lifetime
** Script now cleans up the objects created when the script ends
** Also moved some adjustable properties out into var aliases at the top of the
file for easier/less error prone tweaking. Should probably add one for the shapeType.
* Fixes some issues with validateShapeType helper function
* Removed naive attempt at including physics library within entities library.
* Transferred some todos from notes
* Fixed some formatting

NOTE(s):
  This compiles and runs.  Cylinder is spawned and treated as CYLINDER_Y.

TODO(s):
* Add tweakable var for shapeType within shapeSpawner.js
* Vet and verify other shapes.
* Add in edge case handling.
* Add in support for other shapes to ShapeInfo infrastructure.

Changes to be committed:
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.h
	modified:   libraries/entities/CMakeLists.txt
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/shared/src/ShapeInfo.cpp
	modified:   scripts/developer/tests/basicEntityTest/shapeSpawner.js
2017-07-25 14:43:39 -04:00
LaShonda Hopper
5bc38bd7f0 [WL21389] Collision Shapes need to be updated (details below).
Revised approach involves creating a helper function within ShapeFactory to aid
in devising the ShapeType to be used by an ShapeEntityItem for collision.  The
ShapeFactory is currently doing this for creating the actual Bullet Library
collision shapes.

ShapeEntityItem overrides its virtually inherited computeShapeInfo which
in turn calls the new ShapeFactory helper function.

ShapeEntityItem has a new memvar _collisionShapeType to cache its actual
ShapeType used by the physics system.  This memvar is returned via the getShapeType
accessor which is expected to return an object's ShapeType.

Note(s):
    This is similar to the original approach save translation between entity::Shape and ShapeType
    isn't tied to the EntityItemProperties shapeTypeNames or shapeType. This approach more
    directly solves the issue of getting the actual ShapeType used by the time it's needed
    to determine the bullet collision object type created when initializing the physic information.

    Translation of the ShapeEntityItem's entity::Shape to its ShapeType is handled by
    ShapeFactory which handles creating the bullet collision objects when setting up
    physics on the ShapeEntityItems.

Known Issue(s):
    This doesn't compile.  It appears that the Entity Library needs to know about
    the Physics Library.  The naive attempt at providing that link failed to resolve
    all compilation issues.

    Current Error:
    C1083: Cannot open include file: btBulletDynamicsCommon.h:
    No such file or directory (C:\projects\cusack\libraries\entities\src\ShapeEntityItem.cpp)
       C:\projects\cusack\libraries\physics\src\ShapeFactory.h	15	1	entities

	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities/CMakeLists.txt
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/physics/src/ShapeFactory.h
	modified:   libraries/physics/src/ShapeInfo.cpp
	modified:   scripts/developer/tests/basicEntityTest/entitySpawner.js
	new file:   scripts/developer/tests/basicEntityTest/shapeSpawner.js
2017-07-25 14:43:07 -04:00
Olivier Prat
a50c267d0b Fading on polyline now works when the polyline is added to the scene 2017-07-20 12:45:14 +02:00
Olivier Prat
abc751ef9c Fade seems to be working on shape items with instanced drawing. 2017-07-18 18:25:54 +02:00
Olivier Prat
3316be4dea Working fade parameters through instanced draw calls 2017-07-18 17:01:17 +02:00
Olivier Prat
dbf0b64dfb Refactored Fade.slh to take into account differences between instanced draw and normal draw 2017-07-18 12:49:34 +02:00
Olivier Prat
1f14b6ef38 Shape entities have the correct pipeline picked when fading is activated. Still need to support instanced rendering 2017-07-17 17:50:59 +02:00
Olivier Prat
f8b2ffe359 Removed transparency on fading shapes 2017-07-17 15:06:32 +02:00
Olivier Prat
290d106cf4 Shapes are working again. Had to re-specialize all the payload hooks for ShapePayload::Pointer... 2017-07-17 11:37:50 +02:00
Olivier Prat
1b8696fdda First draft of custom pipeline on geometry cache 2017-07-13 17:09:49 +02:00
Olivier Prat
06d69d04c3 TransitionStage + FadeJob compiling but not linked to entity events 2017-07-07 18:22:11 +02:00
Olivier Prat
4256a1f2a7 Preparing for merge with stage. DOESN'T COMPILE! 2017-07-07 15:16:20 +02:00
Olivier Prat
8a12d0c106 Fade effect working again for basic enter domain but with various Fade jobs 2017-06-29 08:54:23 +02:00
samcake
20d8c11e28 ALmost there, getting eback everything to work with the light and background stages in the scene, not in deferredLighting Effect anymore 2017-06-22 17:54:16 -07:00
Olivier Prat
24d45e0f5b Updated from upstream master because of change of protocol 2017-06-13 10:43:25 +02:00
Olivier Prat
20d4fcbbc7 Fixed fading on skinned objects. Added initialiazeShapePipelines on GeometryCache to postpone simple pipeline creation after initializeGL 2017-06-08 09:24:12 +02:00
samcake
9c1e99fe3f Removing cruft and organizing the stencil config 2017-06-01 13:06:22 -07:00
samcake
0399249a03 Expeand the wireframe to the primitive entities and the polyvox 2017-03-15 16:58:31 -07:00
Ryan Huffman
dae8461773 Fix transparency on procedural shapes 2016-08-16 15:42:17 -07:00
SamGondelman
d8545bc7a3 fix procedural transparency 2016-08-10 13:49:35 -07:00
SamGondelman
36d9f92101 performance optimization to minimize calling usecTimestampNow 2016-08-09 13:10:02 -07:00
SamGondelman
b23d3cd35a fixed messed up transparency on edit selection of shapes 2016-08-05 18:35:16 -07:00
SamGondelman
b794259b7d fixed procedural entity fade 2016-08-05 16:15:10 -07:00
SamGondelman
ac9a80131a refactoring _fadeStartTime and isTransparent, make simple renderables switch to transparent when fade finishes 2016-08-04 12:34:46 -07:00
SamGondelman
27bacc9165 try to fade in procedural shapes 2016-08-03 14:33:05 -07:00
SamGondelman
2eb0c7735f working on fading shape entities 2016-08-03 13:30:05 -07:00
SamGondelman
d63a0ef08f working on making other entities transparent 2016-08-02 18:09:42 -07:00
Brad Davis
03cb6175ab Support triangle and hexagon shapes, add shape support to overlays. 2016-07-15 22:02:17 -07:00
SamGondelman
53435fc730 removed extra argument 2016-06-10 14:04:33 -07:00
SamGondelman
24e5000aeb exposed orientation and eye position to procedural entity shaders 2016-06-08 18:26:54 -07:00
Brad Davis
2c703e963c More shapes 2016-05-22 19:48:59 -07:00
Brad Davis
cd1e910844 Add a generic shape primitive 2016-05-21 23:46:44 -07:00