114 Commits

Author SHA1 Message Date
jimmy andrews
204b202d57 mitigate copy paste not working for dynamic meshes > 1000 tris in some cases, by raising the limit to 200,000 tris before we change to the 'faster but broken in half the cases' method, and surfacing the failure with a toast
#jira UE-211348
#rb tyson.brochu

[CL 36759658 by jimmy andrews in 5.5 branch]
2024-10-01 19:50:31 -04:00
tiago costa
278827a78a [Ray Tracing Instance Gathering Refactor] Refactored dynamic ray tracing instance gathering.
- Deprecated FRayTracingMeshResourceCollector and FRayTracingMaterialGatheringContext.
- Instead GetDynamicRayTracingInstances(...) implementations should use the new FRayTracingInstanceCollector which extends FMeshElementCollector with ray tracing functionality (AddRayTracingInstance/AddReferencedGeometryGroup/AddRayTracingGeometryUpdate)
    - this is similar to GetDynamicMeshElements(...) using FMeshElementCollector.
    - FRayTracingInstanceCollector uses a dedicated RHI command list to gather instances, which is different than FRayTracingMaterialGatheringContext which used the immediate command list.
- Moved dynamic instance gathering logic in RayTracing.cpp into a new class FDynamicRayTracingInstancesContext laying the foundation of gathering dynamic instances in parallel threads on follow up changes.

#rb Kenzo.Terelst

[CL 36034312 by tiago costa in ue5-main branch]
2024-09-05 05:19:35 -04:00
jimmy andrews
fca0f90da5 implement the uprimitivecomponent material slot name interfaces on base dynamic mesh component so that dynamic mesh components work with code/BPs that access component materials via slot names
#rb David.Hill

[CL 35832805 by jimmy andrews in ue5-main branch]
2024-08-27 14:39:28 -04:00
jeremy moore
2854e73533 Move MeshPaintVisualize global functions and data into their own file and out of SceneManagement.h
To maintain backward compatibility for previous engine version include orders, SceneManagement.h includes the new MeshPaintVisualize.h.

[CL 35808897 by jeremy moore in ue5-main branch]
2024-08-26 15:58:31 -04:00
henrik karlsson
78ba369d2c Fixed linker errors on some console platform when building modular builds. Fixes involves moving ctor/dtor and friends from header to cpp and dll import/export
[CL 35710553 by henrik karlsson in ue5-main branch]
2024-08-21 13:44:16 -04:00
jeremy moore
b6e9d42d3c Deprecated direct access to VertexColor visualization global variables.
The visualization is being extended to cover all mesh painting modes and this deprecation step will help licensees who have copy/pasted setup code into their own scene proxies.

[CL 35597615 by jeremy moore in ue5-main branch]
2024-08-16 12:21:27 -04:00
jeremy moore
8ae34caab5 Remove duplication of logic to create a vertex color material proxy for dynamic element style debug rendering.
#rb cedric.caillaud, Jason.Nadro

[CL 35572481 by jeremy moore in ue5-main branch]
2024-08-15 14:58:32 -04:00
jimmy andrews
2de22405ad change IsElementSelectable name to AllowsGeometrySelection
#rb lonnie.li

[CL 35042149 by jimmy andrews in ue5-main branch]
2024-07-23 19:30:24 -04:00
jimmy andrews
c019a51750 add IsElementSelectable concept to dynamic mesh components, so we can disable element selection for generated dynamic meshes
Expose SetIsElementSelectable method to BP, so it can be re-enabled if desired

#rb lonnie.li

[CL 34943695 by jimmy andrews in ue5-main branch]
2024-07-19 16:32:46 -04:00
steve robb
f40be2d759 Fixed some 'deprecated' FString usage.
#rb james.hopkin

[CL 34603027 by steve robb in ue5-main branch]
2024-06-24 09:25:50 -04:00
kevin macaulayvacher
276d09f6df Remove all simple usage of REN_ForceNoResetLoaders from the codebase since the flag has been deprecated and currently does nothing. Simple in this case is direct use of the flag with no conditional logic. More complex uses were removed in another change.
#rnx
#rb Francis.Hurteau

[CL 34424068 by kevin macaulayvacher in ue5-main branch]
2024-06-17 11:55:02 -04:00
chris kulla
cd6d6b5fca Consistently use FPrimitiveUniformShaderParametersBuilder to set properties on dynamic primitives
This is to catch all variables that can impact shading (such as holdouts). This extends the fix that was done for GeometryCache actors.

