Commit Graph

343 Commits

Author SHA1 Message Date
Arne Schober
5fdfd0099d U5 - Move FMeshDistanceFieldAsyncTask in parallelFor
[CL 15373180 by Arne Schober in ue5-main branch]
2021-02-09 20:52:00 -04:00
JeanFrancois Dube
0981e2c2fe Optim: reserve proper array size in FSkeletalMeshUtilityBuilder::GenerateSkeletalRenderMesh to avoid unrequired memory allocations.
#rb danny.couture

[CL 15337177 by JeanFrancois Dube in ue5-main branch]
2021-02-05 09:37:19 -04:00
Marc Audy
cac1fe0019 Merge UE5/Release-Engine-Staging @ CL# 15299266 to UE5/Main
This represents UE4/Main @ CL# 15277572

[CL 15299962 by Marc Audy in ue5-main branch]
2021-02-03 14:57:28 -04:00
Arne Schober
f6e1fb0d86 U5 - have MeshDistanceFields BusyWait and not take down all Task Workers.
[CL 15288899 by Arne Schober in ue5-main branch]
2021-02-02 21:18:43 -04:00
Josh Adams
b0e4357576 - UBT Code changes to remove 32-bit Windows support (C++ code for 32-bit still exists)
#rb marc.audy (concept, not each file)

[CL 15265424 by Josh Adams in ue5-main branch]
2021-01-31 15:09:58 -04:00
Krzysztof Narkowicz
bef7aa2a1e Fixed Lumen card representation for thin planes, where decals were too thin to be picked up for projection
#fyi Daniel.Wright

[CL 15169798 by Krzysztof Narkowicz in ue5-main branch]
2021-01-23 01:26:01 -04:00
Marc Audy
bc88b73a29 Merge Release-Engine-Staging to Main @ CL# 15151250
Represents UE4/Main @ 15133763

[CL 15158774 by Marc Audy in ue5-main branch]
2021-01-21 16:22:06 -04:00
Krzysztof Narkowicz
6c573a2474 Lumen surface cache now supports internal surfaces
* r.LumenScene.MeshCardsMaxLOD controls representation quality. With 0 being a box projection
* New card placement to focus on important parts of a mesh (skip non visible parts)
* Replaced CubeMapTrees with MeshCards. Instead of a big volume texture lookup there are now 6 lists of decals (one per axis)
* Merged distance field and mesh card Embree setup code into a set of common functions
* Removed hardcoded limits of 6 cards per mesh

#fyi Daniel.Wright, Patrick.Kelly, Yuriy.ODonnell

[CL 15144947 by Krzysztof Narkowicz in ue5-main branch]
2021-01-20 11:34:55 -04:00
Daniel Wright
e5b3986253 Mesh Distance Field supports Two Sided materials properly, when assigned to the asset
[CL 14945194 by Daniel Wright in ue5-main branch]
2020-12-17 00:02:25 -04:00
Alexis Matte
73d83c6a38 To protect the skeletalmesh when using async operations like build or re-import we deprecate all public member variables of USkeletalMesh class and create the necessary getter and setter. Those member will stay public but will be move to private in a future release.
Adding a public member to USkeletalMesh class is now prohibed since it can break asynchronous operations that will be added next to this submit.

#rb danny.couture
#jira UEENT-3936
#rnx

[CL 14812920 by Alexis Matte in ue5-main branch]
2020-11-25 11:17:08 -04:00
Krzysztof Narkowicz
14d02c6809 MeshSDF - implemented a tight bounding box with one voxel margin for bilinear gradient reconstruction. This allowed the MESH_SDF_APPROX_MARGIN hack to be removed and secured all gradient reconstruction operations from reading outside of valid bounds. Also saved ~50% of SDF atlas space, and speed up some mesh SDF operations:
UpdateGlobalDistanceField: ~7% faster
TraceMeshSDFs: ~5% faster

#rb Daniel.Wright, Patrick.Kelly

[CL 14618591 by Krzysztof Narkowicz in ue5-main branch]
2020-10-29 23:43:01 -04:00
Marc Audy
68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00
danny couture
0b151ec30f Deprecate some directly accessible fields in UStaticMesh
#rb Francis.Hurteau

[CL 14606505 by danny couture in ue5-main branch]
2020-10-28 22:08:44 -04:00
Krzysztof Narkowicz
2921126a39 SDF and card rep generation now check for degenerate triangles before adding them to the Embree scene
#rb Daniel.Wright

