37 Commits

Author SHA1 Message Date
trapper mcferron
3d8ffe15c9 #rb jeremy.moore
If bAllowPerInstanceRemoval was set, an instance would be removed if the transform scale is 0 and readded when transform scale is valid.  The process of removing it erases its custom instance data and there is no way to restore it when the instance is readded.

This CL makes a shadow copy of the custom instance data if bAllowPerInstanceRemoval is set which allows the process of readding the instance to also restore its custom instance data.


#changelist validated
#virtualized

[CL 31237346 by trapper mcferron in 5.4 branch]
2024-02-06 18:23:19 -05:00
steve robb
f029468598 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30729174 by steve robb in ue5-main branch]
2024-01-19 16:41:35 -05:00
jeremy moore
f3aa01fb82 Add ISMPool option to not pay cost of ISM component update and ISMPool Tick associated with preallocation.
[CL 29683832 by jeremy moore in ue5-main branch]
2023-11-13 10:09:25 -05:00
jeremy moore
d2a0916428 ISMPool, fix issue where preallocation queue contains raw object pointers that can be invalid by the time we process the entries.
Use weak object pointers instead.

[CL 29533102 by jeremy moore in ue5-main branch]
2023-11-07 16:19:51 -05:00
benn gallagher
0b807dc2c1 Added the ability to set ISM components in Geometry Collection ISM pools to just use their parent bounds and change their transform mode to absolute.
This allows the actor containing the ISM components to have full control over the root transforms of each ISM for faster or customised processing.

#rb Cedric.Caillaud, Jeremy.Moore

[CL 29419013 by benn gallagher in ue5-main branch]
2023-11-03 16:01:49 -04:00
tiago costa
6b9dce4b74 Added flag to control whether ISM cast far shadow in FGeometryCollectionISM.
#rb jeremy.moore

[CL 28975220 by tiago costa in ue5-main branch]
2023-10-20 14:52:53 -04:00
jeremy moore
f987a64307 Add component keep alive option on ISMPool. This keeps ISM components alive when the last instance is removed. This avoids costly scene proxy creation for components that regularly switch between 0 and N instances.
The behavior is controlled by r.ISMPool.ComponentKeepAlive.
The old free list behavior is still supported and is now controlled by r.ISMPool.ComponentRecycle.
Both cvars can be safely enabled/disabled at runtime for testing.
Note that keep alive will effectively override recycling if both are enabled, since no components are released to the recycling free list.
#rb Cedric.Cauillaud

[CL 28966562 by jeremy moore in ue5-main branch]
2023-10-20 11:08:43 -04:00
jeremy moore
59065aca8d Add WPO evaluate flag for ISMPool.
Setting this can allow us to take the optimized path on nanite.

[CL 28890104 by jeremy moore in ue5-main branch]
2023-10-18 16:50:31 -04:00
jeremy moore
9549ec6fe4 ISMPool per primitive max distance cull is now controlled with a flag rather than always set.
[CL 28829415 by jeremy moore in ue5-main branch]
2023-10-16 22:31:55 -04:00
jeremy moore
08ee3f9d09 Remove HISM support from ISMPool.
Raw ISM is faster for all our use cases.
HISM doesn't support permanant instance IDs.
#tests PIE

[CL 28757447 by jeremy moore in ue5-main branch]
2023-10-13 12:39:49 -04:00
jeremy moore
17c701613f ISMPool: Per instance removal is a setting on the mesh group instead of a cvar.
[CL 28738306 by jeremy moore in ue5-main branch]
2023-10-12 20:59:48 -04:00
jeremy moore
9a3a88cf4f [Backout] - CL28697434
[FYI] bob.tellez
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL28695832
[FYI] Jeremy.Moore
Original CL Desc
-----------------------------------------------------------------
ISMPool changed to use the new ISM InstanceId permanant handles.
ISMPool can remove/re-add instances from the ISM depending on whether they are being updated with a zero transform.
This can help keep ISM GPUScene cost down in the case where we are hiding (now removing) many instances.

