Commit Graph

146 Commits

Author SHA1 Message Date
gerard martin
af9cc08041 [Mutable] Mesh Cache. Enable the reuse of USkeletalMeshes between CO.
Minimum changes to enable the reuse of USkeletalMeshes. CVar toggleable.

[REVIEW] [at]pere.rifa, [at]alexei.lebedev
#rnx

[CL 29414369 by gerard martin in ue5-main branch]
2023-11-03 14:21:25 -04:00
gerard martin
dec4d1c634 [Mutable] Added CO option to force generating only the MaxLOD on initial generation.
- Fixed InstanceDescriptorRuntimeHash not being updated.

[REVIEW] [at]alexei.lebedev, [at]pere.rifa
[FYI] [at]aaron.eady, [at]bhavan.vaishnav
#rnx

[CL 29404120 by gerard martin in ue5-main branch]
2023-11-03 09:34:38 -04:00
alexei lebedev
0226d8d187 #rnx
[FYI] gerard.martin

[CL 29403987 by alexei lebedev in ue5-main branch]
2023-11-03 09:30:32 -04:00
jordi rovira
c86004ea2c [mutable] Separate "DisableTextureStream" option into its own state flag instead of deducing it from other enums.
Add option to override this flag at compile time.
Force "None" optimization to disable streaming.
#rnx
[REVIEW] [at]alexei.lebedev [at]pere.rifa
#rb pere.rifa, alexei.lebedev

[CL 29403177 by jordi rovira in ue5-main branch]
2023-11-03 09:03:29 -04:00
gerard martin
f36771cccf [Mutable] Fix FScopeTimer class naming collision.
#tests non-unity build
#rnx

[CL 29084235 by gerard martin in ue5-main branch]
2023-10-25 07:05:08 -04:00
gerard martin
97b833d9e2 [Mutable] Added Update stats.
- Updated FLogBenchmarkUitl class to output only used stats.
- Corrected some wrongly reported stats.
- FLogBenchmarkUtil now also reports stats on csv files.
- Moved FinishUpdateGlobal from outside UpdateSkeletalMesh.
- Fixed GetNumSkeletalMeshes.
- Fixed a case where UE_MUTABLE_UPDATE_REGION region would never end.

[REVIEW] [at]daniel.moreno, [at]alexei.lebedev
[FYI] [at]pere.rifa
#rnx

[CL 29083968 by gerard martin in ue5-main branch]
2023-10-25 06:41:33 -04:00
alexei lebedev
6f012aec32 #rnx
#rb gerard.martin, pere.rifa
[FYI] Aaron.Eady

[CL 29043824 by alexei lebedev in ue5-main branch]
2023-10-24 08:17:10 -04:00
gerard martin
520199da65 [Mutable] Added Descriptor Debug Print.
Allows to see the state of the parameters when enqueuing an update. Useful when analyzing why there are more updates than they should. CVar toggable.

[REVIEW] [at]max.garcia, [at]alexei.lebedev
#rnx

[CL 28872105 by gerard martin in ue5-main branch]
2023-10-18 04:56:12 -04:00
gerard martin
29a834959a [Mutable] Created a single Update Context.
This update context is maintain through the full lifecycle of the update.

- Merged FMutableOperation and FMutableOperationData into the the new FUpdateContextPrivate.
- Renaming of the Operation and OperationData varaibles will come in a future submit.
- Moved header implementations to the source due to delcaration order issues.

[REVIEW] [at]pere.rifa, [at]alexei.lebedev
#tests PIE Jumpsuit, Village Infinite
#rnx

[CL 28833454 by gerard martin in ue5-main branch]
2023-10-17 03:57:37 -04:00
jordi rovira
98d87f1679 [mutable] Ensure images are reduced at compile time if we know the platform-specific maximum size they can be used in.
Add section-based insights tracing for mutable updates.
[REVIEW] [at]pere.rifa
#rnx

[CL 28800986 by jordi rovira in ue5-main branch]
2023-10-16 12:05:17 -04:00
pere rifa
3a156a970e [Mutable] Remove bReuseMesh and related code to simplify the generation of meshes to ease the implementation of mesh streaming.
* Remove LastUpdateData
* Remove CopySockets and CopySkeletonData

#rnx
#rb alexei.lebedev

[CL 28496343 by pere rifa in ue5-main branch]
2023-10-05 09:01:56 -04:00
pere rifa
4ce6b212f9 [Mutable] Attach a callback to the PostCompileDelegate to update the state of the CustomizableObjectInstance after compiling the CO.
On execution, It will invalidate all generated data and re-initialize the ComponentsData to match the state of the compiled model.
* Remove InstanceUpdateFlags and Private::ReloadParameters methods.
* Move the Code to set the AssetUserData from the COSystem to the CustomizableInstancePrivateData
* Add PostDuplicate override to the CustomizableInstancePrivateData to invalidate generated data after duplicating an instance in the editor

#rnx
#rb alexei.lebedev
#rb gerard.martin

[CL 28410905 by pere rifa in ue5-main branch]
2023-10-03 08:47:48 -04:00
alexei lebedev
73dd3d9afa #rnx
[CL 28378755 by alexei lebedev in ue5-main branch]
2023-10-02 11:10:38 -04:00
gerard martin
221e2f65ab [Mutable] Fix SkeletalMeshStatus flags.
- Removed Updating flag.
- Added Error16BitBoneIndex Update error.
- Created Update starting point StartUpdateSkeletalMesh.
- Removed unused functions.

[REVIEW] [at]alexei.lebedev, [at]pere.rifa
#rnx

