89 Commits

Author SHA1 Message Date
jimmy andrews
1cc48b0da4 add missing null pointer check to geometry script set simple collision on static mesh function
#jira UE-224291
#rb semion.piskarev

[CL 37278413 by jimmy andrews in 5.5 branch]
2024-10-18 14:23:34 -04:00
jimmy andrews
22f1321ac0 fix grid size overflowing int for convex hull and convex decomposition methods
#jira UE-227034
#jira UE-227029
#rb tyson.brochu

[CL 36948662 by jimmy andrews in 5.5 branch]
2024-10-08 17:54:38 -04:00
benoit gadreau
b1161f9352 Alternate Skin Weights fixes
- MeshAssetFunctions: updated ddc cache when adding a new profile (should be handled in CommitMeshDescription)
    - LODUtilities: corrected GenerateImportedSkinWeightProfileData, which did not correctly handle maximum bone influence + weight sorting (+ fixed similar position test)
    - SkinnedMeshComponent: added GSkinnedMeshSkinWeightProfileEarlyExit (false by default) to avoid exiting too early when defining a new profile stack
    - FSkeletalMeshAttributes: adding a new skin weight attribute now returns true if the attribute is already available

NOTE: things to keep in mind when generating rendering meshes from editable meshes (mainly for the future me)
    - influences may be clamped at 8/12 when converted for rendering, even if editable data can support any number (be sure to check rendering settings and the number of bones supported by the current platform)
    - as weights can be clamped, it's important that weights are sorted from highest to lowest
    - use FBoneWeights to ensure that weights are re-normalized if they are clamped

TODO:
    - test CommitMeshDescription to ensure that adding a new profile triggers a DDC invalidation
    - there is redundancy between MeshUtilities::GenerateSkeletalRenderMesh and LOD rendering mesh generation (which is a source of errors)
    - FLODUtilities::UpdateAlternateSkinWeights could benefit from a more robust projection algorithm (see FTransferBoneWeights)


#rb halfdan.ingvarsson
#rnx

[CL 36788984 by benoit gadreau in 5.5 branch]
2024-10-02 11:38:49 -04:00
jimmy andrews
9e94ecec51 fix AppendMesh nodes inconsistently handling transforms with negative scales
#jira UE-196872
#rb lonnie.li

[CL 36761358 by jimmy andrews in 5.5 branch]
2024-10-01 20:06:11 -04:00
jimmy andrews
78c65dadf1 fix 2D voronoi diagram generation failing collinear inputs
+ add a result enum to delaunay triangulation so we can know the reason for triangulation failures

#jira UE-224295
#rb David.Hill

[CL 36753394 by jimmy andrews in 5.5 branch]
2024-10-01 18:50:21 -04:00
halfdan ingvarsson
2c870abf61 GeoScripting: Print the calling BP function when emitting warnings/errors in geoscripting calls.
- This helps in understanding where the error/warning is coming from.

#rb Jimmy.Andrews

[CL 36399730 by halfdan ingvarsson in 5.5 branch]
2024-09-18 13:53:30 -04:00
jimmy andrews
9e0506fbb8 Add missing null check to the StaticMeshHasCustomizedCollision Geometry Script method
#jira UE-224291
#rb Jimmy.Andrews

[CL 36344312 by jimmy andrews in 5.5 branch]
2024-09-17 14:20:58 -04:00
jimmy andrews
c0eda854a5 fix crash in GetMaterialIDsOfTriangles if passed null triangle list
+ fix behavior for invalid tris to match documentation in comment
+ fix parameter names with bad spacing (IDList -> ID List)

#jira UE-224294
#rb lonnie.li

[CL 36283065 by jimmy andrews in 5.5 branch]
2024-09-13 17:19:19 -04:00
halfdan ingvarsson
a19a601e9f Geoscripting: Fix inverted condition.
#rnx

[CL 36268182 by halfdan ingvarsson in 5.5 branch]
2024-09-13 11:53:35 -04:00
halfdan ingvarsson
e06cd1239c Geoscripting: Reject empty morph targets right at creation.
#rnx

[CL 36257036 by halfdan ingvarsson in 5.5 branch]
2024-09-13 00:28:24 -04:00
halfdan ingvarsson
3d56916cc4 Geoscripting: Node for adding alt skin weights directly to the skeletal mesh asset.
#rb Jimmy.Andrews

