Commit Graph

81 Commits

Author SHA1 Message Date
jimmy andrews
4d92d0a2cc fix invalid mesh state caused by not merging some neighboring edges in FDynamicMesh3's EdgeMerge, when mesh has bowties
+ add a test to cover this case

#jira UE-179649
#rb david.hill, ryan.schmidt
#preflight 640f34d20e1f02786bdf510c

[CL 24621295 by jimmy andrews in ue5-main branch]
2023-03-13 16:46:20 -04:00
rinat abdrashitov
a3fd902926 -DynamicMeshEditor.cpp: Handle bone data when appending two meshes and use it to reindex the the combined skinning weights.
-DynamicMeshAttributeSet.cpp:  Fixed a bug where we were resetting the bone attributes when matching.
-DynamicVertexSkinWeightsAttribute.h: Added a function that allows to reindex bone indices with respect to a new skeleton.
-SkeletalMeshLODModle.cpp: Handle bone attributes when FSkeletalMeshLODModel::GetMeshDescription is called.

#rb halfdan.ingvarsson
#preflight 640150b91d304a54717f810c

[CL 24523731 by rinat abdrashitov in ue5-main branch]
2023-03-06 11:22:59 -05:00
rinat abdrashitov
13a3f391cb Reverting the accidental removal of the fix for CheckBoneValidty()
#rb trivial
#preflight 63fe1fb3c63aaf1e1368707b

[CL 24450167 by rinat abdrashitov in ue5-main branch]
2023-02-28 15:45:44 -05:00
rinat abdrashitov
86f75d8c02 Fix static analysis error.
#rb trivial
#preflight 63fd74f3dd78dd50f6cfe048

[CL 24438973 by rinat abdrashitov in ue5-main branch]
2023-02-28 00:24:00 -05:00
jimmy andrews
999722e77c fix validity check for boneless meshes
(fixes geometry processing unit tests)

#rb rinat.abdrashitov
#preflight 63fd49692b1a2765f9a994aa

[CL 24437945 by jimmy andrews in ue5-main branch]
2023-02-27 22:36:45 -05:00
rinat abdrashitov
ff5c6e3d72 Added a new class to store per-bone data.
Added bone attributes (name, color, parent index, pose) to the dynamic mesh attribute set.

#rb halfdan.ingvarsson
#rb ryan.schmidt
#preflight 63fcd62dc35a141980f8429f

[CL 24432083 by rinat abdrashitov in ue5-main branch]
2023-02-27 16:20:20 -05:00
jimmy andrews
d6daff005b Make mesh elements visualizer distinguish between normal and tangent seams like the mesh inspector does
#rb david.hill
#preflight 63ee4e7d500c05a6244b020b

[CL 24270353 by jimmy andrews in ue5-main branch]
2023-02-16 17:39:45 -05:00
jimmy andrews
f8055de684 Fix "FDynamicMeshAttributeSet::EnableMatchingAttributes" losing generic attributes w/ bClearAttributes=true
(fixes crash in executing fracture w/ fracture mode)

#rb trivial
#preflight 639d673f35203bc7aa0172c9

[CL 23544294 by jimmy andrews in ue5-main branch]
2022-12-17 03:47:09 -05:00
michael balzer
a172cc38ca DynamicMesh: Fix skin weight attributes serialization and comparison, and add to serialization unit tests
#jira UE-169545
#preflight 639ce1422540a78d27562982

[CL 23543767 by michael balzer in ue5-main branch]
2022-12-16 19:15:23 -05:00
ryan schmidt
c96676ceac GeometryCore: improve FDynamicMeshAttributeSet::EnableMatchingAttributes() function. SkinWeights and Generic attributes now are only reset/discarded if bClearExisting=true. Added bDiscardExtraAttributes flag which results in removal of any attributes not in target attribute set, but does not clear existing attributes. Also added bDiscardExtraAttributes flag to FDynamicMesh3::EnableMatchingAttributes(). GeoScript Mesh Append functions use this flag now when matching "source" attributes, and behave properly in default (combine) mode for Skin Weights.
#rb jimmy.andrews
#preflight 639a5dd4776b61ba3bcbaee2

