Commit graph

72 commits

Author SHA1 Message Date
SamGondelman
86ee5c12d8 merge and update based on sam's changes 2018-05-31 17:53:36 -07:00
SamGondelman
e6741a363e add local-only isVisibleInSecondaryCamera flag to entities 2018-05-23 16:35:21 -07:00
SamGondelman
e0b2c076ef cleanup and fix forward procedural rendering 2018-04-11 13:03:57 -07:00
SamGondelman
d841eeb6e9 Merge remote-tracking branch 'upstream/master' into androidPrimitives 2018-04-10 16:52:08 -07:00
SamGondelman
0c069574c5 forward pipelines for primitives 2018-04-10 15:56:08 -07:00
SamGondelman
5a7e9d8e3e fix shadows on primitives 2018-03-30 09:48:04 -07:00
John Conklin II
2d63afbe28
Merge pull request #12588 from SamGondelman/shapeTex
Materials on primitives
2018-03-21 12:08:24 -07:00
SamGondelman
96e48a0162 warnings 2018-03-07 13:50:51 -08:00
SamGondelman
19e4fb2355 materials on primitives 2018-03-07 12:22:17 -08:00
SamGondelman
b56f755034 material reflection 2018-02-23 17:58:46 -08:00
humbletim
6ea4b660b7 CR feedback; remove ok bool pointer and all metadata; cleanup 2018-02-23 07:47:39 -05:00
humbletim
4fd3d9bf7b cleanup; formalize data structures 2018-02-22 08:18:38 -05:00
SamGondelman
4c6169ec78 merge and a little cleanup 2018-02-20 15:45:34 -08:00
humbletim
5791ca4c51 interim checkin 2018-02-20 12:22:04 -05:00
SamGondelman
2d754edf74 CR 2018-02-15 15:48:41 -08:00
SamGondelman
9e8aa1898c warnings, load material from URL, shapeID -> parentMaterialID 2018-02-12 12:50:09 -08:00
SamGondelman
5337377ef5 Merge remote-tracking branch 'upstream/master' into decals 2018-02-09 14:40:20 -08:00
SamGondelman
84cd0e1529 wip live material swapping on model entities, model overlays, avatars,
and albedo swap on shape entities
2018-02-09 12:00:08 -08:00
humbletim
06afaa7470 BufferView <-> QVariant/QScriptValue conversion
update MeshProxy/SimpleMeshProxy and ScriptableModel

ModelScriptingInterface / scriptable::ModelProvider

integration

update to RC-63

initial graphics-scripting refactoring

graphics-scripting baseline commit

wip commit

Geometry -> MeshPart

remove SimpleMeshProxy

collapse graphics-utils -> graphics-scripting

scriptable::Model => scriptable::ScriptableModel
2018-02-01 16:30:29 -05:00
Olivier Prat
49549ced17 Fixed compilation with new shader system 2018-01-17 10:52:58 +01:00
Olivier Prat
3911ce59cc Scribe now outputs .h and .cpp. Need to change how shader source is referenced in C++ code 2018-01-16 19:02:12 +01:00
Olivier Prat
814de4ab81 Scribe now outputs shaders as cpp files. 2018-01-12 11:59:19 +01:00
Seth Alves
96197e66bb Merge branch 'master' of github.com:highfidelity/hifi into scale-wearables-with-avatar-3 2017-12-22 15:13:02 -08:00
Olivier Prat
bd666406f4 Removed glColor reset hack in MeshPartPayload and replaced it by a reset of the color attribute to white in the execution of the setInputFormat command of the various GLBackends 2017-12-19 14:17:17 +01:00
Seth Alves
b590cd5b89 avatar-entities which are children of an avatar will scale with the avatar 2017-12-02 09:31:43 -08:00
ZappoMan
f63db42c0e migrate SpatiallyNestable::getOrientation to getWorldOrientation, remove redundant getRotation 2017-10-28 10:14:25 -07:00
ZappoMan
a7a0f03ede rename SpatiallyNestable::getPosition() to SpatiallyNestable::getWorldPosition() 2017-10-27 18:39:17 -07:00
LaShonda Hopper
a9fea4c7d3 [WL21389] Minor fix to RenderableShapeEntityItem::doRender (details below).
Shape isn't guaranteed to be permanent and thus the triangle count isn't
guaranteed to be the same since inception, so grab it each time.

