Commit Graph

30 Commits

Author SHA1 Message Date
Jeremy Moore
ff967b1163 Remove PRIMITIVE_SCENE_DATA_FLAG_DRAWS_VELOCITY and only use PRIMITIVE_SCENE_DATA_FLAG_OUTPUT_VELOCITY.
Tidy up use of FPrimitiveSceneProxy velocity getters.
Now DrawsVelocity() is only for velocity relevance.
And HasDynamicTransform() is for determining if we need to store previous transform state.
VSM caching was using PRIMITIVE_SCENE_DATA_FLAG_DRAWS_VELOCITY so replaced that with PRIMITIVE_SCENE_DATA_FLAG_SHOULD_CACHE_SHADOW which should use the old behavior and can be tweaked in future using ShouldCacheShadow().

A common pattern for determining whether to output velocity now is to check if a previous transform exists, and to OR in AlwaysHasVelocity().
I found some proxy types that don't check for previous transform.
Also I found that the debug physics aggregate types *never* check for previous transform.
These are pre-existing potential bugs for fixing in another pass.

Also I found some proxies that don't currently fill out velocity relevance.
These are pre-existing potential bugs for fixing in another pass.

#preflight 62863f789016c6dd897f1cd2
#fyi andrew.lauritzen

[CL 20279797 by Jeremy Moore in ue5-main branch]
2022-05-19 10:08:15 -04:00
Yuriy ODonnell
49e1679b77 Remove few unnecessary includes from BaseDynamicMeshSceneProxy.h
#rb none (trivial)
#preflight 627138b2cb7b2a06138a0c75

[CL 20025424 by Yuriy ODonnell in ue5-main branch]
2022-05-03 10:31:45 -04:00
Yuriy ODonnell
1cee85ad1e Move implementations of FBaseDynamicMeshSceneProxy virtual methods from a public header to a private .cpp file
#rb Christopher.Waters
#preflight 62705226220f89f0ad57aa29

[CL 20017815 by Yuriy ODonnell in ue5-main branch]
2022-05-02 19:01:55 -04:00
christopher waters
3b626d4efc Minor dependency cleanup in ComponentSourceInterfaces.h
#jira none
#rb josh.adams
#preflight 6233619b84667926da279199

[CL 19424614 by christopher waters in ue5-main branch]
2022-03-17 14:59:48 -04:00
sebastien hillaire
54cbaa476f Real time sky light capture does not accept dynamic draws. This is made clear to avoid crashes.
#rb krzysztof.Narkowicz
#jira https://jira.it.epicgames.com/browse/UE-145490
#preflight https://horde.devtools.epicgames.com/job/622f2dec505788e09ffb416b

#ROBOMERGE-AUTHOR: sebastien.hillaire
#ROBOMERGE-SOURCE: CL 19373077 in //UE5/Release-5.0/... via CL 19376179
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19376915 by sebastien hillaire in ue5-main branch]
2022-03-14 15:31:21 -04:00
Jimmy Andrews
85aa3a058b Add an async physics build for dynamic mesh component
To support this, adds an AggGeom to the dynamic mesh component, which collision update functions should update instead of the one on the current BodySetup. This ensures new collision changes are not overwritten by an async build replacing the BodySetup.

#rb rinat.abdrashitov
#rb ryan.schmidt
#preflight 622c179f902b7ca699efb24a

[CL 19366917 by Jimmy Andrews in ue5-main branch]
2022-03-11 23:38:07 -05:00
ryan schmidt
3d69daa9d2 ModelingComponents: disable DynamicMeshComponent in realtime sky capture by default. Results in crash in 5.0.
#rb semion.piskarev
#preflight 622a4b40611f10dd07b68895
#jira UE-145360
#lockdown simon.tourangeau
#rnx

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 19340611 in //UE5/Release-5.0/... via CL 19349020
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v926-19321884)

[CL 19349511 by ryan schmidt in ue5-main branch]
2022-03-11 00:36:19 -05:00
lonnie li
5d135d0aa8 ModelingTools: Fixed race condition when setting override render material on preview mesh in BakeTexture & BakeAll.
#rb jimmy.andrews
#rnx
#jira UE-142326
#preflight 62075a203a5afc57e3bbf75c
#lockdown aurel.cordonnier

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18980712 in //UE5/Release-5.0/... via CL 18980929 via CL 18981207
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18981374 by lonnie li in ue5-main branch]
2022-02-14 12:20:58 -05:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
ryan schmidt
6ad26b69f0 rename UE::Geometry::TTransform3 to TTransformSRT3, update references
#rb none
#rnx
#jira UE-139757
#preflight 61f572d9e52a8a4a910990f1

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18784197 in //UE5/Release-5.0/... via CL 18784203 via CL 18784222
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18784226 by ryan schmidt in ue5-main branch]
2022-01-29 14:37:53 -05:00
tyson brochu
e3e53104c1 [Backout] - CL18520624
#rb ryan.schmidt

