Commit Graph

32 Commits

Author SHA1 Message Date
benoit gadreau
77adc25814 DynamicMeshProvider: full support for MeshDescription LODs when converting to DynamicMesh
a FGetMeshParameters parameter is now used to request a specific LOD, as well as the option of requesting tangents
    this will also allow further customization in the future, if required, by adding attributes to the FGetMeshParameters struct


#rb halfdan.ingvarsson, Jimmy.Andrews
#rnx

[CL 33681647 by benoit gadreau in ue5-main branch]
2024-05-16 04:43:12 -04:00
jimmy andrews
852f4ebae9 Fix incorrect initialization of section index -> material index mapping to fix crash in copy mesh to static mesh geometry script method + add additional validation of polygon group IDs
#rb David.Hill

[CL 33343520 by jimmy andrews in ue5-main branch]
2024-04-30 13:14:18 -04:00
jimmy andrews
0c7ff195bd Fix backwards compat issue with material handling for static mesh -> dynamic mesh geometry script:
Revert the default behavior of CopyMeshFromStaticMesh to again use section material indices, rename it to make it clear that it does so, and make a CopyMeshFromStaticMeshV2 w/ the more-expected default behavior of using the regular material indices (and a new parameter to control the behavior)

+ add a method to more easily get the regular materials list off of a static mesh asset.
#rb David.Hill

[CL 33314364 by jimmy andrews in ue5-main branch]
2024-04-29 16:57:22 -04:00
jimmy andrews
f078f45100 make mesh asset functions' static mesh to dynamic mesh conversion use the same conversion code as the scene component conversion
#rb David.Hill

[CL 32555211 by jimmy andrews in ue5-main branch]
2024-03-27 15:55:30 -04:00
jimmy andrews
beb2de44e2 fix crash if trying to convert a cooked-for-editor geometry collection
#rb lonnie.li

[CL 32384802 by jimmy andrews in ue5-main branch]
2024-03-20 18:18:17 -04:00
lonnie li
8412050e52 ModelingTools: Disable Convert tool on bIsCookedForEditor StaticMesh and SkeletalMesh assets again to prevent crashes when running the tool on read-only cooked assets in UEFN.
#rb Jimmy.Andrews

[CL 32057046 by lonnie li in ue5-main branch]
2024-03-06 12:02:31 -05:00
jimmy andrews
f79612960d make static mesh <-> dynamic mesh conversion be aware of section (polygon group ID) to material index mappings
#jira UE-200228
#rb David.Hill

[CL 32004596 by jimmy andrews in ue5-main branch]
2024-03-04 18:33:07 -05:00
jimmy andrews
5b562530be fix convert tool losing materials
#rb tyson.brochu

[CL 31554839 by jimmy andrews in ue5-main branch]
2024-02-15 23:01:14 -05:00
jimmy andrews
be2e1f07c9 Fix CopyMeshFromComponent in geometryscript not being able to see instance colors for renderdata lod
#rb David.Hill

[CL 31126576 by jimmy andrews in ue5-main branch]
2024-02-02 11:04:32 -05:00
jimmy andrews
e42ce76d86 [Backout] - CL31123234
(will add in a different stream)
[FYI] Jimmy.Andrews
Original CL Desc
-----------------------------------------------------------------
add support for instance colors in scene component -> dynamic mesh geometry script conversion function
#rb David.Hill

[CL 31124528 by jimmy andrews in ue5-main branch]
2024-02-02 10:10:09 -05:00
jimmy andrews
f182595f4a add support for instance colors in scene component -> dynamic mesh geometry script conversion function
#rb David.Hill

[CL 31123300 by jimmy andrews in ue5-main branch]
2024-02-02 09:45:38 -05:00
jimmy andrews
ec2b0dd6d6 fix static analysis complaint about always-true if statement in the non-editor build of SceneComponentToDynamicMesh.cpp
#rb jimmy.andrews

[CL 30366490 by jimmy andrews in ue5-main branch]
2023-12-15 20:03:56 -05:00
jimmy andrews
7b1c8818c8 Make the convert tool support a larger range of scene component sources, by switching away from tool targets to instead use a general scene component->mesh conversion function adapted from geometry script. Make the geometry script node also now use this function.
#jira UE-182348
#rb lonnie.li

