- FMeshSceneAdapter updates
- if bThickenThinMeshes is enabled, then all instance meshes are converted to DynamicMesh and decomposed to find non-closed regions. Those regions are uniqued into separate meshes. The remaining closed geometry is separated out and kept as instanced.
- various utility functions added to support above
- previous code to explicitly 'thicken' open meshes into solids is removed. Instead unsigned distance is used to determine inside/outside and generate a 1/0 winding number
- instances are now sorted into an octree to speed up winding number evaluations
- If all meshes are closed (or effectively closed via above, ie will return integer winding number) then winding number query can early-out as soon as it finds a non-zero value
- Add hard-normals options in IGeometryProcessing_ApproximateActors (not exposed in MergeActors tool options yet)
- Added hard-normal callucation to ApproximateActorsImpl, and additional profiling
- Allow specification of actual ECollisionTraceFlag options in CreateStaticMeshUtil, instead of just a boolean
- Add FSparseDynamicOctree3::ContainmentQueryCancellable() variant that can early-exit
#rb none
#rnx
#jira none
#preflight 60a686274c320300018d3841
#ROBOMERGE-SOURCE: CL 16410125 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v804-16311228)
[CL 16412542 by ryan schmidt in ue5-main branch]
- Skip full-mesh normals computation in OffsetMeshRegion if using vertex normals.
- Add operator[] to MeshConnectedComponents.
- Add FSparseDynamicOctree3::ContainmentQuery() to allow for single-point range query.
- Add FMeshFaceSelection::IsSelectionBoundaryEdge() and optimize ExpandToOneRingNeighbours() and ContractBorderByOneRingNeighbours(), now significantly faster for very large selections. Convert VtxTrianglesItr calls to EnumerateVtxTriangles
- Use TestAnyHitTriangle() instead of FindNearestHitTriangle() in TRemoveOccludedTriangles. Reduces cost from 6.4s to 1.2s on a 64-core threadripper for a large-scale (1.4m triangles) visibility-based removal problem
- Optimize FMarchingCubes implementation for large thread counts. Replace single FCriticalSection with indexed sets of FCriticalSection to reduce thread contention. Instead of directly writing to mesh, accumulate mesh vertices and triangles in separate blocks (hashed on grid coordinates) and then build output mesh after generation completes. Add bEnableValueCaching option to skip caching of corner values, which causes lots of thread contention if Implicit function is very cheap (eg a grid-based SDF evaluation). Enable this option in Morphology meshing. Reduces marching cubes cost from ~3.5s to <500ms on a 64-core threadripper for a large-scale (1.4m triangles) Morphology problem.
#rb jimmy.andrews
#rnx
#jira none
#ROBOMERGE-SOURCE: CL 16370702 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v804-16311228)
[CL 16372561 by ryan schmidt in ue5-main branch]
- Add FImageAdapter, wraps TImageBuilder of different types and provides a consistent interface, so that other code doesn't need specializations for each image type
- FMeshSceneAdapter now supports the ability to detect and thicken "thin" meshes, by flattening the instances into unique mesh copies (generally necessary due to scaling). Can also now return statistics about the mesh scene, return a full flattened mesh (for debugging), and automatically generate a "closing mesh" that can help to cap off the base of mesh assemblies when trying to generate a solid/etc.
ModelingComponents:
- FWorldRenderCapture now writes via FImageAdapter instead of an Image4f
- FSceneCapturePhotoSet now stores less data for photo sets. BaseColor/Emissive/WorldNormal are 3f, Roughness/Specular/Metallic are 1f
- IApproximateActors and implementation now support optional base-capping, occluded mesh removal, geometric-tolerance simplification, thin mesh auth-thickening. Now creates MICs based on an input Material, instead of new Material. Added ability to emit a flattened debug mesh, and print debug info.
MergeActors:
- Expose above improvements to IApproximateActors
#rb none
#rnx
#jira none
#preflight 609ef005f6c6e3000144c5e2
[CL 16338550 by Ryan Schmidt in ue5-main branch]
Add FDynamicMeshEditor::AppendMesh() variant that takes a TTriangleMeshAdapter<double>
Add FMeshDescriptionMeshAdapterd that wraps FMeshDescriptionTriangleMeshAdapter in TTriangleMeshAdapter<double> API
Add TTransform3::HasNonUniformScale()
#rb david.hill
#rnx
#jira none
#preflight 609a0a570ba7b600013cce27
[CL 16278551 by Ryan Schmidt in ue5-main branch]
ModelingComponents: add FMeshSceneAdapter, generates "flattened" mesh representation for a set of Actors, with support for instancing to avoid duplication, and creates minimal set of AABBTree/FWNTrees for the unique meshes. Does not make copies of any mesh data, uses MeshAdapter to allow queries directly on MeshDescriptions.
#rb none
#rnx
#jira none
[CL 16148184 by Ryan Schmidt in ue5-main branch]
- new FWorldRenderCapture class can capture various render buffers of a set of Actors from a given 3D camera
- new TSpatialPhoto represents a 3D-oriented 2D image (ie a "photo")
- new TSpatialPhotoSet stores a set of photos and supports quering them for an attribute value "seen by" the photo set at an arbitrary 3D position (eg basically photo-reprojection onto the point)
- new FSceneCapturePhotoSet calculates TSpatialPhotoSet for a set of render attributes using FWorldRenderCapture, and then supports querying to effectively texture a 3D point using the Photo Set
- FTexture2DBuilder now knows about various other texture types, clarified SRGB conversion parameters
#rb none
#rnx
#jira none
[CL 16135423 by Ryan Schmidt in ue5-main branch]
- Add ECorrespondenceStrategy enum/setting to FMeshImageBakingCache to allow for different lowpoly/highpoly mapping polices, and implement those various policies. Add FindSamplingHoles() to allow for image postprocessing to repair sampling failures.
- Add TImateBuilder::ContainsPixel()
- Add TMathUtil::Tan() function wrapper
- Add support for "Build Scale" in FMeshDescriptionTriangleMeshAdapter. StaticMesh MeshDescriptions can have an arbitrary scaling factor applied, this allows incorporating that scaling without having to make a mesh copy (at cost of a multiply for each vertex access). Add Vectortype-templated GetTriVertices() function.
- Add FWindingNumberBasedSolidify variant of TImplicitSolidify that supports an external Winding-Number-Like function, and does not have an explicit Mesh/AABBTree dependency. This allows us to mesh the winding number an arbitrary assembly of objects.
#rb david.hill
#rnx
#jira none
[CL 16133947 by Ryan Schmidt in ue5-main branch]