* Vertex color was not taken into account
* OnCreatedMergedRawMeshes() extensions could wiping out vertices colors (was the case for Fortnite)
** Only call extension for the final merged mesh result
Force an update of all HLODs by changing the proxy key
#rb patrick.enfedaque
#ROBOMERGE-OWNER: sebastien.lussier
#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 12671370 via CL 12671428 via CL 12671436 via CL 12671437
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v675-12543919)
[CL 12672166 by sebastien lussier in Main branch]
1- The FExportMaterialProxy didn't give the proper static parameters for the materials instance. It always used those from the parent/master material.
2- The mesh description extracted from the static mesh component was sometimes invalid. This occurred when the mesh had an empty section as it first section. This resulted in a mesh with all its polygons being part of the first section when rendered for the proxy mesh.
Also renamed a variable in the create proxy mesh function since its previous name didn't make sense with what it is.
#jira UE-90322
#rb Sebastien.Lussier
#ROBOMERGE-SOURCE: CL 12234869 in //UE4/Release-4.25/... via CL 12234887
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v664-12234175)
[CL 12237471 by julien stjean in Main branch]
#rnx
#jira UE-90171
#rb JeanMichel.Dignard
#ROBOMERGE-SOURCE: CL 12104702 in //UE4/Release-4.25/... via CL 12104740
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v657-12064184)
[CL 12104779 by danny couture in Main branch]
* HLOD0 (merged) - Reliance on DoesUVChannelContainData() & the FMeshMergeSettings::OutputUVs[] array was lost during what looks like a bad code merge in ~2018
* HLOD1 (simplified) - Removed strange processing that added a second UV set, supposedly for lightmapping. This isn't needed as it's handled in the static mesh build.
Bumped the HLOD proxy key to force a rebuild of all HLODs
#rb chris.bunner, jeanfrancois.dube
#ROBOMERGE-OWNER: sebastien.lussier
#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 11958420 via CL 11958431 via CL 11958469 via CL 11958487
#ROBOMERGE-BOT: (v656-11643781)
[CL 11961121 by sebastien lussier in Main branch]
Change WITH_PHYSX to always be defined, even with chaos only.
Make Client/Server targets only disable PhysX when Chaos is enabled.
#rb michael.lentine
#ROBOMERGE-OWNER: max.whitehead
#ROBOMERGE-AUTHOR: max.whitehead
#ROBOMERGE-SOURCE: CL 11877480 via CL 11877967 via CL 11878038
#ROBOMERGE-BOT: (v656-11643781)
[CL 11888569 by max whitehead in Main branch]
CL 10373564 by danny.couture
Optimize Material Baking (Phase 1)
- Introduce a mecanism to override the vertex/index buffer allocator used for dynamic meshes
- Avoid GDynamicMesh non-ticked pools build-up by using our own vertex/index buffer pool during baking
- Reduce reallocation and incurred soft page faults by reusing a single set of vertex/index buffers big enough for the biggest mesh
- Preemptively detect if smearing would result in monochrome texture to avoid useless work
- Shrink smeared monochrome textures during the baking process for huge memory savings
- Move UV smearing in worker threads to avoid blocking the game thread
- Required shaders are now built asynchronously
- Add progress bar for material baking
- 28m23 [at] 150 GB RAM -> 2m14s [at] 45 GB RAM for 6 channels [at] 512x512 when baking materials on ProxyLOD for DATASET-0008a with DDC empty
#rb Jurre.deBaare, Sebastien.Lussier
CL 10516258 by danny.couture
Optimize Material Baking (Phase 2)
- Implement pipelining with staging buffers to avoid GPU stalls when reading from render targets
- Reuse the same prepared FMeshBatch instead of rebuilding it for each draw pass
- Prepare the RenderItem in advance on other threads to reduce work on the game thread
- Move the staging surface copy out of the render thread
- Small vertex and index buffers are not reused to avoid dependency locks when mapping them
- Fix bug in Canvas Flush_RenderThread found while running HLOD rebuild commandlet on Fortnite
- Delete old and unused MaterialBakingModule.h from public files
- 4m44s -> 59s for baking 6 channel [at] 1024x1024 when baking materials on ProxyLOD for DATASET-0008a with shaders already compiled
- Time spent in Material Baking when rebuilding all HLOD on Apollo_POI_Large_HLOD (Phase 1 + 2 combined)
- 10m18s -> 2m36s for a first rebuild all in editor with no shaders in DDC (cold)
- 1m23s -> 20s for a second rebuild all in editor (warm)
#rb Jeremy.Moore, Sebastien.Lussier
CL 11135986 by sebastien.lussier
Optimized mesh merging
* Added DeletePolygons() & DeleteTriangles methods to FMeshDescription which rely on TSets<> instead of performing costly TArray::AddUnique() calls()
* Parallelized UV generation and avoided duplicate processing of the same mesh+lod pairs
* Optimized FMeshDescriptionOperations::GenerateUniqueUVsForStaticMesh()
* Goes from 100s to 10s in my test case
#rb danny.couture, jeanfrancois.dube, richard.talbotwatkin
#ROBOMERGE-OWNER: sebastien.lussier
#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 11206337 via CL 11206341 via CL 11206346
#ROBOMERGE-BOT: (v643-11205221)
[CL 11206493 by sebastien lussier in Main branch]
#rnx
#rb none
#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)
[CL 10870584 by ryan durand in Main branch]
[FYI] bryce.lumpkin
#ROBOMERGE-SOURCE: CL 10453209 via CL 10453213 via CL 10453225
#ROBOMERGE-BOT: (v595-10452236)
[CL 10453236 by sebastien lussier in Main branch]
HLOD - Baked Emissive textures do not have sRGB checked
HLOD - Baked gray-scale/mask textures (Rough/Metal/Spec/Opacity) use sRGB=True
#ROBOMERGE-SOURCE: CL 10082362 via CL 10082363 via CL 10082364 via CL 10082365
#ROBOMERGE-BOT: (v574-10069753)
[CL 10082594 by sebastien lussier in Main branch]
Fixed mesh pivot point offset not being applied in this specific case
#rb patrick.enfedaque
#ROBOMERGE-SOURCE: CL 10056720 via CL 10057694 via CL 10057717 via CL 10057792
#ROBOMERGE-BOT: (v566-10053404)
[CL 10057904 by sebastien lussier in Main branch]
#rnx
#rb none
#ROBOMERGE-OWNER: rex.hill
#ROBOMERGE-AUTHOR: rex.hill
#ROBOMERGE-SOURCE: CL 9968254 via CL 9968365
#ROBOMERGE-BOT: (v560-9963197)
[CL 9969240 by rex hill in Main branch]
HLOD useLODAImposter seems to not copy over all UV channels
Mesh merging code was assuming the UV2 & UV3 channels were free to use to store position & scale of imposter instances.
This behavior seems to have been hacked in the engine for an internal project & is not needed anymore since it's now possible to use instanced static meshes with LODActors
Still kept old behavior around (CVar) in case someone would really need it
#rb patrick.enfedaque
[CL 9868123 by Sebastien Lussier in Main branch]
Attempted to resolve merge conflict for CL 9844036 Robomerge, it caused compilation errors
#rb Jake.Romigh
#fyi sebastien.lussier
[CL 9845666 by Laz Matech in Main branch]