221 Commits

Author SHA1 Message Date
sebastien lussier
5853cdaa77 Mesh Merge: Fix potentially invalid material baking result when using settings to strip out UV channels from the final mesh
* All valid UV channels must be kept during material baking
#tests enginetest
#rb JeanFrancois.Dube

[CL 35033880 by sebastien lussier in ue5-main branch]
2024-07-23 17:00:24 -04:00
sebastien lussier
0b94283c5b Fixed crash occurring when building HLODs after having built light maps
#jira UE-217782
#rb jeanfrancois.dube

[CL 34941673 by sebastien lussier in ue5-main branch]
2024-07-19 15:40:46 -04:00
sebastien lussier
b1f9ef37a0 ProxyLOD - Properly handle meshes with empty sections
#jira UE-189838
#rb JeanFrancois.Dube

[CL 34931233 by sebastien lussier in ue5-main branch]
2024-07-19 10:08:40 -04:00
sebastien lussier
9eb6eacf16 Mesh Merge - Prevent invalid mesh inputs from generating a static mesh asset with no source data
#rb JeanFrancois.Dube

[CL 34736879 by sebastien lussier in ue5-main branch]
2024-06-28 09:37:32 -04:00
sebastien lussier
266ea40bff World Partition - HLOD: Avoid the creation of reverse index buffers when building HLODs
* Reversed index buffers are used to handle negative scaling transforms. Since HLOD meshes will never be used with such transforms, we can get rid of these buffers and reduce memory usage.
#jira UE-216169
#rb JeanFrancois.Dube

[CL 34065502 by sebastien lussier in ue5-main branch]
2024-06-03 10:23:45 -04:00
christopher waters
b6f1a89a21 Fixing single header compiles.
[CL 33274021 by christopher waters in ue5-main branch]
2024-04-26 15:31:45 -04:00
sebastien lussier
02a0620a4d MergeActor - 1st pass cleaning up include files in order to avoid rebuilding the whole engine when editing merge actor settings
#rb JeanFrancois.Dube

[CL 33209699 by sebastien lussier in ue5-main branch]
2024-04-24 15:24:31 -04:00
sebastien lussier
770405be04 Merge Actor - Mesh Merging: Correctly handle MID when merging meshes but not their materials
* Duplicate the MID and outer it to the generated static mesh
#rb JeanFrancois.Dube

[CL 32762555 by sebastien lussier in ue5-main branch]
2024-04-05 12:14:58 -04:00
sebastien lussier
697585b8a1 Fix crash when baking materials on corrupted actor with StaticMeshComponent
* Shielded the utility methods from bad input
* Disabled the Bake Material button in case the operation isn't possible.
#jira UE-209285
#rb JeanFrancois.Dube

[CL 32576630 by sebastien lussier in ue5-main branch]
2024-03-28 10:09:19 -04:00
sebastien lussier
70eb0e1bf4 MergeMergeUtility - Fix broken hash computation in FProxyMeshDescriptor
* Return values of TypeCrc32() was ignored in some cases
#rb JeanFrancois.Dube

[CL 32300997 by sebastien lussier in ue5-main branch]
2024-03-18 11:06:55 -04:00
sebastien lussier
5115db18b1 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 32298478 by sebastien lussier in ue5-main branch]
2024-03-18 09:05:54 -04:00
sebastien lussier
76f709ff39 Merge Merging - Fix crashes occurring when a GC was performed during mesh merging
#rb JeanFrancois.Dube

[CL 31433487 by sebastien lussier in ue5-main branch]
2024-02-13 12:32:01 -05:00
sebastien lussier
25561e8452 Merge Actor - Textures created with the "Merge" option are not visible in the Content Browser
#jira UE-203393
#rb jeanfrancois.dube

[CL 31267432 by sebastien lussier in ue5-main branch]
2024-02-07 14:47:07 -05:00
sebastien lussier
f67194e865 Cleaning up deprecated methods
#rb jeanfrancois.dube

