Commit Graph

145 Commits (4721ef829835e1d15e413c41cc410ccfa5200ed8)

Author SHA1 Message Date
moraaar a29623e5f0
Fixed editor crash using cylinder shape component (#5037)
Fixed cylinder shape by considering shape config list to be empty.

The crash came from clearing shape config list when cylinder height is zero, but when the height is restored to zero it was expecting an element in the list.

The code to set the shape configuration was the same for many shape types, so it has been refactored to a helper function.

Fixes #4999
4 years ago
moraaar 057c8e0d4e
Fixed error: unused variable 'physxMaximumMaterialIndex' (#4989)
Signed-off-by: moraaar <moraaar@amazon.com>
4 years ago
Mike Balfour 243532c5de
Addressed feedback from PR 4874. (#4915)
* Addressed feedback from PR 4874.
* Removed second copy of HeightfieldProviderBus.h from cmake file
* Changed CookedMeshShapeConfiguration and HeightfieldShapeConfiguration to have less messy implementations, instead opting for the slightly less messy const_cast inside of Utils.cpp and DebugDraw.cpp.
* Changed InitHeightfieldShapeConfiguraiton to CreateHeightfieldShapeConfiguration with a better API signature.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Fixed indentation

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
John Jones-Steele 3d67be162c
Terrain Physics Heightfield support
* New Heightfield Components

Signed-off-by: John Jones-Steele <jjjoness@amazon.com>

* Misc PR fixes
* Fixed linux build failure from bad #include
* Renamed "Terrain Physics Collider" to "Terrain Physics Heightfield Collider" per physics team feedback
* Fixed 1/5 -> 1/4 typo in a comment
* Added missing member copies in HeightfieldShapeConfiguration

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Addressed PR feedback

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Changes from review

Signed-off-by: John Jones-Steele <jjjoness@amazon.com>

* Remove tabs accidently added

Signed-off-by: John Jones-Steele <jjjoness@amazon.com>

* Fixed overly complicated scaling math.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Added comments to make it more obvious what's happening on CreateEnd / DestroyBegin.

Signed-off-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>

* Moved Heightfield CreatePxGeometryFromConfig into its own function

Signed-off-by: John Jones-Steele <jjjoness@amazon.com>

Co-authored-by: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com>
4 years ago
greerdv d6067f645d merge from development
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
greerdv 0f40aae8fa merge from development
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
greerdv 1d862325c9 merge from development
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
moraaar 3b9762142a
Triangle Mesh with a Kinematic PhysX Rigid Body warns the user instead of error. (#4657)
Using triangle mesh with a kinematic rigid body is allowed, but the options "Compute COM", "Compute Mass" and "Compute Inertia" are not supported by PhysX and an error in logged that default values for COM, Mass and Inertia will be used. Now this situation is captured and an explanatory warning is used instead.

- Improved RigidBody::UpdateMassProperties function to apply the same logic in the treatment of shapes for all three parameters: COM, Mass and Inertia.
- Improved UpdateMassProperties function by using references for the override parameters instead of pointers.
- Improved function that computes the Center of Mass UpdateCenterOfMass (renamed from UpdateComputedCenterOfMass), to include the same shapes that the compute mass and inertia functions in physx updateMassAndInertia, which is to include all shapes if includeAllShapesInMassCalculation is true, else include only the shapes with eSIMULATION_SHAPE flag.
- Removed unused private function RigidBody::ComputeInertia.
- Added unit test to check when the warnings are fired correctly when COM, Mass or Inertia are asked to be computed on a rigid body with triangle mesh shapes.
- Improved MassComputeFixture tests by not only using Box shape, but also sphere and capture, plus improved the PossibleMassComputeFlags parameters to include all possible variations of the MassComputeFlags flags.

Fixes #3322
Fixes #3979

Signed-off-by: moraaar <moraaar@amazon.com>
4 years ago
greerdv 55c033333e feedback from PR
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
greerdv ec10bb078e improve wording for all PhysX gem tooltips apart from pipeline, fixes 3898
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
greerdv b408635a01 mark not yet supported shapes incompatible with shape collider component, fixes 3031
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
greerdv c3ff1e0cd3 feedback from PR
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
greerdv c562f0a807 small improvements to triangle mesh rigid body warning
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
moraaar 606ba45cf2
Fixed PhysX and Blast creation of default config files (#4497)
- Avoid saving blast global configuration unnecessarily every time the editor is opened.
- Fixed how to obtain the default physics material library. The relative path needs to be from the project folder, not the asset folder inside the project. It was also missing saving the physx configuration after a the default library is assigned to it.
- Fixed asset id for physics material asset 'assets/physics/surfacetypemateriallibrary.physmaterial'

Signed-off-by: moraaar moraaar@amazon.com
4 years ago
moraaar 1c305c6402
Fixed physx asset when exported as convex or primitives. (#4414)
* Fixed physx asset when exported as convex or primitives. Before it was limited to 1 material for the entire object, now it correctly uses multiple materials by looking at the first material per node.

Signed-off-by: moraaar <moraaar@amazon.com>
4 years ago
amzn-sean 43748c37fd
update joints to use cluster viewport ui. (#4352)
also some joints Component mode cleanup.

Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com>
4 years ago
Artur K f44169f7fa
Cleanup SerializeContext.h pt.1 (#4264)
* Remove AssetSerializer inclusion from SerializeContext header

Moved a few Reflect methods to new cpp files.

In addition, some preparations for further header dependency reductions.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix smoke test lua failures.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Windows build fixes.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Missing license headers

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix white-space issues.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Code review fix for AzToolsFramework/AssetEditor/AssetEditorBus.h

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Fix inheritance list wrapping broken by older clang-format

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
4 years ago
John Jones-Steele 29d9abba57
Removed redundant code (#4363)
Signed-off-by: John Jones-Steele <jjjoness@amazon.com>
4 years ago
AMZN-Alexandre Corcia Aguilera 4167bb6cde
Warning System Changes (polish) Redo (#4009)
* Restores the branch to the old status from old branch

Signed-off-by: aaguilea <aaguilea@amazon.com>

* Changes that didnt make it from merge manually fixed

Signed-off-by: aaguilea <aaguilea@amazon.com>

* forgot one

Signed-off-by: aaguilea <aaguilea@amazon.com>

* Added Ebus in order to remove rigidbody's dependencies

Signed-off-by: aaguilea <aaguilea@amazon.com>

* answering some of the comments in the PR

Signed-off-by: aaguilea <aaguilea@amazon.com>

* Small typo changed

Signed-off-by: aaguilea <aaguilea@amazon.com>
4 years ago
Esteban Papp 61247f8019 Gems/PhysX
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp 8102999a05 using uint here will slice the value of npos
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Steve Pham fa0f2a1007
Fix unused warnings release (#3677)
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Linux
* Release build fix for Mac
* Release build fix for iOS

Signed-off-by: Steve Pham <spham@amazon.com>
4 years ago
Esteban Papp 6b96be82ea Merge branch 'development' into cmake/linux_fix_warn_unused
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Legacy/CrySystem/Log.cpp
#	Code/Tools/Standalone/Source/Driller/Annotations/AnnotationHeaderView.cpp
#	Code/Tools/Standalone/Source/Driller/AreaChart.cpp
#	Code/Tools/Standalone/Source/Driller/AreaChart.hxx
#	Code/Tools/Standalone/Source/Driller/ChannelDataView.cpp
#	Code/Tools/Standalone/Source/Driller/DrillerCaptureWindow.cpp
#	Code/Tools/Standalone/Source/Driller/Profiler/ProfilerDataView.cpp
4 years ago
Jeremy Ong c37c0cab08 Refactor budget definitions as named functions instead of template specializations
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 5e04c3737f Add preliminary budget tracking system and remove driller integration
Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Jeremy Ong 07a14bdce1 Add AZ_BUDGET_DEFINE/AZ_BUDGET_DECLARE and remove driller
NOTE: The memory driller is still intact for now to avoid needing to
modify allocators, but the frame/cpu portions of driller and the
standalone executable are now gone.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Esteban Papp 9c7b55a31d Merge branch 'development' into cmake/linux_fix_warn_unused
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Gems/Atom/RHI/Code/Include/Atom/RHI.Reflect/Bits.h
#	Gems/Atom/RHI/Code/Include/Atom/RHI/IndexBufferView.h
#	Gems/Atom/Tools/MaterialEditor/Code/Source/Window/MaterialEditorWindow.cpp
#	Gems/Atom/Tools/ShaderManagementConsole/Code/Source/Window/ShaderManagementConsoleWindow.cpp
4 years ago
amzn-sean ef9666cb10
fixed case where the Physics Asset could not be set correctly (#3390)
Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com>
4 years ago
Esteban Papp 8c526eeeb6 Merge branch 'development' into cmake/linux_fix_warn_unused
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
amzn-sean b4279ab3d8
Remove touchbending references in PhysX Gem (#3320)
* minor comments update

Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com>
4 years ago
Esteban Papp 4ae74c913f Gems/PhysX
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp ea2f74dc0f more fixes for Gems
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
Esteban Papp f8e99cd7dd Merge branch 'development' into cmake/SPEC-2513_w4244
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/CryEditDoc.cpp
#	Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.cpp
#	Gems/Atom/Feature/Common/Code/Source/PostProcessing/BlendColorGradingLutsPass.cpp
#	Gems/PhysXDebug/Code/Source/SystemComponent.cpp
4 years ago
Jeremy Ong df9b4d4a2f Deprecate profiler categories based on global enum
(to be supplanted by registered budgets in the future)

Signed-off-by: Jeremy Ong <jcong@amazon.com>
4 years ago
Esteban Papp 036114a5a7 Merge branch 'development' into cmake/SPEC-2513_w4244
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Framework/AzToolsFramework/AzToolsFramework/Input/QtEventToAzInputManager.cpp
4 years ago
amzn-sean d9ea329cbd
Fixes #2796 Collider retains phys mesh asset reference after changing to shape (#3162)
Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com>
4 years ago
Esteban Papp 0b70cf2308 Gems/PhysX
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste 82b359e80d PhysX
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
pappeste 2943f16d11 PhysX
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago
amzn-sean e630e3324d
fixed joint crash when no lead entity is selected (#2867)
Signed-off-by: amzn-sean <75276488+amzn-sean@users.noreply.github.com>
4 years ago
greerdv 7ec3283a3e merge from development
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
greerdv 0f58d7394e fixes #2544, fixes all doc links for physx, cloth, blast and white box
Signed-off-by: greerdv <greerdv@amazon.com>
4 years ago
Esteban Papp 19d79f1559 Merge branch 'development' into cmake/SPEC-2513_w4267 4 years ago
amzn-sean 34afed6792
fixed Ragdoll component can crash on deactivate (#2834)
fixes #2650
The root of the crash was connecting/disconnecting to the AZ::Event SceneSimulationStart when not on the main thread, as that is not thread safe.

The connection/disconnection was originally handled from Enable/EnableQueued and Disable/DisabledQueued which can be called from other threads within EmotionFX. I've moved the connection/disconnection to the Constructor / destructor, as the handler is responsible for executing the queued enable/disable actions and it makes sense to have that connection happen external to the Enable/disable path.

Signed-off-by: amzn-sean 75276488+amzn-sean@users.noreply.github.com
4 years ago
AMZN-AlexOteiza 45ebf57d3f
Fixed bug in hash_table that made rehash() function run forever (#2745)
* Fixed bug in hash_table that made rehash() function to run infinitely on specific conditions when inserting an already existing element

Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>

* Replaced erasing to happen in the source list instead

Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>

* minor comment improvement

Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>

* Small commment improvement

Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>

* Small comment fix

Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>

* Added assert and fixed code with incorrect hashing

Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>

* .

Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>

* Addressed PR comments, reverted to void* as it size_t hash is different

Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>

* Fixed build on linux

Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>

* Addressed PR comments

Signed-off-by: Garcia Ruiz <aljanru@amazon.co.uk>

Co-authored-by: Garcia Ruiz <aljanru@amazon.co.uk>
4 years ago
Esteban Papp b33a4db332 Merge branch 'development' into cmake/SPEC-2513_w4267 4 years ago
SergeyAMZN 461743ef2d
Enabled PhysX system component in asset builders since it's required … (#2652)
* Enabled PhysX system component in asset builders since it's required for cooking collision meshes

Signed-off-by: pereslav <pereslav@amazon.com>

* Added AssetCatalogService to the list of dependent

Signed-off-by: pereslav <pereslav@amazon.com>
4 years ago
Ibtehaj Nadeem 0824bb462a Improve tooltip text
Signed-off-by: Ibtehaj Nadeem <81370835+ibtehajn@users.noreply.github.com>
4 years ago
ibtehajn fd07f907bc Implement axis locking options for rigid bodies
Linear and angular motion of rigid bodies can now be restricted along
specific world-space axes.

Signed-off-by: Ibtehaj Nadeem <81370835+ibtehajn@users.noreply.github.com>
4 years ago
Esteban Papp 074e33081f more fixes for w4267
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
4 years ago