Commit Graph

87 Commits

Author SHA1 Message Date
jimmy andrews
709a94dbbd Add a method to remove unused vertices from a dynamic mesh, and expose it to geometry script
#rb tyson.brochu

[CL 30048365 by jimmy andrews in ue5-main branch]
2023-12-01 14:14:28 -05:00
rinat abdrashitov
b0e1560231 -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

[CL 26233377 by rinat abdrashitov in ue5-main branch]
2023-06-26 10:17:13 -04:00
henrik karlsson
5db685f97d [Engine]
* Moved dllexport from type to methods/staticvar in all Engine runtime code. This improves compile times, memory and performance in dll builds

[CL 26082269 by henrik karlsson in ue5-main branch]
2023-06-17 18:13:06 -04:00
henrik karlsson
b8482b44dd [Engine]
* Changed type dllexport to method/staticvar dll export. Various changes for code that upgrade script get wrong

[CL 26082043 by henrik karlsson in ue5-main branch]
2023-06-17 16:57:38 -04:00
rinat abdrashitov
7f43547bc2 Added an operation to compute per-vertex averaged value of all overlay elements.
#rb david.hill
#jira none

[CL 26022763 by rinat abdrashitov in ue5-main branch]
2023-06-15 15:18:03 -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
rinat abdrashitov
78b2bf36ba Add Set/GetValue methods that take templated bone weight scalar data arrays.
#rb halfdan.ingvarsson
#rnx
#preflight 64642d23c34c2e121241969e

[CL 25503080 by rinat abdrashitov in ue5-main branch]
2023-05-17 01:11:27 -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
matija kecman
a5329ddfbb Fix computation of edge collapse lerp parameter to fix (for example) artefacts in the UV layer when remeshing the stairs primitive
#jira UE-141937
#preflight 64008a1bc63aaf1e13565ace
#rb ryan.schmidt,david.hill

[CL 24499685 by matija kecman in ue5-main branch]
2023-03-03 11:21:38 -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
3a53d123a9 remove deprecated timestamp concept and fix const correctness for geometrycore curve and point set classes
#rb rinat.abdrashitov
#preflight 63f63ef7b91d7b0a12b9c945

[CL 24370918 by jimmy andrews in ue5-main branch]
2023-02-22 17:27:21 -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
ryan schmidt
5a61c6b75c GeometryProcessing: add MakeSelectAllSelection(), MakeSelectAllConnectedSelection(), MakeBoundaryConnectedSelection(), CombineSelectionInPlace() utility functions. Some of this is ported from geometry script selection code, which should be replaced with calls to these util functions (after testing). Minor necessarily additions to FGeometrySelection and FGeometrySelectionEditor.
#rb none
#preflight 63c02b711e5ee71dc373f692

[CL 23665656 by ryan schmidt in ue5-main branch]
2023-01-12 12:50:34 -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
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
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