Commit Graph

42 Commits

Author SHA1 Message Date
marc audy
b5b72b7935 Disable false positives for
V557: Array overrun is possible. The 'GetOnPhaseStart' function processes value '[0..6]'. Inspect the first argument.
V621 Consider inspecting the 'for' operator. It's possible that the loop will be executed incorrectly or won't be executed at all.
V654 The condition loop is always false

[CL 29494726 by marc audy in ue5-main branch]
2023-11-06 14:04:14 -05:00
alex mcadams
718cfb659c Fix ToDynamicMesh's ToSrcVertIDMap when splitting vertices for non-manifold meshes.
#rb david.hill

[CL 26263278 by alex mcadams in ue5-main branch]
2023-06-27 13:38:37 -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
Alex McAdams
7c667af704 ToDynamicMesh: Use SrcAttr indices when querying SharedAttrValues in PopulateOverlayFromSharedAttr
#rb david.hill
#preflight 646fc9bec34463d6e87569b3

[CL 25653286 by Alex McAdams in ue5-main branch]
2023-05-26 17:34:30 -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
nathan mitchell
c714c959d7 Geometry: Fixed issue where a deference could be referring to a null value when determining number of UV channels during mesh conversion.
#rb lonnie.li
#preflight 642486e2a86ae7cbcc4591a1

[CL 24851231 by nathan mitchell in ue5-main branch]
2023-03-30 02:27:32 -04:00
rinat abdrashitov
b97f1e2394 Handle bone data when converting to/from mesh description or to/from dynamic mesh.
#rb halfdan.ingvarsson
#preflight 63fd0ec460163ed3c2531df8

[CL 24450207 by rinat abdrashitov in ue5-main branch]
2023-02-28 15:46:38 -05:00
henrik karlsson
ce587eb612 Added markups for headers that can't be compiled standalone.. this is needed for both Header units and IWYU
#preflight 63789b0c170bc34a93a869e5
#rb none

[CL 23552160 by henrik karlsson in ue5-main branch]
2022-12-21 02:46:50 -05:00
David Hill
b167566d3c ToDynamicMesh - update comments to reflect the required API wrt weightmap.
#preflight 638a3fb4b36822f1c3a37588

[CL 23376220 by David Hill in ue5-main branch]
2022-12-02 13:32:15 -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
tyson brochu
e85c5b66a8 Fix/suppress static analyzer warnings
#jira UE-165354
#rb jimmy.andrews
#preflight 6334bf93bb5d6e89caf902d5

[CL 22233436 by tyson brochu in ue5-main branch]
2022-09-28 18:29:12 -04:00
tyson brochu
1b4ce5e3ff Cloth Editor:
- implement a more robust ClothAsset to DynamicMesh converter using TToDynamicMesh
- save DynamicMesh weight maps to cloth asset using cloth adapter API
- remove old DynamicMesh/SkeletalMesh translation code


#jira UE-163833 UE-159698
#rb kriss.gossart
#preflight 6331db9ba4769ad714b33df2

[CL 22188259 by tyson brochu in ue5-main branch]
2022-09-26 13:18:59 -04:00
David Lesage
f02be1a360 #jira UE-160177 ConverterToDynamicMesh hangs
The problem appears when a process of a set of StaticMesh calling ConverterToDynamicMesh is parallelized.
TFuture<void> / Async is not adapted for parallelization of parallelized process.
On the advice of Andriy Tylychko, TFuture has been replaced by UE::Tasks::FTask
#rb geometrytools
#swarm https://p4-swarm.epicgames.net/reviews/21225362
#preflight 62fa3b6ccf7afa018b4afaf9

[CL 21385622 by David Lesage in ue5-main branch]
2022-08-15 08:32:20 -04:00
lonnie li
ce1fd78fa6 MeshConversion: Add flag to undo pre-transformation of vertex colors during MeshDescriptionToDynamicMesh.
Make pre-transformation of vertex colors during MeshDescription/DynamicMesh conversion on by default.
Fixed Convert_NoSharedInstances code path that was not pre-transforming vertex colors.

#rb nathan.mitchell
#jira none
#preflight 62d59b551062f2e6300c8cb8

[CL 21220600 by lonnie li in ue5-main branch]
2022-07-22 10:32:34 -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
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
michael balzer
e52bc9c2f7 MeshConversion: Resolve static analysis warning
#jira UE-151413
#preflight none
#rb none

[CL 20111529 by michael balzer in ue5-main branch]
2022-05-09 17:28:09 -04:00
sebastien lussier
61269672d9 StaticMeshLODResourcesToDynamicMesh.cpp - build fix
#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 19947767 via CL 19948023
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19952530 by sebastien lussier in ue5-main branch]
2022-04-28 02:03:11 -04:00
sebastien lussier
18bb7adcec Support building HLODs meshes using cooked data
* Tested mesh merge/simplify/approximate methods
* Fixed issue in Mesh Approximate where import build scale would be applied twice (as LODRenderData is already scaled)
#rb jeanfrancois.dube
#preflight 62693fdc4c0942024111839b

