From a99786fe5919d977d9bc762aef9e4c92a5853d6b Mon Sep 17 00:00:00 2001 From: greerdv Date: Tue, 13 Apr 2021 09:00:33 +0100 Subject: [PATCH 01/16] fixing bug with visibility aabb for non-uniformly scaled polygon prism at activation --- Gems/LmbrCentral/Code/Source/Shape/PolygonPrismShape.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Gems/LmbrCentral/Code/Source/Shape/PolygonPrismShape.cpp b/Gems/LmbrCentral/Code/Source/Shape/PolygonPrismShape.cpp index 28056c6e60..89c5028e93 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/PolygonPrismShape.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/PolygonPrismShape.cpp @@ -217,6 +217,7 @@ namespace LmbrCentral AZ::TransformBus::EventResult(m_currentTransform, entityId, &AZ::TransformBus::Events::GetWorldTM); m_currentNonUniformScale = AZ::Vector3::CreateOne(); AZ::NonUniformScaleRequestBus::EventResult(m_currentNonUniformScale, m_entityId, &AZ::NonUniformScaleRequests::GetScale); + m_polygonPrism->SetNonUniformScale(m_currentNonUniformScale); m_intersectionDataCache.InvalidateCache(InvalidateShapeCacheReason::ShapeChange); AZ::TransformNotificationBus::Handler::BusConnect(entityId); From 87a3dfc968d6b8debf53d58bb4c5a429ffb2adc4 Mon Sep 17 00:00:00 2001 From: greerdv Date: Tue, 13 Apr 2021 09:04:13 +0100 Subject: [PATCH 02/16] fixing bug in editor bodies for rigid bodies with non-uniformly scaled asset colliders with position offsets --- Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp b/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp index eff1997473..d5ce38d389 100644 --- a/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorRigidBodyComponent.cpp @@ -36,7 +36,7 @@ namespace PhysX const bool hasNonUniformScaleComponent = (AZ::NonUniformScaleRequestBus::FindFirstHandler(entity->GetId()) != nullptr); - const AZStd::vector colliders = entity->FindComponents(); + const AZStd::vector colliders = entity->FindComponents(); for (const EditorColliderComponent* collider : colliders) { const EditorProxyShapeConfig& shapeConfigurationProxy = collider->GetShapeConfiguration(); @@ -45,12 +45,14 @@ namespace PhysX continue; } - const Physics::ColliderConfiguration colliderConfiguration = collider->GetColliderConfigurationScaled(); + const Physics::ColliderConfiguration colliderConfigurationScaled = collider->GetColliderConfigurationScaled(); + const Physics::ColliderConfiguration colliderConfigurationUnscaled = collider->GetColliderConfiguration(); + if (shapeConfigurationProxy.IsAssetConfig()) { AZStd::vector> shapes; Utils::GetShapesFromAsset(shapeConfigurationProxy.m_physicsAsset.m_configuration, - colliderConfiguration, hasNonUniformScaleComponent, shapeConfigurationProxy.m_subdivisionLevel, shapes); + colliderConfigurationUnscaled, hasNonUniformScaleComponent, shapeConfigurationProxy.m_subdivisionLevel, shapes); for (const auto& shape : shapes) { @@ -64,7 +66,7 @@ namespace PhysX if (!hasNonUniformScaleComponent) { AZStd::shared_ptr shape = AZ::Interface::Get()->CreateShape( - colliderConfiguration, shapeConfiguration); + colliderConfigurationScaled, shapeConfiguration); AZ_Assert(shape, "CreateEditorWorldRigidBody: Shape must not be null!"); if (shape) { @@ -73,7 +75,6 @@ namespace PhysX } else { - const Physics::ColliderConfiguration colliderConfigurationUnscaled = collider->GetColliderConfiguration(); auto convexConfig = Utils::CreateConvexFromPrimitive(colliderConfigurationUnscaled, shapeConfiguration, shapeConfigurationProxy.m_subdivisionLevel, shapeConfiguration.m_scale); auto colliderConfigurationNoOffset = colliderConfigurationUnscaled; @@ -377,7 +378,7 @@ namespace PhysX configuration.m_kinematic = m_config.m_kinematic; configuration.m_colliderAndShapeData = Internal::GetCollisionShapes(GetEntity()); - if (auto* sceneInterface = AZ::Interface::Get()) + if (auto* sceneInterface = AZ::Interface::Get()) { m_rigidBodyHandle = sceneInterface->AddSimulatedBody(m_editorSceneHandle, &configuration); m_editorBody = azdynamic_cast(sceneInterface->GetSimulatedBodyFromHandle(m_editorSceneHandle, m_rigidBodyHandle)); From 90e52d69bc465519707c89d22c0568882fcc6637 Mon Sep 17 00:00:00 2001 From: greerdv Date: Tue, 13 Apr 2021 10:50:07 +0100 Subject: [PATCH 03/16] fixing bug with subdivision level for runtime asset colliders and adding caching for collider aabbs --- .../Physics/ShapeConfiguration.cpp | 1 + .../AzFramework/Physics/ShapeConfiguration.h | 1 + .../Code/Source/BaseColliderComponent.cpp | 7 +++---- .../Code/Source/EditorColliderComponent.cpp | 20 ++++++++++++++----- .../Code/Source/EditorColliderComponent.h | 2 ++ 5 files changed, 22 insertions(+), 9 deletions(-) diff --git a/Code/Framework/AzFramework/AzFramework/Physics/ShapeConfiguration.cpp b/Code/Framework/AzFramework/AzFramework/Physics/ShapeConfiguration.cpp index 44c24758f3..f01e42a443 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/ShapeConfiguration.cpp +++ b/Code/Framework/AzFramework/AzFramework/Physics/ShapeConfiguration.cpp @@ -142,6 +142,7 @@ namespace Physics ->Field("PhysicsAsset", &PhysicsAssetShapeConfiguration::m_asset) ->Field("AssetScale", &PhysicsAssetShapeConfiguration::m_assetScale) ->Field("UseMaterialsFromAsset", &PhysicsAssetShapeConfiguration::m_useMaterialsFromAsset) + ->Field("SubdivisionLevel", &PhysicsAssetShapeConfiguration::m_subdivisionLevel) ; if (auto editContext = serializeContext->GetEditContext()) diff --git a/Code/Framework/AzFramework/AzFramework/Physics/ShapeConfiguration.h b/Code/Framework/AzFramework/AzFramework/Physics/ShapeConfiguration.h index 8afe6851b7..b3d04a10c9 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/ShapeConfiguration.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/ShapeConfiguration.h @@ -141,6 +141,7 @@ namespace Physics AZ::Data::Asset m_asset{ AZ::Data::AssetLoadBehavior::PreLoad }; AZ::Vector3 m_assetScale = AZ::Vector3::CreateOne(); bool m_useMaterialsFromAsset = true; + AZ::u8 m_subdivisionLevel = 4; ///< The level of subdivision if a primitive shape is replaced with a convex mesh due to scaling. }; class NativeShapeConfiguration : public ShapeConfiguration diff --git a/Gems/PhysX/Code/Source/BaseColliderComponent.cpp b/Gems/PhysX/Code/Source/BaseColliderComponent.cpp index f4bc86ef93..c67cc105d8 100644 --- a/Gems/PhysX/Code/Source/BaseColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/BaseColliderComponent.cpp @@ -330,10 +330,9 @@ namespace PhysX } const bool hasNonUniformScale = (AZ::NonUniformScaleRequestBus::FindFirstHandler(GetEntityId()) != nullptr); - // the value for the subdivision level doesn't matter in the runtime, because any approximation of primitives will already have - // happened in the editor, so can pass an arbitrary value here - AZ::u8 subdivisionLevel = 0; - Utils::GetShapesFromAsset(physicsAssetConfiguration, componentColliderConfiguration, hasNonUniformScale, subdivisionLevel, m_shapes); + AZ::u8 subdivisionLevel = physicsAssetConfiguration.m_subdivisionLevel; + Utils::GetShapesFromAsset(physicsAssetConfiguration, componentColliderConfiguration, hasNonUniformScale, + physicsAssetConfiguration.m_subdivisionLevel, m_shapes); return true; } diff --git a/Gems/PhysX/Code/Source/EditorColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorColliderComponent.cpp index 974ce23810..8c31746931 100644 --- a/Gems/PhysX/Code/Source/EditorColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorColliderComponent.cpp @@ -513,6 +513,8 @@ namespace PhysX break; case Physics::ShapeType::PhysicsAsset: colliderComponent = gameEntity->CreateComponent(); + + m_shapeConfiguration.m_physicsAsset.m_configuration.m_subdivisionLevel = m_shapeConfiguration.m_subdivisionLevel; colliderComponent->SetShapeConfigurationList({ AZStd::make_pair(sharedColliderConfig, AZStd::make_shared(m_shapeConfiguration.m_physicsAsset.m_configuration)) }); @@ -560,6 +562,8 @@ namespace PhysX void EditorColliderComponent::CreateStaticEditorCollider() { + m_cachedAabbDirty = true; + // Don't create static rigid body in the editor if current entity components // don't allow creation of runtime static rigid body component if (!StaticRigidBodyUtils::CanCreateRuntimeComponent(*GetEntity())) @@ -1014,11 +1018,17 @@ namespace PhysX // PhysX::ColliderShapeBus AZ::Aabb EditorColliderComponent::GetColliderShapeAabb() { - return PhysX::Utils::GetColliderAabb(GetWorldTM() - , m_hasNonUniformScale - , m_shapeConfiguration.m_subdivisionLevel - , m_shapeConfiguration.GetCurrent() - , m_configuration); + if (m_cachedAabbDirty) + { + m_cachedAabb = PhysX::Utils::GetColliderAabb(GetWorldTM() + , m_hasNonUniformScale + , m_shapeConfiguration.m_subdivisionLevel + , m_shapeConfiguration.GetCurrent() + , m_configuration); + m_cachedAabbDirty = false; + } + + return m_cachedAabb; } void EditorColliderComponent::UpdateShapeConfigurationScale() diff --git a/Gems/PhysX/Code/Source/EditorColliderComponent.h b/Gems/PhysX/Code/Source/EditorColliderComponent.h index 65c7a9c67f..f179525802 100644 --- a/Gems/PhysX/Code/Source/EditorColliderComponent.h +++ b/Gems/PhysX/Code/Source/EditorColliderComponent.h @@ -261,6 +261,8 @@ namespace PhysX bool m_hasNonUniformScale = false; //!< Whether there is a non-uniform scale component on this entity. AZ::Vector3 m_cachedNonUniformScale = AZ::Vector3::CreateOne(); //!< Caches the current non-uniform scale. mutable AZStd::optional m_scaledPrimitive; //!< Approximation for non-uniformly scaled primitive. + AZ::Aabb m_cachedAabb = AZ::Aabb::CreateNull(); //!< Cache the Aabb to avoid recalculating it. + bool m_cachedAabbDirty = true; //!< Track whether the cached Aabb needs to be recomputed. AZ::ComponentDescriptor::StringWarningArray m_componentWarnings; }; From 23cf2d5d68d807e40252affdc00fe362ca6c784b Mon Sep 17 00:00:00 2001 From: amzn-sean <75276488+amzn-sean@users.noreply.github.com> Date: Tue, 13 Apr 2021 15:03:21 +0100 Subject: [PATCH 04/16] SystemComponent is now only build in PhysX.Static, instead of most of the Physx projects. --- .../AzFramework/Physics/SystemBus.h | 7 -- Gems/Blast/Code/Tests/Mocks/BlastMocks.h | 3 - .../Code/Tests/Mocks/PhysicsSystem.h | 1 - Gems/PhysX/Code/Editor/EditorWindow.cpp | 3 + Gems/PhysX/Code/Editor/EditorWindow.h | 7 ++ .../Components/EditorSystemComponent.cpp | 20 +++- .../Source/Components/EditorSystemComponent.h | 5 + Gems/PhysX/Code/Source/SystemComponent.cpp | 91 ------------------- Gems/PhysX/Code/Source/SystemComponent.h | 16 ---- .../Code/Tests/CharacterControllerTests.cpp | 50 +++++++++- .../Code/physx_editor_shared_files.cmake | 2 - .../PhysX/Code/physx_editor_tests_files.cmake | 2 - Gems/PhysX/Code/physx_files.cmake | 2 + Gems/PhysX/Code/physx_shared_files.cmake | 2 - Gems/PhysX/Code/physx_tests_files.cmake | 2 - 15 files changed, 82 insertions(+), 131 deletions(-) diff --git a/Code/Framework/AzFramework/AzFramework/Physics/SystemBus.h b/Code/Framework/AzFramework/AzFramework/Physics/SystemBus.h index c303e14636..717f9e023c 100644 --- a/Code/Framework/AzFramework/AzFramework/Physics/SystemBus.h +++ b/Code/Framework/AzFramework/AzFramework/Physics/SystemBus.h @@ -142,13 +142,6 @@ namespace Physics virtual AZStd::shared_ptr CreateShape(const ColliderConfiguration& colliderConfiguration, const ShapeConfiguration& configuration) = 0; - /// Adds an appropriate collider component to the entity based on the provided shape configuration. - /// @param entity Entity where the component should be added to. - /// @param colliderConfiguration Configuration of the collider. - /// @param shapeConfiguration Configuration of the shape of the collider. - /// @param addEditorComponents Tells whether to add the Editor version of the collider component or the Game one. - virtual void AddColliderComponentToEntity(AZ::Entity* entity, const Physics::ColliderConfiguration& colliderConfiguration, const Physics::ShapeConfiguration& shapeConfiguration, bool addEditorComponents = false) = 0; - /// Releases the mesh object created by the physics backend. /// @param nativeMeshObject Pointer to the mesh object. virtual void ReleaseNativeMeshObject(void* nativeMeshObject) = 0; diff --git a/Gems/Blast/Code/Tests/Mocks/BlastMocks.h b/Gems/Blast/Code/Tests/Mocks/BlastMocks.h index 0ac1f6c27e..95a16c311f 100644 --- a/Gems/Blast/Code/Tests/Mocks/BlastMocks.h +++ b/Gems/Blast/Code/Tests/Mocks/BlastMocks.h @@ -213,9 +213,6 @@ namespace Blast CreateShape, AZStd::shared_ptr( const Physics::ColliderConfiguration&, const Physics::ShapeConfiguration&)); - MOCK_METHOD4( - AddColliderComponentToEntity, - void(AZ::Entity*, const Physics::ColliderConfiguration&, const Physics::ShapeConfiguration&, bool)); MOCK_METHOD1(ReleaseNativeMeshObject, void(void*)); MOCK_METHOD1(CreateMaterial, AZStd::shared_ptr(const Physics::MaterialConfiguration&)); MOCK_METHOD0(GetDefaultMaterial, AZStd::shared_ptr()); diff --git a/Gems/EMotionFX/Code/Tests/Mocks/PhysicsSystem.h b/Gems/EMotionFX/Code/Tests/Mocks/PhysicsSystem.h index 0b20632884..1219e34448 100644 --- a/Gems/EMotionFX/Code/Tests/Mocks/PhysicsSystem.h +++ b/Gems/EMotionFX/Code/Tests/Mocks/PhysicsSystem.h @@ -33,7 +33,6 @@ namespace Physics BusDisconnect(); } MOCK_METHOD2(CreateShape, AZStd::shared_ptr(const Physics::ColliderConfiguration& colliderConfiguration, const Physics::ShapeConfiguration& configuration)); - MOCK_METHOD4(AddColliderComponentToEntity, void(AZ::Entity* entity, const Physics::ColliderConfiguration& colliderConfiguration, const Physics::ShapeConfiguration& shapeConfiguration, bool addEditorComponents)); MOCK_METHOD1(ReleaseNativeMeshObject, void(void* nativeMeshObject)); MOCK_METHOD1(CreateMaterial, AZStd::shared_ptr(const Physics::MaterialConfiguration& materialConfiguration)); MOCK_METHOD0(GetDefaultMaterial, AZStd::shared_ptr()); diff --git a/Gems/PhysX/Code/Editor/EditorWindow.cpp b/Gems/PhysX/Code/Editor/EditorWindow.cpp index 41b2991c2a..c8d6715838 100644 --- a/Gems/PhysX/Code/Editor/EditorWindow.cpp +++ b/Gems/PhysX/Code/Editor/EditorWindow.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -23,6 +24,8 @@ #include #include #include +#include +#include namespace PhysX { diff --git a/Gems/PhysX/Code/Editor/EditorWindow.h b/Gems/PhysX/Code/Editor/EditorWindow.h index 34f1906d43..86f72f70f2 100644 --- a/Gems/PhysX/Code/Editor/EditorWindow.h +++ b/Gems/PhysX/Code/Editor/EditorWindow.h @@ -19,6 +19,7 @@ namespace AzPhysics { class CollisionConfiguration; + struct SceneConfiguration; } namespace Ui @@ -28,6 +29,12 @@ namespace Ui namespace PhysX { + struct PhysXSystemConfiguration; + namespace Debug + { + struct DebugConfiguration; + } + namespace Editor { /// Window pane wrapper for the PhysX Configuration Widget. diff --git a/Gems/PhysX/Code/Editor/Source/Components/EditorSystemComponent.cpp b/Gems/PhysX/Code/Editor/Source/Components/EditorSystemComponent.cpp index 2f4b389795..516b958adb 100644 --- a/Gems/PhysX/Code/Editor/Source/Components/EditorSystemComponent.cpp +++ b/Gems/PhysX/Code/Editor/Source/Components/EditorSystemComponent.cpp @@ -18,13 +18,15 @@ #include #include #include -#include -#include #include #include #include +#include +#include +#include +#include #include namespace PhysX @@ -116,18 +118,20 @@ namespace PhysX { AzPhysics::SceneConfiguration editorWorldConfiguration = physicsSystem->GetDefaultSceneConfiguration(); editorWorldConfiguration.m_sceneName = AzPhysics::EditorPhysicsSceneName; - editorWorldConfiguration.m_sceneName = "EditorScene"; m_editorWorldSceneHandle = physicsSystem->AddScene(editorWorldConfiguration); } PhysX::RegisterConfigStringLineEditHandler(); // Register custom unique string line edit control + PhysX::Editor::RegisterPropertyTypes(); + AzToolsFramework::EditorEvents::Bus::Handler::BusConnect(); AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); } void EditorSystemComponent::Deactivate() { AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect(); + AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect(); Physics::EditorWorldBus::Handler::BusDisconnect(); if (auto* physicsSystem = AZ::Interface::Get()) @@ -164,6 +168,16 @@ namespace PhysX } } + void EditorSystemComponent::PopulateEditorGlobalContextMenu([[maybe_unused]] QMenu* menu, [[maybe_unused]] const AZ::Vector2& point, [[maybe_unused]] int flags) + { + + } + + void EditorSystemComponent::NotifyRegisterViews() + { + PhysX::Editor::EditorWindow::RegisterViewClass(); + } + AZ::Data::AssetId EditorSystemComponent::GenerateSurfaceTypesLibrary() { AZ::Data::AssetId resultAssetId; diff --git a/Gems/PhysX/Code/Editor/Source/Components/EditorSystemComponent.h b/Gems/PhysX/Code/Editor/Source/Components/EditorSystemComponent.h index cba542ce84..9ebca05ccd 100644 --- a/Gems/PhysX/Code/Editor/Source/Components/EditorSystemComponent.h +++ b/Gems/PhysX/Code/Editor/Source/Components/EditorSystemComponent.h @@ -30,6 +30,7 @@ namespace PhysX : public AZ::Component , public Physics::EditorWorldBus::Handler , private AzToolsFramework::EditorEntityContextNotificationBus::Handler + , private AzToolsFramework::EditorEvents::Bus::Handler { public: AZ_COMPONENT(EditorSystemComponent, "{560F08DC-94F5-4D29-9AD4-CDFB3B57C654}"); @@ -60,6 +61,10 @@ namespace PhysX void OnStartPlayInEditorBegin() override; void OnStopPlayInEditor() override; + // AztoolsFramework::EditorEvents::Bus::Handler + void PopulateEditorGlobalContextMenu(QMenu* menu, const AZ::Vector2& point, int flags) override; + void NotifyRegisterViews() override; + AZ::Data::AssetId GenerateSurfaceTypesLibrary(); AzPhysics::SceneHandle m_editorWorldSceneHandle = AzPhysics::InvalidSceneHandle; diff --git a/Gems/PhysX/Code/Source/SystemComponent.cpp b/Gems/PhysX/Code/Source/SystemComponent.cpp index 6de54a7593..8210492fe7 100644 --- a/Gems/PhysX/Code/Source/SystemComponent.cpp +++ b/Gems/PhysX/Code/Source/SystemComponent.cpp @@ -15,38 +15,18 @@ #include #include #include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include #include #include #include #include -#include -#include -#include #include #include #include #include #include -#ifdef PHYSX_EDITOR -#include -#include -#include -#include -#include -#endif - #include #include @@ -233,21 +213,11 @@ namespace PhysX Physics::CollisionRequestBus::Handler::BusConnect(); Physics::CharacterSystemRequestBus::Handler::BusConnect(); -#ifdef PHYSX_EDITOR - PhysX::Editor::RegisterPropertyTypes(); - AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); - AzToolsFramework::EditorEvents::Bus::Handler::BusConnect(); -#endif - ActivatePhysXSystem(); } void SystemComponent::Deactivate() { -#ifdef PHYSX_EDITOR - AzToolsFramework::EditorEvents::Bus::Handler::BusDisconnect(); - AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect(); -#endif AZ::TickBus::Handler::BusDisconnect(); Physics::CharacterSystemRequestBus::Handler::BusDisconnect(); Physics::CollisionRequestBus::Handler::BusDisconnect(); @@ -272,19 +242,6 @@ namespace PhysX m_assetHandlers.clear(); //this need to be after m_physXSystem->Shutdown(); For it will drop the default material library reference. } -#ifdef PHYSX_EDITOR - - // AztoolsFramework::EditorEvents::Bus::Handler overrides - void SystemComponent::PopulateEditorGlobalContextMenu([[maybe_unused]] QMenu* menu, [[maybe_unused]] const AZ::Vector2& point, [[maybe_unused]] int flags) - { - } - - void SystemComponent::NotifyRegisterViews() - { - PhysX::Editor::EditorWindow::RegisterViewClass(); - } -#endif - physx::PxConvexMesh* SystemComponent::CreateConvexMesh(const void* vertices, AZ::u32 vertexNum, AZ::u32 vertexStride) { physx::PxConvexMeshDesc desc; @@ -464,54 +421,6 @@ namespace PhysX } } - void SystemComponent::AddColliderComponentToEntity(AZ::Entity* entity, const Physics::ColliderConfiguration& colliderConfiguration, const Physics::ShapeConfiguration& shapeConfiguration, [[maybe_unused]] bool addEditorComponents) - { - [[maybe_unused]] Physics::ShapeType shapeType = shapeConfiguration.GetShapeType(); - -#ifdef PHYSX_EDITOR - if (addEditorComponents) - { - entity->CreateComponent(colliderConfiguration, shapeConfiguration); - } - else -#else - { - if (shapeType == Physics::ShapeType::Sphere) - { - const Physics::SphereShapeConfiguration& sphereConfiguration = static_cast(shapeConfiguration); - auto sphereColliderComponent = entity->CreateComponent(); - sphereColliderComponent->SetShapeConfigurationList({ AZStd::make_pair( - AZStd::make_shared(colliderConfiguration), - AZStd::make_shared(sphereConfiguration)) }); - } - else if (shapeType == Physics::ShapeType::Box) - { - const Physics::BoxShapeConfiguration& boxConfiguration = static_cast(shapeConfiguration); - auto boxColliderComponent = entity->CreateComponent(); - boxColliderComponent->SetShapeConfigurationList({ AZStd::make_pair( - AZStd::make_shared(colliderConfiguration), - AZStd::make_shared(boxConfiguration)) }); - } - else if (shapeType == Physics::ShapeType::Capsule) - { - const Physics::CapsuleShapeConfiguration& capsuleConfiguration = static_cast(shapeConfiguration); - auto capsuleColliderComponent = entity->CreateComponent(); - capsuleColliderComponent->SetShapeConfigurationList({ AZStd::make_pair( - AZStd::make_shared(colliderConfiguration), - AZStd::make_shared(capsuleConfiguration)) }); - } - } - - AZ_Error("PhysX System", !addEditorComponents, "AddColliderComponentToEntity(): Trying to add an Editor collider component in a stand alone build.", - static_cast(shapeType)); - -#endif - { - AZ_Error("PhysX System", shapeType == Physics::ShapeType::Sphere || shapeType == Physics::ShapeType::Box || shapeType == Physics::ShapeType::Capsule, - "AddColliderComponentToEntity(): Using Shape of type %d is not implemented.", static_cast(shapeType)); - } - } - // Physics::CharacterSystemRequestBus AZStd::unique_ptr SystemComponent::CreateCharacter(const Physics::CharacterConfiguration& characterConfig, const Physics::ShapeConfiguration& shapeConfig, AzPhysics::SceneHandle& sceneHandle) diff --git a/Gems/PhysX/Code/Source/SystemComponent.h b/Gems/PhysX/Code/Source/SystemComponent.h index c074a2032d..8c4ac0d836 100644 --- a/Gems/PhysX/Code/Source/SystemComponent.h +++ b/Gems/PhysX/Code/Source/SystemComponent.h @@ -36,9 +36,6 @@ #include #include -#ifdef PHYSX_EDITOR -#include -#endif namespace AzPhysics { struct StaticRigidBodyConfiguration; @@ -61,10 +58,6 @@ namespace PhysX , public Physics::SystemRequestBus::Handler , public PhysX::SystemRequestsBus::Handler , public Physics::CharacterSystemRequestBus::Handler -#ifdef PHYSX_EDITOR - , public AzToolsFramework::EditorEntityContextNotificationBus::Handler - , private AzToolsFramework::EditorEvents::Bus::Handler -#endif , private Physics::CollisionRequestBus::Handler , private AZ::TickBus::Handler { @@ -100,8 +93,6 @@ namespace PhysX bool CookTriangleMeshToMemory(const AZ::Vector3* vertices, AZ::u32 vertexCount, const AZ::u32* indices, AZ::u32 indexCount, AZStd::vector& result) override; - void AddColliderComponentToEntity(AZ::Entity* entity, const Physics::ColliderConfiguration& colliderConfiguration, const Physics::ShapeConfiguration& shapeConfiguration, bool addEditorComponents = false) override; - physx::PxFilterData CreateFilterData(const AzPhysics::CollisionLayer& layer, const AzPhysics::CollisionGroup& group) override; physx::PxCooking* GetCooking() override; @@ -125,13 +116,6 @@ namespace PhysX void Activate() override; void Deactivate() override; -#ifdef PHYSX_EDITOR - - // AztoolsFramework::EditorEvents::Bus::Handler overrides - void PopulateEditorGlobalContextMenu(QMenu* menu, const AZ::Vector2& point, int flags) override; - void NotifyRegisterViews() override; -#endif - // Physics::SystemRequestBus::Handler AZStd::shared_ptr CreateShape(const Physics::ColliderConfiguration& colliderConfiguration, const Physics::ShapeConfiguration& configuration) override; AZStd::shared_ptr CreateMaterial(const Physics::MaterialConfiguration& materialConfiguration) override; diff --git a/Gems/PhysX/Code/Tests/CharacterControllerTests.cpp b/Gems/PhysX/Code/Tests/CharacterControllerTests.cpp index d5b961ada7..218571c01c 100644 --- a/Gems/PhysX/Code/Tests/CharacterControllerTests.cpp +++ b/Gems/PhysX/Code/Tests/CharacterControllerTests.cpp @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include #include @@ -31,6 +33,51 @@ namespace PhysX { + namespace Internal + { + void AddColliderComponentToEntity(AZ::Entity* entity, const Physics::ColliderConfiguration& colliderConfiguration, const Physics::ShapeConfiguration& shapeConfiguration) + { + Physics::ShapeType shapeType = shapeConfiguration.GetShapeType(); + + switch (shapeType) + { + case Physics::ShapeType::Sphere: + { + const Physics::SphereShapeConfiguration& sphereConfiguration = static_cast(shapeConfiguration); + auto sphereColliderComponent = entity->CreateComponent(); + sphereColliderComponent->SetShapeConfigurationList({ AZStd::make_pair( + AZStd::make_shared(colliderConfiguration), + AZStd::make_shared(sphereConfiguration)) }); + } + break; + case Physics::ShapeType::Box: + { + const Physics::BoxShapeConfiguration& boxConfiguration = static_cast(shapeConfiguration); + auto boxColliderComponent = entity->CreateComponent(); + boxColliderComponent->SetShapeConfigurationList({ AZStd::make_pair( + AZStd::make_shared(colliderConfiguration), + AZStd::make_shared(boxConfiguration)) }); + } + break; + case Physics::ShapeType::Capsule: + { + const Physics::CapsuleShapeConfiguration& capsuleConfiguration = static_cast(shapeConfiguration); + auto capsuleColliderComponent = entity->CreateComponent(); + capsuleColliderComponent->SetShapeConfigurationList({ AZStd::make_pair( + AZStd::make_shared(colliderConfiguration), + AZStd::make_shared(capsuleConfiguration)) }); + } + break; + default: + { + AZ_Error("PhysX", false, + "AddColliderComponentToEntity(): Using Shape of type %d is not implemented.", static_cast(shapeType)); + } + break; + } + } + } + // transform for a floor centred at x = 0, y = 0, with top at level z = 0 static const AZ::Transform DefaultFloorTransform = AZ::Transform::CreateTranslation(AZ::Vector3::CreateAxisZ(-0.5f)); @@ -367,8 +414,7 @@ namespace PhysX auto triggerEntity = AZStd::make_unique("TriggerEntity"); triggerEntity->CreateComponent()->SetWorldTM(AZ::Transform::Identity()); triggerEntity->CreateComponent(PhysX::StaticRigidBodyComponentTypeId); - Physics::SystemRequestBus::Broadcast(&Physics::SystemRequests::AddColliderComponentToEntity, - triggerEntity.get(), triggerConfig, boxConfig, false); + Internal::AddColliderComponentToEntity(triggerEntity.get(), triggerConfig, boxConfig); triggerEntity->Init(); triggerEntity->Activate(); diff --git a/Gems/PhysX/Code/physx_editor_shared_files.cmake b/Gems/PhysX/Code/physx_editor_shared_files.cmake index 2a84c4e380..b743efb6aa 100644 --- a/Gems/PhysX/Code/physx_editor_shared_files.cmake +++ b/Gems/PhysX/Code/physx_editor_shared_files.cmake @@ -11,6 +11,4 @@ set(FILES Source/Module.cpp - Source/SystemComponent.cpp - Source/SystemComponent.h ) diff --git a/Gems/PhysX/Code/physx_editor_tests_files.cmake b/Gems/PhysX/Code/physx_editor_tests_files.cmake index 202e688a76..1e6ccde75f 100644 --- a/Gems/PhysX/Code/physx_editor_tests_files.cmake +++ b/Gems/PhysX/Code/physx_editor_tests_files.cmake @@ -11,8 +11,6 @@ set(FILES Source/Module.cpp - Source/SystemComponent.cpp - Source/SystemComponent.h Tests/PhysXTestCommon.cpp Tests/PhysXTestCommon.h Tests/ColliderScalingTests.cpp diff --git a/Gems/PhysX/Code/physx_files.cmake b/Gems/PhysX/Code/physx_files.cmake index c850479f53..ed2d59b8aa 100644 --- a/Gems/PhysX/Code/physx_files.cmake +++ b/Gems/PhysX/Code/physx_files.cmake @@ -12,6 +12,8 @@ set(FILES Source/PhysX_precompiled.cpp Source/PhysX_precompiled.h + Source/SystemComponent.cpp + Source/SystemComponent.h Include/PhysX/SystemComponentBus.h Include/PhysX/ColliderComponentBus.h Include/PhysX/NativeTypeIdentifiers.h diff --git a/Gems/PhysX/Code/physx_shared_files.cmake b/Gems/PhysX/Code/physx_shared_files.cmake index 9451f44648..1b7c17f5f5 100644 --- a/Gems/PhysX/Code/physx_shared_files.cmake +++ b/Gems/PhysX/Code/physx_shared_files.cmake @@ -11,8 +11,6 @@ set(FILES Source/Module.cpp - Source/SystemComponent.cpp - Source/SystemComponent.h Source/ComponentDescriptors.cpp Source/ComponentDescriptors.h ) diff --git a/Gems/PhysX/Code/physx_tests_files.cmake b/Gems/PhysX/Code/physx_tests_files.cmake index adf0f587d2..406aed64a7 100644 --- a/Gems/PhysX/Code/physx_tests_files.cmake +++ b/Gems/PhysX/Code/physx_tests_files.cmake @@ -10,8 +10,6 @@ # set(FILES - Source/SystemComponent.cpp - Source/SystemComponent.h Source/ComponentDescriptors.cpp Source/ComponentDescriptors.h Tests/PhysXComponentBusTests.cpp From 582b098ed227a26b2f9548fe1990f52b2cd01ef0 Mon Sep 17 00:00:00 2001 From: greerdv Date: Thu, 15 Apr 2021 17:06:56 +0100 Subject: [PATCH 05/16] removing unused local variable --- Gems/PhysX/Code/Source/BaseColliderComponent.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Gems/PhysX/Code/Source/BaseColliderComponent.cpp b/Gems/PhysX/Code/Source/BaseColliderComponent.cpp index c67cc105d8..c8581efcb7 100644 --- a/Gems/PhysX/Code/Source/BaseColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/BaseColliderComponent.cpp @@ -330,7 +330,6 @@ namespace PhysX } const bool hasNonUniformScale = (AZ::NonUniformScaleRequestBus::FindFirstHandler(GetEntityId()) != nullptr); - AZ::u8 subdivisionLevel = physicsAssetConfiguration.m_subdivisionLevel; Utils::GetShapesFromAsset(physicsAssetConfiguration, componentColliderConfiguration, hasNonUniformScale, physicsAssetConfiguration.m_subdivisionLevel, m_shapes); From cc7b4fc251ac22e65d5bf86cf3e1c2804cf8f347 Mon Sep 17 00:00:00 2001 From: gallowj Date: Thu, 15 Apr 2021 13:06:27 -0500 Subject: [PATCH 06/16] Updated all materials, did some mesh cleaning adding source file as well. --- .../ArtSource/objects/sponza_cleanup.mb | 3 ++ .../Sponza/Assets/objects/sponza.fbx | 4 +- .../Assets/objects/sponza_mat_arch.material | 15 ++++++ .../objects/sponza_mat_background.material | 22 +++++++- .../Assets/objects/sponza_mat_bricks.material | 27 ++++++++-- .../objects/sponza_mat_ceiling.material | 50 ++++++++++++++++--- .../Assets/objects/sponza_mat_chain.material | 13 ++++- .../objects/sponza_mat_columna.material | 22 +++++++- .../objects/sponza_mat_columnb.material | 22 +++++++- .../objects/sponza_mat_columnc.material | 22 +++++++- .../objects/sponza_mat_curtainblue.material | 19 +++++++ .../objects/sponza_mat_curtaingreen.material | 16 ++++++ .../objects/sponza_mat_curtainred.material | 21 ++++++++ .../objects/sponza_mat_details.material | 14 +++++- .../objects/sponza_mat_fabricblue.material | 16 ++++++ .../objects/sponza_mat_fabricgreen.material | 16 ++++++ .../objects/sponza_mat_fabricred.material | 16 ++++++ .../objects/sponza_mat_flagpole.material | 19 ++++++- .../Assets/objects/sponza_mat_floor.material | 22 +++++++- .../Assets/objects/sponza_mat_leaf.material | 39 ++++++++++++++- .../Assets/objects/sponza_mat_lion.material | 23 ++++++++- .../Assets/objects/sponza_mat_roof.material | 17 +++++-- .../Assets/objects/sponza_mat_vase.material | 19 ++++++- .../objects/sponza_mat_vasehanging.material | 16 +++++- .../objects/sponza_mat_vaseplant.material | 32 +++++++++++- .../objects/sponza_mat_vaseround.material | 26 +++++++++- 26 files changed, 499 insertions(+), 32 deletions(-) create mode 100644 Gems/AtomContent/Sponza/ArtSource/objects/sponza_cleanup.mb diff --git a/Gems/AtomContent/Sponza/ArtSource/objects/sponza_cleanup.mb b/Gems/AtomContent/Sponza/ArtSource/objects/sponza_cleanup.mb new file mode 100644 index 0000000000..882496f2b0 --- /dev/null +++ b/Gems/AtomContent/Sponza/ArtSource/objects/sponza_cleanup.mb @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9d3c18d76f00688d15c54736ef3d8c953df08baf46a796fa71627de18bdb3c0f +size 22804332 diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza.fbx b/Gems/AtomContent/Sponza/Assets/objects/sponza.fbx index 80cb76941e..9061666968 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza.fbx +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza.fbx @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6cbfc4d0a6722726070468da4368df7c76be67e8d067a7e3130fd29cdcdd5c6b -size 7613840 +oid sha256:35a880abc018520d4b30d21a64f7a14fca74d936593320d5afd03ddf25771bf3 +size 9176416 diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_arch.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_arch.material index 8f5edb6968..da72f8a430 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_arch.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_arch.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/arch_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,17 @@ ], "textureMap": "Textures/arch_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.885053813457489, + 0.801281750202179, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/arch_1k_metallic.png" }, diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_background.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_background.material index 5ba48a758e..5a195fd0b6 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_background.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_background.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/background_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,23 @@ ], "textureMap": "Textures/background_1k_basecolor.png" }, + "clearCoat": { + "enable": true, + "factor": 0.5, + "normalMap": "Textures/background_1k_normal.jpg", + "roughness": 0.4000000059604645 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.8911573886871338, + 0.7894102334976196, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/background_1k_metallic.png" }, @@ -24,7 +45,6 @@ }, "parallax": { "algorithm": "POM", - "enable": true, "factor": 0.03099999949336052, "pdo": true, "quality": "High", diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_bricks.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_bricks.material index c32beebd5c..d2089b5537 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_bricks.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_bricks.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/bricks_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,23 @@ ], "textureMap": "Textures/bricks_1k_basecolor.png" }, + "clearCoat": { + "enable": true, + "factor": 0.5, + "normalMap": "Textures/bricks_1k_normal.jpg", + "roughness": 0.5 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.9703211784362793, + 0.9703211784362793, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/bricks_1k_metallic.png" }, @@ -23,11 +44,9 @@ "factor": 1.0 }, "parallax": { - "algorithm": "POM", - "enable": true, + "algorithm": "ContactRefinement", "factor": 0.03500000014901161, - "pdo": true, - "quality": "High", + "quality": "Medium", "textureMap": "Textures/bricks_1k_height.png" }, "roughness": { diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_ceiling.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_ceiling.material index cbccd8ed88..40e476305d 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_ceiling.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_ceiling.material @@ -4,17 +4,55 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/ceiling_1k_ao.png" + }, "baseColor": { - "color": [ - 0.800000011920929, - 0.800000011920929, - 0.800000011920929, - 1.0 - ], + "textureBlendMode": "Lerp", "textureMap": "Textures/ceiling_1k_basecolor.png" }, + "clearCoat": { + "enable": true, + "factor": 0.5, + "influenceMap": "Textures/ceiling_1k_ao.png", + "normalMap": "Textures/ceiling_1k_normal.png", + "roughness": 0.30000001192092898 + }, + "emissive": { + "color": [ + 0.0, + 0.0, + 0.0, + 1.0 + ] + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.7591058015823364, + 0.43776607513427737, + 1.0 + ] + }, + "normal": { + "textureMap": "Textures/ceiling_1k_normal.png" + }, "opacity": { "factor": 1.0 + }, + "parallax": { + "algorithm": "ContactRefinement", + "factor": 0.019999999552965165, + "pdo": true, + "quality": "Medium", + "textureMap": "Textures/ceiling_1k_height.png" + }, + "roughness": { + "textureMap": "Textures/ceiling_1k_roughness.png" } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_chain.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_chain.material index cdb28a8a6f..4e39112383 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_chain.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_chain.material @@ -13,6 +13,17 @@ ], "textureMap": "Textures/chain_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.4891279339790344, + 0.7931944727897644, + 1.0, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/chain_alpha.png" }, @@ -21,7 +32,7 @@ }, "opacity": { "alphaSource": "Split", - "factor": 1.0, + "factor": 0.30000001192092898, "mode": "Cutout", "textureMap": "Textures/chain_alpha.png" }, diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columna.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columna.material index 1889e33313..6c89c94021 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columna.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columna.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/columnA_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,23 @@ ], "textureMap": "Textures/columnA_1k_basecolor.png" }, + "clearCoat": { + "enable": true, + "factor": 0.5, + "normalMap": "Textures/columnA_1k_normal.jpg", + "roughness": 0.30000001192092898 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.8964369893074036, + 0.8264744281768799, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/columnA_1k_metallic.png" }, @@ -24,7 +45,6 @@ }, "parallax": { "algorithm": "POM", - "enable": true, "factor": 0.017000000923871995, "pdo": true, "quality": "High", diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnb.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnb.material index 095afc0ab1..0be26ba553 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnb.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnb.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/columnB_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,23 @@ ], "textureMap": "Textures/columnB_1k_basecolor.png" }, + "clearCoat": { + "enable": true, + "factor": 0.5, + "normalMap": "Textures/columnB_1k_normal.jpg", + "roughness": 0.30000001192092898 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.9015335440635681, + 0.8348516225814819, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/columnB_1k_metallic.png" }, @@ -23,7 +44,6 @@ "factor": 1.0 }, "parallax": { - "enable": true, "factor": 0.020999999716877939, "pdo": true, "quality": "High", diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnc.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnc.material index e78cb485cc..2f1512fa4a 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnc.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_columnc.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/columnC_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,23 @@ ], "textureMap": "Textures/columnC_1k_basecolor.png" }, + "clearCoat": { + "enable": true, + "factor": 0.5, + "normalMap": "Textures/columnC_1k_normal.jpg", + "roughness": 0.30000001192092898 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.9050736427307129, + 0.9050736427307129, + 1.0, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/columnC_1k_metallic.png" }, @@ -24,7 +45,6 @@ }, "parallax": { "algorithm": "POM", - "enable": true, "factor": 0.014000000432133675, "pdo": true, "quality": "High", diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainblue.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainblue.material index 62942faa87..e68bc7a41a 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainblue.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainblue.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/curtain_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,10 +17,22 @@ ], "textureMap": "Textures/curtainBlue_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.06195162981748581, + 0.2056153267621994, + 1.0, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/curtain_metallic.png" }, "normal": { + "factor": 0.5, "textureMap": "Textures/curtain_normal.jpg" }, "opacity": { @@ -24,6 +40,9 @@ }, "roughness": { "textureMap": "Textures/curtain_roughness.png" + }, + "specularF0": { + "enableMultiScatterCompensation": true } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtaingreen.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtaingreen.material index 3284cfa837..85a5ef9775 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtaingreen.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtaingreen.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/curtain_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,10 +17,22 @@ ], "textureMap": "Textures/curtainGreen_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.0, + 1.0, + 0.029526207596063615, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/curtain_metallic.png" }, "normal": { + "factor": 0.5, "textureMap": "Textures/curtain_normal.jpg" }, "opacity": { diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainred.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainred.material index d07cf6d172..086f34727c 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainred.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_curtainred.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/curtain_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,17 @@ ], "textureMap": "Textures/curtainRed_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.023315785452723504, + 0.048538949340581897, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/curtain_metallic.png" }, @@ -24,6 +39,12 @@ }, "roughness": { "textureMap": "Textures/curtain_roughness.png" + }, + "uv": { + "center": [ + 16.0, + 0.0 + ] } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_details.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_details.material index fc5f5761d8..18bd2a307b 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_details.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_details.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/details_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,15 @@ ], "textureMap": "Textures/details_1k_basecolor.png" }, + "clearCoat": { + "enable": true, + "factor": 0.5, + "normalMap": "Textures/details_1k_normal.png", + "roughness": 0.25 + }, + "general": { + "applySpecularAA": true + }, "metallic": { "textureMap": "Textures/details_1k_metallic.png" }, @@ -24,7 +37,6 @@ }, "parallax": { "algorithm": "POM", - "enable": true, "factor": 0.02500000037252903, "pdo": true, "textureMap": "Textures/details_1k_height.png" diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricblue.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricblue.material index 3a555c0824..fb0490f9a9 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricblue.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricblue.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/fabric_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,10 +17,22 @@ ], "textureMap": "Textures/fabricBlue_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.0, + 0.15049973130226136, + 1.0, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/fabric_metallic.png" }, "normal": { + "factor": 0.5, "textureMap": "Textures/fabric_normal.jpg" }, "opacity": { diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricgreen.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricgreen.material index 6a95d0d275..c6074bf894 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricgreen.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricgreen.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/fabric_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,10 +17,22 @@ ], "textureMap": "Textures/fabricGreen_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.0, + 1.0, + 0.15378041565418244, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/fabric_metallic.png" }, "normal": { + "factor": 0.5, "textureMap": "Textures/fabric_normal.jpg" }, "opacity": { diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricred.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricred.material index 2558c86819..4215d8dde5 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricred.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_fabricred.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/fabric_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,10 +17,22 @@ ], "textureMap": "Textures/fabricRed_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.08197146654129029, + 0.10267795622348786, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/fabric_metallic.png" }, "normal": { + "factor": 0.5, "textureMap": "Textures/fabric_normal.jpg" }, "opacity": { diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_flagpole.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_flagpole.material index c13baae474..cbba302103 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_flagpole.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_flagpole.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/flagpole_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,17 @@ ], "textureMap": "Textures/flagpole_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.6520485281944275, + 0.7122911214828491, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/flagpole_1k_metallic.png" }, @@ -24,7 +39,6 @@ }, "parallax": { "algorithm": "POM", - "enable": true, "factor": 0.014000000432133675, "pdo": true, "quality": "High", @@ -32,6 +46,9 @@ }, "roughness": { "textureMap": "Textures/flagpole_1k_roughness.png" + }, + "specularF0": { + "enableMultiScatterCompensation": true } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_floor.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_floor.material index cb4affe1cf..2c2abe3931 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_floor.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_floor.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/floor_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,23 @@ ], "textureMap": "Textures/floor_1k_basecolor.png" }, + "clearCoat": { + "enable": true, + "influenceMap": "Textures/floor_1k_ao.png", + "normalMap": "Textures/floor_1k_normal.png", + "roughness": 0.25 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.9404135346412659, + 0.8688944578170776, + 1.0 + ] + }, "normal": { "textureMap": "Textures/floor_1k_normal.png" }, @@ -21,7 +42,6 @@ }, "parallax": { "algorithm": "POM", - "enable": true, "factor": 0.012000000104308129, "pdo": true, "textureMap": "Textures/floor_1k_height.png" diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_leaf.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_leaf.material index bb226d14cb..4508a68f3f 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_leaf.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_leaf.material @@ -13,6 +13,23 @@ ], "textureMap": "Textures/thorn_basecolor.png" }, + "clearCoat": { + "enable": true, + "factor": 0.05000000074505806, + "normalMap": "Textures/thorn_normal.jpg", + "roughness": 0.10000000149011612 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.46506446599960329, + 1.0, + 0.3944609761238098, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/thorn_metallic.png" }, @@ -20,7 +37,8 @@ "textureMap": "Textures/thorn_normal.jpg" }, "opacity": { - "factor": 0.5699999928474426, + "doubleSided": true, + "factor": 0.20000000298023225, "mode": "Cutout" }, "parallax": { @@ -28,6 +46,25 @@ }, "roughness": { "textureMap": "Textures/thorn_roughness.png" + }, + "subsurfaceScattering": { + "enableSubsurfaceScattering": true, + "quality": 1.0, + "scatterColor": [ + 0.28143739700317385, + 1.0, + 0.13000686466693879, + 1.0 + ], + "scatterDistance": 1.0, + "thickness": 0.10000000149011612, + "transmissionMode": "ThinObject", + "transmissionTint": [ + 0.07225146889686585, + 0.16981765627861024, + 0.04444953054189682, + 1.0 + ] } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_lion.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_lion.material index 4b47e1b7a1..55f44b2f63 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_lion.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_lion.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/lion_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,17 @@ ], "textureMap": "Textures/lion_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.7364919781684876, + 0.3672388792037964, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/lion_1k_metallic.png" }, @@ -23,14 +38,18 @@ "factor": 1.0 }, "parallax": { - "algorithm": "POM", + "algorithm": "ContactRefinement", "enable": true, - "factor": 0.023000000044703485, + "factor": 0.009999999776482582, "pdo": true, + "quality": "Ultra", "textureMap": "Textures/lion_1k_height.png" }, "roughness": { "textureMap": "Textures/lion_1k_roughness.png" + }, + "specularF0": { + "enableMultiScatterCompensation": true } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_roof.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_roof.material index 3b245b251f..a64486309d 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_roof.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_roof.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/roof_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -11,24 +15,27 @@ 0.800000011920929, 1.0 ], + "textureBlendMode": "Lerp", "textureMap": "Textures/roof_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, "metallic": { - "factor": 0.009999999776482582, "useTexture": false }, "normal": { + "factor": 0.5, + "flipY": true, "textureMap": "Textures/roof_1k_normal.jpg" }, "opacity": { "factor": 1.0 }, "parallax": { - "algorithm": "POM", - "enable": true, + "algorithm": "ContactRefinement", "factor": 0.019999999552965165, - "pdo": true, - "quality": "High", + "quality": "Medium", "textureMap": "Textures/roof_1k_height.png" }, "roughness": { diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vase.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vase.material index e471de4ab9..867943642e 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vase.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vase.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/vase_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,17 @@ ], "textureMap": "Textures/vase_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.8713664412498474, + 0.6021667718887329, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/vase_1k_metallic.png" }, @@ -24,7 +39,6 @@ }, "parallax": { "algorithm": "POM", - "enable": true, "factor": 0.027000000700354577, "pdo": true, "quality": "High", @@ -32,6 +46,9 @@ }, "roughness": { "textureMap": "Textures/vase_1k_roughness.png" + }, + "specularF0": { + "enableMultiScatterCompensation": true } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vasehanging.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vasehanging.material index 6bb8a205d1..9e96fb983d 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vasehanging.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vasehanging.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/vaseHanging_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,17 @@ ], "textureMap": "Textures/vaseHanging_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.765606164932251, + 1.0, + 0.7052567601203919, + 1.0 + ] + }, "metallic": { "textureMap": "Textures/vaseHanging_1k_metallic.png" }, @@ -24,7 +39,6 @@ }, "parallax": { "algorithm": "POM", - "enable": true, "factor": 0.04600000008940697, "pdo": true, "quality": "High", diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseplant.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseplant.material index 0fe458b4ac..c5bfe5c6b4 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseplant.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseplant.material @@ -13,9 +13,39 @@ ], "textureMap": "Textures/vasePlant_1k_basecolor.png" }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 0.6788738965988159, + 1.0, + 0.026138704270124437, + 1.0 + ] + }, "opacity": { - "factor": 0.8399999737739563, + "doubleSided": true, + "factor": 0.28999999165534975, "mode": "Cutout" + }, + "subsurfaceScattering": { + "enableSubsurfaceScattering": true, + "quality": 1.0, + "scatterColor": [ + 0.07421988248825073, + 0.10223544389009476, + 0.0, + 1.0 + ], + "subsurfaceScatterFactor": 0.0, + "transmissionMode": "ThinObject", + "transmissionTint": [ + 0.33716335892677309, + 0.4620737135410309, + 0.0, + 1.0 + ] } } } \ No newline at end of file diff --git a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseround.material b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseround.material index d2ef595c0d..ebb4e537f5 100644 --- a/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseround.material +++ b/Gems/AtomContent/Sponza/Assets/objects/sponza_mat_vaseround.material @@ -4,6 +4,10 @@ "parentMaterial": "", "propertyLayoutVersion": 3, "properties": { + "ambientOcclusion": { + "enable": true, + "textureMap": "Textures/vaseRound_1k_ao.png" + }, "baseColor": { "color": [ 0.800000011920929, @@ -13,6 +17,24 @@ ], "textureMap": "Textures/vaseRound_1k_basecolor.png" }, + "clearCoat": { + "enable": true, + "factor": 0.5, + "influenceMap": "Textures/vaseRound_1k_ao.png", + "normalMap": "Textures/vaseRound_1k_normal.jpg", + "roughness": 0.25 + }, + "general": { + "applySpecularAA": true + }, + "irradiance": { + "color": [ + 1.0, + 0.5939116477966309, + 0.29176774621009829, + 1.0 + ] + }, "normal": { "textureMap": "Textures/vaseRound_1k_normal.jpg" }, @@ -21,7 +43,6 @@ }, "parallax": { "algorithm": "POM", - "enable": true, "factor": 0.019999999552965165, "pdo": true, "quality": "High", @@ -29,6 +50,9 @@ }, "roughness": { "textureMap": "Textures/vaseRound_1k_roughness.png" + }, + "specularF0": { + "enableMultiScatterCompensation": true } } } \ No newline at end of file From a9345646f8bf188841551ce649f89f2b22cdfe78 Mon Sep 17 00:00:00 2001 From: gallowj Date: Thu, 15 Apr 2021 13:08:13 -0500 Subject: [PATCH 07/16] fixing a hardcoded path typo that someone submitted on accident. --- .../DccScriptingInterface/azpy/config_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py index 483e14a8ec..0b75ea4330 100755 --- a/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py +++ b/Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/azpy/config_utils.py @@ -158,10 +158,10 @@ def bootstrap_dccsi_py_libs(dccsi_dirpath=return_stub_dir()): """Builds and adds local site dir libs based on py version""" from azpy.constants import STR_DCCSI_PYTHON_LIB_PATH # a path string constructor - _DCCSI_PYTHON_LIB_PATH = "E:\\P4\\jromnoa_spectra_atom_2\\dev\\Tools\\Python\\3.7.5\\windows\\Lib\\site-packages" - # _DCCSI_PYTHON_LIB_PATH = STR_DCCSI_PYTHON_LIB_PATH.format(dccsi_dirpath, - # sys.version_info[0], - # sys.version_info[1]) + #_DCCSI_PYTHON_LIB_PATH = "E:\\P4\\jromnoa_spectra_atom_2\\dev\\Tools\\Python\\3.7.5\\windows\\Lib\\site-packages" + _DCCSI_PYTHON_LIB_PATH = STR_DCCSI_PYTHON_LIB_PATH.format(dccsi_dirpath, + sys.version_info[0], + sys.version_info[1]) if os.path.exists(_DCCSI_PYTHON_LIB_PATH): _LOGGER.debug('Performed site.addsitedir({})'.format(_DCCSI_PYTHON_LIB_PATH)) From a9516c6498b6b92e8e18b02b638e6d98154806d4 Mon Sep 17 00:00:00 2001 From: gallowj Date: Thu, 15 Apr 2021 15:04:36 -0500 Subject: [PATCH 08/16] updated the ref to dccsi env that changed --- Gems/AtomContent/Sponza/Project_Env.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/AtomContent/Sponza/Project_Env.bat b/Gems/AtomContent/Sponza/Project_Env.bat index ae21e6ebc4..46d4663c34 100644 --- a/Gems/AtomContent/Sponza/Project_Env.bat +++ b/Gems/AtomContent/Sponza/Project_Env.bat @@ -44,7 +44,7 @@ CD /d %LY_PROJECT_PATH%\%DEV_REL_PATH% set LY_DEV=%CD% echo LY_DEV = %LY_DEV% -CALL %LY_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\Launchers\Windows\Env.bat +CALL %LY_DEV%\Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\Launchers\Windows\Env_Maya.bat rem :: Constant Vars (Global) rem SET LYPY_GDEBUG=0 From abf26eede19f53876e7aa8d511a147cc1c3ac7eb Mon Sep 17 00:00:00 2001 From: moudgils Date: Thu, 15 Apr 2021 14:00:40 -0700 Subject: [PATCH 09/16] Bump REsourcePoolBuilder as the bufferBindFlags were updated --- .../Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp index 7f617f4c6c..812198668d 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp @@ -45,7 +45,7 @@ namespace AZ AssetBuilderSDK::AssetBuilderDesc builderDescriptor; builderDescriptor.m_name = "Atom Resource Pool Asset Builder"; - builderDescriptor.m_version = 1; + builderDescriptor.m_version = 2; //ATOM-15196 builderDescriptor.m_patterns.emplace_back(AssetBuilderSDK::AssetBuilderPattern(AZStd::string("*.") + s_sourcePoolAssetExt, AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); builderDescriptor.m_busId = azrtti_typeid(); From 61c24084e883a43d1a6f583899d22b5d680c550e Mon Sep 17 00:00:00 2001 From: moudgils Date: Thu, 15 Apr 2021 16:13:22 -0700 Subject: [PATCH 10/16] Enable Null RHI for AutomatedTesting --- .../Gem/Code/Platform/Windows/runtime_dependencies.cmake | 1 + .../Gem/Code/Platform/Windows/tool_dependencies.cmake | 2 ++ .../Template/Code/Platform/Mac/mac_runtime_dependencies.cmake | 1 + .../Template/Code/Platform/Mac/mac_tool_dependencies.cmake | 1 + .../Code/Platform/Windows/windows_runtime_dependencies.cmake | 1 + .../Code/Platform/Windows/windows_tool_dependencies.cmake | 2 ++ 6 files changed, 8 insertions(+) diff --git a/AutomatedTesting/Gem/Code/Platform/Windows/runtime_dependencies.cmake b/AutomatedTesting/Gem/Code/Platform/Windows/runtime_dependencies.cmake index 617816dcd0..0a1541bcfc 100644 --- a/AutomatedTesting/Gem/Code/Platform/Windows/runtime_dependencies.cmake +++ b/AutomatedTesting/Gem/Code/Platform/Windows/runtime_dependencies.cmake @@ -12,4 +12,5 @@ set(GEM_DEPENDENCIES Gem::Atom_RHI_Vulkan.Private Gem::Atom_RHI_DX12.Private + Gem::Atom_RHI_Null.Private ) \ No newline at end of file diff --git a/AutomatedTesting/Gem/Code/Platform/Windows/tool_dependencies.cmake b/AutomatedTesting/Gem/Code/Platform/Windows/tool_dependencies.cmake index d13d0fb180..ddd3bfa6a7 100644 --- a/AutomatedTesting/Gem/Code/Platform/Windows/tool_dependencies.cmake +++ b/AutomatedTesting/Gem/Code/Platform/Windows/tool_dependencies.cmake @@ -15,5 +15,7 @@ set(GEM_DEPENDENCIES Gem::Atom_RHI_Vulkan.Builders Gem::Atom_RHI_DX12.Private Gem::Atom_RHI_DX12.Builders + Gem::Atom_RHI_Null.Private + Gem::Atom_RHI_Null.Builders Gem::Atom_RHI_Metal.Builders ) \ No newline at end of file diff --git a/Templates/DefaultProject/Template/Code/Platform/Mac/mac_runtime_dependencies.cmake b/Templates/DefaultProject/Template/Code/Platform/Mac/mac_runtime_dependencies.cmake index e49929c6e1..2821493346 100644 --- a/Templates/DefaultProject/Template/Code/Platform/Mac/mac_runtime_dependencies.cmake +++ b/Templates/DefaultProject/Template/Code/Platform/Mac/mac_runtime_dependencies.cmake @@ -11,4 +11,5 @@ set(GEM_DEPENDENCIES Gem::Atom_RHI_Metal.Private + Gem::Atom_RHI_Null.Private ) diff --git a/Templates/DefaultProject/Template/Code/Platform/Mac/mac_tool_dependencies.cmake b/Templates/DefaultProject/Template/Code/Platform/Mac/mac_tool_dependencies.cmake index eea4bb1dce..adf5485ed4 100644 --- a/Templates/DefaultProject/Template/Code/Platform/Mac/mac_tool_dependencies.cmake +++ b/Templates/DefaultProject/Template/Code/Platform/Mac/mac_tool_dependencies.cmake @@ -14,4 +14,5 @@ set(GEM_DEPENDENCIES Gem::Atom_RHI_Metal.Builders Gem::Atom_RHI_Vulkan.Builders Gem::Atom_RHI_DX12.Builders + Gem::Atom_RHI_Null.Builders ) diff --git a/Templates/DefaultProject/Template/Code/Platform/Windows/windows_runtime_dependencies.cmake b/Templates/DefaultProject/Template/Code/Platform/Windows/windows_runtime_dependencies.cmake index c5e1b4bc2e..514a61aa57 100644 --- a/Templates/DefaultProject/Template/Code/Platform/Windows/windows_runtime_dependencies.cmake +++ b/Templates/DefaultProject/Template/Code/Platform/Windows/windows_runtime_dependencies.cmake @@ -12,4 +12,5 @@ set(GEM_DEPENDENCIES Gem::Atom_RHI_Vulkan.Private Gem::Atom_RHI_DX12.Private + Gem::Atom_RHI_Null.Private ) diff --git a/Templates/DefaultProject/Template/Code/Platform/Windows/windows_tool_dependencies.cmake b/Templates/DefaultProject/Template/Code/Platform/Windows/windows_tool_dependencies.cmake index 304f97d590..b7f4b82126 100644 --- a/Templates/DefaultProject/Template/Code/Platform/Windows/windows_tool_dependencies.cmake +++ b/Templates/DefaultProject/Template/Code/Platform/Windows/windows_tool_dependencies.cmake @@ -14,4 +14,6 @@ set(GEM_DEPENDENCIES Gem::Atom_RHI_Vulkan.Builders Gem::Atom_RHI_DX12.Private Gem::Atom_RHI_DX12.Builders + Gem::Atom_RHI_Null.Private + Gem::Atom_RHI_Null.Builders ) From 8074e0fb186aea840feaa9ebed561c08eadb7ffe Mon Sep 17 00:00:00 2001 From: karlberg Date: Thu, 15 Apr 2021 17:56:08 -0700 Subject: [PATCH 11/16] Remove formal template parameter name to resolve shadowed variable warning on clang --- .../AzNetworking/AzNetworking/DataStructures/FixedSizeBitset.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzNetworking/AzNetworking/DataStructures/FixedSizeBitset.h b/Code/Framework/AzNetworking/AzNetworking/DataStructures/FixedSizeBitset.h index a91f42b3a0..3d064b5ecc 100644 --- a/Code/Framework/AzNetworking/AzNetworking/DataStructures/FixedSizeBitset.h +++ b/Code/Framework/AzNetworking/AzNetworking/DataStructures/FixedSizeBitset.h @@ -115,7 +115,7 @@ namespace AzNetworking ContainerType m_container; - template + template friend class FixedSizeVectorBitset; }; } From ee3f157fb8620e340f921a8b581b0273a2339c78 Mon Sep 17 00:00:00 2001 From: karlberg Date: Thu, 15 Apr 2021 20:41:08 -0700 Subject: [PATCH 12/16] Fix memory leak in multiplayer unit test --- Gems/Multiplayer/Code/Tests/MultiplayerSystemTests.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Gems/Multiplayer/Code/Tests/MultiplayerSystemTests.cpp b/Gems/Multiplayer/Code/Tests/MultiplayerSystemTests.cpp index 13adc6d774..c18c2ee5e3 100644 --- a/Gems/Multiplayer/Code/Tests/MultiplayerSystemTests.cpp +++ b/Gems/Multiplayer/Code/Tests/MultiplayerSystemTests.cpp @@ -97,6 +97,10 @@ namespace UnitTest m_mpComponent->OnConnect(&connMock2); EXPECT_EQ(m_connectionAcquiredCount, 25); + + // Clean up connection data + m_mpComponent->OnDisconnect(&connMock1, AzNetworking::DisconnectReason::None, AzNetworking::TerminationEndpoint::Local); + m_mpComponent->OnDisconnect(&connMock2, AzNetworking::DisconnectReason::None, AzNetworking::TerminationEndpoint::Local); } } From 89a935cd29b4daf0f77d4f637fbc85fa46ae07fc Mon Sep 17 00:00:00 2001 From: moudgils Date: Thu, 15 Apr 2021 20:44:01 -0700 Subject: [PATCH 13/16] Minor update --- .../Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp index 812198668d..6a94a46b93 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp @@ -45,7 +45,7 @@ namespace AZ AssetBuilderSDK::AssetBuilderDesc builderDescriptor; builderDescriptor.m_name = "Atom Resource Pool Asset Builder"; - builderDescriptor.m_version = 2; //ATOM-15196 + builderDescriptor.m_version = 3; //ATOM-15196 builderDescriptor.m_patterns.emplace_back(AssetBuilderSDK::AssetBuilderPattern(AZStd::string("*.") + s_sourcePoolAssetExt, AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); builderDescriptor.m_busId = azrtti_typeid(); From 05359187c4a2d4aca2d15e59ffff771eaee8588d Mon Sep 17 00:00:00 2001 From: moudgils Date: Thu, 15 Apr 2021 20:45:53 -0700 Subject: [PATCH 14/16] Test update --- .../Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp index 6a94a46b93..812198668d 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp @@ -45,7 +45,7 @@ namespace AZ AssetBuilderSDK::AssetBuilderDesc builderDescriptor; builderDescriptor.m_name = "Atom Resource Pool Asset Builder"; - builderDescriptor.m_version = 3; //ATOM-15196 + builderDescriptor.m_version = 2; //ATOM-15196 builderDescriptor.m_patterns.emplace_back(AssetBuilderSDK::AssetBuilderPattern(AZStd::string("*.") + s_sourcePoolAssetExt, AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); builderDescriptor.m_busId = azrtti_typeid(); From d0435b448959e69a38b7c914954ca40f75c6c1c8 Mon Sep 17 00:00:00 2001 From: moudgils Date: Thu, 15 Apr 2021 20:46:48 -0700 Subject: [PATCH 15/16] Minor update --- .../Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp index 812198668d..6a94a46b93 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp @@ -45,7 +45,7 @@ namespace AZ AssetBuilderSDK::AssetBuilderDesc builderDescriptor; builderDescriptor.m_name = "Atom Resource Pool Asset Builder"; - builderDescriptor.m_version = 2; //ATOM-15196 + builderDescriptor.m_version = 3; //ATOM-15196 builderDescriptor.m_patterns.emplace_back(AssetBuilderSDK::AssetBuilderPattern(AZStd::string("*.") + s_sourcePoolAssetExt, AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); builderDescriptor.m_busId = azrtti_typeid(); From ca86068d8338a9484eccb08a8925a4b166fa3b32 Mon Sep 17 00:00:00 2001 From: moudgils Date: Thu, 15 Apr 2021 20:55:54 -0700 Subject: [PATCH 16/16] Minor update --- .../Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp index 6a94a46b93..92c30c28b1 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/ResourcePool/ResourcePoolBuilder.cpp @@ -45,7 +45,7 @@ namespace AZ AssetBuilderSDK::AssetBuilderDesc builderDescriptor; builderDescriptor.m_name = "Atom Resource Pool Asset Builder"; - builderDescriptor.m_version = 3; //ATOM-15196 + builderDescriptor.m_version = 2; //ATOM-15196 builderDescriptor.m_patterns.emplace_back(AssetBuilderSDK::AssetBuilderPattern(AZStd::string("*.") + s_sourcePoolAssetExt, AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); builderDescriptor.m_busId = azrtti_typeid();