Commit Graph

90 Commits

Author SHA1 Message Date
fred kimberley
e7e64e1749 Make FVector conversions explicit.
#preflight 6221270ea00412627d0b7dd3
#jira UE-122078
#lockdown Julien.Marchand
#rb Andrew.Davidson

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 19253774 in //UE5/Release-5.0/... via CL 19257968
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v924-19243027)

[CL 19263535 by fred kimberley in ue5-main branch]
2022-03-04 03:48:53 -05:00
Brian Karis
dba24ab6be FDynamicBVH now supports a forest with a spatial hash at the highest level to support LWC without the need for doubles for bounding boxes.
Switched FDynamicBVH to use greedy insertion because branch and bound perf significantly degrades with heavily overlapped leaves.

Added closest point queries using branch and bound.

FBounds is now templated as TBounds.

#rb graham.wihlidal
#robomerge FNNC
#preflight 6216dbf9104496cff8abfc36

[CL 19107993 by Brian Karis in ue5-main branch]
2022-02-23 21:17:53 -05:00
brian karis
a208fbc50b Changed name on Nanite Proxy mesh to Nanite Fallback mesh.
Changed fallback settings to be largely error based with new property FallbackRelativeError.

Nanite builder will now provide the LOD fallbacks for all autogenerated LOD levels which is far faster than generating them from scratch.

#rb graham.wihlidal
#preflight 61f9e1fe9e4d23cd93b8d556

#ROBOMERGE-AUTHOR: brian.karis
#ROBOMERGE-SOURCE: CL 18820056 in //UE5/Release-5.0/... via CL 18820070 via CL 18822916
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18825066 by brian karis in ue5-main branch]
2022-02-02 08:19:56 -05: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
zak middleton
36c99f6887 #ue5 - LWC: FVector4f <-> FVector4d conversion is now explicit.
FLinearColor has also been modified to make any double->float conversions explicit. Previously all 3D TVector versions were allowed to be implicit and thus could convert TVector<double> => FLinearColor => TVector4<float>.

Fixed up all engine and game casts. Added "//LWC_TODO: precision loss" around any explicit casts that previously were silently explicit and we may need to revisit for precision loss analysis.

#jira UE-122085
#rb Ben.Ingram, Andrew.Davidson
#preflight 61f24af473238441cb7bb0f1

#ROBOMERGE-AUTHOR: zak.middleton
#ROBOMERGE-SOURCE: CL 18751249 in //UE5/Release-5.0/... via CL 18751253 via CL 18751319
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18751326 by zak middleton in ue5-main branch]
2022-01-27 03:30:41 -05:00
ryan schmidt
6954d6fb45 StaticMesh: update Nanite Build from HiRes SourceModel that had regressed relative to changes in Nanite builder
#rb richard.talbotwatkin
#jira UE-137501
#rnx
#preflight 61b8adbeba7ec9608ef14307

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18454217 in //UE5/Release-5.0/... via CL 18454225
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v898-18417669)

[CL 18454238 by ryan schmidt in ue5-release-engine-test branch]
2021-12-14 09:54:56 -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
aurel cordonnier
a6e741e007 Merge from Release-Engine-Staging @ 17915896 to Release-Engine-Test
This represents UE4/Main @17911760, Release-5.0 @17915875 and Dev-PerfTest @17914035

[CL 17918595 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-25 20:05:28 -04:00
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -04: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
kenzo terelst
b6bdbd8452 Fix build for Max & Linus platforms
#rb none
#preflight skip

#ROBOMERGE-SOURCE: CL 17314750 via CL 17315753
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17315952 by kenzo terelst in ue5-release-engine-test branch]
2021-08-26 07:41:28 -04:00
kenzo terelst
c730c76f8f Add support for Nanite coarse mesh streaming (vertex data + BLAS):
- Cook side extra low lod coarse mesh will be created at 1/8th of the original coarse mesh if mesh streaming or editor data is available for the platform
- Nanite static meshes with streamable LODs are registered to a Nanite::CoarseMeshStreamingManager which will handle the stream in/out requests for these assets in fixed memory budget (memory budget is part of the total mesh streaming budget)
- Nanite proxy needs to handle different raytracing proxy LOD indices now for dynamic and cached indices
- What to stream is driven by what's used in the TLAS build - each deferred render pass all used streamable meshes are collected and forwarded to the CoarseMeshStreamingManager
- CoarseMeshStreamingManager is updated after all views are rendered and will make stream in/out requests depending on the TLAS usage
- When LODs of UStaticMeshes renderdata is loaded or unloaded then a rebuild of the cached render data is requested to make sure the correct LOD & RT BLAS is used (to do this the UStaticMeshComponent are registered to the UStaticMesh so a request for rebuild can be made for all the proxies on the scene)

#preflight 612659e872e9eb00010a27d9

#ROBOMERGE-SOURCE: CL 17314263 via CL 17315687
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17315942 by kenzo terelst in ue5-release-engine-test branch]
2021-08-26 07:40:55 -04:00
ben ingram
02a8483152 Fix usage of embree with LWC for mesh distance fields and cards
#jira UE-117476
#rb Krzysztof.Narkowicz

#ROBOMERGE-SOURCE: CL 16624221 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v831-16623017)

