Commit Graph

266 Commits

Author SHA1 Message Date
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
cedric caillaud
035af94e52 Geometry collection : add a property to control at which level position and velocity are corrected for clusters
The smaller the number the more bandwidth will be saved by not sending the position and velocities to the client

#rb benn.gallgher, vincent.robert, michael.bao
#preflight 64371be51f33a0b34a417b7c

[CL 25020009 by cedric caillaud in ue5-main branch]
2023-04-12 20:46:15 -04:00
steven barnett
47da03070f Add UGeometryCollectionComponent::SetDamageThreshold so that we can call RecreatePhysicsState when damage threshold changes.
#preflight https://horde.devtools.epicgames.com/job/64371fa7f12d5de7058ea924
#rb cedric.caillaud

[CL 25019216 by steven barnett in ue5-main branch]
2023-04-12 19:46:27 -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
a2c26ca114 Fix nullptr crash in ISM pool debug component when ISM components have been put on free list.
#preflight 643421887536ac6b78910619

[CL 24979037 by jeremy moore in ue5-main branch]
2023-04-10 12:36:14 -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
cedric caillaud
f125045cb1 Geometry collection : add blueprint functions to get initial and current transform of the root node of the collection
[FYI] logan.harvell, Cody.Haskell
#rb none
#preflight 642cee708f078cc703c8d8e9

[CL 24924259 by cedric caillaud in ue5-main branch]
2023-04-05 02:09:40 -04:00
jeremy moore
36fbd59bf5 Move creation of ISMPoolActor to outside of place where it may be called in a construction script.
#preflight 642c79d08f078cc703a5a0df

[CL 24920916 by jeremy moore in ue5-main branch]
2023-04-04 19:18:34 -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
jeremy moore
815fa2643c Add support for setting custom renderer class on geom collection asset or component.
Deprecate oldd ISMPool setting so that it uses UGeometryCollectionISMPoolRenderer which has old behavior.
#preflight 642a3f33c6769c60822ad366
#preflight 642ab6c1d6069e71b17521e7

[CL 24892140 by jeremy moore in ue5-main branch]
2023-04-03 10:06:24 -04:00
jeremy moore
13505f9e4e Fix root component not visually updating with Geometry Collection ISMPool renderer.
#preflight 6427404a50546ea336d2f5d0

[CL 24884458 by jeremy moore in ue5-main branch]
2023-04-01 02:38:44 -04:00
jeremy moore
9114575fd0 Add back bAutoAssignISMPool to GeometryComponent.
#preflight 64271d5438075fa13f5bff61

[CL 24876940 by jeremy moore in ue5-main branch]
2023-03-31 15:30:41 -04:00
jeremy moore
4f424c08a5 Move geometry collection ISM Pool management code into custom renderer object.
Allows us to have different rendering strategies for geometry collection.
#preflight 64260c6b9621ba9cb46bf178

[CL 24868103 by jeremy moore in ue5-main branch]
2023-03-31 02:58:27 -04:00
sebastien lussier
ca273183ff World Partition - HLOD: Added UGeometryCollectionComponent HLOD support
* Added CreateProxyComponents() method which creates static mesh component(s) from the collection proxy meshes
* Override IsHLODRelevant()
#rb jeanfrancois.dube
#preflight skip

[CL 24820137 by sebastien lussier in ue5-main branch]
2023-03-28 11:45:57 -04:00
cedric caillaud
d26d360663 Add support for custom primitive data for geomtetry collection
#rb jeremy.moore
#preflight 6421e051c42c7fd1cb99a33d

[CL 24811720 by cedric caillaud in ue5-main branch]
2023-03-27 18:52:40 -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
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
cedric caillaud
1d819cbbb9 Fix issues with regenerating geometry collection using the destruction builder script
- Fixed broken rendering in thumbnail after re-exporting a geometry collection a different layout / number of transforms
- Loaded components ( including the one in blueprints ) are now properly updated when the geometry collection asset is updated
- Fixed the thumbnail renderer crashing after re-exporting an asset and opening its editor
- Added check for size of arrays passed to the geometry group based bounds calculation

#rb none
#preflight 64115af170639dfc94a497b5

[CL 24656950 by cedric caillaud in ue5-main branch]
2023-03-15 12:59:39 -04:00
cedric caillaud
02baac011d geometry collection : make scale on removal read write for blueprints
#rb trivial
#preflight none

[CL 24643822 by cedric caillaud in ue5-main branch]
2023-03-14 16:45:20 -04:00
michael bao
d32777373c introduce a new FPhysicsObjectId alias to add some type clarity to the various functions on the IPhysicsComponent that deal with this id
[FYI] cedric.caillaud
#preflight 640f527f28026468d94594f8

[CL 24621833 by michael bao in ue5-main branch]
2023-03-13 17:11:51 -04:00
matt breindel
219568ba36 New GeometryCollection helpers for getting allocation info.
[REVIEW] [at]*chris.caulfield
#preflight 640b84c3c41a0a2a77b91fcd

[CL 24601861 by matt breindel in ue5-main branch]
2023-03-10 20:20:40 -05:00
cedric caillaud
411a3d5a09 Geometry collection : optimize scale on remove feature
- Add oiptions on the GC asset to disable scale on remove, saving transform computation
- Remove the "UniformScale" attribute on the dynamic collection ( saving a FTransform per piece per compoinent )
- Move update of transform from decay from CalculateGlobalMatrices to the post physics update callback
- Make better use of the collection decay facade throughout the remove on sleep and remove on break code

#rb brice.criswell, benn.gallagher, matt.breindel
#preflight 640a9b767e654e2e655b335a

[CL 24601490 by cedric caillaud in ue5-main branch]
2023-03-10 20:05:11 -05: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