Original CL Desc
-----------------------------------------------------------------
UDynamicMesh: Add a bEnforceAttributeInvariants flag to the EditMesh function. If it's false, don't try to enable all required mesh attributes after the edit occurs.

Modify the DiscardMeshAttributes function in Geometry Script to not enforce attribute invariants -- otherwise the function does nothing.

#rnx
#rb aurel.cordonnier
#preflight 61d5d3f32e0e436c726cacd8
#preflight 61e1db6e00246899a94e9baf

#ROBOMERGE-AUTHOR: tyson.brochu
#ROBOMERGE-SOURCE: CL 18622813 in //UE5/Release-5.0/... via CL 18622818 via CL 18622830
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18622849 by tyson brochu in ue5-main branch]
2022-01-14 15:39:06 -05:00
semion piskarev
129b2f567c MeshModelingTools: Fix DynamicMeshSceneProxy fast UV update not updating all UV channels.
#rb Lonnie.Li, Ryan.Schmidt
#rnx
#jira UE-138287
#preflight 61d8949c322ebb01f71c70c9

#ROBOMERGE-AUTHOR: semion.piskarev
#ROBOMERGE-SOURCE: CL 18549516 in //UE5/Release-5.0/... via CL 18549549
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18549588 by semion piskarev in ue5-release-engine-test branch]
2022-01-07 14:48:09 -05:00
tyson brochu
7269e170f3 UDynamicMesh: Add a bEnforceAttributeInvariants flag to the EditMesh function. If it's false, don't try to enable all required mesh attributes after the edit occurs.
Modify the DiscardMeshAttributes function in Geometry Script to not enforce attribute invariants -- otherwise the function does nothing.

#rnx
#rb aurel.cordonnier
#preflight 61d5d3f32e0e436c726cacd8

#ROBOMERGE-AUTHOR: tyson.brochu
#ROBOMERGE-SOURCE: CL 18520624 in //UE5/Release-5.0/... via CL 18520630
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18520641 by tyson brochu in ue5-release-engine-test branch]
2022-01-05 12:27:52 -05:00
ryan schmidt
517754bf03 GeometryFramework: expose View Mode Overrides flag as a setting on BaseDynamicMeshComponent. This flag controls how the mesh is drawn in different Editor View Modes, eg in Wireframe mode, if view mode overrides are disabled, the mesh will be drawn to the Z buffer to remove hidden lines. It also effects the various lighting-only modes. This change defaults the overrides to enabled, ie changing the previous behavior which disabled them, as otherwise DynamicMeshActor meshes are opaque in the standard Editor Wireframe mode.
#rb tyson.brochu
#rnx
#jira none
#preflight 619fe6b4ee100b68fa51fcf4

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18297199 in //UE5/Release-5.0/... via CL 18297201
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18297209 by ryan schmidt in ue5-release-engine-test branch]
2021-11-25 17:01:03 -05:00
michael balzer
b8a1c9b6cf GeometryCore: Remove ExplicitUseGeometryMathTypes.h
#ROBOMERGE-AUTHOR: michael.balzer
#ROBOMERGE-SOURCE: CL 18227685 in //UE5/Release-5.0/... via CL 18229350
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18231457 by michael balzer in ue5-release-engine-test branch]
2021-11-17 19:02:44 -05:00
ryan schmidt
a3624c42d3 GeometryFramework:
- add DynamicMeshComponent::SetComplexAsSimpleCollisionEnabled(), SetDeferredCollisionUpdatesEnabled() to handle some common component variable configuration in BP.
- expose DynamicMeshComponent::UpdateCollision()
GeometryScripting:
- pass UDynamicMesh TargetMesh as parameter to GeneratedDynamicMeshActor::OnRebuildGeneratedMesh(), to simplify BPs and leave open the possibility of updating a compute mesh separate from the actual Component mesh
- Automatically enable (then disable) deferred collision updates on DynamicMeshComponent in AGeneratedDynamicMeshActor::ExecuteRebuildGeneratedMeshIfPending, otherwise every GeometryScript node will rebuild collision (!)
#rb none
#rnx
#jira none
#preflight 6182abf261c9270001790212

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18056478 in //UE5/Release-5.0/... via CL 18056493
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 18056503 by ryan schmidt in ue5-release-engine-test branch]
2021-11-04 10:22:38 -04:00
matija kecman
1e25b7bd06 Add WriteOBJ function for FDynamicMeshAABBTree3 and ReadOBJ function useful to inline small obj files
Also do some refactoring to pass settings structs which improve readability when setting options, reduce the need to change call sites due to signature changes, and allow overloading of Read/Load functions which return some type

