Commit Graph

42 Commits

Author SHA1 Message Date
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
sebastien lussier
266ea40bff World Partition - HLOD: Avoid the creation of reverse index buffers when building HLODs
* Reversed index buffers are used to handle negative scaling transforms. Since HLOD meshes will never be used with such transforms, we can get rid of these buffers and reduce memory usage.
#jira UE-216169
#rb JeanFrancois.Dube

[CL 34065502 by sebastien lussier in ue5-main branch]
2024-06-03 10:23:45 -04:00
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
alban bergeret
f26d489cd8 Added the ability to generate UVs with full floating point precision when building a new Mesh asset programmatically
#rb Jimmy.Andrews

[CL 33243084 by alban bergeret in ue5-main branch]
2024-04-25 16:13:21 -04: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
christopher waters
5a0e169c6d Getting more headers compiling solo on Win64.
#rb joe.kirchoff, henrik.karlsson

[CL 31663239 by christopher waters in ue5-main branch]
2024-02-20 18:57:35 -05:00
halfdan ingvarsson
b692d6e175 Skeletal Mesh: Change the import storage to use FMeshDescription instead of FSkeletalMeshImportData. This includes deprecating the USkeletalMesh::LoadLODImportedData and friends, in lieu of an API more similar to the one on UStaticMesh (GetMeshDescription/CommitMeshDescription/etc).
#jira UE-166343
#rb Alexis.Matte, benoit.gadreau, john.vanderburg

[CL 30711382 by halfdan ingvarsson in ue5-main branch]
2024-01-19 00:37:06 -05:00
jimmy andrews
723fd517f1 make staticmeshtooltarget and staticmeshcomponenttooltarget handle buildscale on static mesh <-> mesh description conversions, so tools using these targets will show correctly-scaled meshes
#rb David.Hill

[CL 30193994 by jimmy andrews in ue5-main branch]
2023-12-07 17:38:34 -05:00
jimmy andrews
0b02d04d2b add a default-enabled option to remove degenerate triangles during dynamic mesh -> volume conversion, to make volume creation more likely to create valid BSP geometry that works for collisions. This fixes the collision for the modeling mode cone and arrow primitives when they are created as blocking volumes.
#rb rinat.abdrashitov
#jira UE-201659

[CL 30047481 by jimmy andrews in ue5-main branch]
2023-12-01 13:47:26 -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
lonnie li
c985b2ef68 ModelingTools: Fixed crash in UEFN when reloading a level after using the Modeling Tools with Mesh Element Selection.
#rb jimmy.andrews

[CL 27739312 by lonnie li in ue5-main branch]
2023-09-09 14:50:19 -04: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
ryan schmidt
826eb71a04 ModelingMode: selection system bugfixes & improvements.
Add DynamicMeshSelector::UpdateAfterGeometryEdit API. StaticMeshSelector implementation updates static mesh after an Edit instead of emitting MeshChange on temporary DynamicMesh.
Delete and Retriangulate Commands now use this API instead of directly emitting transaction, so now these commands work properly on Static Meshes.

FStaticMeshComponentSelectorFactory::CanBuildForTarget now only allows UStaticMeshComponent specifically, filtering out subclasses. This is not ideal but I don't know what else we can do for now, there are many subclasses like ISMC, SplineMeshComponent, etc, that will not work w/ the Selection system. Also now filtering out Engine assets and cooked assets.

ModelingToolsEditorMode now listens for blueprint pre-compiles, and when this occurs, clears the active selection and selection targets. This is necessary because if the selection Component was part of a BP, on recompile it is re-instanced and the old pointer goes stale. Possibly can handle this better or at a more granular level, but clearing the selection is safest. This currently results in things not being undoable because the FChange transactions are on the "old" UDynamicMesh that no longer exists.

UModelingToolsEditorMode::UpdateSelectionManagerOnEditorSelectionChange now does a more thorough job of inspecting the current Actor/Component selection to find Components that could work w/ the selection system.

#rb lonnie.li

[CL 26133067 by ryan schmidt in ue5-main branch]
2023-06-20 16:23:43 -04:00
semion piskarev
d27ea02f0c MeshModelingTools: Subdivide tool improvements dealing with meshes with open boundaries.
- Factor out "extra corner" finding code from PolyEd and add support for it in subdivide tool.
- Add support for rounded corners for mesh boundaries.
- Override subdivision scheme during tool usage rather than just at tool start, to allow extra corners to fix some issues.
- Add some clarifying comments about schemes.

#rb Jimmy.Andrews
#jira UE-185416

[CL 26011610 by semion piskarev in ue5-main branch]
2023-06-15 08:56:02 -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
nickolas drake
a97a2b32d4 ModelingToolset: Make Pattern Tool emit correct actors using a new CreateNewActor function.
Added a CreateNewActor function to EditorModelingObjectsCreationAPI which finds a factory capable of producing actors of the same type as a provided template actor to create the new actor without needing to create entirely new assets as would have been necessary with the existing functions in EditorModelingObjectsCreationAPI.

#rb lonnie.li

[CL 25963642 by nickolas drake in ue5-main branch]
2023-06-13 17:05:45 -04:00
matija kecman
ae026188f8 Render Capture Baking: Make BakeRC tool output a new material configured with the generated textures
This change also extends UModelingObjectsCreationAPI to support materials by duplicating a given material

