47 Commits

Author SHA1 Message Date
Ola Olsson
77d15449ac Deduplicated primitive flags to a shared header & also deduplicated shader paramter construction to shared function in the proxy.
- Also moved FPrimitiveUniformShaderParametersBuilder to its own header to cut down rebuilding when changing scene & nanite definitions.

#rb jamie.hayes
#preflight 644919d41c2846595cfdbf28

[CL 25199110 by Ola Olsson in ue5-main branch]
2023-04-26 11:26:23 -04:00
aidin abedi
bae0fd899a Amend previous fix (25014983): Fix material baking incorrectly ignores specific UV space when using mesh data
Previous fix only works when mesh data is a quad, this amended fix works for arbitrary mesh data.


#jira UE-183148
#review @Jason.Nadro
#preflight 643ef22fb550f425ace042c9

[CL 25095680 by aidin abedi in ue5-main branch]
2023-04-18 17:33:35 -04:00
aidin abedi
eaeafb13bf Fix material baking incorrectly ignoring specific UV space when using mesh data
#jira UE-183148
#review @JeanLuc.Corenthin @Jason.Nadro @Kevin.Ortegren
#preflight 64370c8a00398d6f886f19f1

[CL 25014983 by aidin abedi in ue5-main branch]
2023-04-12 16:27:33 -04:00
aidin abedi
001c32df84 Add support for material baking expressions that rely on primitive data
#jira UE-132097
#review @Kevin.Ortegren @Massimo.Tristano

(based on PR #8526)
#preflight 63c6b27302024f93d8591a46

[CL 23737565 by aidin abedi in ue5-main branch]
2023-01-17 09:51:53 -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
Wei Liu
06c9a5c84e 1. Remove all flip-y completely and only flip y at the end on androidl GL with a native window api, no need to handle flip-y on high level.
2. Supports CustomDepth in translucency pass on mobile LDR.

#jira none

#rb Dmitriy.Dyomin
#preflight 62be9894d94b57687c68aed1

[CL 20911586 by Wei Liu in ue5-main branch]
2022-07-01 03:38:17 -04:00
zach bethel
78b6b40701 Remove view uniform buffer from ray tracing mesh draw commands and delete FPersistentUniformBuffers::ViewUniformBuffer. Deprecated the view uniform buffer from MeshPassRenderState.
#rb yuriy.odonnell
#preflight 629915e62e20b63f9a9d2d46

[CL 20475710 by zach bethel in ue5-main branch]
2022-06-02 16:57:29 -04:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
andrew davidson
3debbbd465 Fix FVector2D variant casts
Submitted on behalf of fred.kimberley
#rb andy.davidson
#preflight 61f8719ea6632a34f35e654b

#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18801709 in //UE5/Release-5.0/... via CL 18802160 via CL 18821533
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18821619 by andrew davidson in ue5-main branch]
2022-02-02 01:45:23 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
andrew davidson
57beb335f2 Merging //UE5/Dev-LargeWorldCoordinates [at] 17581892 to //UE5/Main
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 17595295 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17595306 by andrew davidson in ue5-release-engine-test branch]
2021-09-22 10:01:48 -04:00
dmytro vovk
fe6369b9ca Fixed SSE Math double precision issues
#jira none
#rb Zak.Middleton

#ROBOMERGE-SOURCE: CL 17033934 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v846-17029325)

[CL 17035634 by dmytro vovk in ue5-release-engine-test branch]
2021-08-03 14:44:57 -04:00
Andrew Davidson
3ddc3a4da3 Merge up from //UE5/Dev-LargeWorldCoordinates
#rb none

[CL 16211417 by Andrew Davidson in ue5-main branch]
2021-05-05 15:07:25 -04:00
Sebastien Lussier
06ccaf7c69 Optimized proxy mesh generation
* Added GroupIdenticalMeshesForBaking, which, when activated, will result in identical meshes (or mesh instances) being baked only once.

Other changes/fixes
* Always rely on the StaticMesh RenderData when retrieving mesh description for mesh merging/simplification (was the case when retrieving from a SMC, now also the case for a SM).
* For some reason, Material baking was rendering each triangle twice, but with opposite facing. Uneeded as we are rendering with backface culling disabled.

