Commit Graph

29 Commits

Author SHA1 Message Date
jimmy andrews
516ad3e0f4 make basemeshprocessing- and basecreatefromselected-derived tools set a max number of background tasks based on the input mesh sizes
#jira UE-220225
#jria UE-220226

#rb lonnie.li

[CL 36454406 by jimmy andrews in 5.5 branch]
2024-09-19 17:54:31 -04:00
roey borsteinas
31ffb20fb6 [Modeling Tools]: Changed the default target requirements for most tools and tool builders to use UDynamicMeshProvider/Commiter. Only specific tools that directly get the MeshDescription in non-optional ways.
#rb lonnie.li

[CL 34648063 by roey borsteinas in ue5-main branch]
2024-06-25 13:59:43 -04:00
katie caputo
9170a72472 Modeling Tools: Adds Geometry Selection Support for the Smooth Tool
#JIRA UE-181659
#rb lonnie.li

[CL 32507530 by katie caputo in ue5-main branch]
2024-03-26 09:48:04 -04:00
katie caputo
ae362b0c01 Modeling Tools: Adds Geometry Selection Support for the Split Tool
#JIRA UE-181657
#rb lonnie.li

[CL 32336604 by katie caputo in ue5-main branch]
2024-03-19 15:45:02 -04:00
jimmy andrews
faeb30bea8 make tools use a more consistent path to get dynamic meshes from tool targets
#jira UE-200228
#rb David.Hill

[CL 32004665 by jimmy andrews in ue5-main branch]
2024-03-04 18:35:47 -05:00
jimmy andrews
086d9075c0 Make create-from-selected tools apply updated materials to both the component as well as the asset, so that the material reliably shows in the result while still applying to the asset
#jira UE-183218
#rb tyson.brochu

[CL 31554945 by jimmy andrews in ue5-main branch]
2024-02-15 23:11:02 -05:00
jimmy andrews
05d70b0bf8 remove deprecated persistent mesh selection code from modelingcomponents
#rb jimmy.andrews

[CL 31501095 by jimmy andrews in ue5-main branch]
2024-02-14 18:58:49 -05:00
jimmy andrews
b4bb1bfb9a disable workarounds for now-fixed collision update bug, so bake transform, edit pivot, and the various voxel/boolean tools will not create two transactions per operation for static meshes that have convex collision
#jira UE-165856
#rb David.Hill, lonnie.li

[CL 31347696 by jimmy andrews in ue5-main branch]
2024-02-09 13:16:32 -05:00
jimmy andrews
6ba33263bd Add support for copying collision shapes in the Create From Selected base tool, so we get this feature in the derived tools (e.g., the Merge tool, Vox Wrap, a few others).
Customize derived tools to exclude the collision from subtracted shapes.

#jira UE-182340
#rb lonnie.li

[CL 30359256 by jimmy andrews in ue5-main branch]
2023-12-15 15:50:51 -05:00
nathan mitchell
eec5c6c119 Modeling Mode: Fix issue where weightmaps are loaded with invalid values for a target when tools' settings are loaded with a preset.
#rb Jimmy.Andrews
#jira UE-188052

[CL 26590929 by nathan mitchell in ue5-main branch]
2023-07-25 17:57:32 -04:00
matija kecman
d8e6b45610 Add a reusable geometry selection visualization system intended to be used in modeling tools with minimal boilerplate
This CL was reviewed here: https://p4-swarm.epicgames.net/reviews/26051575 but needs to be merged into //Fortnite/Release-26.00, not //Fortnite/Main

#jira UE-183457
#rb ryan.schmidt, nathan.mitchell

[CL 26180658 by matija kecman in ue5-main branch]
2023-06-22 09:28:20 -04:00
jimmy andrews
5337719d2e Fix vox offset tool issues:
- Warn about artifacts on meshes with open boundaries
 - Fix some settings not being saved/restored
 - Fix transaction name on undo/redo not matching the tool name

Also: Make the asset warning for base interactive tool only clear the tool's display message if it set a display message when it was last called, so that it is less likely to clear unrelated display messages when called with no warning to display.

#jira UE-180838
#jira UE-180758
#jira UE-180838
#rb rinat.abdrashitov
#preflight 641be32f25389270b7300ae4

