Commit Graph

496 Commits

Author SHA1 Message Date
cedric caillaud
008be9ebe8 Geometry Collection : static mesh root proxies component now updates with root transform and broken state
#rb Jeremy.Moore

[CL 32488873 by cedric caillaud in 5.4 branch]
2024-03-25 18:24:55 -04:00
benn gallagher
d42ee4a1ea Reduce severity of nav export warning in geoemtry collection. May be useful to enable when disagnosing nav issues but in editor modes the log messages are overly verbose and slow down movement of objects.
#rb michael.bao

[CL 32111523 by benn gallagher in 5.4 branch]
2024-03-07 21:07:03 -05:00
benn gallagher
d3ef04cead Expose fully decayed flag on geometry collection components
Gameplay systems may want to bind to the decayed event on a geometry collection, but if it's already fully decayed the event will never fire. In order to handle this we can expose the flag so gameplay can check first before binding to the event

#rb Shaun.Kime

[CL 32005132 by benn gallagher in 5.4 branch]
2024-03-04 18:47:59 -05:00
cedric caillaud
81250ea830 Geometry collection component : Fix crash in CreateRootProxyComponentsIfNeeded for components that do not have an owner assigned
- crash can happen when resetting the RestCollection while having a geometry collection asset open ( with a dataflow assigned )

#jira UE-207948

[CL 31807948 by cedric caillaud in 5.4 branch]
2024-02-26 12:30:46 -05:00
cedric caillaud
fe98e9d96b Fix geometry collection not triggering destruction visually
Fallout from 31782118

#rb shaun.kime, benn.gallagher

[CL 31800880 by cedric caillaud in 5.4 branch]
2024-02-26 07:50:07 -05:00
jeremy moore
99c6d526bc Add OnActorVisibilityChanged virtual function for UActorComponent.
SetActorHiddenInGame() now ends up calling this.
Override on GeometryCollectionComponent to update any custom renderer.
#rb aidan.mcdu, cedric.caillaud

[CL 31782189 by jeremy moore in 5.4 branch]
2024-02-23 18:05:20 -05:00
cedric caillaud
5bdfe67f76 Enable rendering root proxy meshes in editor when available for geometry collections
- change back to normal rendering when asset is selected in fracture editor

#rb Jeremy.Moore, benoit.deschenes

[CL 31739459 by cedric caillaud in 5.4 branch]
2024-02-22 18:07:51 -05:00
aidan mcdu
3e33257544 [Lime]
Integrating code that allows for geometry collections to actually be hidden when you ask them to.
Modifying minor BP flow funcitonality so that we don't hide the Geometry Collection for no reason, and we clean up the tempororay static mesh component that we created in order to generate the SM previews.
#rb Cory.Kolek

[CL 31668753 by aidan mcdu in 5.4 branch]
2024-02-20 20:43:04 -05:00
jeremy moore
8f74296bbb GeometryCollectionComponents that have root proxies will now create root proxy static mesh components when there is no other render method enabled.
This deals with an edge case with geometry collection custom renderers. Custom renderers don't run in edition mode, and in editor we would expect to have mesh data available instead. But for UEFN editor with cooked data, the mesh data may already be removed (because it is not needed in cooked game).
#rb Shaun.Kime
[FYI] cedric.caillaud

[CL 31642958 by jeremy moore in 5.4 branch]
2024-02-20 08:47:32 -05:00
chris caulfield
9801fbd5f3 Chaos - add FBodyInstance::bUseMACD flag to enable Motion-Aware Collision Detection per particle
- flag is also used by GeomrteyCollections
- wire flag through to Chaos particles in the ControlFlags structure

NOTE: this flag isn't actually being used yet. It will be connected to the MACD feature in an upcoming change.

#rb Benn.Gallagher

[CL 31577246 by chris caulfield in 5.4 branch]
2024-02-16 15:22:54 -05:00
cedric caillaud
5d66b2a140 Geometry collection : remove unused DummyBodyInstance property
Can save up to 400 bytes per component ( maybe lower based on which memory pool the component ends up be allocated in  )

#rb vincent.robert, chris.caulfield, benn.gallagher

[CL 31532134 by cedric caillaud in 5.4 branch]
2024-02-15 15:13:35 -05:00
jeremy moore
5dfb60d451 Defensive check against null RestCollection in PSO Precache.
#rnx
#rb cedric.caillaud

[CL 31493297 by jeremy moore in 5.4 branch]
2024-02-14 16:18:17 -05:00
cedric caillaud
585d398e0c Geometry collection : fix removed piecers failing to shrink when the feature is enabled
- the issue was a consequence of the component space transforms computation optimization
- the code responsible to update the scale of the pieces now properly mark the component space transforms dirty  so the rendering reads the updated ones