[CL 31257115 by sebastien lussier in ue5-main branch]
2024-02-07 10:07:39 -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
jamie hayes
adce377825 Fix race condition on FKAggregateGeom::GetGeom when rendering in parallel.
#rb zach.bethel

[CL 29787939 by jamie hayes in ue5-main branch]
2023-11-16 15:21:50 -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
dominic couture
8bc739dd3e This changelist contains various changes to allow the creation of FPrimitiveSceneProxy & FPrimtiveSceneInfos for meshes not associated with an AActor/UPrimitiveComponent pair. In other words, it's now possible to add primitives to FScene that aren't associated with AActors & UPrimitiveComponents. These are additional entry points, all existing code should continue to build & execute as is.
*Added FPrimitiveSceneDesc, a structure you can initialize with a description of the primitive you're trying to Add/Remove/Update in the FScene
-Added entry points in FSceneInterface to do those operations, legacy entry points using UPrimitiveComponent are untouched.
-The code that executes those operations in FScene has been refactored to be shared between the two entry points as much as possible to lessen the additional maintenance burden.


*Added FPrimitiveSceneProxyDesc/FStaticMeshSceneProxyDesc/FInstancedStaticMeshSceneProxyDesc, structures that hold all the necessary information to create a FPrimitiveSceneProxy/FStaticMeshSceneProxy/FInstancedStaticMeshSceneProxy without depending on AActors or UPrimitiveComponent.
-Those structures can be initialized by constructing them with the corresponding UPrimitiveComponents, or by constructing their default versions and initializing the desired fields.
-Creation code for FPrimitiveSceneProxy/FStaticMeshSceneProxy/FInstancedStaticMeshSceneProxy now takes all its info from those desc structures. They are created on demand during scene proxy creation for UPrimitiveComponents. This means no additional memory, and all serialized assets & blueprints are unaffected.


*Added IPrimitiveComponent/IStaticMeshComponent interfaces
-These allow for some editor-only interactions occurring during proxy creation, and serve as a common interface for some code that expected to manipulate UPrimitiveComponent/UStaticMeshComponents. For example FObjectCacheEventSink / FObjectCacheContext now uses those interfaces to associate the resources between various users and interactions like proxy recreation on shader/mesh changes occur through those interfaces.


* Misc
-Moved scene primitive related member variables into a new structure (FPrimitiveSceneInfoData) to facilitate code sharing and implementations of various related functionality (like SetLastRenderTime).
-Changed ObjectCacheContext to store associations between resources and components using component interfaces so that other systems creating proxies have the proper behaviors when resource changes require proxy recreation.
-Added natvis support so that component interfaces to UPrimitiveComponent/UStaticMeshComponent display the component ptr for easier debugging.
-Changed FMotionVectorSimulation to use UObject* instead of UPrimitiveComponent*, it was already using this internally
-Templatized some nanite helpers like ShouldCreateNaniteProxy & AuditMaterials since we need to use them from both UPrimitiveComponent & FPrimitiveSceneProxyDesc and it'll help make sure we keep them in sync.

#jira UE-191990

#rb Zach.Bethel, Ola.Olsson, Jason.Nadro, Krzysztof.Narkowicz

[CL 27200716 by dominic couture in ue5-main branch]
2023-08-18 09:26:39 -04:00
sebastien lussier
567b9098e9 FStaticMeshOperations::GenerateUniqueUVsForStaticMesh() - Fallback to AutoUV if UVs are invalid or missing
#rb patrick.enfedaque

[CL 26020789 by sebastien lussier in ue5-main branch]
2023-06-15 14:13:53 -04:00
bryan sefcik
62d3f94e73 Removed public module dependencies because they aren't used by the module making them public and they create circular dependency issues.
#preflight 6478a35ec26e3b2449f1afcf
#jira

[CL 25745177 by bryan sefcik in ue5-main branch]
2023-06-01 17:53:45 -04:00
bryan sefcik
91c57d395e Removed redundant module includes.
#preflight 645d4bf3aa3c584c0b5b3a67

[CL 25435653 by bryan sefcik in ue5-main branch]
2023-05-11 16:48:21 -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