Commit Graph

238 Commits

Author SHA1 Message Date
Jimmy Andrews
483735ed38 #jira UE-117587
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]
2021-06-24 12:29:49 -04:00
Ryan Schmidt
52ab1f5537 ModelingTools: Clean up AutoUV Tools and add support for Polygroup Layers.
- Refactor recompute-UVs-for-groups/islands out of ParameterizeMeshOp/Tool into RecomputeUVsOp/Tool. RecomputeUVsTool supports selection of active PolygroupLayer when applicable. Add support for auto-repacking.
- Clean up ParameterizeMeshOp/Tool, remove functionality related to recomputation that was moved to Recompute tool, add separate property sets for UVAtlas and XAtlas
- Add FDynamicMeshUVEditor::QuickPack() function to compute UV layout
- Add support for Polygroup Layer selection in SetCollisionGeometryTool, if only one source object is in use

#rb none
#rnx
#jira none
#preflight 60ced4b0be81e800012cc135

[CL 16724375 by Ryan Schmidt in ue5-main branch]
2021-06-20 16:57:02 -04:00
Ryan Schmidt
e196c256e4 GeometryProcessing: remove forwarding headers used in GeometryCore transition, and update all affected includes.
#rb none
#rnx
#jira none
#preflight 60c52c5db9446100014da02d

[CL 16653115 by Ryan Schmidt in ue5-main branch]
2021-06-13 00:35:22 -04:00
lonnie li
450820cda6 ModelingTools: Fix synchronization issues in BakeTexture when modifying bake targets during a background compute.
#rb michael.balzer
#rnx
#jira none
#preflight 60c1280079a7fe0001317aaa

[CL 16614097 by lonnie li in ue5-main branch]
2021-06-09 18:10:23 -04:00
lonnie li
febb75cece ModelingTools: Fix post op selection for TriEdit: Extrude, Offset, Cut Faces & Duplicate.
#rb michael.balzer
#rnx
#jira UE-114975
#preflight 60baa85f2c42ea0001d65f32

[CL 16562738 by lonnie li in ue5-main branch]
2021-06-04 19:26:45 -04:00
Ryan Schmidt
451511406d GeometryProcessing: Improve cylinder projection in FDynamicMeshUVEditor.
ModelingTools: Replace local code in UVProjectionOp with calls to FDynamicMeshUVEditor. Major rewrite of UVProjectionTool to support ExpMap projection, improve property handling, support world-space dimensions, support re-using previous projection to simplify world-space tiling, support input selections coming from PolyEdit/TriEdit, support ctrl+click and ctrl+shift+click interactions to reposition projection primitive.
#rb none
#rnx
#jira none
#preflight 60b57761f51cd90001f9676c

[CL 16511543 by Ryan Schmidt in ue5-main branch]
2021-05-31 22:15:32 -04:00
Ryan Schmidt
9c6498f498 GeometryProcessing: add various functions to FDynamicMeshUVEditor. New SetTriangleUVsFromExpMap() variant can specify a specific target frame, supports normal blending and smoothing internally. Ported box and cylinder projection from UVProjectionOp to SetTriangleUVsFromBoxProjection() and SetTriangleUVsFromCylinderProjection(). Cylinder projection currently has been modified to create two islands for cylinder, instead of one (should eventually make this optional)
#rb david.hill
#rnx
#jira none
#preflight 60b01ab23c6c4e0001d04895

[CL 16494256 by Ryan Schmidt in ue5-main branch]
2021-05-27 19:37:34 -04:00
lonnie li
04eedbdd12 ModelingTools: Refactor new bake path to bake evaluators.
Add support for variable float size and bake results per evaluator.

#rb jimmy.andrews michael.balzer
#rnx
#jira UETOOL-3397
#preflight 60aea5a35f6905000159e87b

[CL 16475935 by lonnie li in ue5-main branch]
2021-05-26 17:14:57 -04:00
Ryan Schmidt
8fd2394228 GeometryProcessing:
- Add MakeBoundsFromIndices() utility functions to TAxisAlignedBox3 to simplify computing bounding-box of point sets
- FDynamicMesh3::GetVertexFrame() can now take an externally-provided normal, and so now can be used without computing VertexNormals attribute
- Add FModuloIteration to IteratorUtil for doing quasi-random-ish iterations over index ranges
- Add CollectVertexPositions() to MeshIndexUtil.h, for creating arrays/sets of vertex positions as a one-liner
- Add FMeshWeights::CotanWeightsBlendSafe() to support cotan-based smoothing of arbitrary properties
- Add TMinVolumeBox3::SolveSubsample() which will (quasi-randomly) subsample a set of the input points to reduce cost of box computation
#rb david.hill
#rnx
#jira none

[CL 16450731 by Ryan Schmidt in ue5-main branch]
2021-05-25 12:13:39 -04:00
Ryan Schmidt
fdb2bab149 GeometryProcessing: Move MeshConversion module from GeometryProcessing plugin to Runtime. Transfer necessary additional files from DynamicMesh to GeometryCore. Move functions from MeshIndexUtil and MeshAdapterUtil namespaces to UE::Geometry namespace.
#rb none
#rnx
#jira none
#preflight 60a7e75e7d6b060001c61f47