#jira UE-202204
#rb Benn.Gallagher, vincent.robert

[CL 31483889 by cedric caillaud in 5.4 branch]
2024-02-14 13:23:59 -05:00
vincent robert
fd9ac9027f Make consistent API by using GetX, SetX, GetP and SetP for physics particles
#jira UE-202397, PLAY-14685
#rb chris.caulfield, alex.mcadams, cedric.caillaud

[CL 31383179 by vincent robert in 5.4 branch]
2024-02-12 10:54:32 -05:00
jason kanagaratnam
bb4b20abc6 Fixed a null pointer crash if a static mesh had multiple physics proxy mesh entries and one of them was null
#rnx

[CL 31269855 by jason kanagaratnam in 5.4 branch]
2024-02-07 15:49:37 -05:00
cedric caillaud
1b19ba3ddb Unshelved from pending changelist '30895702':
Fix geometry collection dynamic data replication
- Some members of the structure were not properly netserialized
- Root data was always ignore
- Dynamic and static rep data were sharing the same VersionProcessed

#rb Chris.Caulfield, michael.bao

[CL 31244308 by cedric caillaud in 5.4 branch]
2024-02-06 21:10:28 -05:00
vincent robert
5d815efa0a Store velocities and rotations in single precision in Physics particles
This is saving 40 bytes per particle
#rb chris.caulfield

[CL 31177006 by vincent robert in 5.4 branch]
2024-02-05 11:53:37 -05:00
michael bao
e9e7c49cce if UGeometryCollectionComponent::SetSimulatePhysics needs to initialize the physics proxy it should go through the route of recreating the physics state to ensure that the physics state gets destroyed when the component is destroyed
#rb cedric.caillaud, Todd.Eckert

[CL 31128383 by michael bao in 5.4 branch]
2024-02-02 11:52:51 -05:00
jon sourbeer
15deed6595 Fix for incorrect trace geometry being generated
[REVIEW] [at]cedric.caillaud [at]michael.bao [at]sergio.gardeazabal
#rb michael.bao, Sergio.Gardeazabal

[CL 30946034 by jon sourbeer in 5.4 branch]
2024-01-26 18:00:05 -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
kenzo terelst
24051b2cbf Rename FComponentPSOPrecacheParams to FMaterialInterfacePSOPrecacheParams - use shared version defined in PSOPrecache.h so it can be used outside of FPrimitiveComponent as well
[CL 30629794 by kenzo terelst in ue5-main branch]
2024-01-16 04:04:28 -05:00
chris caulfield
55beea5fe8 Chaos - sleeping fixes and behaviour improvement
- add debug draw to visualize sleep state
- implement SleepFamily system that was missing from Chaos (SleepThesholdMultiplier)
- SetV and SetW now wakes particles
- reduced default velocity smoothing used by sleep thresholds
- fix smoothed velocity for particles in awake islands (minor issue that made it slightly harder to go to sleep)
- don't use smoothed velocity for floating particles
- system top alloe reduced sleep thresholds for floating particles (cvar controlled, disable dby default)

#rb benn.gallagher

[CL 30608421 by chris caulfield in ue5-main branch]
2024-01-12 19:37:04 -05:00
sarah noonan
467c0e0269 Release unused slack memory in geometry collection rep data.
#rb cedric.caillaud, Michael.Forot

[CL 30502426 by sarah noonan in ue5-main branch]
2024-01-09 07:41:49 -05:00
vincent robert
091054745a No creating particle and geometry on Game Thread when creating a Geometry Collection.
Still creating geometry on the Physics Thread, otherwise a partial destruction issue occurs.
Setup query flag after particle and geometry creation
#rb cedric.caillaud
#fy chris.caulfield

[CL 30386282 by vincent robert in ue5-main branch]
2023-12-18 19:27:18 -05:00
cedric caillaud
9842d58a96 geometry collection : fix pre-placed geometry collection not properly setting collision when calling SetUseStaticMeshCollisionForTraces from construction script
- When placing in editor, construction script runs before physics proxy is set , which was not setting the collision properly
- Move the proxy side flag to be part of the simulation parameters, so that when the proxy get created it is properly set from the component bUseStaticMeshCollisionForTraces property

#rb emanuel.masciarelli, michael.bao, vincent.robert

[CL 30378857 by cedric caillaud in ue5-main branch]
2023-12-18 12:52:01 -05:00