Commit Graph

12 Commits

Author SHA1 Message Date
ryan schmidt
d292a2b82f GeometryCore: add min-triangle-count threshold to TMeshSimplification::FastCollapsePass()
ApproximateActors: add FMeshApproximationSettings::bEnableSimplifyPrePass option, default true, and implement in ApproximateActors impl. This does a fast-collapse down to a multiple of the target triangle count (or 1m tris in tolerance-mode). This reduces simplification time in HLOD builds for small city from 4-5m to 1m in some of the worst blocks.

ApproximateActors: add FMeshApproximationSettings::bEnableParallelBaking, default true, and implement in the ApproximateActors Impl. This allows the photocapture step to proceed at the same time as the mesh generation, which shaves 30-40s off every HLOD build, but increases memory requirements.

#rb sebastien.lussier
#jira UE-142582
#preflight 6214fd9e797dbbeb4723468e
#rnx

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 19083146 in //UE5/Release-5.0/... via CL 19097574
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845)

[CL 19141130 by ryan schmidt in ue5-main branch]
2022-02-24 23:46:55 -05:00
ryan schmidt
b4814d732d ApproximateActors: reduce memory footprint by using compressed or lower-resolution LOD0 meshes
- add FStaticMeshLODResourcesAdapter in MeshConversions module, wrapper that presents StaticMesh LODResources mesh (ie Section buffers) with an API compatible with GeometryCore mesh templates
- add TMeshWrapperAdapterd in GeometryCore, this is a shim for getting any template-API-compatible mesh into a FTriangleMeshAdapterd specifically (required to call some non-template mesh processing functions)

- add support for using StaticMesh LODResources meshes in FMeshSceneAdapter instead of source meshes, controlled by build options flag
- add FMeshSceneAdapter build options flags specifying whether UV/Normal queries are required (default true)
  - when not required, the loaded MeshDescriptions and created DynamicMeshes are packed into FColliderMesh which has a smaller memory footprint, allowing the larger meshes to be freed

- to support above, the SpatialWrappers in MeshSceneAdapter.cpp have been refactored extensively
  - added FCompressedMeshSpatialWrapper which Builds from a temporary FDynamicMesh3 into a FColliderMesh, supports all the same options as FDynamicMeshSpatialWrapper (so a drop-in replacement with less memory usage, but no UV/Normal queries)
  - added FBaseMeshSpatialWrapper, base class for existing FDynamicMeshSpatialWrapper and new FCompressedMeshSpatialWrapper that has shared config settings (can more more here in the future)
  - added FStaticMeshLODResourcesMeshSurfaceAdapter, similar toFMeshDescriptionTriangleMeshSurfaceAdapter, a mesh adapter that filters out any geo that doesn't have a Surface-domain material
  - refactored TStaticMeshSpatialWrapper into TStaticMeshSpatialWrapperBase and subclasses FStaticMeshSourceDataSpatialWrapper and FStaticMeshRenderDataSpatialWrapper, for source mesh vs render mesh
  - added FCompressedStaticMeshSpatialWrapper, variant of FStaticMeshSourceDataSpatialWrapper that stores to a FColliderMesh and releases the source MeshDescription
  - SpatialWrapperFactory() now has logic to build from render mesh vs source mesh vs compressed source mesh
  - moved initial SpatialWrapper construction from AddActors() phase to Build() phase, because now it depends on build settings

- add EMeshDataSourceLODPolicy to IGeometryProcessing::FOptions, with LOD0 Source and LOD0 RenderMesh options
- ApproximateActorsImpl now provides/handles this policy setting, and configures FMeshSceneAdapter to not need UV/Normal queries (not required in this context)
- add bUseRenderLODMeshes option in FMeshApproximationSettings to expose render vs source mesh control at user level

#rb sebastien.lussier, rinat.abdrashitov
#jira UE-141256
#preflight 6206db44054c2e38c473be5d
#rnx

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18963126 in //UE5/Release-5.0/... via CL 18963829 via CL 18964587
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18964607 by ryan schmidt in ue5-main branch]
2022-02-11 18:11:49 -05:00
ryan schmidt
100afc909f ApproximateActors: re-organize computation to reduce peak memory usage
- MeshSceneAdapter instance is now passed to GenerateApproximationMesh(), to be released as soon as possible
- generated SolidMesh is now discarded once Morphology result is computed (never used again)
- FColliderMesh is used to create projection-target mesh copy for Simplification w/ geometric tolerance, instead of DynamicMesh (fewer buffers)
- CapturePhotoSet is no longer run in parallel with mesh generation. This costs a bit of performance but significantly reduces peak memory usage
- Add Insights bookmarks

