Commit Graph

680 Commits

Author SHA1 Message Date
matija kecman
0b6a2abc76 Render Capture Baking: Move BakeRC tool from MeshModelingToolsExp to MeshModelingToolsEditorOnlyExp module
#jira UE-187294
#rb ryan.schmidt
#preflight 6478b6430848b7126d375200

[CL 25732218 by matija kecman in ue5-main branch]
2023-06-01 13:34:04 -04:00
matija kecman
ccdc68c119 Render Capture Baking: Move the preview settings to above the list of generated textures
This change was reviewed here: https://p4-swarm.epicgames.net/reviews/25701222 but the change should merge into //Fortnite/Release-25.20 rather than //Fortnite/Main

#preflight 6478728e8417d79259df9157
#jira UE-187295
#rb ryan.schmidt

[CL 25723762 by matija kecman in ue5-main branch]
2023-06-01 08:09:01 -04:00
lonnie li
f1633ae54c ModelingTools: Fixed PVS warning in MeshVertexPaintBrushOps.
[CL 25666684 by lonnie li in ue5-main branch]
2023-05-29 14:49:06 -04:00
semion piskarev
77c4021749 MeshModelingTools: Make remesh and simplify tools ask for dynamic mesh directly to avoid conversions back and forth for non-mesh description backed targets.
#rb Jimmy.Andrews
#preflight 6470cf31da61f7b0793ba323

[CL 25649529 by semion piskarev in ue5-main branch]
2023-05-26 13:56:47 -04:00
jimmy andrews
c53ce32a83 add plane projection and boolean/offset options to the mesh splines tool
#rb tyson.brochu
#preflight 646e78412c0a5da0dc40c358

[CL 25633353 by jimmy andrews in ue5-main branch]
2023-05-25 18:47:13 -04:00
ryan schmidt
83956549f1 CombineMeshInstances: clamp min-sample-points-per-triangle in hidden removal to 8 instead of 2. This may need to be exposed as a parameter in future. Improves a lot of current failure cases for hidden removal. Minor renaming. Tweaked sample radius in various calling code.
#rb none
#jira UE-186818
#preflight 646e4bc2bf15b1ab002742fb
#rnx

[CL 25627555 by ryan schmidt in ue5-main branch]
2023-05-25 16:02:23 -04:00
ryan schmidt
4514a71fea ModelingTools: pvs fix and minor const-correctness fix
#rb none
#preflight 646e32f6807b157b8b3b8f8b
#rnx

[CL 25626915 by ryan schmidt in ue5-main branch]
2023-05-25 15:34:14 -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
57ff1fac74 ModelingTools: add MeshStatistics display to DisplaceMeshTool. Remove AdvancedDisplay from ProjectionDistance and bProjectionInWorldSpace in Bake tools, these are critical properties and should not be hidden-by-default.
#preflight 646cf1e62c0a5da0dc8d607c
#rb none
[FYI] lonnie.li

[CL 25592301 by ryan schmidt in ue5-main branch]
2023-05-23 18:14:43 -04:00
ryan schmidt
c41af3c4c7 CombineMeshInstances: Add support for 2D retriangulation of planar areas, after coplanar face merging. This can further reduce triangle count as the planar-simplification applied after coplanar merging often cannot remove vertices on region borders, limiting it's effectiveness.
Also tweaked geometric tolerances recently added to RemoveHiddenFaces_ExteriorVisibilit() as they seem to be too aggressive (need to add real-world dimensions here).
Updated internal usage to enable this new capability
#rb none
#preflight 646cea301417daba1e6120a7
#rnx

[CL 25592274 by ryan schmidt in ue5-main branch]
2023-05-23 18:14:08 -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
c1ba1e5d22 Fix Horde issue 306851
#horde 306851
#rb none

[CL 25548183 by matija kecman in ue5-main branch]
2023-05-19 13:51:11 -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
4959c1f413 CombineMeshInstaces:
Renamed FInstanceSet to FSourceInstanceList in CombineMeshInstances API
Added FMeshInstanceGroupData.bPreserveUVs flag, defaults to false, in which case UVs are discarded on simplified and approximate meshes to encourage simplification
Added FOptions::MaxAllowableApproximationDeviation, prevents very large deviation in approximation of highly non-convex parts (may break some approximations, might need per-part overrides in future)
Added FOptions::bDoubleSidedHiddenRemoval, treating as single-sided improves hidden removal
FOptions::ApproximationSourceLOD can now be set to a generated simplified LOD, in addition to Source LODs. This helps avoid approximations being higher-quality than simplified parts

In CombineMeshInstancesImpl, renamed FMeshInstanceSet to FMeshPart, FMeshInstance to FMeshPartInstance, FMeshInstanceAssembly to FMeshPartsAssembly, to help clarify internal vs external data structures (many renaming changes as a result)
FPartApproxSelector now has MaxAllowableDeviation, set from new FOptions member, prevents major shape deviation (maybe too strict? might be good to count how many things deviate...)
tweaked AABB-override of approximations based on volume comparison
reduced InitialTriCost scaling for extra approximate LODs in ComputeMeshApproximations - this value is used as an exponent and so if it gets larger than ~5, for large deviations it will basically be infinity and stops being useful. This may need more work as it tends to go to box approximation very quickly now.
Various improvements to RemoveHiddenFaces_ExteriorVisibility. Now can backface-cull, does so by FOptions default. Improved filtering around "glancing angle" rays/hits. Changed from using fixed exterior point set as visibility locations, to direction set. Add slight downscaling of UV triangles, and of hit-triangle barycentric coords, to filter out hits very near to triangle edges, which can often be spurious.

