Commit Graph

65 Commits

Author SHA1 Message Date
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
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
Jimmy Andrews
68c7126a7c make more mesh creation tools generate tangents for their created meshes
(PolyExt, PathExt, PathRev, and BdryRev)

#jira UE-141656

#rb david.hill
#preflight 6307950c6f3401e0225dfa29

[CL 21566086 by Jimmy Andrews in ue5-main branch]
2022-08-25 11:51:02 -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
Ryan Schmidt
430d6c4107 GeometryCore: add TConstObjectSharedAccess and FSharedConstDynamicMesh3 typedef for FDynamicMesh3. This template provides a way for an "owner" of an object to share it with background threads. The owner may have a TSharedPtr or some other ownership model in which it can provide a raw pointer, the TConstObjectSharedAccess can work with either. Receivers of the TConstObjectSharedAccess use a function AccessSharedObject() to access and process the shared object. See header comments for more details
#rb david.hill
#preflight 62fbd1410f2aefc97a75c0de

[CL 21414137 by Ryan Schmidt in ue5-main branch]
2022-08-16 16:55:42 -04:00
Bryan sefcik
b4a6e947d8 Ran IWYU on Public headers under Engine/Source/Runtime/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21065896 by bryan.sefcik
#preflight 62d4b1a5a6141b6adfb0c892
#jira

#ROBOMERGE-OWNER: Bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
#ROBOMERGE-CONFLICT from-shelf

[CL 21181076 by Bryan sefcik in ue5-main branch]
2022-07-20 11:31:36 -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
David Hill
769f6e10fd GeometryCore: DynamicVertex Attributes. fixing type promotion warnings.
#preflight 62c84de1e060ecd065bc8918
#rb Jimmy.Andrews

[CL 21011298 by David Hill in ue5-main branch]
2022-07-08 14:28: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
Ryan Schmidt
2e3f49e8bd GeometryCore: add FMeshEdgeTriID struct that identifies an edge in a mesh by a 30-bit triangle ID and a 2-bit edge-index. This allows an edge to be represented on meshes that do not have explicit edge IDs, or on a FDynamicMesh3 after add/remove changes (as edge IDs are currently not stable across such operations).
GeometryProcessing: add functions to FGroupTopology to query some information by FMeshEdgeTriID

#rb davd.hill, jimmy.andrews
#preflight 62b0dec89c1686e7e7eecbe2

[CL 20745548 by Ryan Schmidt in ue5-main branch]
2022-06-20 17:41:52 -04:00
Jimmy Andrews
bee14bcc2e deprecate timestamp on TDynamicPointSet3
#rb ryan.schmidt
#preflight 62a8d4eecf54a658ee26d9ba

[CL 20679346 by Jimmy Andrews in ue5-main branch]
2022-06-15 19:54:30 -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
Ryan Schmidt
39ea0b82bb Improve WeightMap support in Modeling Mode. Duplicate Tool now preserves WeightMaps, conversion between Dynamic and Static meshes properly preserves weight maps and names.
GeometryCore: Add bClearExisting option to FDynamicMeshAttributeSet::EnableMatchingAttributes(). Default true is old behavior. New behavior, when false, is to preserve existing attribute set counts/values. Also now copying group and weight layer names if not set.
ModelingTools: CombineMeshesTool now uses EnableMatchingAttributes instead of only explicitly matching UV layers, so group and weight layers are copied properly to duplicates
MeshConversion: DynamicMeshToMeshDescription now generates unique names in ConvertPolygroupLayers and ConvertWeightLayers. Previously if multiple attribs had the same name (eg NAME_None), output MeshDescription would only have a single attrib w/ that name
#rb david.hill
#preflight 62a116439a3e81e904dde76f

[CL 20570919 by Ryan Schmidt in ue5-main branch]
2022-06-08 23:37:03 -04:00
tyson brochu
30c0327d63 DynamicMesh3: Add comments to AppendTriangle functions saying the vertices must exist and the indices must be distinct
#rb michael.balzer
#preflight 629a42579019199ebc8ed71e

