Commit Graph

88 Commits

Author SHA1 Message Date
rinat abdrashitov
8e6e28690b -GeometryScript: When creating a new SkeletaMesh asset, provide an option to use the bone attributes of the dynamic mesh to set the reference skeleton of the skeletal mesh.
-Added a convenience function for getting an array of bone names from a reference skeleton.
-Added MeshBones.h/cpp that contain utility functions to deal with dynamic mesh bone attributes

#rb halfdan.ingvarsson
#jira none

[CL 26233292 by rinat abdrashitov in 5.3 branch]
2023-06-26 10:10:55 -04:00
rinat abdrashitov
30ec28e2d6 Added an operation to compute per-vertex averaged value of all overlay elements.
#rb david.hill

[CL 26053056 by rinat abdrashitov in 5.3 branch]
2023-06-16 11:17:33 -04:00
ryan schmidt
4514a71fea ModelingTools: pvs fix and minor const-correctness fix
#rb none
#preflight 646e32f6807b157b8b3b8f8b
#rnx

[CL 25626915 by ryan schmidt in ue5-main branch]
2023-05-25 15:34:14 -04:00
ryan schmidt
c0c1e82b10 DynamicMesh: add TDynamicMeshVectorOverlay::EnumerateVertexElements, does triangle iteration around vertex and calls a function for each tri-vtx-element
#rb david.hill
#preflight 646cde3a2c0a5da0dc8627fa
#rnx

[CL 25592176 by ryan schmidt in ue5-main branch]
2023-05-23 18:12:36 -04:00
ryan schmidt
c3976cd7b1 GeometryCore: fix crash copy-paste-o in FDynamicMeshAttributeSet::EnableMatchingAttributes
#rb none
#preflight skip

[CL 25539031 by ryan schmidt in ue5-main branch]
2023-05-18 23:50:53 -04:00
ryan schmidt
fd2127d075 GeometryCore: add ability to store and fetch 'debug' FDynamicMesh3 via UE::Geometry::Debug::StashDebugMesh() and FetchDebugMesh(). CVar geometry.DynamicMesh.EnableDebugMeshes controls this support, defaults to disabled. Console command geometry.DynamicMesh.ClearDebugMeshes added to allow clearing entire debug mesh set.
GeometryScript: expose above capability to Geometry Scripting
#rb none
#preflight 643fe92c090323f9a3f2a10d

[CL 25107977 by ryan schmidt in ue5-main branch]
2023-04-19 11:47:17 -04:00
david hill
b3a71a15e2 Mesh Modeling Tools: Improve Weld Mesh Edges tool to optionally merge attributes.
Geometry Core: Adding Split Attribute Welder.

#jira UE-182345
#rb ryan.schmidt
#preflight 643d6fc8211b661dc4f47c6a

[CL 25072473 by david hill in ue5-main branch]
2023-04-17 15:22:49 -04:00
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