[CL 15669055 by Sebastien Lussier in ue5-main branch]
2021-03-10 15:46:29 -04:00
zach bethel
a2bc3ea0f8 Converted canvas rendering to RDG.
#rb christopher.waters
#jira UE-106330

[CL 15157078 by zach bethel in ue5-main branch]
2021-01-21 14:46:38 -04:00
Marc Audy
a7f9391231 Merge UE5/Release-Engine-Staging @ 14811410 to UE5/Main
This represents UE4/Main @ 14768117

For ReleaseObjectVersion.h
#lockdown Marcus.Wassmer

[CL 14811440 by Marc Audy in ue5-main branch]
2020-11-24 18:42:39 -04:00
Marc Audy
a7c9001a94 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14075166
#rb
#rnx

[CL 14075271 by Marc Audy in ue5-main branch]
2020-08-11 01:36:57 -04:00
Richard TalbotWatkin
51d4cb3f66 Fully deprecated old MeshDescription APIs.
Prepared direct attribute access for deprecation, preferring use of APIs to access static mesh attributes.
Fixed recently merged Enterprise code to comply with new APIs.
Changed all tools to use triangle-centric iteration where possible.
Added new MeshAttributeArray APIs for querying attribute flags, and added a new Mandatory flag.
Various bug fixes.
#rb Alexis.Matte

[CL 13873755 by Richard TalbotWatkin in ue5-main branch]
2020-07-16 08:23:15 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00
Richard TalbotWatkin
4884bf9d9a First pass of MeshDescription API and format refactor.
- Removed hardcoded element type arrays (Vertices, Edges, Triangles etc.). Mesh element types can now be arbitrarily added, with any number of channels.
- Mesh element containers have a much leaner format; instead of sparse arrays, they are now represented by a simple bitarray, determining whether an index is used or not. Consequently, mesh topology is now entirely described with the attribute system, e.g. edge start and end vertices, triangle vertices, etc.
- Support added for attributes of arbitrary dimensions, e.g. float[4] or int[2].
- Support added for attributes which index into another mesh element container.
- Added FMeshElementIndexer: this is an efficient container for maintaining backward references from one element type to another; for example, edges have an attribute specifying which vertices are at each end (an attribute of type FVertexID[2]). With an indexer, it is possible to look up which edges contain a given vertex, even though this is not explicitly stored. Indexers are designed to do minimal allocations and update lazily and in batch when necessary.
- Added support for preserving UV topology in static meshes. UVs are now a first-class element type which may be indexed directly from triangles.
- Added the facility to access the underlying array in an attribute array directly.
- Triangles now directly reference their vertex, edge and UV IDs. Vertex instances are to be deprecated.
- Changed various systems to be triangle-centric rather than polygon-centric, as this is faster. Triangles are presumed to be the elementary face type in a MeshDescription, even if polygons are still supported. The concept of polygons will be somewhat shifted to mean a group of triangles which should be treated collectively for editing purposes.
- Optimised normal/tangent generation and FBX import.
- Deprecated EditableMesh, MeshEditor and StaticMeshEditorExtension plugins - these are to be removed, but they still have certain hooks in place which need removing.
#rb

[CL 13568702 by Richard TalbotWatkin in ue5-main branch]
2020-05-28 10:56:57 -04:00
sebastien lussier
9eda8fed2e Merge CL 11587939 - Fix invalid material baking when "Reuse Mesh Lightmap UVs is used with a mirrored (negative scale) mesh.
#jira none
#rb none

#ROBOMERGE-SOURCE: CL 11588027 in //UE4/Release-4.25/... via CL 11588035
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v654-11333218)

[CL 11588040 by sebastien lussier in Main branch]
2020-02-24 11:12:16 -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
70d074639f Merging //UE4/Dev-Main @ 10886849 to Dev-Tools-Staging (//UE4/Dev-Tools-Staging)
#rb none
#rnx

[CL 10906274 by JeanMichel Dignard in Dev-Tools-Staging branch]
2020-01-08 13:26:18 -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
danny couture
8f3036879c Copy up //UE4/Dev-Enterprise/... to //UE4/Dev-Tools-Staging/...
#rb none

[CL 10478662 by danny couture in Dev-Tools-Staging branch]
2019-11-28 10:58:55 -05:00