Commit Graph

92 Commits

Author SHA1 Message Date
david hill
56153993ad Geometry Scripting : Geodesic Functions, add ability to trace a "straight" line on a mesh surface.
#preflight 642dbd7d4d26bcd1eb1bf94b
#rb Jimmy.Andrews

[CL 24956789 by david hill in ue5-main branch]
2023-04-06 17:02:35 -04:00
Steve Robb
c341d7fc22 Added [[nodiscard]] to relevant TUniquePtr functions.
Fixed up misuses.

#rb devin.doucette
#jira none
#preflight 6413707f345ab08524938eec

[CL 24686373 by Steve Robb in ue5-main branch]
2023-03-17 07:06:23 -04:00
rinat abdrashitov
6d13803f37 -TransferBoneWeights function now uses bone attributes to re-index the skin weight bone indices when transferring between different skeletons.
-Refactored Chaos cloth transfer tool to use the new TransferBoneWeights functionality.

#rb halfdan.ingvarsson
#rb tyson.brochu
#jira none
#preflight 6408eb888c0039bbf765cd0a

[CL 24565884 by rinat abdrashitov in ue5-main branch]
2023-03-08 15:22:23 -05:00
tyson brochu
0a9de87960 Hole Fill Tool:
- change the smoothing weight scheme to IDT Cotangent
- re-check for mesh seams to constrain between iterations of remeshing

#rb jimmy.andrews
#preflight 63ffa7cc30633435f83e9200

[CL 24474295 by tyson brochu in ue5-main branch]
2023-03-01 19:19:34 -05:00
jimmy andrews
f63cdc13af Update FLocalPlanarSimplify to support simplification along straight creases in a mesh, where the sides of the crease may optionally belong to different PolyGroups
Add an edge simplification operation to the PolyEdit tool

#rb semion.piskarev
#preflight 63ee9a0f3c1eb56f055442ac

[CL 24276322 by jimmy andrews in ue5-main branch]
2023-02-16 21:55:32 -05:00
jimmy andrews
0188b696c0 Add a general-use version of the 'simplify along edges' logic from FMeshBoolean, and use it to simplify plane cuts and edge insertions
+ Update the plane cut logic to allow it to use the simplify function

#rb david.hill
#preflight 63e516ea1d3284fefe72c97a

[CL 24107250 by jimmy andrews in ue5-main branch]
2023-02-09 16:49:32 -05:00
jonathan bard
6e7a97825e Fixed common typo (verticies->vertices)
#rb trivial
#skipci
#rnx

[CL 24061364 by jonathan bard in ue5-main branch]
2023-02-07 17:42:45 -05:00
ryan schmidt
9290a31c7e ModelingComponents: add FDynamicMeshPolygroupDeformer, applies GroupTopologyDeformer to a MeshSelection. Use in DynamicMeshSelector when selection has Polygroup topology.
#preflight 63cc5028f2318350a2597338
#rb none

[CL 23805236 by ryan schmidt in ue5-main branch]
2023-01-22 13:04:22 -05:00
rinat abdrashitov
02c4d0db99 Fixed missing copyright warning
#rb trivial
#jira none
#preflight none

[CL 23606579 by rinat abdrashitov in ue5-main branch]
2023-01-06 21:13:00 -05:00
rinat abdrashitov
25a9819c06 Added a new operator to transfer bone weights from one Dynamic Mesh to another.
#rb halfdan.ingvarsson
#jira none
#preflight 63b87566221aab21e08ba265

[CL 23606452 by rinat abdrashitov in ue5-main branch]
2023-01-06 20:49:50 -05:00
henrik karlsson
5206158342 [Fortnite]
* Fixed non unity/pch compile errors

#preflight 63b7347ee26e31879ba107d6
#rb none