[CL 20489098 by tyson brochu in ue5-main branch]
2022-06-03 13:33:31 -04:00
Jimmy Andrews
ac6d4e5e8e automatically fix mesh orientation when geometry script functions transform meshes with negative scale
#jira UE-151319
#rb semion.piskarev
#rb ryan.schmidt
#preflight 6282a2f3734d0657703f17b7

[CL 20232088 by Jimmy Andrews in ue5-main branch]
2022-05-16 17:07:25 -04:00
tyson brochu
768cfab5db Add scalar weight maps to DynamicMeshAttributeSet
- Allow the Attribute Editor Tool to add/delete weight maps from DynamicMesh targets.
- Enable transferring scalar weight maps back and forth between DynamicMesh and MeshDescription.
- Serialize TDynamicAttributeBase::Name when its subclasses are serialized

#rb nathan.mitchell
#preflight 62439b2ab6084b9832307f6e

[CL 19551734 by tyson brochu in ue5-main branch]
2022-03-29 20:04:24 -04:00
semion piskarev
75e604f6a8 MeshModelingTools: Added comments clarifying things related to FDynamicMesh3, particularly role of per-vertex attributes.
#rb Ryan.Schmidt, Jimmy.Andrews
#jira none
#preflight 62164be40f71e491ccfc2d3c

[CL 19091339 by semion piskarev in ue5-main branch]
2022-02-23 10:09:22 -05:00
tyson brochu
746ba571d7 Change inequality direction in a check. VertexBoneWeights should have size equal to the number of vertices in the parent mesh *after* compacting, so this will be less than or equal to the size of the compact map, not geq. Includes a unit test for verification.
#jira none
#rnx
#rb rinat.abdrashitov
#preflight 61fd7583b145346c9e8adc2a

[CL 18869206 by tyson brochu in ue5-main branch]
2022-02-04 14:07:49 -05:00
ryan schmidt
1c3ffffff7 Add missing include
#rb aurel.cordonnier
#rnx
#jira UE-141140
#preflight 61fc26b00a50c2606f244b15
#lockdown aurel.cordonnier

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18849508 in //UE5/Release-5.0/... via CL 18849607 via CL 18849970
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18850017 by ryan schmidt in ue5-main branch]
2022-02-03 15:47:19 -05:00
ryan schmidt
172058c824 GeometryCore:
- add FColliderMeshProjectionTarget to allow a FColliderMesh to be used as a projection target
- remove dead code from TDenseGrid3
- add TBlockedDenseGrid3, variant of TDenseGrid3 that lazy-allocates sub-blocks of a dense grid, to reduce memory usage in sparse/narrow-band situations on large uniform grids
- replace usage of TDenseGrid3 in FMarchingCubes with TBlockedDenseGrid3, to reduce memory footprint on large meshing problems
#rb David.Hill, Jimmy.Andrews
#jira UE-141151
#preflight 61fc0007176256ec4f744c4
#lockdown Aurel.Cordonnier

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18846016 in //UE5/Release-5.0/... via CL 18846053 via CL 18846421
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18846468 by ryan schmidt in ue5-main branch]
2022-02-03 13:52:20 -05:00
ryan schmidt
6ad26b69f0 rename UE::Geometry::TTransform3 to TTransformSRT3, update references
#rb none
#rnx
#jira UE-139757
#preflight 61f572d9e52a8a4a910990f1

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18784197 in //UE5/Release-5.0/... via CL 18784203 via CL 18784222
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18784226 by ryan schmidt in ue5-main branch]
2022-01-29 14:37:53 -05:00
semion piskarev
80f86dd481 MeshModelingTools: Fix normals not being transferred to overlays in Remesh and Simplify when discarding attributes at start. Fix CompactCopy to properly copy vertex normals/uvs.
#rb Ryan.Schmidt
#rnx
#jira UE-139241
#preflight 61e1eb164b4bd12cbee7bb0a

#ROBOMERGE-AUTHOR: semion.piskarev
#ROBOMERGE-SOURCE: CL 18629628 in //UE5/Release-5.0/... via CL 18629633 via CL 18629637
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18629639 by semion piskarev in ue5-main branch]
2022-01-16 10:42:36 -05:00