[CL 28699352 by jeremy moore in ue5-main branch]
2023-10-11 23:18:41 -04:00
bob tellez
cafa30c81a [Backout] - CL28695832
[FYI] Jeremy.Moore
Original CL Desc
-----------------------------------------------------------------
ISMPool changed to use the new ISM InstanceId permanant handles.
ISMPool can remove/re-add instances from the ISM depending on whether they are being updated with a zero transform.
This can help keep ISM GPUScene cost down in the case where we are hiding (now removing) many instances.

[CL 28697470 by bob tellez in ue5-main branch]
2023-10-11 21:57:32 -04:00
jeremy moore
033caca80d ISMPool changed to use the new ISM InstanceId permanant handles.
ISMPool can remove/re-add instances from the ISM depending on whether they are being updated with a zero transform.
This can help keep ISM GPUScene cost down in the case where we are hiding (now removing) many instances.

[CL 28695869 by jeremy moore in ue5-main branch]
2023-10-11 20:59:44 -04:00
jeremy moore
482c757cdb Allow multiple meshids in a meshgroup to have the same staticmesh description
[CL 28661395 by jeremy moore in ue5-main branch]
2023-10-11 09:23:22 -04:00
jeremy moore
2c1068f688 Add support to set a custom instance data slot on geometry collection ISM pool instances.
[CL 27630881 by jeremy moore in ue5-main branch]
2023-09-06 08:12:44 -04:00
jeremy moore
e4b96a0b1d Add garbage collection to ISM pool.
[CL 27054469 by jeremy moore in ue5-main branch]
2023-08-11 20:20:15 -04:00
jeremy moore
625bf43130 Add option to spatially divide ISMs in the ISMPool.
Enable ISM pooling by default so that spatially placed ISMs can be recycled easily when moving through a streaming world.

[CL 27044402 by jeremy moore in ue5-main branch]
2023-08-11 16:28:11 -04:00
jeremy moore
49cab1e61d Set MDC stat categories for some known subsystems.
[CL 26725198 by jeremy moore in ue5-main branch]
2023-07-31 18:48:44 -04:00
jeremy moore
720a94d498 GeometryCollection ISMPool add support for ISM GPU LOD.
Also add support for Velocity from WPO option and tidy up boolean options into flags.

[CL 26134927 by jeremy moore in ue5-main branch]
2023-06-20 17:15:13 -04:00
henrik karlsson
5db685f97d [Engine]
* Moved dllexport from type to methods/staticvar in all Engine runtime code. This improves compile times, memory and performance in dll builds

[CL 26082269 by henrik karlsson in ue5-main branch]
2023-06-17 18:13:06 -04:00
jeremy moore
a0faa29fa4 Add tag support to ISMPool.
ISMPool uses serialized version of the default primitive custom data to allow us to copy paste ISMPools for debugging.
ISMPool uses fast version of hash combine.
Expose ISMPool actors getter from ISMPool subsystem.

[CL 25886022 by jeremy moore in ue5-main branch]
2023-06-08 19:39:06 -04:00
cedric caillaud
d1caeada52 Geometry collection rendering optimization
- Optimize the ISM Pool to use the instance static mesh array API for passing transform , avoiding local array allocation
- avoid sorting the removal indices twice by using the new instance static mesh view

#rb jeremy.moore, benn.gallagher
#preflight 646eccdc4422ba05f44bb942

[CL 25633600 by cedric caillaud in ue5-main branch]
2023-05-25 18:53:40 -04:00
jeremy moore
609018f743 Add support for custom primitive data to ISM Pool
#preflight 64553f1bed7ffaa0f5cd919b

[CL 25365376 by jeremy moore in ue5-main branch]
2023-05-06 02:08:34 -04:00
jeremy moore
d6d0ae73fe Support preallocation of ISMs in the ISMPool
#preflight 643ef1609566b614505e2060

[CL 25096541 by jeremy moore in ue5-main branch]
2023-04-18 18:06:56 -04:00