[CL 23523594 by ryan schmidt in ue5-main branch]
2022-12-14 22:06:48 -05:00
nathan mitchell
ff0aaf7feb UVEditor: Implement functionality to allow the Seam tool to now remove seams, as well as add them.
* Provides a mode selection for the Seam tool, switching between seam cutting mode and seam joining mode.
* Seam joining mode has an optional behavioral flag to have the path finding preferentially follow existing seams, making it easier to trace seam edges.
* DynamicMeshOverlay now supports merging elements, providing a method to merge one element to another, if they share the same parent, collapsing any references from the first element into references to the second.
* DynamicMeshUVEditor now supports removing seams from edges, providing a method to remove (via the new DynamicMeshOverlay functionality) seams from an edge collection by iteratively merging elements together.

#rb semion.piskarev
#preflight 6387e2e07b4bd3f057375770

[CL 23343534 by nathan mitchell in ue5-main branch]
2022-11-30 18:25:46 -05:00
ryan schmidt
fbe740f799 GeometryCore and GeometryProcessing additions to support selection and new extrude operator
- Add TMeshQueries::GetTrianglesBounds() and ::GetVerticesBounds()
- Add FMeshNormals::RecomputeOverlayTriNormals() and ::RecomputeOverlayElementNormals(). Update ComputeOverlayNormal() to take area and angle weight parameters.
- Add new FMeshTriOrderedEdgeID type, and util functions ConvertLoopToTriOrderedEdgeLoop / ConvertTriOrderedEdgeLoopToLoop. This type is similar to the TPair-tuple used by FDynamicMeshEditor::ConvertLoopToTriVidPairSequence, but formalized and providing a function to decode back into a vertex/edge ID loop
#rb matija.kecman
#preflight 638799f73377450900d2dc39

[CL 23338151 by ryan schmidt in ue5-main branch]
2022-11-30 14:29:45 -05:00
David Hill
91e7948122 Mesh Modeling and Dynamic Mesh. Provide ability to store and read a vertex mapping with a DynamicMesh inthe case that the source data is non-manifold.
ModelingTools - MeshAttributePaintTool and SkinWeightsPaintTool.  Use non-maniforld vertex ids when provided.  fixes a crash
SplitMeshesTool - removed an unsed mesh conversion.
ModelingComponents - ModelingToolTargetUtil  - request non-manifold vertex Ids on dynamic meshes when converted for tools.
DynamicMeshViaMeshDescription - request non-manifold vertex Ids on dynamic meshes when converted for tools.
ModelingObjectCreation - make sure to strip the any src vertex IDs from a dynamic mesh during object creation.

#rb Ryan.Schmidt
#preflight 63867a97f213a116eb4e9ed1

MeshConversions - MeshDescriptionToDynamicMesh - Add ability to capture non-manifold source veretx IDs in the form of a vertex attribute.

[CL 23330671 by David Hill in ue5-main branch]
2022-11-30 10:38:46 -05:00
henrik karlsson
2b3ad519a5 Fixed compile error surfaced when orphaned headers got compiled (they were never included in their own module so compiler warning settings was never applied)
Changes include
* Removed #pragma once in cpp files
* Removed dll export on templated types
* Fixed code in headers that didn't compile (probably never included anywhere
* Added casting for code going from int to float. Header was never compiled in the owning module that had warnings as errors

#preflight 637b10c6fa348e848054bd0d
#rb none (devin.doucette for a couple files)

[CL 23218414 by henrik karlsson in ue5-main branch]
2022-11-21 03:22:34 -05:00
ryan schmidt
ef1f0f9960 GeometryCore: DynamicMeshAttributeSet now serializes bone weight layer FNames as strings. Conceivably this is a breaking change, however the previous code was completely broken and so no "in the wild" serialized dynamic meshes with skin weight layers should exist.
#rb michael.balzer
#preflight 636a89ef843e6ac794ce915d

[CL 23207953 by ryan schmidt in ue5-main branch]
2022-11-18 17:50:41 -05:00
jimmy andrews
2991d7503d fix for edge collapse leaving isolated elements with parents, which breaks overlay validity
#jira UE-167932
#rb david.hill
#preflight 635302fd777a77c4407286ec