#rb sebastien.lussier
#rnx
#jira UE-141256
#preflight 61fc5843cd1834273044cf72
#lockdown aurel.cordonnier

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18863243 in //UE5/Release-5.0/... via CL 18863328 via CL 18863457
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18863475 by ryan schmidt in ue5-main branch]
2022-02-04 10:25:59 -05:00
ryan schmidt
6ad26b69f0 rename UE::Geometry::TTransform3 to TTransformSRT3, update references
#rb none
#rnx
#jira UE-139757
#preflight 61f572d9e52a8a4a910990f1

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18784197 in //UE5/Release-5.0/... via CL 18784203 via CL 18784222
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18784226 by ryan schmidt in ue5-main branch]
2022-01-29 14:37:53 -05:00
sebastien lussier
9e1d092531 Approximate Actors - Corrected handling of the EMeshApproximationBaseCappingType::ConvexPolygon base capping option.
Using EMeshApproximationBaseCappingType::ConvexPolygon would always generate a solid rather than a polygon.

#jira none
#rb ryan.schmidt
#preflight 61e71b62843acf1b24014a6f

#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 18646035 in //UE5/Release-5.0/... via CL 18646062 via CL 18646090
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v900-18638592)

[CL 18648114 by sebastien lussier in ue5-main branch]
2022-01-18 16:38:06 -05:00
ryan schmidt
b47d66add3 ApproximateActors: add support for PatchBuilder AutoUV method
#rb jimmy.andrews
#rnx
#jira none
#preflight 61b8d5532e65a1df046a90c5

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

[CL 18456352 by ryan schmidt in ue5-release-engine-test branch]
2021-12-14 13:08:31 -05:00
jimmy andrews
fd07763a78 remove UE::Geometry::TRay3 and replace usages with UE::Math::TRay
#rb tyson.brochu
#rnx
#preflight 6195872476668b37001d1141

#ushell-cherrypick of 18231220 by Jimmy.Andrews

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 18232491 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v895-18170469)

[CL 18232527 by jimmy andrews in ue5-release-engine-test branch]
2021-11-17 21:06:46 -05:00
ryan schmidt
db56ecac96 ModelingTools: add new bOnlySurfaceMaterials build option in MeshSceneAdapter to only include StaticMesh sections with MD_Surface material (previously this was hardcoded). Enable this setting in ApproximateActors, disable it in ISMEditorTool.
#rb sebastien.lussier
#rnx
#preflight 612d1e57423a8f000130c352

#ROBOMERGE-SOURCE: CL 17355981 via CL 17355990
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17355992 by ryan schmidt in ue5-release-engine-test branch]
2021-08-30 14:32:11 -04:00
ryan schmidt
3c6a5318d8 GeometryProcessing: LWC Fixes. Remove GeometryCore TRay3, TSphere3, and TOrientedBox3 from ExplicitUseGeometryMathTypes.h, update call sites to fully-qualified name where necessary (in some cases handled by using declaration at class scope, or by wrapping code in UE::Geometry:: namespace)
#rb none
#rnx
#jira none
#preflight 6126b717d673c400011f438b

#ROBOMERGE-SOURCE: CL 17316981 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17316997 by ryan schmidt in ue5-release-engine-test branch]
2021-08-26 09:31:28 -04:00
andrew davidson
ffa1d5ca26 LWC support for FQuat and FTransform
Merge Dev-LargeWorldCoordinates [at] 17289670

#preflight 6125fb6925057900014f2cd6

#ROBOMERGE-SOURCE: CL 17300515 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v861-17282326)

[CL 17300523 by andrew davidson in ue5-release-engine-test branch]
2021-08-25 06:26:44 -04:00
sebastien lussier
9d1dc3109e MeshModelingToolset
* ApproximateActors - Fix forced scene capture of MRS when PackMRS is off
* MeshSceneAdapter - Use GetMaterial_Concurrent() rather than GetMaterial() for code that is executed in parallel tasks
[FYI] ryan.schmidt
#preflight 611a675fe7a3070001b5be0a

#ROBOMERGE-SOURCE: CL 17175463 via CL 17175489
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v855-17104924)

[CL 17175500 by sebastien lussier in ue5-release-engine-test branch]
2021-08-16 09:36:40 -04:00
michael balzer
82ab317af0 MeshModelingToolset: Split plugin into non-experimental and experimental
#jira UETOOL-3823
#rb ryan.schmidt
#preflight 6101fb4b2b002800014f7007

#ROBOMERGE-SOURCE: CL 17003092 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 17003151 by michael balzer in ue5-release-engine-test branch]
2021-07-29 20:08:48 -04:00