Fix nanite geometry collection not visually rotating on gizmo driven rotations.
Needed to reapply modified instance transforms after primitive transform update.
This is because, for nanite, Geom Collection GPU instance transforms are stored relative to the relative (non-rotated) world transform.
This bug wasn't visible for non-gizmo use movement cases which go through full scene proxy recreate.
This bug wasn't visible for gizmo translation use case because this is in the relative transform.
#rb cedric.caillaud
[CL 36344776 by jeremy moore in 5.5 branch]
- 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]
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]
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]
#rb Jimmy.Andrews
#tests Use fracture mode with nanite geometry collection to confirm that selection works.
[CL 34902727 by jeremy moore in ue5-main branch]
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]
Issue is that geometry collection scene proxies were always created at the rest transform state, and then the current transforms were set at the first update. This would could cause a reset flicker.
Also the first update wouldn't happen if the component was at rest, so visually it would go back to the rest state and stay there.
The fix is to get the current DynamicData during scene proxy construction.
#rb cedric.caillaud
#jira UE-210150
[CL 32331095 by jeremy moore in ue5-main branch]
Use the RestCollection to access those attributes instead.
#rb cedric.caillaud, vincent.robert, Benn.Gallagher
[CL 29246315 by titouan deslandes in ue5-main branch]
- Removed old vertex-attribute centered buffers & useless translation code & replace with GPU-scene centric data
- Made the instance data persistent over scene proxy re-creates.
- Tracks per-instance data changes in the ISM & implement delta updates, remove need to call "MarkRenderStateDirty" for most instance updates
- Added preliminary ID-based interface for ISM such that users can forego needing to match the internals (e.g., remove swap, required when using indices).
- Unified the instance data use in the renderer (removed mix of old & new buffers and processing sites) - all code now sees orthogonalized transforms, the same as is in GPU-Scene.
- Added FInstanceSceneDataBuffers and moved instance data buffer arrays to that from the Primitive proxy
- Added FISMInstanceDataManager, which is responsible for tracking changes & dispatching updates. The ISMC owns one of these.
- Instance data update tasks are async and waits are only done when needed, e.g., for GPU-scene update moving this off RT and later in the frame.
- Added FInstanceDataSceneProxy, which is the owner of the scene data buffers and is updated by the manager by way if a shared reference with the primitive proxy.
- Removed FPerInstanceRenderData, ISMC::PerInstanceRenderData
- Removed FInstanceUpdateCmdBuffer
- Lumen, GPUScene, SceneCulling, RT, DF all now retrieve data from FInstanceSceneDataBuffers rather than a mix of previous buffers. All now use the primitive-relative space.
- Geometry Collection & Spline Mesh now manage FInstanceSceneDataBuffers, since they manipulate instance data in one way or another.
- Mass: contained re-implementations of significant internals of ISMC, converted to ID-based interface
- PCG: minor changes to avoid touching ISM internals.
#jira UE-191955,PLAY-11918
#rb jamie.hayes,jeremy.moore,jonathan.bard,krzysztof.narkowicz,mieszko.zielinski,julien.lheureux,zach.bethel,aleksander.netzel,yuriy.odonnell
[CL 28371398 by ola olsson in ue5-main branch]