Changes to be committed:
    modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
2017-10-24 14:16:24 -04:00
LaShonda Hopper
5b50b362f1 [WL21389] WL21389 PR2: Representation of collision shapes need updating (details below).
This commit adds support for the polyhedrons and polygons sans
Torus and Quad which aren't currently supported within GeometryCache.

* Moves GeometryCache::_shapes from public to private scope
    * Nothing aside from the class should be directly altering this, only querying
    * Updated instances of direct referencing which looks to have been limited to prior
      testing of instancing and shapes.
* Adds an accessor function for ShapeData to GeometryCache
* Consolidates point list generation to helper function
    * GeometryCache::computeSimpleHullPointListForShape
* Moves GeometryCache::Shape to entity::Shape mapping to GeometryCache from
  RenderableShapeEntityItem
    * Adds conversion accessor to GeometryCache, GeometryCache::Shape getShapeForEntityShape
* Sets ShapeEntityItem::ShapeInfoCalculator callback committed earlier.
    * This helps circumvent the issue with library inclusion.  entity-render knows about
      entity; however, entity doesn't know about entity-renderer; however, GeometryCache
      data is needed within entity::ShapeEntityItem to compose the ShapeInfo point list data.
    * This callback is set up within Application::init of the Interface as it knows about
      both halves of the equation, and the callback needs to be setup prior to any entities
      collision data getting generated.
* Removes _type reset within ShapeInfo::setPointCollection
    * This should avoid any issues due to subversively setting the type or
      incorrectly setting the type as a tangential operation.
        * Audited instances of ShapeInfo::setPointCollection and all seemed to be
          calling the function immediately after having set the type via
          ShapeInfo::setParams
* Adds new ShapeType: SHAPE_TYPE_CIRCLE
    * This type is reserved for the circle which is now treated as a special
      type of Cylinder_Y with regard to collision as opposed to a simple hull.
    * Fixes the issue where jumping on a circle, at times, would
      result in the avatar sliding off towards an edge as if atop a
      squished cone.
* Also updates ShapeInfo::getType() to return ShapeType as opposed to int
    * Auditing calls showed that majority of places were comparing against ShapeType
    * ShapeType::_type is a ShapeType so returning the type explicitly
      is more consistent.
        * ShapeInfo file houses ShapeType enum so any file aware of ShapeInfo is aware of
          ShapeType enumeration.
* entity::Quad defaults to SHAPE_TYPE_ELLIPSOID
    * Like entity::Shape::Torus, entity::Shape::Quad is currently unsupported within
      GeometryCache::buildShapes.
    * Also it appears that a Quad shape can't be created within world via the creation menu.
        * There's no explicit option at present to create one.
        * Trying subvert the Cube/Box creation option to generate one results in an enforced
          stubby box as opposed to a quad.
    * Given the aforementioned points, entity::Shape::Quad will default to
      SHAPE_TYPE_ELLIPSOID as opposed to SHAPE_TYPE_BOX.
        * Added Todo regarding the shape being unsupported along with a notation to create
          a special ShapeType, SHAPE_TYPE_QUAD, for it should it be added in the future.
* Adds some comments and has some minor clean up.

Reviewed-by: Leander Hasty <leander@1stplayable.com>

Changes Committed:
	modified:   interface/src/Application.cpp
	modified:   interface/src/Util.cpp
	modified:   interface/src/Util.h
	modified:   libraries/entities-renderer/src/RenderableShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.cpp
	modified:   libraries/entities/src/ShapeEntityItem.h
	modified:   libraries/physics/src/ShapeFactory.cpp
	modified:   libraries/render-utils/src/GeometryCache.cpp
	modified:   libraries/render-utils/src/GeometryCache.h
	modified:   libraries/shared/src/ShapeInfo.cpp
	modified:   libraries/shared/src/ShapeInfo.h
	modified:   tests/gpu-test/src/TestInstancedShapes.cpp
2017-10-24 14:16:17 -04:00
Bradley Austin Davis
4f5851f420 Reducing needless render updates 2017-10-23 15:31:25 -07:00
SamGondelman
a6b7578c3c start fixing asynch issue, fixes model loading! 2017-10-05 12:30:00 -07:00
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