Commit Graph

244 Commits

Author SHA1 Message Date
ryan schmidt
3a37357aa3 ModelingTools: add new Vertex Painting Tool
Add UMeshVertexPaintTool, subclass of UMeshSculptToolBase. Paints Mesh Vertex Colors (ie Asset colors, not instance colors). Provides many interactions similar to GroupPaintTool (ie brush paint, click-to-fill, poly-lasso, volumetric vs connected brush ROI, UV/Normal seams, visibility filter, etc. Supports painting split-vertex colors, or smooth per-vertex colors (bHardEdges setting). Supports various brush types (paint, smooth, "blend" = average split values). Painting supports custom color-blend modes (ie "over" mode, does stroke compositing like pixel painting tools). Can show vertex color under cursor. Supports showing vertex color or original materials. Ability to filter channels for visibility/painting. Actions buttons to fill current-color/black/white. "Utility" panel for common operations (blend all seams, fill channels, invert channels, copy channel to channel, swap channels, copy from weight map, copy to all/single LOD).

Internally supports seam painting by splitting all colors on startup (ie to create per-triangle-vertex color) and then welding on shutdown.

Current auto-RGBA conversions are inverted, internally the tool works in Linear colors, preview DynamicMeshComponent is configured to convert to SRGB in color buffers (similar to static mesh).

Vertex color brush ops added in MeshVertexPaintBrushOps.h, deriving from new FMeshVertexColorBrushOp. Various color-blending functions implemented there, should be moved to centralized place eventually.

Expose MeshVertexPaintTool in ModelingMode
Add FModelingToolsColorChannelFilter, for toggling R/G/B/A filtering state, and a details customization that shows these four checkboxes in a horizontal row. Use in MeshVertexPaintTool, Register in Modeling Mode.

#rb none
#preflight 646cfc50205f5d23d53f80f1

[CL 25592458 by ryan schmidt in ue5-main branch]
2023-05-23 18:18:39 -04:00
ryan schmidt
0ff893f0f2 Modeling Tools: minor changes in prepration for future CL. Add UE::Geometry::Lerp for TVector4 types. Refactor code MeshGroupPaintTool code for polylasso post-process to static function UPolyLassoMarqueeMechanic::ApproximateSelfClipPolyline(). Make brush flow rate configurable via overridable UMeshSculptToolBase::GetStampTemporalFlowRate().
#rb none
#preflight 646cbf4064351d76f31f6841
#rnx

[CL 25592096 by ryan schmidt in ue5-main branch]
2023-05-23 18:10:55 -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
kiaran ritchie
ca07aefee4 Fixing compile error from 25482982
#rb none
#JIRA none
#preflight none

[CL 25483177 by kiaran ritchie in ue5-main branch]
2023-05-15 20:01:48 -04:00
tyson brochu
9f9432863e Adding a two-sided vertex color material. Same as MeshVertexColorMaterial but with "Two Sided" checked.
Use the new two-sided material in the cloth weight map paint tool so that we can paint on the "back" side of the 2D panels

#rb ryan.schmidt
#preflight 645beaef8b3e445e810aa6ef

[CL 25414150 by tyson brochu in ue5-main branch]
2023-05-10 15:35:50 -04:00
matija kecman
87ee9970e8 Fix GetElapsedComputeTime so that the preview material kicks in after the proper delay
#jira UE-183810
#preflight 644a77c66b589f8b36ee29a9
#rb jimmy.andrews

[CL 25299633 by matija kecman in ue5-main branch]
2023-05-02 07:51:43 -04:00
ryan schmidt
8937f914fa ModelingMode: avoid a crash on shutdown when DynamicMeshActor is selected, due to TargetCache being modified during iteration
#rb none
#preflight 644af8701150e908d05a0976

[CL 25238944 by ryan schmidt in ue5-main branch]
2023-04-28 16:01:06 -04:00
ryan schmidt
2046684122 ModelingMode: support IGeometrySelector::Sleep() and ::Restore() failing in GeometrySelectionManager. FBaseDynamicMeshSelector will now fail to sleep if TargetMesh is not valid. SupportsSleep() now also checks for valid target mesh.
#rb jimmy.andrews
#jira UE-184089
#preflight 644953476b589f8b367c7f7a

[CL 25204039 by ryan schmidt in ue5-main branch]
2023-04-26 14:35:53 -04:00
matija kecman
7b090b69c0 Add Geometry Selection visualization to Normals tool
#jira UE-183457
#preflight 64492eecb208f61af87912db
#rb ryan.schmidt

[CL 25199891 by matija kecman in ue5-main branch]
2023-04-26 11:54:13 -04:00
tyson brochu
23204d6190 Cloth Paint Tool:
- Add a Gradient Interaction Type. The user selects "high" and "low" vertices and a gradient is automatically computed between them

#jira UE-183874
#rb jimmy.andrews
#preflight 644805ccd07064cbaea8ce5a

[CL 25183697 by tyson brochu in ue5-main branch]
2023-04-25 13:16:11 -04:00
Steve Robb
acfaf95a3f Fixed mismatched copy constructor/assignment operator in FGeometryIdentifier.
#rb none
#jira none
#preflight none

[CL 25177552 by Steve Robb in ue5-main branch]
2023-04-25 05:53:22 -04:00
semion piskarev
41dc177b10 MeshModelingTools: Make FPhysicsDataCollection::CopyGeometryToAggregate clear the AggGeom before filling it. Fixes MeshToCollision tool duplicating simple geometry when appending
#rb Jimmy.Andrews
#preflight 6442e7dfb14f1faacf2a087a

[CL 25157514 by semion piskarev in ue5-main branch]
2023-04-22 00:32:56 -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
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
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
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
dmytro vovk
6e87e7ac29 Pack FTexture2DMipMap fields
#rb Christopher.Waters
#preflight 6422d44f803cb466e8475419

[CL 24912796 by dmytro vovk in ue5-main branch]
2023-04-04 12:38:36 -04:00
Steve Robb
5b8c9537f7 Made FMeshBakerDynamicMeshSampler explicitly non-copyable to prevent a bunch of deprecation warnings about FMeshBakerDynamicMeshSampler::DetailNormalMap from their implicit copy constructors.
Made FSceneCapturePhotoSetSampler explicitly non-copyable to prevent its special member functions being DLL-exported.

#rb none
#jira none
#preflight none

[CL 24890436 by Steve Robb in ue5-main branch]
2023-04-03 06:14:42 -04:00
charles bloom
ffe45866e0 clean up code using GetMipData without checking return value
GetMipData can return false on textures that have no sources
Textures without source is common now in UEFN
also comment about some code that is broken or more fragile than necessary

#preflight https://horde.devtools.epicgames.com/job/6423434d710ec8400fe83bd6
#rb fabian.giesen,dan.thompson

[CL 24831862 by charles bloom in ue5-main branch]
2023-03-29 02:28:14 -04:00
ryan schmidt
c8acfc09b0 ModelingTools: add support for DynamicMeshComponent Simple Collision in Mesh to Collision Tool, Convert Tool, and Transfer Tool.
ModelingComponents: Add ShapeSet member for passing simple collision shapes in FCreateMeshObjectParams, support in relevant functions in UEditorModelingObjectsCreationAPI. Add UE::Geometry::GetCollisionShapes() functions in ComponentCollisionUtil.h, and update various functions to support DynamicMeshComponent

DynamicMeshComponent: change signature of GetSimpleCollisionShapes() to return const ref

#rb david.hill
#preflight 6421ca54973e609670a408c7

[CL 24819452 by ryan schmidt in ue5-main branch]
2023-03-28 11:19:32 -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
michael balzer
178a17d074 Fix access to render LOD0 in editor
#preflight 641cfd93973e609670965d20

[CL 24780771 by michael balzer in ue5-main branch]
2023-03-24 12:15:06 -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
b4369f3873 Geometry Scripting: Add a ChannelPack node which has up to 4 input textures and creates an output texture where the RGBA channels are sourced from the inputs
#preflight 641a46d625389270b7a7a781
#jira UE-174783
#rb ryan.schmidt

[CL 24745402 by matija kecman in ue5-main branch]
2023-03-22 07:02:05 -04:00