fixes for potential crash / invalid operations on radial fracture of pillar
- make 'embed surface path' find the intended start vertex for its path when it's known
- guard against path being empty before accessing element 0
- guard against invalid edge collapse in mesh boolean that was triggered by this example
#rb david.hill
#rnx
#ushell-cherrypick of 16760529 by Jimmy.Andrews
#preflight 60d49b4557b30200011a0594
[CL 16775195 by Jimmy Andrews 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]
- Changed triangulation of volume polygons to Delaunay to avoid degenerate tris when possible.
- Added ability to set degenerate tri normals to neighbor normal to avoid creating nonplanar volume polygons if degenerate tris do appear.
- Created a path to use FPolys instead of bsp nodes to convert from volumes, as nodes get broken up arbitrarily.
- Gave volume conversion the ability to preserve group boundary edges.
- Changed PlanarFlipsOptimization to correctly deal with degenerate tris, and to respect group boundaries.
- Added legacy cleanup code that Ryan ported to make volume faces convex.
- Changed our version of the convexity code to avoid arbitrary precision cutoff, and to remove one of the places we were arbitrarily throwing away colinear verts.
- Changed on-the-fly conversion options to not try to fill cracks, as this seems to worsen any problems further.
#rb Jimmy.Andrews, Ryan.Schmidt
#lockdown simon.tourangeau
#rnx
#jira UE-107140
#ROBOMERGE-OWNER: semion.piskarev
#ROBOMERGE-AUTHOR: semion.piskarev
#ROBOMERGE-SOURCE: CL 15953732 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v787-15839533)
#ROBOMERGE-CONFLICT from-shelf
[CL 15971476 by semion piskarev in ue5-main branch]
#ROBOMERGE-SOURCE: CL 15561912 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15561922 by jimmy andrews in ue5-main branch]
GeometryFlow: Added FCompactMeshNode, FComputeMeshPerVertexOverlayNormalsNode (convenient), and FTransferMeshMaterialIDsNode that applies FMeshAttributeTransfer based on two input meshes. Graph InferConnection() now is more clever and can infer connections in cases where a potentially-ambiguous connection is resolved based on what is already connected (ie if two mesh inputs, and one is assigned, infer that second one is intended)
LODToolset: LODGraph now transfers materials and computes per-vertex normals before Simplify node, and Compacts afterwards (required for other downstream processes).
LODProcess now handles multiple materials, and can re-use input materials if they do not require a baked texture or normal map. In repeat applications, previously-auto-generated StaticMesh Materials are detected and removed from the material set. Normals and Tangents are explicitly computed for stored HiRes source and LOD0, and build settings updated appropriately.
#rb none
#rnx
#jira none
[FYI] tyson.brochu
#ROBOMERGE-SOURCE: CL 15470041 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
[CL 15470044 by ryan schmidt in ue5-main branch]
Add insights profiling tags to RemeshMeshOp and FRemesher. Small optimizations to FRemesher::ProcessEdge(), which has surprising overhead for no-ops (ie edge is not modified).
Add FUniqueIndexSet, alternative to a TSet for constructing list of unique indices (eg when finding set of one-ring tris of a list of vertices). Generally more efficient, particularly for large sets.
Improve FSubRegionRemesher. Make VertexROI private, provide accessors and update usage sites. Optimize InitializeFromVertexROI(), which is an expensive part of dynamic mesh sculpting. Make FullSmoothPass_Buffer() compute in parallel.
ModelingTools:
Major refactor of DynamicMeshSculptTool to improve performance (2-4x improvement on large brush sizes on 1m triangle mesh). A single FSubRegionRemesher is now created and maintained for entire brush stroke, rather than recreating every stamp. This avoids the high cost of initialzing full-mesh constraint set, and allows re-use of various allocated memory buffers. Reorganize major sub-steps computed in a single brush-stamp tick to allow Async computation where possible. Replace some ROI TSets with FUniqueIndexSet. Instrument for Insights, remove old cycle counting.
#rb none
#rnx
#jira none
[CL 15215321 by Ryan Schmidt in ue5-main branch]
- Rename "offset" to the more accurate "thicken shells"
- More consistent clamp min thickening based on voxel resolution
- Only apply thickening to meshes that are actually shells (i.e. have open boundaries)
- Improve related comments and variable names
#rb david.hill
[CL 15118588 by Jimmy Andrews in ue5-main branch]