#ROBOMERGE-OWNER: sebastien.lussier
#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 19939143 via CL 19945922 via CL 19946391 via CL 19946484
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19952398 by sebastien lussier in ue5-main branch]
2022-04-28 01:59:21 -04:00
ryan schmidt
a779b2746b MeshConversion: add support for Tangents and Vertex Colors to FStaticMeshLODResourcesAdapter. Add new FStaticMeshLODResourcesToDynamicMesh conversion class.
#rb jimmy.andrews, rinat.abdrashitov
#preflight 62630735cf17922036dabe3a

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 19920177 via CL 19920217 via CL 19920250
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19923140 by ryan schmidt in ue5-main branch]
2022-04-26 12:51: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
fred kimberley
e7e64e1749 Make FVector conversions explicit.
#preflight 6221270ea00412627d0b7dd3
#jira UE-122078
#lockdown Julien.Marchand
#rb Andrew.Davidson

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 19253774 in //UE5/Release-5.0/... via CL 19257968
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v924-19243027)

[CL 19263535 by fred kimberley in ue5-main branch]
2022-03-04 03:48:53 -05:00
ryan schmidt
b4814d732d ApproximateActors: reduce memory footprint by using compressed or lower-resolution LOD0 meshes
- add FStaticMeshLODResourcesAdapter in MeshConversions module, wrapper that presents StaticMesh LODResources mesh (ie Section buffers) with an API compatible with GeometryCore mesh templates
- add TMeshWrapperAdapterd in GeometryCore, this is a shim for getting any template-API-compatible mesh into a FTriangleMeshAdapterd specifically (required to call some non-template mesh processing functions)

- add support for using StaticMesh LODResources meshes in FMeshSceneAdapter instead of source meshes, controlled by build options flag
- add FMeshSceneAdapter build options flags specifying whether UV/Normal queries are required (default true)
  - when not required, the loaded MeshDescriptions and created DynamicMeshes are packed into FColliderMesh which has a smaller memory footprint, allowing the larger meshes to be freed

- to support above, the SpatialWrappers in MeshSceneAdapter.cpp have been refactored extensively
  - added FCompressedMeshSpatialWrapper which Builds from a temporary FDynamicMesh3 into a FColliderMesh, supports all the same options as FDynamicMeshSpatialWrapper (so a drop-in replacement with less memory usage, but no UV/Normal queries)
  - added FBaseMeshSpatialWrapper, base class for existing FDynamicMeshSpatialWrapper and new FCompressedMeshSpatialWrapper that has shared config settings (can more more here in the future)
  - added FStaticMeshLODResourcesMeshSurfaceAdapter, similar toFMeshDescriptionTriangleMeshSurfaceAdapter, a mesh adapter that filters out any geo that doesn't have a Surface-domain material
  - refactored TStaticMeshSpatialWrapper into TStaticMeshSpatialWrapperBase and subclasses FStaticMeshSourceDataSpatialWrapper and FStaticMeshRenderDataSpatialWrapper, for source mesh vs render mesh
  - added FCompressedStaticMeshSpatialWrapper, variant of FStaticMeshSourceDataSpatialWrapper that stores to a FColliderMesh and releases the source MeshDescription
  - SpatialWrapperFactory() now has logic to build from render mesh vs source mesh vs compressed source mesh
  - moved initial SpatialWrapper construction from AddActors() phase to Build() phase, because now it depends on build settings

- add EMeshDataSourceLODPolicy to IGeometryProcessing::FOptions, with LOD0 Source and LOD0 RenderMesh options
- ApproximateActorsImpl now provides/handles this policy setting, and configures FMeshSceneAdapter to not need UV/Normal queries (not required in this context)
- add bUseRenderLODMeshes option in FMeshApproximationSettings to expose render vs source mesh control at user level

#rb sebastien.lussier, rinat.abdrashitov
#jira UE-141256
#preflight 6206db44054c2e38c473be5d
#rnx

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18963126 in //UE5/Release-5.0/... via CL 18963829 via CL 18964587
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v917-18934589)

[CL 18964607 by ryan schmidt in ue5-main branch]
2022-02-11 18:11:49 -05:00
fred kimberley
7fbfaf57c8 Require explicit constructors/casts when converting between FVector, FVector3d, and FVector3f.
#jira UE-122078
#rb Andrew.Davidson, Colin.McGinley
#preflight standard build

#ROBOMERGE-AUTHOR: fred.kimberley
#ROBOMERGE-SOURCE: CL 18817999 in //UE5/Release-5.0/... via CL 18818012 via CL 18822871
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)

[CL 18824721 by fred kimberley in ue5-main branch]
2022-02-02 07:59:31 -05:00
andrew davidson
8e95b10069 Fix FVector2D variant casts - Runtime
Submitted on behalf of fred.kimberley
#rb andy.davidson
#preflight 61f8729a5a026d2d19bb9ca6
#preflight 61f87a025a026d2d19be76ed

#ROBOMERGE-OWNER: andrew.davidson
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 18802361 in //UE5/Release-5.0/... via CL 18802891 via CL 18821557
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18821641 by andrew davidson in ue5-main branch]
2022-02-02 01:47:07 -05:00