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]
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]
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]
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]
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]
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]
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]