26 Commits

Author SHA1 Message Date
jeremy moore
c52fad955a Hide ISMPool ISMs when empty.
[CL 26075622 by jeremy moore in 5.3 branch]
2023-06-16 19:32:24 -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
ed11df56f0 ISMPool: If ISM component has no component transform then we can ignore the bWorldSpace flag. This makes the maths simpler in the ISM Update call.
This is a quick fix for a perf hot spot, but we can still improve the underlying ISM code here to avoid multiple transform inverts when updating multiple instances.
#preflight 646278c4aa3c584c0b07ea96

[CL 25479015 by jeremy moore in ue5-main branch]
2023-05-15 15:51:09 -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
jeremy moore
1dbe0a3999 Fix duplicated CVar
#preflight skip

[CL 25050220 by jeremy moore in ue5-main branch]
2023-04-14 17:06:14 -04:00
jeremy moore
8cd3ec16de ISM Pool sets ISM to use RemoveAtSwap remove behavior.
Assume RemoveAtSwap in group removal so that we can do local remapping logic and remove the more expensive delegate callbacks.
#preflight 64397c6a211b661dc418651a

[CL 25050206 by jeremy moore in ue5-main branch]
2023-04-14 17:05:40 -04:00
jeremy moore
ac9df1f5dc Add explicit remap arrays to the ISM Pool to manage mapping between the ISM Pool instance index and the ISM render instance index.
This costs some memory but makes the cost of instance removal much cheaper. We no longer need to loop and scan multiple arrays to find our instance to rename.
Added a bit more commenting around the code.
#preflight 6438851d9566b61450a1c45e

[CL 25039201 by jeremy moore in ue5-main branch]
2023-04-14 09:07:04 -04:00
jeremy moore
54f43f2240 Add MinLod option to ISMPool components.
#preflight 64349821b306e98c634b5019

[CL 24987424 by jeremy moore in ue5-main branch]
2023-04-10 23:19:28 -04:00
jeremy moore
e861e8645f Add support for ISMPool reverse culling flag. This allows us to potentially create two ISM components for left and right handedness if needed.
Add free list for ISMPool ISM component slots so that we can recycle them when the number of instances for a component becomes zero.
#preflight 642f0942427eda562650ef0b

[CL 24957562 by jeremy moore in ue5-main branch]
2023-04-06 17:29:18 -04:00
jeremy moore
5a74598a34 Better parameterization of ISM pool components.
Still work to do for recycling components that are empty.
#preflight 642b52164d26bcd1eb357be2

[CL 24906566 by jeremy moore in ue5-main branch]
2023-04-03 23:33:01 -04:00
kenzo terelst
b11faa9d8b Make sure delegates are removed on component destruction and move delegate ownership to component as well
#rb Jeremy.Moore
#preflight 641b401aa6092dfb8dbbafdd
#rnx

[CL 24756440 by kenzo terelst in ue5-main branch]
2023-03-22 19:44:46 -04:00
cedric caillaud
c5a77ae596 ISMPool, fix bug where processing batched transform were shifted by 1 after index 0
#rb kenzo.terelst
#preflight none

[CL 24750254 by cedric caillaud in ue5-main branch]
2023-03-22 13:08:11 -04:00
kenzo terelst
857a7c0207 - Use ISMComponent events on instance removed and index reallocated in the ISMPool to handle both ISM & HISM reordering on remove instances (Remove vs SwapRemove differences)
- Re-enable HISM by default for GeometryCollection proxy and leaf rendering

#rnx
#rb Cedric.Caillaud
#preflight 6419ff1e42618c85c40b6975

[CL 24740869 by kenzo terelst in ue5-main branch]
2023-03-21 17:54:35 -04:00
jeremy moore
4af0cb0770 Added ISM pool debug component.
Currently allows ISM selection and some debug bounds/stats.
#preflight 64090c8ca92b27de3c553c5c

[CL 24571870 by jeremy moore in ue5-main branch]
2023-03-09 00:00:20 -05:00
jeremy moore
644ac38dc2 GeometryCollection object can store custom instance data to pass to instances spawned in ISM pools.
Also add a per component custom data which, if present, is added to all ISM pool instances that the component generates.
#preflight 6409444bcf5fe1e28c0e065c

[CL 24571716 by jeremy moore in ue5-main branch]
2023-03-08 23:38:52 -05:00
jeremy moore
34bb7d78c3 Use AddInstances() from ISM Pool.
This gives a single HISM rebuild event instead of one for each instance added.
#preflight 6405fb733206d45d200c007a

[CL 24528554 by jeremy moore in ue5-main branch]
2023-03-06 15:17:02 -05:00
cedric caillaud
289ce53362 ISM Pool : fix preallocation of instance passing the total number of instance instead of the added ones
#rb kenzo.terelst, bryan.sefcik
#preflight 63fefba1e32cdb7d9a959e93

[CL 24469446 by cedric caillaud in ue5-main branch]
2023-03-01 15:41:06 -05:00
cedric caillaud
d57752d7f2 Geometry collection : add support for root proxy and leaf meshes to using ISM or HISM
- added cvar to control this
- updated ISMPool to take a pereferHISM option when registering a mesh

#rb jeremy.moore
#preflight 63ec1631f36e1a5ece8b9064

[CL 24225362 by cedric caillaud in ue5-main branch]
2023-02-14 20:54:11 -05:00
cedric caillaud
f0b522291e Geometry collection : Avoid physics state creation on ISM pool meshes
#rb trivial
[FYI] benn.gallagher
#jira UE-176045
#preflight 63e096fc78716a01e85e49b3

[CL 24040227 by cedric caillaud in ue5-main branch]
2023-02-06 18:00:32 -05:00
bryan sefcik
4b8a83790a Updated to use UE_INLINE_GENERATED_CPP_BY_NAME.
#jira
#preflight 637c388f170bc34a93587526

[CL 23244381 by bryan sefcik in ue5-main branch]
2022-11-22 20:17:33 -05:00
cedric caillaud
fb3e9ff339 Chaos : enable support for root proxy mesh for geometry collection ( work only with ISM at the moment )
#rb brice.criswell, michael.bao
#preflight 6359d21b5d49a96f7b127ffa

[CL 22850795 by cedric caillaud in ue5-main branch]
2022-10-29 03:00:57 -04:00
henrik karlsson
d138aa6804 Fixed a bunch of non-unity non-pch compile errors (missing includes)
#rb none
#preflight skipped

[CL 22713063 by henrik karlsson in ue5-main branch]
2022-10-22 17:33:07 -04:00
cedric caillaud
a579d1c640 Chaos : fix non-unity build for ISMPool changes
#rb trivial
#preflight none

[CL 22705195 by cedric caillaud in ue5-main branch]
2022-10-21 19:52:03 -04:00