[CL 23595106 by henrik karlsson in ue5-main branch]
2023-01-05 19:52:06 -05:00
ryan schmidt
6caf2c483e GeometryProcessing: improve OffsetMeshRegion operation
Add support for inferring MaterialID, various methods for controlling creation of new polygroups in FOffsetMeshRegion
Add new PolyModelingFaceUtil.h/cpp with new function ComputeFaceSelectionFrame()
Add new PolyModelingMaterialUtil.h/cpp with new functions ComputeMaterialIDRange() and ComputeMaterialIDsForVertexPath()
Add Row/Column count accessor methods to FQuadGridPatch, and new function GetQuadOpeningAngle() that can return opening angle between two quad columns
Improve ComputeUVIslandForQuadPatch, now considers adjacent strips on either side to determine average target UV scale
#preflight 398f6298c5081ee9a563ceb
#rb none

[CL 23516493 by ryan schmidt in ue5-main branch]
2022-12-14 14:51:58 -05:00
ryan schmidt
153ef493fb GeometryProcessing: OffsetMeshRegion improvements
Refactor core of FDynamicMeshEditor::DisconnectTriangles into an overload that takes precomputed triangle TSet and BoundaryLoops array, as some call sites already have computed this info
Refactor new-polygroup computation out of OffsetMeshRegion into UE::Geometry::ComputeNewGroupIDsAlongEdgeLoop util function in PolyEditingEdgeUtil.h/cpp
Add new function UE::Geometry::ComputeAverageUVScaleRatioAlongVertexPath in PolyEditingUVUtil.h/cpp

Introduce new type FQuadGridPatch, this is a book-keeping data structure for keeping track of "grid of quads" subregion of a triangle mesh, that provides easy access to vertex and quad/trainagle rows/columns
Add util functions ComputeNormalsForQuadPatch() and ComputeUVIslandForQuadPatch() in QuadGridPatchUtil.h

Add new version of OffsetMeshRegion geometric operation, inside FOffsetMeshRegion class. EVersion parameter determines which version of operation to run. Code for the "Legacy" version has not been modified, so back-compat is maintained. New implementation supports variable number of subdivisions along the Offset (via .NumSubdivisions), and computes normal/UV-islands "per group" in extrusion region, instead of per-quad. New version also splits bowties in extrude region before any additional processing, which simplifies some of the book-keeping/etc.

FExtrudeOp currently hardcoded to use use the FOffsetMeshRegion implementation

#rb none
#preflight 639762350a67152550ee9a18

[CL 23481550 by ryan schmidt in ue5-main branch]
2022-12-12 15:09:02 -05:00
semion piskarev
9404d2353f MeshModelingTools: Fix mesh boolean marking created group boundary edges as mesh boundary edges. Make EmbedPolygonsOp correctly set embedded edges and edges on failure in bool path.
#rb Jimmy.Andrews
#jira UE-169510
#preflight 637bc140e30d438849321f99

[CL 23225056 by semion piskarev in ue5-main branch]
2022-11-21 14:13:24 -05:00
rinat abdrashitov
1da1ecb3f0 -Added a new flag (bBlendZeroInfluence) to the FBoneWeightSettings to allow control over how zero-influence bones are treated during the blend. The Blend method will now consider the flag when performing the interpolation.
-Added a Blend function overload that handles barycentric interpolation of 3 skin weights.
-Refactored SetBoneWeightsFromBary (in DynamicVertexSkinWeightsAttribute.h) and ConstructVertexSkinWeightsAttribute (in SelectiveTessellate.cpp) functions to use the newly added Blend function for barycentric interpolation.
-Since the default Blend behavior has changed, make sure that unit tests in BoneWeightTests.cpp are refactored. Added more tests for cases when bBlendZeroInfluence is set to true and when using Blend for barycentric interpolation.

#rb halfdan.ingvarsson
#jira None
#preflight 6361de120c2e7c8f91668a75

[CL 22921407 by rinat abdrashitov in ue5-main branch]
2022-11-02 13:53:31 -04:00
ryan schmidt
b6f4d36cb6 GeometryProcessing: harden FMeshJoinLoops to handle some cases that users can create in geometry scriptingf
#rb rinat.abdrashitov
#preflight 633593dde410691606b7be57

