Commit Graph

132 Commits

Author SHA1 Message Date
jimmy andrews
143d4cd0c4 add generated light map option to the modeling tools mesh creation settings + make the settings more consistently used by default
also, when creating a static mesh with lightmap enabled via modeling components, also set the lightmap channel and resolution to match the build settings values, to better match the importer results

#jira UE-143961
#8929
#rb ryan.schmidt
#preflight 6406adbf0c7df1967f461e2d

[CL 24542092 by jimmy andrews in ue5-main branch]
2023-03-07 12:04:54 -05: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
semion piskarev
51b9a59a53 MeshModelingTools: Fix depth bias issues that come about from MeshElementsVisualizer adjusting depth bias to be too high due to a setting that works poorly with percentage-wise depth offset. For now, just making it not user-visible and set to false. Will be deprecated and removed more thoroughly in a later CL.
#rb Ryan.Schmidt
#preflight 63f3db3a90198dffbaf83aac

[CL 24329160 by semion piskarev in ue5-main branch]
2023-02-20 17:59:42 -05:00
nathan mitchell
b27788dcea ModelingTools: Replaces the wireframe visuals in the UVLayoutPreview with an instance of MeshElementsVisualizer, instead of the built in wireframe provided by PreviewMesh. This helps address some of the visual z-fighting issues that were being seen and provides more control over the wireframe visuals.
#rb Jimmy.Andrews
#preflight 63f0072561378b7ea04b9209

[CL 24327480 by nathan mitchell in ue5-main branch]
2023-02-20 17:06:25 -05:00
jimmy andrews
d6daff005b Make mesh elements visualizer distinguish between normal and tangent seams like the mesh inspector does
#rb david.hill
#preflight 63ee4e7d500c05a6244b020b

[CL 24270353 by jimmy andrews in ue5-main branch]
2023-02-16 17:39:45 -05:00
nathan mitchell
59d1e663d4 ModelingTools: Adjust the behavior of the Mesh Visualizer settings to properly disable when the Visible property is checked off.
#rb rinat.abdrashitov
#jira UE-176245
#preflight 63e2d59a1466610c64a3a931

[CL 24110660 by nathan mitchell in ue5-main branch]
2023-02-09 19:36:31 -05:00
ryan schmidt
af5699f133 ModelingTools: improve handling of invalid input selections to PolyEd Tool
Add UGeometrySelectionManager::GetActiveSelectionInfo, returns info about current selection w/o having to copy selection
Override UEditMeshPolygonsActionModeToolBuilder::CanBuildTool, use this new function to do specific per-action filtering to limit to supported input selection types
UEditMeshPolygonsSelectionModeToolBuilder::InitializeNewTool() now filters UI panels for current input selection if available, update Selection-palette PolyEd button to use this builder instead
#jira UE-176168
#preflight 63e2c886c2257e56f413b805
#rb david.hill

[CL 24068438 by ryan schmidt in ue5-main branch]
2023-02-08 01:21:37 -05:00
matija kecman
f05215f1c5 Render Capture Baking: Fix a crash which occurred because the SceneCapture state was not properly updated when its computation was cancelled
#jira UE-175047
#preflight 63d94591f626715201e45242

[CL 23933594 by matija kecman in ue5-main branch]
2023-01-31 14:12:46 -05:00
matija kecman
dfe144b82b Render Capture Baking: Remove sub-classing of BakeRC from UBakeMeshAttributeMapsToolBase and implement a few fixes
Fixed materials in the BakeRC tool missing UV layer switches or controls for brightness of the Base Color, Subsurface Color or Emissive channels
Removed the unused AO Multiplier setting that appeared in the Preview panel of the tool UI
Improved performance of BakeRC tool baking step by not recomputing the target mesh spatial index and uv charts
Improved the clarity of the analytics code since the sub-classing has enabled us to more easily use custom BakeRC analytics


#rb lonnie.li
#rnx
#preflight 63cfaa1ed83c1837b182104b
#jira none