[CL 36239076 by halfdan ingvarsson in 5.5 branch]
2024-09-12 14:50:35 -04:00
halfdan ingvarsson
df166cdbe7 Geoscripting: Add an option to reconstruct non-manifold meshes
#rb David.Hill

[CL 36212041 by halfdan ingvarsson in 5.5 branch]
2024-09-11 17:57:34 -04:00
Ryan Hummer
4af2fd066d Updating Dev-Release-5.5 from Main at CL #36144969
#okforversepublic

[CL 36146571 by Ryan Hummer in Dev-5.5 branch]
2024-09-10 10:26:02 -04:00
jimmy andrews
55c5461876 add geometry script vector math functions to transform, inverse transform, and plane project
#rb David.Hill

[CL 36013326 by jimmy andrews in ue5-main branch]
2024-09-04 12:42:37 -04:00
jimmy andrews
816c1ad89d add optional num parameter to the geometry script list wrapper type 'reset' method, so we can more efficiently reset when we know the desired list size
#rb David.Hill

[CL 36013243 by jimmy andrews in ue5-main branch]
2024-09-04 12:40:07 -04:00
halfdan ingvarsson
b9e73115ac Geoscripting: Make it an option to rebind weights to the ref skeleton of the skeletal mesh asset.
#rnx

[CL 35997383 by halfdan ingvarsson in ue5-main branch]
2024-09-04 00:10:27 -04:00
halfdan ingvarsson
5dee5d7bf1 Geoscripting: Remap bone indices on skin bindings of the source dynamesh to the skeletal mesh asset in CopyMeshToSkeletalMesh.
#jira UE-222914
#rb benoit.gadreau

[CL 35974449 by halfdan ingvarsson in ue5-main branch]
2024-09-03 14:30:42 -04:00
jimmy andrews
4fa7fe8fb5 add autocreaterefterm to geometry script options structs that were passed by const ref, so users don't have to connect the pin to get default options for these nodes
#rb David.Hill

[CL 35969778 by jimmy andrews in ue5-main branch]
2024-09-03 12:01:35 -04:00
jimmy andrews
cf62c4386e redo asset -> material list + slot names functions to a more consistent form, and add helpers to conver to/from material map format as a separate step
#rb adrien.logut, David.Hill

[CL 35936608 by jimmy andrews in ue5-main branch]
2024-08-30 16:34:08 -04:00
jimmy andrews
a61e73ac85 More consistently also add 'EditAnywhere' tag to geometry script options structs members that are 'BlueprintReadWrite' so they are editable when used as variables
#rb lonnie.li

[CL 35936376 by jimmy andrews in ue5-main branch]
2024-08-30 16:25:33 -04:00
jimmy andrews
e3fc9f5e8c add a method to get section materials for skeletal meshes
#jira UE-169489
#rb tyson.brochu

[CL 35901867 by jimmy andrews in ue5-main branch]
2024-08-29 14:33:43 -04:00
halfdan ingvarsson
ba1cc26aa2 Geoscripting: Fix initial color when averaging triangle vertex colors into vertex colors.
#rnx

[CL 35899139 by halfdan ingvarsson in ue5-main branch]
2024-08-29 12:40:23 -04:00
halfdan ingvarsson
7cfbe58e74 Geoscripting: Fix morph target writing to use the non-manifold conversion when going back to the original mesh descript.
#rb benoit.gadreau

[CL 35890935 by halfdan ingvarsson in ue5-main branch]
2024-08-29 02:54:05 -04:00
jimmy andrews
a2285c9f18 Make CopyMeshToStaticMesh have the same bUseSectionMaterials parameter as the CopyMeshFromStaticMesh, and change the default behavior for both to use section materials.
#rb David.Hill

[CL 35880132 by jimmy andrews in ue5-main branch]
2024-08-28 16:42:41 -04:00
jimmy andrews
9d9da03443 add geometry script methods to create 'slot name to material' maps from components, static meshes, and skeletal meshes, and to convert such maps back to arrays of materials. (these maps are expected by the 'create new skeletal mesh' method)
#rb David.Hill

[CL 35832402 by jimmy andrews in ue5-main branch]
2024-08-27 14:25:58 -04:00