#jira UE-206282
#rb aleksander.netzel, Ola.Olsson

[CL 33983165 by chris kulla in ue5-main branch]
2024-05-29 15:10:43 -04:00
jimmy andrews
51884fb8b9 Add option to remove extra material slots when configuring materials on a dynamic mesh component from an array, so that it will only have the materials in the array + make that the default behavior
#rb David.Hill

[CL 33319308 by jimmy andrews in ue5-main branch]
2024-04-30 01:03:41 -04:00
chris kulla
085005b226 Ray Tracing: Ensure that ReverseCulling does not depend on the matrix determinant and observe ReverseCulling where appropriate
The DXR specification states that backface culling is not affected by the transform, so there is no need to set this flag based on the transform determinant.

Additionally, update the creation of mesh batches to take into account the reverse culling flag on the primitive (when present) for consistency with the raster behavior.

#rb Krzysztof.Narkowicz

[CL 33212381 by chris kulla in ue5-main branch]
2024-04-24 16:43:23 -04:00
david hill
b6b8fe44a4 Expose mehtods that create and update FMeshRenderBufferSets from FDynamicMesh3 so this can be used outside the DynamicMeshSceneProxy.
#rb Jimmy.Andrews

[CL 33008830 by david hill in ue5-main branch]
2024-04-16 14:28:43 -04:00
sergio gardeazabal
915d52e8d4 [ChaosVD] Initial Implementation of CVD as a standalone program
Now CVD can be built as an unreal program (in addition to being an editor tool).


#jira UE-191890
#rb Benn.Gallagher

[CL 32844991 by sergio gardeazabal in ue5-main branch]
2024-04-09 19:24:14 -04:00
jimmy andrews
de217cb618 add a limit to the number of simultaneous dynamic mesh component distance field builds that can be active
+ make the background thread operate on a (geo-only) copy of the mesh (because ProcessMesh doesn't seem to actually lock access to the mesh, and can't really since code can easily grab the mesh pointer via GetMesh() also)
+ make the post-compute MarkRenderStateDirty() call happen on the game thread (on tick), so it won't be called at an unsafe time
#rb David.Hill

[CL 32579407 by jimmy andrews in ue5-main branch]
2024-03-28 11:32:35 -04:00
jimmy andrews
416ad3e977 Initial Lumen support for DynamicMeshComponent
#rb David.Hill, Krzysztof.Narkowicz

[CL 32551494 by jimmy andrews in ue5-main branch]
2024-03-27 14:27:24 -04:00
jimmy andrews
2514e21129 make dynamic mesh collision updates also update the preview collision visualization
#rb David.Hill

[CL 32524004 by jimmy andrews in ue5-main branch]
2024-03-26 17:34:12 -04:00
jimmy andrews
3cc1bb730b fix issue where the static draw path was still run when it was not intended to be enabled +
disable fast vertex/index buffer updates when using static draw path for dynamic mesh component, and more consistently lock the dynamic mesh proxy buffersets when accessing them

#jira UE-210165
#rb David.Hill

[CL 32368392 by jimmy andrews in ue5-main branch]
2024-03-20 11:50:05 -04:00
jimmy andrews
961bfeea01 Add cvar geometry.DynamicMesh.MaxComplexCollisionTriCount to prevent dynamic mesh components with many triangles from auto-generating complex collision.
+ Make complex collision wireframe only render on the base dynamic mesh proxy if the complex collision is provided.
+ add helper to update physics/etc consistently after mesh changes
#rb rinat.abdrashitov

[CL 32003960 by jimmy andrews in ue5-main branch]
2024-03-04 18:02:09 -05:00
jimmy andrews
3931400baa Add option for dynamic mesh component to use static render path instead of dynamic
#rb David.Hill

[CL 31949704 by jimmy andrews in ue5-main branch]
2024-03-01 13:43:42 -05:00
tiago costa
03f7f8f626 Call FRayTracingGeometry::IsValid() instead of just checking that RayTracingGeometryRHI is not null
[FYI] aleksander.netzel

[CL 31840561 by tiago costa in ue5-main branch]
2024-02-27 10:26:42 -05:00
jimmy andrews
956359aede add UVs to dynamic mesh component's physics mesh
#rb David.Hill

[CL 31772380 by jimmy andrews in ue5-main branch]
2024-02-23 14:43:16 -05:00
jimmy andrews
a49f583f54 add physics materials to dynamic mesh component's physics mesh
#rb david.hill

[CL 31703778 by jimmy andrews in ue5-main branch]
2024-02-21 18:46:48 -05:00