[CL 23828120 by matija kecman in ue5-main branch]
2023-01-24 05:18:59 -05:00
semion piskarev
f18d6198cc MeshModelingTools: Add gizmo numerical UI.
- Added FTransformGizmoDataBinder which allows for gizmos to be bound to vectors such that the vectors are updated when the gizmo changes, and the gizmo is updated from vectors when asked. This should make it easy-ish to create displays of gizmos.
- Used the data binder in STransformGizmoNumericalUIOverlay, an overlay containing a draggable numerical UI panel for gizmos. Note that currently all changes, including typing, intentionally go down a gizmo drag path, meaning that they trigger the begin/end transform edit sequence calls, to make the tools treat them as a gizmo drag (in part because some tools might otherwise assume that a gizmo update is from an undo transaction or some other path that is special-cased).
- Added some slate things to ModelingEditorUI to support the numerical UI, in particular a viewport draggable box, and a widget that emits a tick delegate.
- Added some delegates to gizmo context object and combined transform gizmos to allow things to bind/unbind to/from them appropriately.

#rb Ryan.Schmidt
#preflight 63ce97ebf2318350a2f3a6c4

[CL 23815889 by semion piskarev in ue5-main branch]
2023-01-23 12:48:47 -05:00
ryan schmidt
9290a31c7e ModelingComponents: add FDynamicMeshPolygroupDeformer, applies GroupTopologyDeformer to a MeshSelection. Use in DynamicMeshSelector when selection has Polygroup topology.
#preflight 63cc5028f2318350a2597338
#rb none

[CL 23805236 by ryan schmidt in ue5-main branch]
2023-01-22 13:04:22 -05:00
ryan schmidt
10924781b2 ModelingMode: add support for Editor Marquee in new Mesh Selection system.
Add IGeometrySelector::UpdateSelectionViaShape() API, takes a FConvexHull to use as selection shape. Implement in DynamicMeshSelector.
Add UGeometrySelectionManager::UpdateSelectionViaConvex() API, calls above
ModelingToolsEditorMode now implements ILegacyEdModeSelectInterface, ::FrustumSelect() implementation calls above w/ frustum convex hull

Hide Marquee drag mode option, set default drag mode to "none"
Add save/restore of selection mode, drag mode, and volume/staticmesh toggles via UModelingToolsModeCustomizationSettings
Remove old selection toggle commands that were replaced w/ combined commands
Call DeleteSelectionCommand in UModelingToolsEditorMode::ProcessEditDelete() if there is an active selection

#preflight 63cac131fa66be4cc33661a9
#rb none

[CL 23796046 by ryan schmidt in ue5-main branch]
2023-01-20 15:30:23 -05: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
46630c002f ModelingMode: Selection system improvements. Add Disconnect command and various new Selection-Edit Commands
Add UInteractiveCommandResult, UInteractiveCommand::ExecuteCommand() now optionally can return a result subclass
Add UGeometrySelectionEditCommandResult, UGeometrySelectionEditCommand now can optionally return an "output" selection via this type
UGeometrySelectionManager::ExecuteSelectionCommand optionally can restore a selection after a command, via UGeometrySelectionEditCommandResult

Add UDisconnectGeometrySelectionCommand, implements disconnection of selected triangles (ie separates but not into a new mesh)
Add UModifyGeometrySelectionCommand, implements various selection edits (select all, expand to connected, invert, invert connected, expand, contract)
Add IGeometrySelector::InitializeSelectionFromPredicate() and ::UpdateSelectionFromSelection(), implement in UDynamicMeshSelector, used to implement selection edit commands
Add UI to enable new commands in Modeling Mode

#rb none
#preflight 63c047f4305002c64170f6a2

[CL 23667880 by ryan schmidt in ue5-main branch]
2023-01-12 14:52:52 -05:00
matija kecman
346ead8222 Render Capture Baking: Refactor how the scene capture and baking steps are managed to fix a crash when scene capture parameters changed and implement other improvements
The crash that was fixed occured when, for example, the userturned off a capture channel while the baking background compute was running
The refactoring has enabled the tool to only bake the newly captured channels only, previously when the scene capture was incrementally updated all pre-existing channels were baked again
The refactoring should enable us to more easily support a feature where the user toggles capture directions or adds new ones manually


#preflight 63c02c46345a532dfc273e6a
#rb lonnie.li
#rnx