[CL 24783364 by jimmy andrews in ue5-main branch]
2023-03-24 14:05:46 -04:00
ryan schmidt
70ac55822d ModelingMode: improve interop with new Selection System and existing Tools
Add support for Tools to provide an "output" selection. Add UGeometrySelectionManager::SetSelectionForComponent() which can set an explicit externally-provided selection. FBaseDynamicMeshSelector::UpdateSelectionFromSelection() now supports selection conversion when available and requested (is used to implement SetSelectionForComponent). New GeometrySelectionUtil functions InitializeSelectionFromTriangles() and ConvertSelection() are used to implement this (note: only Triangles->other conversion is currently supported). Add HaveAvailableGeometrySelection() and SetToolOutputGeometrySelectionForTarget() in StoredMeshSelectionUtil.h, this is the top-level function that Tools can use to set an Output selection.

ExtrudeMeshSelectionTool now emits output selection.

Update EditMeshPolygonsTool to use new Selection system and allow individual operations to be utilized as standalone Tools. Convert EditMeshPolygonsTool to be a USingleTargetWithSelectionTool, use FGeometrySelection to initialize selection. Add bTerminateOnPendingActionComplete flag, which is set when Tool is directly initialized to a specific operation, and forces tool to shut down when operation completes. This allows it to be used to more cleanly implement multiple action buttons in Modeling UI. When in this mode, selection panels are not shown. On Shutdown, now emits an "output" selection which GeometrySelectionManager can use to provide new selection to user. Update UPolygonSelectionMechanic Set/Get selection APIs to use FGeometrySelection instead of UPersistentMeshSelection.

port UVProjectionTool to derive from USingleTargetWithSelectionTool, use FGeometrySelection to initialize target ROI

deprecate UPersistentMeshSelection and related functions in StoredMeshSelectionUtil.h. Deprecate Tool Input Selection APIs in USingleSelectionMeshEditingTool and Builder.

Repurpose old ModelingMode-level PolyModel tab operations for new Selection Tools UI, now support Inset, Outset, Cut Faces, Insert Edge Loop, PushPull, and Bevel.

#rb none
#preflight 63c84fa2b065224750b9831f

[CL 23766643 by ryan schmidt in ue5-main branch]
2023-01-18 17:59:31 -05:00
ryan schmidt
0e4ddc8e1a ModelingTools: add new modeling-mode Tool/Operator for extruding Mesh Selections
Add UE::ToolTarget::SupportsIncrementalMeshChanges() and ::ApplyIncrementalMeshEditChange(), these allow a Tool to directly edit a DynamicMeshComponent in the level (and emit corresponding MeshChange) so that a Tool can emit multiple undoable edits on a DynamicMesh
Add new USingleTargetWithSelectionTool base tool class, this is a USingleSelectionTool that can receive a FGeometrySelection. USingleTargetWithSelectionToolBuilder configures this type of Tool as necessary.
Add new LinearExtrusionOp dynamic mesh operator, provides linear-extrusion API to FOffsetMeshRegion using new Operator design (mesh shared via FSharedConstDynamicMesh3, CalculateResultInPlace() function to simplify direct usage in geometry script/etc)
Add new ExtrudeMeshSelectionTool, subclass of USingleTargetWithSelectionTool, exposes new LinearExtrusionOp, uses above ToolTarget functions to directly edit DynamicMeshComponent where possible
Enable new Tool in Modeling Mode

Add a few new functions to UMeshOpPreviewWithBackgroundCompute to simplify configuring InProgress and Secondary materials
Small additions to USingleSelectionTool

#preflight 639a3e250a671525500d8a7e
#rb none

[CL 23520421 by ryan schmidt in ue5-main branch]
2022-12-14 17:43:16 -05:00
henrik karlsson
4a5e13525d Fixed non-unity non-pch compile errors
#preflight skipped
#rb none

[CL 22788359 by henrik karlsson in ue5-main branch]
2022-10-26 16:22:34 -04:00
jimmy andrews
4b2210d53f Fix missing transform back to world space in single-selection case for BaseCreateFromSelected tools (Merge, VoxWrap, VoxMorph)
#jira UE-166171
#preflight 63408ddd437603cb0e439934
#rb rinat.abdrashitov
#rb tyson.brochu

[CL 22424949 by jimmy andrews in ue5-main branch]
2022-10-09 23:35:03 -04:00
bryan sefcik
50d4fac9e0 Updated ../Engine/Plugins/... to inline gen.cpp files
Before:
3548 unity files
Total CPU Time: 47343.578125 s
Total time in Parallel executor: 494.60 seconds