#rb
#rnx
#jira none
#preflight

#ROBOMERGE-AUTHOR: matija.kecman
#ROBOMERGE-SOURCE: CL 17829083 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v881-17767770)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17829101 by matija kecman in ue5-release-engine-test branch]
2021-10-15 10:32:03 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04:00
ryan schmidt
21cd57289b GeometryScript: automatically clear mesh before rebuild in GeneratedDynamicMeshActor. Expose ADynamicMeshActor members. Bump up size of "empty" mesh bounding box in DynamicMeshComponent to prevent log spam.
#rb none
#rnx
#preflight 615b2a842554620001ff5546

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17724133 in //UE5/Release-5.0/... via CL 17724136
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v879-17706426)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17724146 by ryan schmidt in ue5-release-engine-test branch]
2021-10-05 13:22:31 -04:00
ryan schmidt
88f6b02bc3 GeometryFramework: Add Raytracing support for Base/DynamicMeshComponent.
- add FRayTracingGeometry structures to FMeshRenderBufferSet for primary and secondary triangle indices
- add UpdateRaytracingGeometryIfEnabled() function which rebuilds these raytracing data structures. This does a full rebuild, not clear if any kind of incremental update is possible currently, to revisit in future.
- call the above in the various places where we modify the existing index/vertex buffers.
- add UPrimitiveComponent::GetDynamicRayTracingInstances() implementation, mirrors GetDynamicMeshElements() implementation, uses new DrawRayTracingBatch() function

#rb juan.canada
#rnx
#jira none
#preflight 6157507e2363e400012ed95f

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17696127 in //UE5/Release-5.0/... via CL 17696138
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17696156 by ryan schmidt in ue5-release-engine-test branch]
2021-10-01 16:01:41 -04:00
ryan schmidt
d4ff6d0195 GeometryScripting: move in-editor generated-mesh functionality from DynamicMeshActor to a subclass GeneratedDynamicMeshActor in experimental GeometryScriptingEditor module. Add EditorGeometryGenerationSubsystem to provide tick for mesh regeneration, instead of relying on Actor tick-in-Editor, which can be throttled by slate interaction (and is generally problematic).
#rb none
#rnx
#jira none
#preflight 6156250b9dc4c500012f56eb

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17685256 in //UE5/Release-5.0/... via CL 17685594
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v875-17642767)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17685601 by ryan schmidt in ue5-release-engine-test branch]
2021-09-30 20:07:42 -04:00
ryan schmidt
6437ecc4a1 GeometryCore: replace all usage of GeometryCore FVector3<T> with TVector<T>, remove FVector3<T> and GVector4<T>
#rb none
#rnx
#jira none
#preflight 614ce33574f7e70001ea822b

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17617027 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)
#ROBOMERGE[STARSHIP]: UE5-Release-Engine-Staging Release-5.0

[CL 17617043 by ryan schmidt in ue5-release-engine-test branch]
2021-09-23 19:38:55 -04:00
ryan schmidt
f52e84de3f GeometryFramework: add support for in-Editor deferred mesh regeneration for BP procedural mesh generators built with DynamicMeshActor
#rb none
#rnx
#jira none
#preflight 614910f211925a000172fc66

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17578679 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17578683 by ryan schmidt in ue5-release-engine-test branch]
2021-09-20 22:17:00 -04:00
ryan schmidt
39261ded6a GeometryFramework: add BP-exposed UDynamicMeshComponent::EnableComplexAsSimpleCollision() function
#rb none
#rnx
#jira none
#preflight 6143c0c44778fa00017926b9

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17546414 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17546422 by ryan schmidt in ue5-release-engine-test branch]
2021-09-16 20:16:44 -04:00
ryan schmidt
3cbc795fda GeometryFramework:
- UDynamicMesh Reset() functions now return themselves, configured as BP output pin, helps to make BP wiring cleaner
- added DynamicMeshComponent::ConfigureMaterialSet() and ::ValidateMaterials(), to allow material set to be updated from BP
- added BaseDynamicMeshComponent::SetNumMaterials() to support above
#rb none
#rnx
#jira none
#preflight 614271263c7c670001ae4afd

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 17531959 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v870-17433530)

[CL 17531972 by ryan schmidt in ue5-release-engine-test branch]
2021-09-15 21:24:22 -04:00