[CL 22712189 by jimmy andrews in ue5-main branch]
2022-10-22 15:36:09 -04:00
tyson brochu
2e19cd43f6 Cloth Editor: enable adding/deleting weight maps directly in the weight map paint tool. (Currently the user has to go through the Attribute Editor tool to do this.)
#rb david.hill rinat.abdrashitov
#preflight 633f3fd52a0a2c1ead43571b

[CL 22383750 by tyson brochu in ue5-main branch]
2022-10-06 16:57:39 -04:00
Jimmy Andrews
19ee47937c fix lattice tool for negative scales
#rb tyson.brochu
#rb david.hill
#preflight 63091651dd33b8a5238b2dfb

[CL 21602609 by Jimmy Andrews in ue5-main branch]
2022-08-26 19:59:59 -04:00
Ryan Schmidt
f3f44f9dfd GeometryCore: make FDynamicMesh3::GetMeshInfoString() const
GeometryScript: add SplitMeshBowties, RepairMeshDegenerateGeometry, and GetMeshInfoString functions
#rb none
#preflight 630387dec85b7fef224a1dcd

[CL 21483407 by Ryan Schmidt in ue5-main branch]
2022-08-22 10:38:15 -04:00
michael balzer
e803f94779 UVEditor: Optimized UUVSelectTool::OnSelectionChanged()
#preflight 62fec7aa3f75602b2f2565b8
#rb matija.kecman

[CL 21457570 by michael balzer in ue5-main branch]
2022-08-19 10:57:48 -04:00
Ryan Schmidt
715e1d357f GeometryCore:
Add FDynamicMesh3::EnableMatchingAttributes(), to expose AttributeSet::EnableMatchingAttributes() at the Mesh level
Add FDynamicMesh3::GetTriEdgeIDFromEdgeID(), helper to simplify construction of FMeshTriEdgeID identifiers
Add FRotator conversions for TQuaternion
Add TTransformSRT3::GetRotator()
Add UE::Geometry::Lerp variant for TFrame3
#rb rinat.abdrashitov
#preflight 62cc4a23f22e9d4fdf5da0f2

[CL 21047483 by Ryan Schmidt in ue5-main branch]
2022-07-11 17:10:51 -04:00
Ryan Schmidt
c5e859dbdc GeometryCore: Add FColliderMesh::FindNearestHitTriangle() and FColliderMesh::FindNearestTriangle() wrappers around AABBTree functions. Replace most calls to these functions via AABBTree w/ calls to FColliderMesh functions. Rename ::GetAABBTree() to ::GetRawAABBTreeUnsafe() to discourage usage (intention long-term is to encapsulate the spatial data structure, so it is not exposed)
#rb jimmy.andrews
#preflight 62b5f31a3646551b1139502e

[CL 20813267 by Ryan Schmidt in ue5-main branch]
2022-06-24 14:08:36 -04:00
Ryan Schmidt
ae58db0625 GeometryCore:
- Add FDynamicMesh3::EnumerateEdgeTriangles() function, same API as ::EnumerateVertexTriangles()
- add function UE::Geometry::TrianglesToOverlayElements() in MeshIndexUtil.h, collects elements from triangles in a mesh attribute overlay
- minor change in TPolyline3::DistanceSquared to consistently use UE::Geometry:: function
#rb jimmy.andrews
#preflight 62b12cd64c538079d665150c

[CL 20750718 by Ryan Schmidt in ue5-main branch]
2022-06-20 22:42:29 -04:00
David Hill
857a3acd3e GeometryCore: Fixing unsafe typecast warnings in preparation for enabling such warnings for GeometryCore
#preflight 62acc6d2c0449d3dccc9b1d5
#rb Jimmy.Andrews

[CL 20710188 by David Hill in ue5-main branch]
2022-06-17 17:23:52 -04:00
Ryan Schmidt
c6c930536b GeometryProcessing: add FMeshResolveTJunctions, tries to fix cases where a boundary vertex lies on the interior of some other boundary edge, via edge splits, so that a Weld will work on the new set of boundary edges.
ModelingTools: Add option to Weld Tool to try to resolve T-junctions. Add feedback to report back the initial and final number of open boundary edges.
#rb jimmy.andrews
#preflight 62a260e48b67b148f2600dd8

[CL 20585253 by Ryan Schmidt in ue5-main branch]
2022-06-09 17:40:10 -04:00