After:
3445 unity files
Total CPU Time: 46044.671875 s
Total time in Parallel executor: 468.51 seconds

#jira
#preflight 63336159b20e73a098b7f24f

[CL 22218213 by bryan sefcik in ue5-main branch]
2022-09-28 01:06:15 -04:00
Jimmy Andrews
3f0fdaddb4 When applying MeshTransforms' transform and transforminverse, generally pass bReverseOrientationIfNeeded=true
(+ for code that was passing false then manually applying the same logic, remove the extra reverse orientation logic)

#rb david.hill
#preflight 630d245fe352708d44f9e007

[CL 21706500 by Jimmy Andrews in ue5-main branch]
2022-08-30 14:40:56 -04:00
Jimmy Andrews
10153ffb90 Deprecate TTransformSRT3::Inverse() and attempt to fix usages of it and also FTransform::Inverse() in the modeling code
#rb david.hill
#preflight 627d2b99a82f3adab87fb87f

[CL 20165573 by Jimmy Andrews in ue5-main branch]
2022-05-12 12:08:26 -04: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
lonnie li
4afd669dcb ModelingTools: Clear TargetWorld member during Shutdown of SingleSelectionMeshEditingTool and MultiSelectionMeshEditingTool
#rb ryan.schmidt michael.balzer
#rnx
#jira none
#preflight 61f435dd74510448a6865d14

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18777332 in //UE5/Release-5.0/... via CL 18780413 via CL 18780555
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18780558 by lonnie li in ue5-main branch]
2022-01-28 18:40:54 -05:00
lonnie li
e1c7ca927e Fix non-unity error in SingleSelectionMeshEditingTool & MultiSelectionMeshEditingTool
#rb trivial
#rnx
#jira none
#preflight 61f421f76b5aea38e5bd90fb

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18773159 in //UE5/Release-5.0/... via CL 18773298 via CL 18773779
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18773785 by lonnie li in ue5-main branch]
2022-01-28 12:44:22 -05:00
lonnie li
d041f2273b ModelingTools: Fix crash when reloading levels during an AutoLOD compute
#rb ryan.schmidt
#rnx
#jira UE-139485
#preflight 61f38478da54035207ecae9b

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18771194 in //UE5/Release-5.0/... via CL 18771204 via CL 18771302
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18771314 by lonnie li in ue5-main branch]
2022-01-28 10:18:10 -05:00
ryan schmidt
17cefb1dd1 ModelingTools:
Reduce surface area of MeshDescriptionProvider/Committer, replace with UE::ToolTarget:: calls where possible.

Add new UE::ToolTarget::CommitMeshDescriptionUpdateViaDynamicMesh() function. This is being used for now to avoid potential regressions as UE::ToolTarget::CommitDynamicMeshUpdate will preferentially use DynamicMeshCommitter, and I am not certain it is functionally equivalent in all cases.
Add new UE::ToolTarget::CommitDynamicMeshNormalsUpdate(), similar to existing UV version
Add new Move-variant of UE::ToolTarget::CommitMeshDescriptionUpdate(), uses new Move-variant of IMeshDescriptionCommitter::CommitMeshDescription.
Make existing IMeshDescriptionCommitter::CommitMeshDescription callback interface protected, to prevent usage of this function at public API level (will be removed in future).

Tool updates should not change, just using cleaner APIs.
EditNormalsTool now uses CommitDynamicMeshNormalsUpdate(), which does go via DynamicMeshCommitter preferentially, where it previously went via MeshDescriptionCommitter. In light testing the results appear equivalent.
AttributeEditorTool now operates on MeshDescription copies in various update functions. These are not performance-critical.

#rb rinat.abdrashitov
#rnx
#preflight 61ae45998358693a22c28d1b

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18384350 in //UE5/Release-5.0/... via CL 18384361
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18384373 by ryan schmidt in ue5-release-engine-test branch]
2021-12-06 12:42:19 -05:00
lonnie li
2972827a94 ModelingTools: Fix CIS break with BaseCreateFromSelectedTool.
#rb trivial
#rnx

#ROBOMERGE-AUTHOR: lonnie.li
#ROBOMERGE-SOURCE: CL 18278314 in //UE5/Release-5.0/... via CL 18278329
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18278343 by lonnie li in ue5-release-engine-test branch]
2021-11-23 19:17:30 -05:00