Commit Graph

18 Commits

Author SHA1 Message Date
tiago costa
1334d92ec1 Removed some code related to Nanite Coarse Mesh Streaming
- don't modify DDC key based on cvar since it doesn't impact LOD generation since CL 18820056.
- removed bGenerateCoarseMeshStreamingLODs parameter from a few functions since it isn't used anymore.

#rb brian.karis
#prelight 652516f53a59af0b367fbd0b

[CL 28614902 by tiago costa in ue5-main branch]
2023-10-10 07:29:08 -04:00
tiago costa
abca6b5a6c Resubmit CL26160360, 26146080, 26137852, 26126752
Only leaving CL 26157603 reverted since accessing GenerateSource in FDistanceFieldVolumeData::CacheDerivedData is not safe due to async mesh compilation.

#prelight 64948190a26e02126bc0a64f
#rb Krzysztof.Narkowicz

[CL 26206875 by tiago costa in ue5-main branch]
2023-06-23 04:28:57 -04:00
bob tellez
4c7e2e1b32 [Backout] - CL26160360, 26157603, 26146080, 26137852, 26126752
[FYI] tiago.costa
Original CL Desc
-----------------------------------------------------------------
Use FSignedDistanceFieldBuildSectionData when generating distance fields for Nanite meshes.

Context:
- Nanite meshes distance fields are generated using the original mesh data instead of the coarse representation generated by Nanite, however that code path was not checking section data such as blend mode, two sided, etc.

Fix:
- Modified FStaticMeshBuilder::BuildMeshVertexPositions(...) to also output a FStaticMeshSectionArray.
- Updated MeshRepresentation::SetupEmbreeScene(...) to check section flags when using SourceMeshData.IsValid() code path.

#prelight
#rb Krzysztof.Narkowicz

[CL 26174853 by bob tellez in ue5-main branch]
2023-06-22 00:25:01 -04:00
tiago costa
2b73cf0aa3 Use FSignedDistanceFieldBuildSectionData when generating distance fields for Nanite meshes.
Context:
- Nanite meshes distance fields are generated using the original mesh data instead of the coarse representation generated by Nanite, however that code path was not checking section data such as blend mode, two sided, etc.

Fix:
- Modified FStaticMeshBuilder::BuildMeshVertexPositions(...) to also output a FStaticMeshSectionArray.
- Updated MeshRepresentation::SetupEmbreeScene(...) to check section flags when using SourceMeshData.IsValid() code path.

#prelight
#rb Krzysztof.Narkowicz

[CL 26160411 by tiago costa in ue5-main branch]
2023-06-21 16:17:07 -04:00
graham wihlidal
7e92ab173a Remove Nanite static mesh memory from incompatible platforms
#rb devin.doucette
[FYI] brian.karis, rune.stubbe, zousar.shaker
#preflight 62bbdeabd8366789fdc55c95

#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 20878146 via CL 20878158 via CL 20878172
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v971-20777995)

[CL 20880187 by graham wihlidal in ue5-main branch]
2022-06-29 15:11:23 -04:00
kenzo terelst
00c5e43c69 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
#ROBOMERGE-BOT: (v861-17282326)

[CL 17315687 by kenzo terelst in ue5-main branch]
2021-08-26 07:30:04 -04:00
Ben Ingram
b569c9be59 Fix usage of embree with LWC for mesh distance fields and cards
#jira UE-117476
#rb Krzysztof.Narkowicz

[CL 16624221 by Ben Ingram in ue5-main branch]
2021-06-10 11:46:03 -04:00
Marc Audy
0cbbc781ca Merge UE5/Release-Engine-Staging @ 15740152 to UE5/Main
This represents UE4/Main @ 15709114

[CL 15740605 by Marc Audy in ue5-main branch]
2021-03-18 15:20:03 -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
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
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
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
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
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
Ben Marsh
7598af0532 Update copyright notices to 2019.
#rb none
#lockdown Nick.Penwarden

[CL 4662404 by Ben Marsh in Main branch]
2018-12-14 13:41:00 -05:00
projectgheist
27ae5afdcb PR #4726: Update copyright notices to 2018. (Contributed by projectgheist)
#rb none
#lockdown Nick.Penwarden

[CL 4070389 by Ben Marsh in Main branch]
2018-05-14 07:48:19 -04:00
Alexis Matte
fcd54612ff Fix the build to use the correct renderdata
Fix a crash in debug when reducing staticmesh
#rb none
#jira UE-56969
#jira UE-56970

[CL 3995847 by Alexis Matte in Dev-Geometry branch]
2018-04-10 13:20:01 -04:00
Alexis Matte
f158f6f053 Move MeshBuilder module from runtime to developper and make it editor only
#rb none

[CL 3914382 by Alexis Matte in Dev-Geometry branch]
2018-02-28 10:07:25 -05:00