Commit Graph

58 Commits

Author SHA1 Message Date
sebastien lussier
dd3e8d03fd Fix multiple UV remapping issues for merged meshes
* 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]
2020-04-08 10:13:22 -04:00
julien stjean
f324e13073 Fixed two issues in the proxy merge tools.
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]
2020-03-17 20:02:37 -04:00
danny couture
41ebad9f71 Fix crash during proxy lods generation if lightmap uvindex is -1
#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]
2020-03-10 09:33:58 -04:00
Sebastien Lussier
055f5e2c31 CIS fix
#rb none
#jira none

[CL 11968903 by Sebastien Lussier in Main branch]
2020-03-05 18:24:55 -05:00
Sebastien Lussier
0d1f80b726 Fix build error in MeshMergeUtilities.cpp
#jira none
#rb none

[CL 11962945 by Sebastien Lussier in Main branch]
2020-03-05 16:13:57 -05:00
sebastien lussier
c51c310de7 Remove extra UV sets from HLOD meshes
* 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]
2020-03-05 16:01:44 -05:00
JeanFrancois Dube
e7f37d8b09 Avoid memcopies in MergeFlattenedMaterials.
#rb danny.couture

[CL 11535927 by JeanFrancois Dube in Main branch]
2020-02-19 06:42:29 -05:00
JeanFrancois Dube
7d3d157816 Integrate 11534852 from 4.25: Add missing flattened material property enum that was missed when anisotropy was added.
#jira UE-89011, UE-89068, UE-89035
#fyi danny.couture
#rb none

[CL 11535904 by JeanFrancois Dube in Main branch]
2020-02-19 06:34:52 -05:00
Rolando Caloca
5b82f15def Copying //UE4/Dev-RenderPlat-Staging@11388153 to //UE4/Main
#rb none
#rnx

[CL 11388545 by Rolando Caloca in Main branch]
2020-02-12 13:27:19 -05:00
Chris Gagnon
c3f9a18841 Merge from Main in prep for Dev-Tools-Staging Copy up
#rb none

[CL 11221539 by Chris Gagnon in Dev-Tools-Staging branch]
2020-02-04 17:00:31 -05:00
sebastien lussier
ba57adfd4b Edigrating 3 CLs to improve HLOD generation time (faster material baking & mesh merging)
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]
2020-02-03 11:08:35 -05:00
JeanMichel Dignard
84facd6d15 Copy from dev-enterprise cl 11097196
#rb none
#rnx

[CL 11099277 by JeanMichel Dignard in Dev-Tools-Staging branch]
2020-01-23 16:28:59 -05:00
Juan Canada
f396f56a0b Merging //UE4/Dev-Main@11042002 to Dev-RenderPlat-Staging(//UE4/Dev-Rendering)
#rnx
#rb none

[CL 11075443 by Juan Canada in Dev-RenderPlat-Staging branch]
2020-01-21 14:54:20 -05:00
Juan Canada
2ecf4f9708 Merging //UE4/Dev-Main@10877709 to Dev-RenderPlat-Staging(//UE4/Dev-Rendering)
#rnx
#rb none

[CL 10895568 by Juan Canada in Dev-RenderPlat-Staging branch]
2020-01-07 13:45:01 -05:00
alexis matte
56b70834bb Fix crash when merging staticmesh and using CreateMeshMerge option.
#jira UE-86183
#rb sebastien.lussier
#rnx
#lockdown cristina.riveron

#ROBOMERGE-SOURCE: CL 10883815 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v626-10872990)

[CL 10883816 by alexis matte in Main branch]
2020-01-06 16:10:00 -05:00
ryan durand
471d972e62 Updating copyright for Engine Developer.
#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]
2019-12-26 15:32:37 -05:00
jeanluc corenthin
1f438f8396 Fixed crash when 'merge actors' tries to create a mesh which name is already used by another type of asset
#jira UE-83445
#rb sebastien.luissier,alexis.matte
#rnx
#lockdown cristina.riveron

#ROBOMERGE-SOURCE: CL 10114966 in //UE4/Release-4.23/...
#ROBOMERGE-BOT: RELEASE (Release-4.23 -> Main) (v587-10111126)

[CL 10114967 by jeanluc corenthin in Main branch]
2019-11-12 14:38:01 -05:00
Alexis Matte
c97c681a9f Fix skeletalmesh bake material crash, and incorrect ID remapping.
#jira UE-83204
#jira UE-83216
#rb benoit.deschenes

[CL 10056841 by Alexis Matte in Main branch]
2019-11-06 12:11:28 -05:00
JeanMichel Dignard
d4f0f4d3f2 Copying //UE4/Dev-Enterprise @ cl 9420543 to Dev-Main (//UE4/Dev-Main)
#rb none

[CL 9420574 by JeanMichel Dignard in Main branch]
2019-10-04 13:11:45 -04:00
Chris Gagnon
8ab0638182 Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) for 4.24
#rb none

[CL 9325047 by Chris Gagnon in Main branch]
2019-10-01 20:41:42 -04:00
jon nabozny
6b60663f39 Update Engine and Plugins to use the new Getters / Setters for UActorComponent, USceneComponent, and AActor replicated properties
[at]Ryan.Gerleve, [at]Brian.Bekich
#rb None


#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: jon.nabozny
#ROBOMERGE-SOURCE: CL 9290108 via CL 9290249
#ROBOMERGE-BOT: (v452-9288972)

[CL 9290520 by jon nabozny in Main branch]
2019-09-29 16:49:10 -04:00
sebastien lussier
21447d2bd7 Do not exclude static mesh subclasses from the mesh merge process
#ROBOMERGE-SOURCE: CL 9152055 via CL 9152079 via CL 9152095
#ROBOMERGE-BOT: (v443-9013191)

[CL 9152099 by sebastien lussier in Main branch]
2019-09-26 13:09:15 -04:00
sebastien lussier
6f9d431e83 Fixed merged meshes having wrong material mapping
#jira UE-80604


#ROBOMERGE-SOURCE: CL 8934573 via CL 8934580 via CL 8934591
#ROBOMERGE-BOT: (v435-8929571)

[CL 8934596 by sebastien lussier in Main branch]
2019-09-20 15:47:52 -04:00
sebastien lussier
9462f6b7ac HLOD building crashes when building
Cherrypicked CL8214461 from Dev-Enterprise
#jira UE-79203


#ROBOMERGE-SOURCE: CL 8224679 via CL 8230150
#ROBOMERGE-BOT: (v401-8057353)

[CL 8230887 by sebastien lussier in Main branch]
2019-08-23 12:08:39 -04:00
sebastien lussier
c5d90f6078 HLOD - Allow merging of HISM to the resulting mesh
Also allow merging of H(ISM) from the mesh merging tool
#jira UE-79239
jeanfrancois.dube


#ROBOMERGE-SOURCE: CL 8220928 via CL 8221461 via CL 8229897
#ROBOMERGE-BOT: (v401-8057353)

[CL 8230715 by sebastien lussier in Main branch]
2019-08-23 12:04:04 -04:00