[CL 16428413 by Ryan Schmidt in ue5-main branch]
2021-05-22 01:32:46 -04:00
Ryan Schmidt
623e4f96fe GeometryCore: create new GeometryCore Module. Move GeometricObjects code from GeometryProcessing plugin to this new module, as well as core FDynamicMesh3 classes (attributes, aabbtree/octree, change tracking). Update module Build.cs files that reference GeometricObjects.
#rb none
#rnx
#jira none
#preflight 60a713700569f300014a064a

[CL 16415082 by Ryan Schmidt in ue5-main branch]
2021-05-21 01:04:38 -04:00
semion piskarev
24e3ede218 Move IDynamicMeshProvider and IDynamicMeshCommitter out of the dynamic mesh module so that it can remain devoid of UThings. Add comments to avoid this in the future.
#rb Ryan.Schmidt
#jira none
#rnx

[CL 16388181 by semion piskarev in ue5-main branch]
2021-05-19 12:39:42 -04:00
ryan schmidt
d884513784 GeometryProcessing:
- 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]
2021-05-18 14:33:08 -04:00
tyson brochu
50cf569720 Normal Flow Remesh improvements:
- add scalar damping to vertex projection and normal fitting
- detect areas that cover holes in the target mesh and don't project in those regions
- expose smoothing parameters for these areas

#jira UETOOL-3554
#ushell-cherrypick of 16170772 by Ryan.Schmidt
#rb ryan.schmidt
#preflight 60a2d17e4f034a000184b785

[CL 16359473 by tyson brochu in ue5-main branch]
2021-05-17 17:27:58 -04:00
lonnie li
bbab3ea643 ModelingTools: 1st pass Mesh Texture bake refactor w/ multisampling support.
#rb tyson.brochu jimmy.andrews semion.piskarev michael.balzer
#rnx
#jira UETOOL-3397
#preflight 60a2b8b7292e3200011a6bf1

[CL 16357743 by lonnie li in ue5-main branch]
2021-05-17 16:01:01 -04:00
semion piskarev
b999806285 MeshModelingTools: Add DynamicMesh provider/committer interfaces and update existing targets to support them. Move interface target files.
#rb Lonnie.Li
#rnx
#jira none

[CL 16315070 by semion piskarev in ue5-main branch]
2021-05-13 13:22:55 -04:00
Ryan Schmidt
6783e1ee61 GeometryProcessing:
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]
2021-05-11 15:50:30 -04:00
Ryan Schmidt
3019b90219 GeometryProcessing: Add option to do explicit geometric tolerance/deviation checking in TMeshSimplification. Checks edge midpoints and face centroids against a fixed tolerance.
MeshModelingToolset: expose new option in SimplifyMeshOp and SimplifyMeshTool
#rb david.hill
#rnx
#jira none
#preflight 6099fb752032ee00016bee43

[CL 16274273 by Ryan Schmidt in ue5-main branch]
2021-05-11 13:17:19 -04:00
Ryan Schmidt
cacab7d7fc GeometryProcessing: add GroupTopology::GetSelectionBounds() function, use in new UPolygonSelectionMechanic::GetSelectionBounds() function
#rb michael.balzer
#rnx
#jira none
#preflight 60985f12dd2e000001ab05ae

[CL 16246052 by Ryan Schmidt in ue5-main branch]
2021-05-09 23:31:56 -04:00
Ryan Schmidt
adf806112c GeometryProcessing: clean up check() that should be checkSlow() or ensure, to avoid hard failures when used at runtime
#rb david.hill
#rnx
#jira none
#preflight 6095784997897f0001945b4f

[CL 16245329 by Ryan Schmidt in ue5-main branch]
2021-05-09 18:14:45 -04:00
tyson brochu
d72d9d1a3b ProjectToTarget tool: enable world space projection option. Currently projection happens in local space for both the "mesh" and the "projection target". The new WorldSpace option transforms the mesh vertices into world coordinates, then into the coordinates of the projection target before projecting. This is similar to transforming both the mesh and target (an associated acceleration structure) into world coordinates and then doing the projection query.
#rb ryan.schmidt
#jira UETOOL-3458
#preflight 60955aad754924000197e2b9

[CL 16238325 by tyson brochu in ue5-main branch]
2021-05-07 12:01:34 -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
tyson brochu
5800ee9761 Partially parallelize two heavy functions in FNormalFlowRemesher.
#jira UETOOL-3457
#rb david.hill
#rnx
#preflight 6092bccd3731fb00015cdad4

[CL 16209378 by tyson brochu in ue5-main branch]
2021-05-05 13:02:15 -04:00
halfdan ingvarsson
b170b32087 Add support for converting mesh description with skin weights to/from dynamic mesh and topological editing of dynamic meshes, with skin weights that properly handle weight distribution under split/collapse.
#jira UE-93689
#rb jimmy.andrews, david.hill
#preflight 6092079559592e00013e4aed
#rnx

[CL 16202781 by halfdan ingvarsson in ue5-main branch]
2021-05-04 23:49:23 -04:00
Jimmy Andrews
15250452f9 move fast iterative smoothing algorithm over from ModelingOperators into DynamicMesh + associated cleanup
#rb michael.balzer
#rnx
#preflight 608ca8b93b027a000153d14d

[CL 16175448 by Jimmy Andrews in ue5-main branch]
2021-04-30 21:50:43 -04:00