[CL 28371606 by gerard martin in ue5-main branch]
2023-10-02 05:40:58 -04:00
alexei lebedev
7df9f5afdf #rnx
[CL 28269879 by alexei lebedev in ue5-main branch]
2023-09-27 07:44:07 -04:00
gerard martin
b4bcad6227 [Mutable] Fix incorrect Update flow result code.
[REVIEW] [at]pere.rifa, [at]alexei.lebedev
#rnx

[CL 28220980 by gerard martin in ue5-main branch]
2023-09-26 06:57:49 -04:00
jordi rovira
fb9c334844 [mutable] Remove most of the legacy string usage in favor of FString and FName.
Renamed some legacy structs to use the proper convention.
Removed some unnecessary boilerplate get and set methods.
Optimize mesh extract operation with switches and conditionals.
#rnx
[REVIEW] [at]max.garcia

[CL 28219048 by jordi rovira in ue5-main branch]
2023-09-26 04:43:37 -04:00
gerard martin
54e61a55a7 [Mutable] Merge EnqueueUpdateSkeletalMesh from Instance and System.
- Moved FMutableUpdateCandidate function bodies from header to source files.
- Moved IsUpdateRequired and GetUpdatePriority functions from the Instance to the System (who has the Update resonsability).
- Moved Hashes from the public to the private.

[REVIEW] [at]alexei.lebedev
[FYI] [at]pere.rifa
#rnx

[CL 28181603 by gerard martin in ue5-main branch]
2023-09-25 04:49:55 -04:00
alexei lebedev
015b98ef3e #rnx
[CL 28125657 by alexei lebedev in ue5-main branch]
2023-09-22 04:26:19 -04:00
pere rifa
e2e05b898a [Mutable] Enable ReuseImagesBetweenInstances.
[FYI] [at]alexei.lebedev
#rnx

[CL 28030497 by pere rifa in ue5-main branch]
2023-09-20 06:20:12 -04:00
gerard martin
d06fb58f3e [Mutable] Disable ReuseImagesBetweenInstances due to issues when changing manterials.
[REVIEW] [at]alexei.lebedev
[FYI] [at]pere.rifa, [at]max.garcia
#rnx

[CL 27990166 by gerard martin in ue5-main branch]
2023-09-19 06:06:34 -04:00
gerard martin
c98af61fcc [Mutable] Simplify UpdateSkeletalMesh flow.
- Removed unecessary flags.
- Removed Generated Instance flag from DoUpdateSkeletalMesh. Was incorrect. This flag still requires some improvements.
- Renamed InitUpdateSkeletalMesh to EnqueuepdateSkeletalMesh.
- DoUpdateSkeletalMesh is no longer mandatory to start an update. An update can start by simply adding the FMutableOperation to the MutableCurrentOperation.
- Removed no longer necessary bIsCloseDistTick. DoUpdateSkeletalMesh is no longer called from the tick. Now DoUpdateSkeletalMesh is only necessary to enqueue a task, which tick never does (executes a task directly).
- Removed unused BeginUpdate delegates.
- Replaced LODsStreamingEnabled with expression that was activating the flag (LODSettings).
- Replaced ForceGenerateAllLODs with the expression that was activating the flag (being on an EditorViewport).
- State is no longer obtained from the Instance, it is captured when generating mu::Parameters.
- Removed unecessary State copy when creating lambads.

[REVIEW] [at]alexei.lebedev, [at]pere.rifa
#tests PIE, Village, Editor
#rnx

[CL 27873026 by gerard martin in ue5-main branch]
2023-09-14 05:31:42 -04:00
jordi rovira
241cc7b515 [mutable] Fix and re-apply again CL27666321
[mutable] Add option to use Unreal's texture compressor at compile and debug time. Enable it by default for cook. Add option to override the internal pixel format function.
Change the method to find out the platform texture format, so that we have less ad-hoc code and more support for Unreal's project settings affecting it.
Cleanup image conversion code related to instance baking, removing duplicated hacky code.
Prevent CO image compilation for server platforms.
[REVIEW] [at]gerard.martin, [at]pere.rifa
#rnx

[CL 27825438 by jordi rovira in ue5-main branch]
2023-09-13 06:59:56 -04:00
robert millar
0374a2d30f [Backout] - CL27708842
[FYI] jordi.rovira
Original CL Desc
-----------------------------------------------------------------
[mutable] Fix and re-apply CL27666321
[mutable] Add option to use Unreal's texture compressor at compile and debug time. Enable it by default for cook. Add option to override the internal pixel format function.
Change the method to find out the platform texture format, so that we have less ad-hoc code and more support for Unreal's project settings affecting it.
Cleanup image conversion code related to instance baking, removing duplicated hacky code.
Prevent CO image compilation for server platforms.
[REVIEW] [at]gerard.martin, [at]pere.rifa
#rnx

[CL 27728180 by robert millar in ue5-main branch]
2023-09-08 16:59:37 -04:00
jordi rovira
4eef7bcce3 [mutable] Fix and re-apply CL27666321
[mutable] Add option to use Unreal's texture compressor at compile and debug time. Enable it by default for cook. Add option to override the internal pixel format function.
Change the method to find out the platform texture format, so that we have less ad-hoc code and more support for Unreal's project settings affecting it.
Cleanup image conversion code related to instance baking, removing duplicated hacky code.
Prevent CO image compilation for server platforms.
[REVIEW] [at]gerard.martin, [at]pere.rifa
#rnx

[CL 27708867 by jordi rovira in ue5-main branch]
2023-09-08 08:53:10 -04:00