diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 007d793..dd0e0f4 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -1,5 +1,5 @@ [/Script/EngineSettings.GameMapsSettings] -EditorStartupMap=/Game/MassSample/Maps/MassSampleHall.MassSampleHall +EditorStartupMap=/MassCommunitySample/MassSample/Maps/MassSampleHall.MassSampleHall LocalMapOptions= TransitionMap=None bUseSplitscreen=False diff --git a/Content/MassSample/ISMPerInstanceData/EntityMaterial.uasset b/Content/MassSample/ISMPerInstanceData/EntityMaterial.uasset deleted file mode 100644 index 123eea7..0000000 --- a/Content/MassSample/ISMPerInstanceData/EntityMaterial.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6cb82e618ef0b9bbd1a47202ede14b5fd5eb8e2fe121963a4ca94a364dee01dd -size 15394 diff --git a/Content/MassSample/ISMPerInstanceData/EntityMaterial_Inst.uasset b/Content/MassSample/ISMPerInstanceData/EntityMaterial_Inst.uasset deleted file mode 100644 index 1a305ee..0000000 --- a/Content/MassSample/ISMPerInstanceData/EntityMaterial_Inst.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9cb2aa6eb21a76c9edcbc9abde8eb00573d04fe4e3b3afa9ef9bad6d114d6b93 -size 7551 diff --git a/Content/MassSample/ISMPerInstanceData/RandomPerInstanceDataEntity.uasset b/Content/MassSample/ISMPerInstanceData/RandomPerInstanceDataEntity.uasset deleted file mode 100644 index b3ea1bd..0000000 --- a/Content/MassSample/ISMPerInstanceData/RandomPerInstanceDataEntity.uasset +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e78b9edad54a9d26c62b4cc9fefdb189fdc30ed81b68d39009be5123d4c37ae2 -size 4564 diff --git a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_BenchMarkSwapper.uasset b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_BenchMarkSwapper.uasset index bf268ac..ecc2ca4 100644 --- a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_BenchMarkSwapper.uasset +++ b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_BenchMarkSwapper.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad1f775299047c17bbc9804174a742f57f542d91caee65c8e262a8601e10d44d -size 147523 +oid sha256:06e516ed2bf688519de2adc4275feb483c89181c8fab6a6ecfc2b487d58c76da +size 173966 diff --git a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_MassAgentActor.uasset b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_MassAgentActor.uasset index a8686e8..2b33aac 100644 --- a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_MassAgentActor.uasset +++ b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_MassAgentActor.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b2fb7b60e332794ae2b077f21a4776cf0ed18bd5d89576e22f65113fb0ee543 -size 28653 +oid sha256:579470bf167e97b8b600a71b986eea204bad1b95e4eb84cd17a146a6d97edcf4 +size 35298 diff --git a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_MassAgentActorFastPathTranslation.uasset b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_MassAgentActorFastPathTranslation.uasset index 7984f41..350c4b5 100644 --- a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_MassAgentActorFastPathTranslation.uasset +++ b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/BP_MassAgentActorFastPathTranslation.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:140525dc7782ada58a6d29864ea82da6cc94a830037dda65289bb10ab65830ee -size 28950 +oid sha256:37f252e0a644b184bd3bdd05417d5dbff9ac40d5e382a0adc1b7da28c265f578 +size 35015 diff --git a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/EQ_BenchmarkField.uasset b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/EQ_BenchmarkField.uasset new file mode 100644 index 0000000..c1d2e4d --- /dev/null +++ b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/EQ_BenchmarkField.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b053ddd8ac32f91791572d617cfc892caa6f05e524c46c109fc91532924a3e74 +size 5813 diff --git a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/MEC_MassTranslationBench.uasset b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/MEC_MassTranslationBench.uasset new file mode 100644 index 0000000..c665076 --- /dev/null +++ b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/MEC_MassTranslationBench.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dbdfdeed08ce0757570a27639f36ed5c737424354166d928d24a1ebdc59fba5c +size 5226 diff --git a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/M_SimpleColorMaterial.uasset b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/M_SimpleColorMaterial.uasset new file mode 100644 index 0000000..bb437d4 --- /dev/null +++ b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/M_SimpleColorMaterial.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d43d8b58da578b043a3d60ceb2a77c039af6c3fd1943033000b292ff01089614 +size 9232 diff --git a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/M_SimpleColorMaterial_Inst_Blue.uasset b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/M_SimpleColorMaterial_Inst_Blue.uasset new file mode 100644 index 0000000..531bcdb --- /dev/null +++ b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/M_SimpleColorMaterial_Inst_Blue.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:373857b976198d51f9720d09e312849ba7377308c68bebfcc8d3f767fcc75fb7 +size 9676 diff --git a/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/M_SimpleColorMaterial_Inst_Red.uasset b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/M_SimpleColorMaterial_Inst_Red.uasset new file mode 100644 index 0000000..95cb3d0 --- /dev/null +++ b/Plugins/MassCommunitySample/Content/MassSample/Experimental/Benchmark/M_SimpleColorMaterial_Inst_Red.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dc9db6e35d8740c59199a640d1772897eaa5793a057fc3266316bdb21d1eb7a9 +size 9087 diff --git a/Plugins/MassCommunitySample/Content/MassSample/Maps/GymBenchmark.umap b/Plugins/MassCommunitySample/Content/MassSample/Maps/GymBenchmark.umap index 251b41d..568b82f 100644 --- a/Plugins/MassCommunitySample/Content/MassSample/Maps/GymBenchmark.umap +++ b/Plugins/MassCommunitySample/Content/MassSample/Maps/GymBenchmark.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e36179a014de02fc8bd6bbbe0f22aba2ca9b4f2604c98d0460154e4c7bed3ab5 -size 67710 +oid sha256:31d875255d58e2b6d7ef6a1ef87740af320872f9848e46ec092a6bd5c29f7f4e +size 68063 diff --git a/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/Benchmark/MSSceneCompTransformToActorTranslators.cpp b/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/Benchmark/MSSceneCompTransformToActorTranslators.cpp index bd8daab..7b4621d 100644 --- a/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/Benchmark/MSSceneCompTransformToActorTranslators.cpp +++ b/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/Benchmark/MSSceneCompTransformToActorTranslators.cpp @@ -12,7 +12,7 @@ UMSTransformToSceneCompTranslatorFastPath::UMSTransformToSceneCompTranslatorFast ExecutionFlags = (int32)EProcessorExecutionFlags::All; ExecutionOrder.ExecuteInGroup = UE::Mass::ProcessorGroupNames::UpdateWorldFromMass; ExecutionOrder.ExecuteAfter.Add(UE::Mass::ProcessorGroupNames::Movement); - + RequiredTags.Add(); bRequiresGameThreadExecution = true; @@ -27,13 +27,12 @@ void UMSTransformToSceneCompTranslatorFastPath::ConfigureQueries() } void UMSTransformToSceneCompTranslatorFastPath::Execute(FMassEntityManager& EntityManager, - FMassExecutionContext& Context) + FMassExecutionContext& Context) { EntityQuery.ForEachEntityChunk(EntityManager, Context, [this](FMassExecutionContext& Context) { - const TConstArrayView ComponentList = Context.GetFragmentView< - FMassSceneComponentWrapperFragment>(); - const TArrayView LocationList = Context.GetMutableFragmentView(); + const auto ComponentList = Context.GetFragmentView(); + const auto LocationList = Context.GetMutableFragmentView(); const int32 NumEntities = Context.GetNumEntities(); @@ -66,8 +65,8 @@ void UMSSceneCompTransformToMassTranslator::Execute(FMassEntityManager& EntityMa { EntityQuery.ForEachEntityChunk(EntityManager, Context, [this](FMassExecutionContext& Context) { - const TConstArrayView ComponentList = Context.GetFragmentView(); - const TArrayView LocationList = Context.GetMutableFragmentView(); + const auto ComponentList = Context.GetFragmentView(); + const auto LocationList = Context.GetMutableFragmentView(); const int32 NumEntities = Context.GetNumEntities(); for (int32 i = 0; i < NumEntities; ++i) diff --git a/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/Benchmark/MSSceneCompTransformToActorTranslators.h b/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/Benchmark/MSSceneCompTransformToActorTranslators.h index 0a66f50..5a90cdf 100644 --- a/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/Benchmark/MSSceneCompTransformToActorTranslators.h +++ b/Plugins/MassCommunitySample/Source/MassCommunitySample/Experimental/Benchmark/MSSceneCompTransformToActorTranslators.h @@ -28,36 +28,44 @@ class MASSCOMMUNITYSAMPLE_API UMSTransformToSceneCompTranslatorFastPath : public // Thanks to vblanco for this fast transform setting trick - // According to him the first two steps (to world and updatebounds) can be threaded but not the render dirty - FORCEINLINE static void SetWorldTransformFastPath(USceneComponent* InComp, FTransform InTransform) + // According to him the first two steps (comp to world and updatebounds) can be threaded but not the render dirty + FORCEINLINE static void SetWorldTransformFastPath(USceneComponent* InComp, const FTransform& InTransform) { - + // directly set transform and update bounds InComp->SetComponentToWorld(InTransform); InComp->UpdateBounds(); + + // Evil temp physics set with static cast + auto bodyinstance = static_cast(InComp)->BodyInstance; + FChaosEngineInterface::SetGlobalPose_AssumesLocked(bodyinstance.ActorHandle, InTransform); + + // dirty the render transform InComp->MarkRenderTransformDirty(); + for (auto Component : InComp->GetAttachChildren()) { // This * transforms from local space to world space! - InTransform = Component->GetRelativeTransform() * InTransform; + FTransform CompWorldTransform = Component->GetRelativeTransform() * InTransform; //These are to support non-relative transforms (could probably omit as this is rare?) - if(InComp->IsUsingAbsoluteLocation()) + + if(UNLIKELY(InComp->IsUsingAbsoluteLocation())) { - InTransform.CopyTranslation(InTransform); + CompWorldTransform.CopyTranslation(InTransform); } - - if(InComp->IsUsingAbsoluteRotation()) + + if(UNLIKELY(InComp->IsUsingAbsoluteRotation())) { - InTransform.CopyRotation(InTransform); + CompWorldTransform.CopyRotation(InTransform); } - - if(InComp->IsUsingAbsoluteScale()) + + if(UNLIKELY(InComp->IsUsingAbsoluteScale())) { - InTransform.CopyScale3D(InTransform); + CompWorldTransform.CopyScale3D(InTransform); } // Recursive! - SetWorldTransformFastPath(Component,InTransform); + SetWorldTransformFastPath(Component,CompWorldTransform); } }; diff --git a/Plugins/MassCommunitySample/Source/MassCommunitySample/MassCommunitySample.Build.cs b/Plugins/MassCommunitySample/Source/MassCommunitySample/MassCommunitySample.Build.cs index e8c5135..24e9238 100644 --- a/Plugins/MassCommunitySample/Source/MassCommunitySample/MassCommunitySample.Build.cs +++ b/Plugins/MassCommunitySample/Source/MassCommunitySample/MassCommunitySample.Build.cs @@ -25,7 +25,9 @@ public MassCommunitySample(ReadOnlyTargetRules Target) : base(Target) "Core", "CoreUObject", "Engine", - "InputCore" + "InputCore" , + "Chaos" + } ); @@ -59,11 +61,16 @@ public MassCommunitySample(ReadOnlyTargetRules Target) : base(Target) "StateTreeModule", "MassLOD", "NavigationSystem", - //todo: maybe do thee editor only stuff on another module? + "Chaos", + "PhysicsCore", + "ChaosCore", + "ChaosSolverEngine" + } ); - + //todo: maybe do thee editor only stuff on another module? + if (Target.bBuildEditor) { PrivateDependencyModuleNames.Add("CodeView"); diff --git a/Source/MassSampleProject.Target.cs b/Source/MassSampleProject.Target.cs index 4805061..cc63cb8 100644 --- a/Source/MassSampleProject.Target.cs +++ b/Source/MassSampleProject.Target.cs @@ -11,5 +11,7 @@ public MassSampleProjectTarget(TargetInfo Target) : base(Target) DefaultBuildSettings = BuildSettingsVersion.V2; ExtraModuleNames.AddRange(new string[] { "MassSampleProject" }); + IncludeOrderVersion = EngineIncludeOrderVersion.Latest; + } } diff --git a/Source/MassSampleProjectEditor.Target.cs b/Source/MassSampleProjectEditor.Target.cs index 0b30646..9b1d26d 100644 --- a/Source/MassSampleProjectEditor.Target.cs +++ b/Source/MassSampleProjectEditor.Target.cs @@ -10,5 +10,8 @@ public MassSampleProjectEditorTarget(TargetInfo Target) : base(Target) Type = TargetType.Editor; DefaultBuildSettings = BuildSettingsVersion.V2; ExtraModuleNames.Add("MassSampleProject"); + + IncludeOrderVersion = EngineIncludeOrderVersion.Latest; + } }