[CL 14579820 by Krzysztof Narkowicz in ue5-main branch]
2020-10-26 15:07:53 -04:00
Krzysztof Narkowicz
3da3a205fb Added FMeshBuilder::BuildMeshVertexPositions. It replaces FMeshBuilder::BuildMesh(bool bBuildOnlyPosition = true) and does the minimal work which is required to extract vertex positions from a mesh descriptor.
This is later used to build static mesh derived data in cases where Nanite coarse mesh representation replaces original static mesh data and we can't depend on it. In extreme cases it lowers main thread derived data build time from ~7.5s to ~0.1s.

#rb Richard.TalbotWatkin

[CL 14578414 by Krzysztof Narkowicz in ue5-main branch]
2020-10-26 13:09:34 -04:00
Krzysztof Narkowicz
6a3e844487 Mesh distance field generation fixes:
* Fixed section filtering bug causing to generate SDF from random triangles when a single section was filtered out
* Removed plane hack, which was squashing some meshes and causing generation rays to randomly return backface / frontface hits

Tested in FortGPUTestBed and Fornite, but didn't notice any issues introduced by plane hack removal. If something breaks, then anyway we should fix it in the tracing code by improving non uniform SDF scale support there.

#rb Daniel.Wright

[CL 14571736 by Krzysztof Narkowicz in ue5-main branch]
2020-10-25 23:29:54 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
danny couture
6e8494009d DistanceField and MeshCards async queues are now reusing existing threadpool instead of spawning their own
DistanceField and MeshCards are not limited anymore to a single thread and can scale to the number of physical cores available
DistanceField and MeshCards are now both limiting their tick time length to avoid huge game-thread stalls when lots of assets are being built
Fix potential race-condition in DistanceFieldAsyncQueue found while fixing MeshCardAsyncQueue

#rb Alexis.Matte

[CL 14420000 by danny couture in ue5-main branch]
2020-10-05 08:22:37 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Krzysztof Narkowicz
5581ebef92 Generate mesh distance fields and Lumen card representation for Nanite meshes directly from the source mesh data. Nanite replaces static mesh data with a coarse mesh representation, which sometimes has holes in it or is not accurate enough. Building from the source data works around that issue and gets up the highest possible SDF/card quality. Unfortunately it also regresses static mesh import times by ~3-5% until we don't get async static mesh builds.
Mesh build numbers for Nanite meshes:
1701216 tris:
Static mesh build: 11.2s
Static mesh build for the SDF async task (added in this CL): 2.3s
Async SDF build: 0.7s
Async card rep build: 0.15s

5524435 tris:
Static mesh build: 36.4s
Static mesh build for the SDF async task: 6.2s
Async SDF build: 1.2s
Async card rep build: 0.5s

1146238 tris
Static mesh build: 10.5s
Static mesh build for the SDF async task: 1.5s
Async SDF build: 0.6s
Async card rep build: 0.1s

#rb Daniel.Wright

[CL 14372405 by Krzysztof Narkowicz in ue5-main branch]
2020-09-22 23:04:05 -04:00
Daniel Wright
97cf839625 Merging //Tasks/UE4/Private-Reverb-Development-Lumen/... to //UE5/Main/...
Contains all work on Lumen since shipping Reverb in March:
 * New Opaque Final Gather with higher quality in clean architecture and better performance
 * Improved global tracing which reduces leaking
 * New basic Reflections pipeline which respects material Roughness
 * New HZB traces that are more accurate at tracing against the depth buffer
 * Hardware Ray Tracing paths for Lumen shadowing and Final Gather
#rb none

[CL 14274844 by Daniel Wright in ue5-main branch]
2020-09-08 17:44:06 -04:00
brooke hubert
48113fc77e Adding EditorFramework to build.cs files
#rnx
#Jira UE-96448
#rb chris.gagnon

[CL 14114839 by brooke hubert in ue5-main branch]
2020-08-14 13:24:16 -04:00
danny couture
9a5d8acdea Add support for adding tasks from multiple threads like distance fields (CL 8571312)
Fix threadpool lifetime management like distance field (CL 10733543)

#rb Francis.Hurteau

[CL 13954301 by danny couture in ue5-main branch]
2020-07-28 09:09:18 -04:00
Michal Valient
95d19f95b1 [REVERB] Merging //UE4/Private-Reverb-Development@13832732
#rb graham.wihlidal, rune.stubbe, brian.karis, andrew.lauritzen, jeff.farris

[CL 13834854 by Michal Valient in ue5-main branch]
2020-07-06 18:58:26 -04:00
brooke hubert
a470770796 Remove deprecated asset editor manager.
#Jira none
#rb lauren.barnes

[CL 13816532 by brooke hubert in ue5-main branch]
2020-07-01 16:35:41 -04:00