#rb ryan.schmidt
#jira UE-182349
#preflight 6467649a573c1da15838e005

[CL 25548119 by matija kecman in ue5-main branch]
2023-05-19 13:50:08 -04:00
ryan schmidt
4061f31c7c ModelingTools: Add IMeshDescriptionProvider::GetMeshDescriptionLOD() which returns current LOD for a ToolTarget. Implement in StaticMesh Tool Targets. Add UE::ToolTarget::GetTargetMeshDescriptionLOD() which wraps this function
#rb jimmy.andrews
#preflight 646631103660522200164f0c

[CL 25529470 by ryan schmidt in ue5-main branch]
2023-05-18 13:52:35 -04:00
semion piskarev
582964265a MeshModelingTools: Harden tool targets against underlying objects being replaced via blueprints and/or garbage collected.
#rb Lonnie.Li, Jimmy.Andrews
#jira UE-184401
#preflight 64525c58743c256cd692d59e

[CL 25334286 by semion piskarev in ue5-main branch]
2023-05-04 09:51:24 -04:00
ryan schmidt
2f30bc1c16 ModelingMode: updates to selection system.
Selection enable/disable can now be toggled dynamically via mode settings popup, toolbar will hide/show based on current setting state.
GeometrySelectionManager is now always created. New Mode function GetMeshElementSelectionSystemEnabled() indicates whether selection is currently enabled, when disabled active targets will not be tracked.
Selection Toolbar icons now are disabled while in a Tool (as selection system is not active then)
New Static Mesh Assets and Volumes created using Modeling Tools now default to unlocked, via new functions on StaticMeshSelector / Volume Selector.
Unlocked Asset/Volume sets are cleared on level change
Added cvars modeling.Selection.EnableStaticMeshLocking and modeling.Selection.EnableVolumeLocking which can be used to fully disable lock-ability of StaticMesh/Volume (default true)
shortened some names of tool group tabs, as labels are now shown and long names make the bar wider
Added a few toast notifications for when setting state changes require a mode or editor restart.
#rb none
#preflight 64426fabb14f1faacff6921d

[CL 25149511 by ryan schmidt in ue5-main branch]
2023-04-21 14:04:50 -04:00
david hill
1660860437 Mesh Modeling - Static Mesh and Static Mesh Component Tool Targets.
Update Can Build Target to distinguish generated LODs.   Tools shouldn't edit generated LODs.

#jira UE-183213
#preflight 64415b4e9566b614506456f5
#rb Rinat.Abdrashitov

[CL 25132341 by david hill in ue5-main branch]
2023-04-20 14:18:49 -04:00
jimmy andrews
e5b9310407 add support for querying LOD support in a mesh description provider, and use this to add an option to apply Bake Transform and Pivot tools to all LODs
#jira UE-182339
#rb ryan.schmidt
#preflight 6439a35c8e019684483b37dd

[CL 25068419 by jimmy andrews in ue5-main branch]
2023-04-17 11:09:56 -04:00
ryan schmidt
d83ee312b8 ModelingMode: bring back in-viewport selection toolbar. Add concept of Locking to IGeometrySelector, have StaticMeshSelector and VolumeSelector default to locked. Add util functions to check/manipulate locking state to UGeometrySelectionManager. Add locked-state indicator/button to selection toolbar.
#preflight 642df231c6769c608209676a
#rnx

[CL 24979045 by ryan schmidt in ue5-main branch]
2023-04-10 12:36:37 -04:00
ryan schmidt
3880554a59 ModelingMode: preliminary support for selection transform visualization for Volumes and Static Meshes, and other minor improvements.
Add IGeometrySelectionTransformer::PreviewRender() API, for rendering info during selection transforms. Currently being called by  UGeometrySelectionManager::DebugRender() for active transforms.
FBasicDynamicMeshSelectionTransformer implements PreviewRender, draws selected mesh edges (tris as edges) and vertices, as well as affected edge ROI.
FDynamicMeshPolygroupTransformer overrides this behavior and draws polygroup edges/verts and edge ROI

FStaticMeshSelector and FVolumeSelector now create FDynamicMeshPolygroupTransformer for polygroup selections

FBasicDynamicMeshSelectionTransformer::bEnableSelectionTransformDrawing flag controls whether this edge drawing is enabled. Disabled on DynamicMeshComponent, enabled on StaticMesh and Volume.

Add Normals recomputation during tri and polygroup transforms in FBasicDynamicMeshSelectionTransformer and FDynamicMeshPolygroupTransformer

Add FGroupTopologyDeformer::EnumerateROIEdges() util function to support above

#rb none
#preflight 641cd27bc44ce895fc62f724

[CL 24780655 by ryan schmidt in ue5-main branch]
2023-03-24 12:08:43 -04:00
matija kecman
c52fb72f6b Improve the documentation of options in the SubDiv tool
#jira UE-171088
#preflight 63de28a6af610ffb8b5fcbba
#rb jimmy.andrews

[CL 24042071 by matija kecman in ue5-main branch]
2023-02-06 19:14:40 -05:00