[CL 30359853 by jimmy andrews in ue5-main branch]
2023-12-15 16:11:52 -05:00
jimmy andrews
7c757e5254 on volume->dynamic mesh conversion, when normals are requested and groups are not requested, still keep the groups until they can be used to compute normals and then discard them.
this fixes an ensure on trying to place a new modeling tools primitive mesh in a level when a volume is in the level and volume snapping is enabled

#rb david.hill

[CL 29615343 by jimmy andrews in ue5-main branch]
2023-11-09 18:43:27 -05:00
jimmy andrews
7e50f1b82d add option to request tangents to the dynamic mesh provider, with custom implementations for targets that go through the mesh description (so we'll use the standard tangent compute paths in those cases)
#rb ryan.schmidt

[CL 29416384 by jimmy andrews in ue5-main branch]
2023-11-03 14:59:41 -04:00
semion piskarev
c9de10f9cf MeshModelingTools: Various volume conversion fixes:
- Fix conversion sometimes making degenerate tris and firing an ensure.
- Fix volume conversion sometimes creating cracks in volumes when dealing with non-convex faces (by deleting necessary colinear verts)
- Make simplification preserve group boundaries when asked.
- Remove colinear verts along group boundaries without losing boundaries when preserving groups.
- Break up faces that have holes into convexes rather than emitting per-triangle faces.
- Make mesh to volume tool use same path for conversion as tool targets, and add controls for preserving groups and simplifying
- Revert to ear clipping if delaunay triangulation fails in converting back from volume

#rb Jimmy.Andrews
#jira UE-173272, UE-152032
#prelfight 6470ccbf5b1dc793b715d66b

[CL 26002669 by semion piskarev in ue5-main branch]
2023-06-14 23:43:43 -04:00
rinat abdrashitov
34ac3675af -Added support for skin weight and bone attributes when converting skinned meshes to dynamic meshes.
-Removed extra spaces.

#rb david.hill
#rb halfdan.ingvarsson
#rb alexis.matte
#jira none
#preflight 64343ef4b306e98c632d1bd1
#rnx

[CL 24979483 by rinat abdrashitov in ue5-main branch]
2023-04-10 13:00:44 -04:00
semion piskarev
6dd5376acb MeshModelingTools: Fix volumes always having per-triangle normals when not going through volume to mesh tool.
#rb Jimmy.Andrews
#jira UE-152032
#preflight 63f78bb0ae54ee4ce9599a84

[CL 24432234 by semion piskarev in ue5-main branch]
2023-02-27 16:25:17 -05:00
joe kirchoff
44e52d14d1 More parent include path fixes
#rnx
#rb trivial

[CL 24138215 by joe kirchoff in ue5-main branch]
2023-02-11 13:04:14 -05:00
ryan schmidt
fb77bece49 ModelingComponents: compact mesh after welding/etc in BrushToDynamicMesh, to avoid complications with downstream code
#rb none
#preflight 63cab74a7a1539b28ced87a9

[CL 23795953 by ryan schmidt in ue5-main branch]
2023-01-20 15:26:57 -05:00
david hill
683d606b59 Geometry : ModelingComponents and GeometryScript - add ability to deform a dynamic mesh according to a spline mesh component add conversion from spline mesh component to dynamic mesh
#preflight 63bf201c763c6c1064460396
#rb ryan.schmidt

[CL 23658538 by david hill in ue5-main branch]
2023-01-11 20:56:29 -05:00
david hill
f34c40813a Geometry - SkinnedMeshToDynamicMesh - fix linux editor build error
#rnx

[CL 23377527 by david hill in ue5-main branch]
2022-12-02 15:11:27 -05:00
david hill
55b5ee8d28 Geometry - Modeling Components: conversion from SkinnedMeshComponent to DynamicMesh.
GeometryScriptintCore : add the conversion to CopyMeshFromComponent

#preflight 638a1c410e4613faed378b7e

[CL 23377469 by david hill in ue5-main branch]
2022-12-02 15:09:12 -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
bryan sefcik
117472780d Fixed include paths.
#jira
#preflight 634ee62fe746026e48eb077e

[CL 22621687 by bryan sefcik in ue5-main branch]
2022-10-19 06:39:08 -04:00