Commit Graph

162 Commits

Author SHA1 Message Date
sebastien lussier
c344fbeb86 Approximate Actors - Fix ensure() caused by empty scene representation
* Return an error if no valid input was provided
#rb jimmy.andrews, lonnie.li

[CL 27845860 by sebastien lussier in ue5-main branch]
2023-09-13 15:43:42 -04:00
matija kecman
fccb4f9aff Scene sampling using a Render Capture approach
#rb jimmy.andrews
#jira UE-193152,UE-194653

[CL 27637471 by matija kecman in ue5-main branch]
2023-09-06 11:39:40 -04:00
sebastien lussier
9ba039e68e Approximate Actors - Allow approximate actors to use an array of components as input, rather than only actors
#rb patrick.enfedaque

[CL 27597062 by sebastien lussier in ue5-main branch]
2023-09-05 11:04:59 -04:00
kiaran ritchie
5375337bcc Adding select shell / grow / shrink to vertex selection modes.
#rb halfdan.ingvarsson

[CL 27327509 by kiaran ritchie in ue5-main branch]
2023-08-23 19:29:44 -04:00
matija kecman
00ca171680 Fix crashes in BakeRC tool, improved the scene capture progress bar, improved and simplified the scene capture cancellation behavior
* Fixed a crash that occurred in the baking step when cancelling a scene capture which was triggered by changing an option which invalidated all photo sets (i.e., render capture resolution or capture anti aliasing). This was occurring because the baking step proceeded after the scene capture cancellation and the needed photosets were empty.

* Fixed a crash which can happen if you have no channel enabled, change cleanup tolerance from 0 to 1 and then enable the BaseColor channel. This was fixed by changing the behavior of the Cleanup Threshold property, if its positive the DeviceDepth capture is enabled and its disabled otherwise, previously we also required that another channel was enabled which led to the crash in the baking step. The new semantics are easier to understand in the code and and is probably an improvement to the UX as well since the Cleanup Threshold property behavior does not depend on other properties.

* Improved the scene capture cancellation: Users can now cancel the scene capture when the tool is starting up which is better UX since if they picked slow settings they don't intend to reuse, the capture can be cancelled, also, the code is simpler. Changed the behavior of the BakeRC tool properties so that after cancellation the completed captures with the desired settings are enabled. The old behavior where cancellation was documented to restore old results was broken and cannot be made to work unless we store the old results in a separate scene capture but for high capture resolutions that would require a lot of memory. When the SceneCapture is cancelled the channels which were pending and didn't complete are logged in the Output Log in case the user forgets which ones were enabled.

* Simplified the code in various places: Added `operator[](ERenderCaptureType)` to structs with per-capture data, and use it to simplify many places where we previously checked channels individually. Added conversion functions from tool properties/geometry script parameters to the render capture parameters. Removed old confusing logic that determined if a capture had been updated by tracking the number of photos in each photoset with a new system based on a new per-capture pending state. Deprecated a bunch of functions which are no longer useful or which used the wrong types (e.g., `FRenderCaptureUpdate` was added because I hadn't noticed `FRenderCaptureTypeFlags`). Changed the defaults in `FSceneCapturePhotoSet` so that the DeviceDepth capture is off, its an advanced feature and the defaults are intended to make the class friendly to new developers

#rb lonnie.li

[CL 26569987 by matija kecman in ue5-main branch]
2023-07-25 08:46:23 -04:00
semion piskarev
e3d5ff2bdc MeshModelingTools: Make depth bias in our materials less sensitive and adjust for FOV, and clean up the material graphs. Add options for dithered and dimmed occluded lines.
#rb Matija.Kecman
#jira UE-189441

[CL 26504582 by semion piskarev in ue5-main branch]
2023-07-20 22:54:18 -04:00
tyson brochu
f605a439af Mesh Topology Selection Mechanic: enable/disable different selection modes in the details customization
#rb semion.piskarev

[CL 26319136 by tyson brochu in ue5-main branch]
2023-06-29 13:27:16 -04:00
christopher waters
4e96f4193d Removing UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_0 and UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_1 including all uses in the engine.
[CL 26259545 by christopher waters in ue5-main branch]
2023-06-27 11:54:23 -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
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
nathan mitchell
7399c9bb75 Modeling Mode: Added a new tool to assist with the editing of simple collision primitives for static and dynamic meshes.
This tool mostly encapsulates the basic collision editing behaviors found within the Static Mesh Editor, but exists as a tool within Modeling Mode to work along side existing collision tools, such as Collision to Mesh and Mesh to Collision.

Initial features include:

* Support for selecting and transforming collision primitives, including primitive aware transforms (such as explicit length and radius controls on capsule shapes).
* Adding new simple shapes (spheres, boxes, and capsules)
* Duplicating existing shapes
* Deleting some or all collision geometry

#rb Ryan.Schmidt
#jira UE-182341

[CL 26066042 by nathan mitchell in ue5-main branch]
2023-06-16 15:31:59 -04:00
semion piskarev
b4529d4548 MeshModelingTools: Create Draw Spline Tool for drawing splines and spline-based blueprints.
#rb Jimmy.Andrews
#jira UE-182356

[CL 25991352 by semion piskarev in ue5-main branch]
2023-06-14 15:47:10 -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
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
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
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