[CL 23663959 by matija kecman in ue5-main branch]
2023-01-12 11:09:29 -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
matija kecman
802bf3bdfd Render Capture Baking: Add SubsurfaceColor and Opacity channels
#jira FORT-509766
#rb lonnie.li
#preflight 63b5fbd6202bee5e272b66c3

[CL 23585842 by matija kecman in ue5-main branch]
2023-01-05 05:19:44 -05:00
Nickolas Drake
33700c92e8 Modeling Mode Tools: Remove exponential behavior from unbounded sliders in various tools.
Added UI/Clamp meta tags where appropriate to implicitly remove the exponential behavior and added Delta/LinearDeltaSensitivity tags when values shouldn't be bounded but don't necessarily depend on the scale of the working mesh.

In the case of values that shouldn't be bounded and do change depending on the mesh scale, the exponential behavior remains.

#jira none
#rb ryan.schmidt
#preflight 639a3cc3776b61ba3bbf0f9f

[CL 23538292 by Nickolas Drake in ue5-main branch]
2022-12-16 11:11:57 -05:00
ryan schmidt
ccf82672ad ModelingMode: Add support for Gizmo snapping and pivot-repositioning in new Selection mode.
UDragAlignmentMechanic is refactored into FDragAlignmentBase with subclasses UDragAlignmentMechanic and UDragAlignmentInteraction, the latter is usable outside of a Tool (the Mechanic requires a Tool).
FFindSceneSnapPointParams struct in ToolSceneQueriesUtil now takes explicit SnappingManager and CameraState, instead of a Tool that is used to look up those values. Update the one call site (inside of ToolSceneQueriesUtil) that used this struct.
Add a DragAlignmentInteraction to ModelingSelectionInteraction and hook up to TransformGizmo, as well as required DragAlignmentToggleBehavior. Also required adding UModelingSelectionInteraction::Render(), and calling fro ModelingToolsEditorMode

#rb none
#preflight 639b95f72540a78d27047838

[CL 23535316 by ryan schmidt in ue5-main branch]
2022-12-15 20:49:34 -05:00
bryan sefcik
b30383a834 Fixed compile issues found after moving module files around in the unity files.
Also added missing generated.h includes.

#jira
#preflight 639bbcb2776b61ba3b35a835

[CL 23535000 by bryan sefcik in ue5-main branch]
2022-12-15 19:56:15 -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
michael balzer
de8aea8db9 MeshModelingToolset: Fix ResetToDefault for Output Object Name in e.g. Merge and Trim tools
#jira UE-168625
#preflight 63937accc415e8dc78c56176
[FYI] nickolas.drake

[CL 23475313 by michael balzer in ue5-main branch]
2022-12-11 23:09:16 -05:00
Nickolas Drake
9d9ebfa131 Modeling Mode Plane Visualization: Expose some options in the modeling mode preferences allowing the user to determine how planes in various tools should appear.
Created UModelingComponentsEditorSettings, a subclass of UDeveloperSettings.

#jira none
#rb jimmy.andrews, ryan.schmidt, matija.kecman
#preflight 6377d9fccc307d6fa5cfdb46

[CL 23430604 by Nickolas Drake in ue5-main branch]
2022-12-07 12:26:55 -05:00
Nickolas Drake
4c3322b3d9 Merge Tool: Remove useless 'Reset to Default' button for the 'Write To' field in UBaseCreateFromSelectedHandleSourceProperties.
This isn't specific to the merge tool, it is caused by the base create from selected tool from which the merge tool inherits.

#jira UE-168625
#rb ryan.schmidt
#preflight 638e58fa1776b8c21c4085c6

[CL 23430581 by Nickolas Drake in ue5-main branch]
2022-12-07 12:26:09 -05:00
ryan schmidt
bbd0ec3468 ToolsFramework: Hid various internal tools framework Actors from placement and blueprinting. Added some markup to various InteractiveTool UProperties to prevent them from ever being serialized, for incoming Blueprintable Tools.
remove unnecessary EToolShutdownType predeclaration from BaseToolkit.h, this was added a long time to ago when the type was referenced in this header, but that code was moved w/o removing the predecl
#rb none
#preflight 638e0c36c0652bbec2ea161b

[CL 23394677 by ryan schmidt in ue5-main branch]
2022-12-05 13:19:53 -05:00