updated internal usage for renaming, set plausible MaxAllowableApproximationDeviation, and using simplified LODs as ApproximationSourceLOD

#rb none
#preflight

[CL 25546006 by ryan schmidt in ue5-main branch]
2023-05-19 12:03:09 -04:00
ryan schmidt
19abdc7833 CombineMeshInstances improvements. Add support for externally-provided fixed LOD budgets for different LODs. Add 'Part Promotion' strategy in ComputeMeshApproximations() that incrementally "promotes" per-part LODs upwards so that combined mesh achieves triangle budget (see code comments for details).
Add explicit support for Axis-Aligned Box Approximation in addition to existing Oriented Box. Add explicit preference for AABB if it's volume is within 20% of OBB or best-shape approximation.
Other minor fixes.
#rb none
#preflight 64654aedd62884a78f5cbfa9

[CL 25519890 by ryan schmidt in ue5-main branch]
2023-05-17 20:29:18 -04:00
kiaran ritchie
e6d62a49db Added ability to disable base brush tool. Added toggle to skin paint tool while in selection mode.
#rb halfdan.ingvarsson
#JIRA none
#preflight https://horde.devtools.epicgames.com/job/64640cb84404e3cdd2833e1e

[CL 25500261 by kiaran ritchie in ue5-main branch]
2023-05-16 19:33:41 -04:00
kiaran ritchie
6cac88cc44 Adding ability to assign weight value > 1.0 in skin paint tool. Useful for "multiply" operation. Still normalizes afterwards and fixed minor issue this exposed with weight normalization.
#rb trivial
#JIRA none
#preflight

[CL 25499095 by kiaran ritchie in ue5-main branch]
2023-05-16 18:09:44 -04:00
david hill
fd6a63396a Mesh Modeling - update the voxel-based CSG and Merge tools to have the same output selection and widgets that the other voxel-based tools have - this was done by converting the tools to use the UBaseVoxelTool base class.
Also hook-up progress class /  interrputer to that open-vdb voxelization step so a cancelled tool may use less resources.

#preflight 64625469aa3c584c0bfbe0de
#rb Jimmy.Andrews , Rinat.Adbrashitov

[CL 25495785 by david hill in ue5-main branch]
2023-05-16 15:55:48 -04:00
kirill zorin
de8db5ff76 Converting ARO-facing raw pointers to TObjectPtr ahead of raw pointer ARO API deprecation.
#rb zousar.shaker
#rb markus.breyer
#rb robert.manuszewski

#preflight 646391406b1406b54ab15460

[CL 25489627 by kirill zorin in ue5-main branch]
2023-05-16 10:52:49 -04:00
jimmy andrews
6ab860aed5 fix crash in modeling mode's bake transform tool when some selected meshes have the same source asset
#rb rinat.abdrashitov
#preflight 6462b001aa3c584c0b175dd7

[CL 25483247 by jimmy andrews in ue5-main branch]
2023-05-15 20:07:54 -04:00
kiaran ritchie
d4d1f994b1 Adding vertex selection to skin weight tool.
#rb halfdan.ingvarsson
#JIRA https://jira.it.epicgames.com/browse/UE-183089
#preflight https://horde.devtools.epicgames.com/job/6462b86df760fe87e9126ee8
#fyi benoit.gadreau

[CL 25482982 by kiaran ritchie in ue5-main branch]
2023-05-15 19:40:24 -04:00
kiaran ritchie
c204d977e1 Fixing localization strings
#rb trivial
#JIRA none
#preflight
#preflight 645fc11f6b4bdec267538fc2

[CL 25466191 by kiaran ritchie in ue5-main branch]
2023-05-13 13:09:30 -04:00
halfdan ingvarsson
7fa6b12f4a Modeling Toolset: Store the name of the class being customized so that UnloadModule doesn't try to reference a UObject that might be deleted already during shutdown.
#jira none
#rb trivial
#fyi kiaran.ritchie
#preflight 645d883e2c180971ee4484a0
#rnx

[CL 25439918 by halfdan ingvarsson in ue5-main branch]
2023-05-11 20:46:11 -04:00
bryan sefcik
91c57d395e Removed redundant module includes.
#preflight 645d4bf3aa3c584c0b5b3a67

[CL 25435653 by bryan sefcik in ue5-main branch]
2023-05-11 16:48:21 -04:00
kiaran ritchie
668afc3e32 Setting up weight editing UI in preparation for weight editing on selections.
#rb halfdan.ingvarsson
#JIRA https://jira.it.epicgames.com/browse/UE-183083
#preflight https://horde.devtools.epicgames.com/job/644c5f7d1c2846595c877cdd
#preflight 645d197aaa3c584c0b4a282e

[CL 25430228 by kiaran ritchie in ue5-main branch]
2023-05-11 12:53:37 -04:00