[CL 16624232 by ben ingram in ue5-release-engine-test branch]
2021-06-10 11:46:40 -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
aurel cordonnier
50944fd712 Merge UE5/RES @ 16162155 to UE5/Main
This represents UE4/Main @ 16130047 and Dev-PerfTest @ 16126156

[CL 16163576 by aurel cordonnier in ue5-main branch]
2021-04-29 19:32:06 -04:00
Richard TalbotWatkin
591cc432a6 Fix for Nanite building with reordered section material indices.
This involves a change to the DDC key format for static meshes with multiple sections in LOD0.
#jira UE-112945
#rb Graham.Wihlidal, Alexis.Matte

[CL 16127723 by Richard TalbotWatkin in ue5-main branch]
2021-04-27 10:50:58 -04:00
christopher waters
c45f1dfad5 Removing Tessellation:
- Removed Tessellation settings from Materials and Material Interfaces
- Removed Adjacency buffers from Static and Skeletal Meshes.

#jira UE-94564
#rb jeremy.moore, josie.yang, kevin.ortegren, yuriy.odonnell

#ROBOMERGE-OWNER: christopher.waters
#ROBOMERGE-AUTHOR: christopher.waters
#ROBOMERGE-SOURCE: CL 15501023 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
#ROBOMERGE-CONFLICT from-shelf

[CL 15502653 by christopher waters in ue5-main branch]
2021-02-23 14:03:21 -04:00
ryan schmidt
43c0893054 Support using HiRes SourceModel to generate Nanite rendering data in Static Mesh Build. If HiRes exists, it will be used instead of LOD0, in local function BuildNaniteFromHiResSourceModel(). Refactored several blocks out of FStaticMeshBuilder::Build() into standalone functions so they could be called in multiple places.
This CL also updates the bounding box computation, previously the bounds were computed on LOD0 render data, ie after the nanite cut. Now the bounds of either the HiRes SourceModel, or high-res LOD0, are combined with the final LOD0 bounds.

#rb brian.karis, richard.talbotwatkin, jimmy.andrews, david.hill
#rnx
#jira none

#ROBOMERGE-SOURCE: CL 15485739 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15485742 by ryan schmidt in ue5-main branch]
2021-02-21 13:20:29 -04:00
ionut matasaru
a90718a7fb Fixed usage of TRACE_CPUPROFILER_EVENT_SCOPE macro(s) in various places.
Common mistakes:

a) TRACE_CPUPROFILER_EVENT_SCOPE("Foo") or TRACE_CPUPROFILER_EVENT_SCOPE("FClass::Foo")
    --> results in a timer named "Foo" or "FClass::Foo" (the quotes will be included in the name)

b) TRACE_CPUPROFILER_EVENT_SCOPE(TEXT("Foo"))
    --> results in a timer named L"Foo" (L and quotes will be included in the name)

c) TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(TEXT("Other Foo")) or TRACE_CPUPROFILER_EVENT_SCOPE_TEXT("Foo")
    --> Slow! It will use dynamic string matching that adds an unnecessary overhead.

Correct usage:
    TRACE_CPUPROFILER_EVENT_SCOPE(Foo)
    TRACE_CPUPROFILER_EVENT_SCOPE(FClass::Foo)
    TRACE_CPUPROFILER_EVENT_SCOPE_STR("Other Foo") // when timer name has spaces
    TRACE_CPUPROFILER_EVENT_SCOPE_TEXT(*Foo.ToString()) // only if a dynamic name is really needed

#rb Catalin.Dragoiu
#fyi Marc.Audy, Krzysztof.Narkowicz, Rune.Stubbe, Michal.Valient

[CL 15134822 by ionut matasaru in ue5-main branch]
2021-01-19 06:29:15 -04:00
Krzysztof Narkowicz
4229937db8 Removed FMeshBuilder::Build(UStaticMesh* StaticMesh, TArray<FStaticMeshBuildVertex>& Verts, TArray<uint32>& Indexes, TArray<FStaticMeshSection>& Sections, uint32& NumTexCoords, bool& bHasColors). It's somewhat danegous as it leaks mesh descriptors and isn't used anymore.
#rb Brian.Karis

[CL 14602726 by Krzysztof Narkowicz in ue5-main branch]
2020-10-28 15:52:00 -04:00
Krzysztof Narkowicz
d5c90b01a3 Replaced descriptor get with a clone inside FStaticMeshBuilder::BuildMeshVertexPositions to lower memory usage during the mesh build process.
#rb Danny.Couture

[CL 14598717 by Krzysztof Narkowicz in ue5-main branch]
2020-10-28 09:56:58 -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
Rune Stubbe
e46e841768 Large memory saving for Editor builds. ~5GB for Reverb P_World.
Removed unused and invalid WedgeMap from Nanite meshes.
#rb richard.talbotwatkins

[CL 14554459 by Rune Stubbe in ue5-main branch]
2020-10-23 05:42:03 -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
Brian Karis
8ad4d4a7cd Fixed determinism in build.
Fixed tangents not being derived resulting in no welding for mip0 of Nanite
Ignore bHasColor from mesh desc and check if any non-white.
Misc clean up

#rb rune.stubbe

[CL 14223322 by Brian Karis in ue5-main branch]
2020-08-31 17:49:41 -04:00