Commit Graph

265 Commits

Author SHA1 Message Date
nathan mitchell
6fa4cb42f1 ModelingTools: Fix crash issue in the Simple Collision Editor when undoing a delete operation.
#rb Jimmy.Andrews
#jira UE-190149

[CL 26711848 by nathan mitchell in ue5-main branch]
2023-07-31 13:24:10 -04:00
matija kecman
d9a8710948 Fix ensure in BakeRC tool which occured when disabling a capture channel after cancelling a previous scene capture
#rb lonnie.li
#jira UE-191193

[CL 26611051 by matija kecman in ue5-main branch]
2023-07-26 12:38:53 -04:00
matija kecman
e4e99966ed Fix horde issue 337708 related to text conflicts in LOCTEXT
#rb trivial
#horde 337708

[CL 26601159 by matija kecman in ue5-main branch]
2023-07-26 04:49:50 -04: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
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
jimmy andrews
a4fbc0b633 make the 'simple collision editor' tool show hidden lines so that it is usable for collision that is hidden inside solid shapes
#rb rinat.abdrashitov

[CL 26442074 by jimmy andrews in ue5-main branch]
2023-07-18 14:45:34 -04:00
jimmy andrews
51c961876f Fix meshes that have 'recompute tangents' enabled not displaying with correct tangents after conversion to dynamic mesh + enable tangents on sculpt tools so 'original material' mode renders correctly when normal maps are used
#jira UE-189344
#rb rinat.abdrashitov

[CL 26408384 by jimmy andrews in ue5-main branch]
2023-07-17 11:25:00 -04:00
dan thompson
992eceb8f3 Texture2DBuilder shouldn't remove mips - this is unneeded, and in the use cases where the builder texture is reused as the final texture, causes issues.
[FYI] Ryan.Schmidt
#rb none
#jira UE-187796

[CL 26328949 by dan thompson in ue5-main branch]
2023-06-29 17:26:02 -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
zach bethel
61a256b156 More command list conversions. Streaming buffers, vertex factories, and TUniformBufferRef.
[CL 26217320 by zach bethel in ue5-main branch]
2023-06-23 16:03:17 -04:00
matija kecman
fd4d7cfcde Fix horde issue 323832 about a warning caused by #inlcude "Engine.h", fixed by using #include "Engine/Engine.h" instead
#rb none

[CL 26181688 by matija kecman in ue5-main branch]
2023-06-22 10:21:01 -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
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
semion piskarev
00d95585b1 MeshModelingTools: Fix nonunity build errors from missing includes for Draw Spline Tool.
#rb none

[CL 25993733 by semion piskarev in ue5-main branch]
2023-06-14 16:22:00 -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
zach bethel
a9a5fa39db Deprecated non-command list variant of InitResource and UpdateResource. Patched the engine to pass command lists through. Follow-up CL's will refactor individual locations to thread command lists through the various callstacks, but that was done very judiciously in this CL to reduce risk.
#rb mihnea.balta, christopher.waters

[CL 25953623 by zach bethel in ue5-main branch]
2023-06-13 11:46:40 -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