[CL 22262793 by ryan schmidt in ue5-main branch]
2022-09-29 23:42:54 -04:00
ryan schmidt
b64039ce19 DynamicMesh: handle some failure cases in MeshBevel. These two fixes resolve many bevel failure cases, particularly those introduced by repeat bevels.
In some edge configurations two 'terminator' vertices (at the end of open bevel edge paths) are directly connected by a non-bevel edge that we will "open", and this creates a quad-shaped hole instead of a triangle-shaped hole (which was already handled). Detecting this case will arise is simpler before we change the topology, so it is done in BuildVertexSets(), stored in FBevelVertex::ConnectedBevelVertex, and used during mesh generation to call new AppendTerminatorVertexPairQuad function.

In BuildTerminatorVertex(), the search for a terminator split-edge may fail if the filtered triangle list ends up non-contiguous, preventing the vertex from being beveled (ie it is "stuck"). Code was added to both handle that case, and also try to force the list to stay contiguous.

#rb jimmy.andrews
#preflight 6319fbe3304480f8f8565048
#jira UE-160073

[CL 21908190 by ryan schmidt in ue5-main branch]
2022-09-08 20:09:26 -04:00
semion piskarev
de9d706c9b MeshModelingTools: Fix WalkMeshPlanar occasionally picking bad paths that resulted in holes and other errors in boolean operations.
#rb Jimmy.Andrews
#jira UE-151749
#preflight 6317579c980179553e3b35bc

[CL 21817939 by semion piskarev in ue5-main branch]
2022-09-06 11:14:10 -04:00
Jimmy Andrews
3f0fdaddb4 When applying MeshTransforms' transform and transforminverse, generally pass bReverseOrientationIfNeeded=true
(+ for code that was passing false then manually applying the same logic, remove the extra reverse orientation logic)

#rb david.hill
#preflight 630d245fe352708d44f9e007

[CL 21706500 by Jimmy Andrews in ue5-main branch]
2022-08-30 14:40:56 -04:00
rinat abdrashitov
90cd97efcc Renaming AdaptiveTessellate.h/cpp to SelectiveTessellate.h/cpp
#rb trivial
#jira none
#rnx
#preflight 63069306a45b007ea2b6cedf

[CL 21564641 by rinat abdrashitov in ue5-main branch]
2022-08-25 11:02:41 -04:00
rinat abdrashitov
70cf962f41 Renaming AdaptiveTessellate to SelectiveTessellate to better reflect its actual functionality.
#rb jimmy.andrews
#jira none
#rnx
#preflight 6306859ac85b7fef22c52811

[CL 21551697 by rinat abdrashitov in ue5-main branch]
2022-08-24 16:46:15 -04:00
rinat abdrashitov
b0f59dad0a Fixed a bug causing an error when tessellating non-compact meshes.
#rb david.hill
#jira None
#rnx
#preflight 63064dce5366f61a42c39428

[CL 21547609 by rinat abdrashitov in ue5-main branch]
2022-08-24 14:28:05 -04:00
roey borsteinas
679290bffa Water: Water LOD system. Replaces water mesh tiles at a distance with simplified, non-tessellated meshes. This allows the Water Info texture to localized and higher precision.
#rb jonathan.bard, tim.dorries

[CL 21525131 by roey borsteinas in ue5-main branch]
2022-08-23 19:25:08 -04:00
rinat abdrashitov
13c60db582 Only displace those vertices that belong to triangles affected by the tessellation.
#rb david.hill
#rb jimmy.andrews
#jira none
#rnx
#preflight 63053a840061f895d02bb5d4

[CL 21524058 by rinat abdrashitov in ue5-main branch]
2022-08-23 18:55:07 -04:00
Ryan Schmidt
c55dd6a6e2 DynamicMesh: fix VertexNormals mode in FOffsetMeshRegion. It was not properly handling the case where input mesh did not have VertexNormals attribute, the FMeshNormals being computed and passed to ::ApplyOffset() were never used.
GeometryScript: add ApplyMeshOffsetFaces and ApplyMeshInsetOutsetFaces
#rb none
#preflight 6303f6440061f895d0f67450

[CL 21510656 by Ryan Schmidt in ue5-main branch]
2022-08-23 12:31:21 -04:00