123 Commits

Author SHA1 Message Date
sebastien lussier
22e2777271 Merge Actor - Properly handle custom primitive data when baking materials
* Forward custom primitive data info to material baking
* Added Custom Primitive Data case to material baking engine test
* Also updated broken Material Baking tests screenshots as subtle differences are now occuring on shadows... Disabled shadows from the map light source to minimize noise in future test results
#rb JeanFrancois.Dube

#virtualized

[CL 32499424 by sebastien lussier in 5.4 branch]
2024-03-26 02:22:45 -04:00
sebastien lussier
caf65130b5 Merge Merging - Fix crashes occurring when a GC was performed during mesh merging
#rb JeanFrancois.Dube

[CL 31430516 by sebastien lussier in 5.4 branch]
2024-02-13 11:26:23 -05:00
sebastien lussier
942f92c3b9 Merge Actor - Textures created with the "Merge" option are not visible in the Content Browser
#jira UE-203393
#rb jeanfrancois.dube

[CL 31265688 by sebastien lussier in 5.4 branch]
2024-02-07 14:00:23 -05:00
sebastien lussier
27297a206b Cleaning up deprecated methods
#rb jeanfrancois.dube

[CL 31257031 by sebastien lussier in 5.4 branch]
2024-02-07 10:05:11 -05:00
steve robb
6d5b974842 Fixed up a lot of bool-taking container resize functions to take EAllowShrinking instead.
[CL 30735396 by steve robb in ue5-main branch]
2024-01-19 19:41:56 -05:00
sebastien lussier
0af6dcbbc1 Merge Actor - Mesh Merge: Fix corner case where a merged mesh section was assigned an invalid material index (INDEX_NONE)
* Required a source mesh with two sections with identical materials
* Occured only when created a merged mesh without baking down textures
#jira UE-201699
#rb Patrick.Enfedaque

[CL 30245768 by sebastien lussier in ue5-main branch]
2023-12-11 14:29:20 -05:00
sebastien lussier
0fdff1ee1f MergeActor - Improved UV generation of merged/simplified meshes
Currently controlled globally with the MeshMergeUtilities.UVGenerationMethod cvar
-> 0 - Engine default - (currently Patch Builder)
-> 1 - Legacy
-> 2 - UVAtlas
-> 3 - XAtlas
-> 4 - Patch Builder

#rb jeanfrancois.dube

[CL 29842440 by sebastien lussier in ue5-main branch]
2023-11-20 10:37:32 -05:00
tiago costa
62242df915 Moved IsStaticLightingAllowed() to RenderUtils.h and replaced relevant usage.
#rb ola.olsson

[CL 27557666 by tiago costa in ue5-main branch]
2023-09-01 12:07:26 -04:00
Sebastien Lussier
cf996c14f9 Mesh Merging - Fix combination of FMeshProxySettings settings bReuseMeshLightmapUVs and bGroupIdenticalMeshesForBaking
#jira none
#rb philippe.deseve
#preflight 6453c0bf4d593c0b4289faf6

[CL 25335142 by Sebastien Lussier in ue5-main branch]
2023-05-04 10:49:57 -04:00
sebastien lussier
0c3948ad71 FBoxSphereBounds - Fixed many potential issues with bounds initialization containing the origin (0,0,0)
* Added a FBoxSphereBounds::Builder class to help avoid these kind of issues
#rb jeanfrancois.dube, patrick.enfedaque
[FYI] Graham.Wihlidal
#preflight 6419e677ec01de1664d3e95c

[CL 24739078 by sebastien lussier in ue5-main branch]
2023-03-21 16:38:42 -04:00
sebastien lussier
d5b66a61f2 Material Baking - Added optimized code path when baking a set of meshes with remapped UVs
* In this case, instead of baking each mesh material property to it's own buffer, we can write all the meshes to the same buffer as their UVs are already the final ones that do not overlap
* Memory usage is greatly reduced (in test case with ~300 materials to bake, peak is reduced by 5.5GB)
* A lot faster to process (~2x in most cases) as we are doing a single RT readback per baked material property
* We can also skip the final merge of the baked outputs, as we have a single one

Refactored the material baking module to have both code paths (single output and multi outputs) share as much code as possible

#rb jeanfrancois.dube
#preflight 63eba6e0284e76cdadbecb48

[CL 24226039 by sebastien lussier in ue5-main branch]
2023-02-14 22:23:44 -05:00
sebastien lussier
30d6de42e3 MeshMergeUtilities cleanup
* Moved material creation in MergeComponentsToStaticMesh() to a standalone utility function
* Deprecate bCreateMergedMaterial
#rb trivial

[CL 24197343 by sebastien lussier in ue5-main branch]
2023-02-13 20:06:39 -05:00
sebastien lussier
e4c7d97bef Mesh Merging - Lazily evaluate vertex data usage by the material, as it is costly and we can avoid it in a lot of cases
#rb jeanfrancois.dube

[CL 24179740 by sebastien lussier in ue5-main branch]
2023-02-13 12:54:26 -05:00
benoit deschenes
3ef3727c41 MeshMergeUtility - Fix a bug where collisions of ISM components were not merged correctly.
We new merge the collisions of all the instances in the ISM component, instead of a single collision instance using just the component transform.
Also exposing a utility function for getting the collision information of a list of components.

#rb Richard.TalbotWatkin
#jira UE-174128
#preflight 63c99511c503023ab929831e

[CL 23814991 by benoit deschenes in ue5-main branch]
2023-01-23 12:22:18 -05:00
Sebastien Lussier
294a4bc715 #jira UE-150232
Merging static mesh actors resulted in static mesh sockets getting lost
* Added a "Merge Mesh Sockets" option to the Mesh Merge Settings
#rb jeanfrancois.dube
#preflight 63c0b1e602024f93d8d2f6af

[CL 23672695 by Sebastien Lussier in ue5-main branch]
2023-01-12 20:32:31 -05:00
jeanfrancois dube
0ef655e225 Merge Actors: don't dirty the level when merging actors.
#jira UE-172242
#rb sebastien.lussier
#preflight none

[CL 23480073 by jeanfrancois dube in ue5-main branch]
2022-12-12 13:37:49 -05:00
sebastien lussier
0f3472fc8b Added FISMComponentBatcher which can be used to batch SMC & ISMC
Now used in place of duplicated code in:
* UHLODBuilder::BatchInstances()
* FMeshMergeUtilities::MergeComponentsToInstances
* FPackedLevelActorISMBuilder::PackActors
#rb patrick.enfedaque
#preflight 637f87defa348e84808f0c99

[CL 23261629 by sebastien lussier in ue5-main branch]
2022-11-24 13:48:05 -05:00
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
sebastien lussier
24e886f1c4 Merge Actor: Turn a UV generation error into a warning as a temp workaround for failing HLOD builds
* Will rework UV generation to be more resilient
#rb trivial
#preflight skip

[CL 22217711 by sebastien lussier in ue5-main branch]
2022-09-27 23:59:24 -04:00
sebastien lussier
e2b30272ba Merge Actor - Fix section/material mapping issue introduced by CL22158948
#rb patrick.enfedaque
#preflight skip

[CL 22205513 by sebastien lussier in ue5-main branch]
2022-09-27 10:17:21 -04:00
sebastien lussier
21dc3e393c Merge Actor: Fixed incorrect MeshDataIndex stored as the key to the MeshDataAwaitingResults map
#rb patrick.enfedaque

[CL 22165310 by sebastien lussier in ue5-main branch]
2022-09-23 20:45:24 -04:00
sebastien lussier
4c65a049b9 Detect failure of global UV remap and avoid a crash accessing the empty GlobalTextureCoordinates array
#rb patrick.enfedaque

[CL 22165253 by sebastien lussier in ue5-main branch]
2022-09-23 20:44:11 -04:00
sebastien lussier
2689dd71cb World Partition - HLOD: Added support for automatic texture sizing for Merged & Simplified HLODs
* Reused existing code to share it between all HLOD generation methods

#jira UE-161274, UE-156559
#rb patrick.enfedaque
#preflight 632927c99840225da23c49a5

[CL 22088941 by sebastien lussier in ue5-main branch]
2022-09-20 01:40:59 -04:00
sebastien lussier
f1d3663fa2 World Partition - HLOD
* Exposed proper Nanite generation settings: To control mesh fallback mesh generation, relative error is prefered over triangle percent
* Exposed "Support Ray Tracing" option
#preflight 632856a91c7511917a845ef2
#rb jeanfrancois.dube

[CL 22086940 by sebastien lussier in ue5-main branch]
2022-09-19 21:54:48 -04:00
nick darnell
8c6dccfce9 Core - Making some improvements to TObjectPtr, introducing some templating utilities so that we can better template match TObjectPtr vs UObject* pointers so that a single templated function can work for either.
Core - Added support for assigning a TObjectPtr<T> to a TScriptInterface just like you'd expect from a raw Object*.

Actor - Making a version of GetComponents that will work for TObjectPtr collections.  Additionally fixed several places in the engine where we're forcing the template parameter instead of allowing it to be determined automatically - which forced me to leave one of the GetComponent implementations, but I think we aught to remove it. e.g.

Don't Do

TArray<UPrimitiveComponent*> PrimComponents;
Actor->GetComponents<UPrimitiveComponent>(PrimComponents);

Do

TArray<UPrimitiveComponent*> PrimComponents;
Actor->GetComponents(PrimComponents);

Slate - Introducing support for collections of TObjectPtr<T>'s being used as source lists for the STableView.

#preflight 630f7af8e54ec9d581b03d65
[REVIEW] [at]Marc.Audy, [at]Steve.Robb, [at]Zousar.Shaker

[CL 21727328 by nick darnell in ue5-main branch]
2022-08-31 16:13:49 -04:00