Commit Graph

76 Commits

Author SHA1 Message Date
Ryan Schmidt
52ab1f5537 ModelingTools: Clean up AutoUV Tools and add support for Polygroup Layers.
- Refactor recompute-UVs-for-groups/islands out of ParameterizeMeshOp/Tool into RecomputeUVsOp/Tool. RecomputeUVsTool supports selection of active PolygroupLayer when applicable. Add support for auto-repacking.
- Clean up ParameterizeMeshOp/Tool, remove functionality related to recomputation that was moved to Recompute tool, add separate property sets for UVAtlas and XAtlas
- Add FDynamicMeshUVEditor::QuickPack() function to compute UV layout
- Add support for Polygroup Layer selection in SetCollisionGeometryTool, if only one source object is in use

#rb none
#rnx
#jira none
#preflight 60ced4b0be81e800012cc135

[CL 16724375 by Ryan Schmidt in ue5-main branch]
2021-06-20 16:57:02 -04:00
Ryan Schmidt
e196c256e4 GeometryProcessing: remove forwarding headers used in GeometryCore transition, and update all affected includes.
#rb none
#rnx
#jira none
#preflight 60c52c5db9446100014da02d

[CL 16653115 by Ryan Schmidt in ue5-main branch]
2021-06-13 00:35:22 -04:00
Ryan Schmidt
7b214c4a33 MeshModeling: add ModelingObjectsCreationAPI, replaces existing usage of IToolsContextAssetAPI in Modeling Tools/Mode
- add new UModelingObjectsCreationAPI and associated data structures, provides abstract API for creating mesh and texture objects from Tools that is not specifically tied to StaticMesh Actors/Assets
- new helper functions in UE::Modeling:: namespace to simplify usage of an implementation of this API registered in a ContextObjectStore
- add new UEditorModelingObjectsCreationAPI implementation of above, supports hooks for higher level to provide custom paths
- add ModelingModeAssetUtils.h, provides several functions in UE::Modeling:: namespace to be used to implement those hooks (various existing path-determination code is moved here)
- ModelingToolsEditorMode now registers an instance of UEditorModelingObjectsCreationAPI in ContextObjectStore and connects up callbacks to these path functions
- AssetGenerationUtil functions and ModelingModeAssetAPI deleted
- All Tools that previously used IToolsContextAssetAPI updated to use this new system

#rb jimmy.andrews
#rnx
#jira none
#preflight 60b7c2ddae46a1000162729b

[CL 16538450 by Ryan Schmidt in ue5-main branch]
2021-06-02 15:58:00 -04:00
Ryan Schmidt
451511406d GeometryProcessing: Improve cylinder projection in FDynamicMeshUVEditor.
ModelingTools: Replace local code in UVProjectionOp with calls to FDynamicMeshUVEditor. Major rewrite of UVProjectionTool to support ExpMap projection, improve property handling, support world-space dimensions, support re-using previous projection to simplify world-space tiling, support input selections coming from PolyEdit/TriEdit, support ctrl+click and ctrl+shift+click interactions to reposition projection primitive.
#rb none
#rnx
#jira none
#preflight 60b57761f51cd90001f9676c

[CL 16511543 by Ryan Schmidt in ue5-main branch]
2021-05-31 22:15:32 -04:00
tyson brochu
50cf569720 Normal Flow Remesh improvements:
- add scalar damping to vertex projection and normal fitting
- detect areas that cover holes in the target mesh and don't project in those regions
- expose smoothing parameters for these areas

#jira UETOOL-3554
#ushell-cherrypick of 16170772 by Ryan.Schmidt
#rb ryan.schmidt
#preflight 60a2d17e4f034a000184b785

[CL 16359473 by tyson brochu in ue5-main branch]
2021-05-17 17:27:58 -04:00
tyson brochu
d72d9d1a3b ProjectToTarget tool: enable world space projection option. Currently projection happens in local space for both the "mesh" and the "projection target". The new WorldSpace option transforms the mesh vertices into world coordinates, then into the coordinates of the projection target before projecting. This is similar to transforming both the mesh and target (an associated acceleration structure) into world coordinates and then doing the projection query.
#rb ryan.schmidt
#jira UETOOL-3458
#preflight 60955aad754924000197e2b9

[CL 16238325 by tyson brochu in ue5-main branch]
2021-05-07 12:01:34 -04:00
Jimmy Andrews
15250452f9 move fast iterative smoothing algorithm over from ModelingOperators into DynamicMesh + associated cleanup
#rb michael.balzer
#rnx
#preflight 608ca8b93b027a000153d14d

[CL 16175448 by Jimmy Andrews in ue5-main branch]
2021-04-30 21:50:43 -04:00
Jimmy Andrews
08daac5d4d Don't use the sharp normal setting when computing new normals for simplified meshes on the voxel op (tends to give confusing normal seams)
+ compute per-vertex normals on the overlay if the mesh has one (when not auto-simplifying)

#jira UE-113552
#rb david.hill
#rnx
#preflight 6079b03cdfae7100010b592e

[CL 16035802 by Jimmy Andrews in ue5-main branch]
2021-04-16 12:37:16 -04:00
Ryan Schmidt
196be0f6d1 GeometryProcessing: replace UE::Geometry::FVector3d/FVector3f with UE Core versions based on TVector<T>. FVector3<T> is now an extension of TVector<T>. Update all affected call sites.
#rb none
#rnx
#jira none

[CL 15870068 by Ryan Schmidt in ue5-main branch]
2021-03-30 21:25:22 -04:00
tyson brochu
21316a6cd2 Fix robomerge build break. Vector member functions have been changed to free functions.
#rnx
#rb none

[CL 15868805 by tyson brochu in ue5-main branch]
2021-03-30 18:26:57 -04:00
tyson brochu
b2230584d7 HoleFill tool: optionally try to fill single-triangle holes first. Don't create new UV islands for these filled triangles, instead try to attach them to adjacent UV islands.
#rb jimmy.andrews

#ROBOMERGE-SOURCE: CL 15868315 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)

[CL 15868369 by tyson brochu in ue5-main branch]
2021-03-30 17:39:22 -04:00
semion piskarev
2b47a6cf86 MeshModelingTools: Changing edge loop insertion and group edge insertion to use undo like PolyEdit does, both to fix invisibility bug and to prep for eventual movement into PolyEdit. Also made loop insertion highlight non-quad groups when a loop is stopped.
#rb Jimmy.Andrews, Ryan.Schmidt
#jira UETOOL-2405, UETOOL-2854
#rnx

#ROBOMERGE-OWNER: semion.piskarev
#ROBOMERGE-AUTHOR: semion.piskarev
#ROBOMERGE-SOURCE: CL 15850950 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v786-15839533)
#ROBOMERGE-CONFLICT from-shelf

[CL 15852933 by semion piskarev in ue5-main branch]
2021-03-29 13:39:32 -04:00
Ryan Schmidt
6db97af132 GeometryProcessing: FVector2/3/4 refactoring. Move various member functions to standalone functions in UE::Geometry:: namespace, to simplify upcoming conversion to core vector types. Update all call sites.
#rb tyson.brochu, semion.piskarev
#rnx
#jira none

[CL 15732208 by Ryan Schmidt in ue5-main branch]
2021-03-17 19:32:44 -04:00
jimmy andrews
223c70718c CIS fix -- remove extraneous #pragma once from RemoveOccludedTriangles.cpp
#rb trivial
#rnx
#jira UE-110434

#ROBOMERGE-SOURCE: CL 15668521 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v779-15635321)

[CL 15670050 by jimmy andrews in ue5-main branch]
2021-03-10 17:16:04 -04:00
Ryan Schmidt
ffe3b401cd GeometryProcessing: move all public types in GeometryProcessing plugin into UE::Geometry:: namespace, as well as some code in MeshModelingToolset. Fix fallout in Water, Paint Mode, ChaosEditor, DataPrep, Text3D, Unit Tests, internal projects.
#rb jimmy.andrews, semion.piskarev
#jira none

[CL 15661651 by Ryan Schmidt in ue5-main branch]
2021-03-09 19:33:56 -04:00
Jimmy Andrews
73aba29752 fixes for ci errors from non-windows compile of modeling toolset modules
#rb trivial
#rnx

[CL 15628492 by Jimmy Andrews in ue5-main branch]
2021-03-05 15:45:04 -04:00
Jimmy Andrews
c955207177 try removing Win64 platform whitelist from modeling toolset modules that shouldn't need it
+ fix minor issues uncovered by doing so

#rb ryan.schmidt
#rnx

[CL 15627114 by Jimmy Andrews in ue5-main branch]
2021-03-05 14:05:05 -04:00
jimmy andrews
caa2f1bf82 refactor jacketing to use one AABB tree per mesh, and transform samples into the local space of each tree, rather than a giant combined AABB tree for all meshes
#ROBOMERGE-SOURCE: CL 15561912 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15561922 by jimmy andrews in ue5-main branch]
2021-03-01 17:01:16 -04:00
tyson brochu
91859c599d Deform mesh normals in FFDLattice. Computes the Jacobian of the trilinear or tricubic interpolation functions and rotates the original normals by the inverse Jacobian transpose times the determinant of the Jacobian.
#rb jimmy.andrews david.hill
#rnx
#jira none

[CL 15454087 by tyson brochu in ue5-main branch]
2021-02-18 13:06:34 -04:00
Jimmy Andrews
6c699a2ce3 change all the modeling / geometry tools shared pointers to thread safe mode, because they're often used in background threads
#rb ryan.schmidt
#rnx

[CL 15435521 by Jimmy Andrews in ue5-main branch]
2021-02-17 11:50:23 -04:00
Jimmy Andrews
29ca4d2e51 add option to improve geometry on mesh boolean during the boolean operation itself, rather than as a post-process, which should be faster and work even if the edges aren't welded
(plus same for mesh self-union)

#rb tyson.brochu
#rnx

[CL 15385252 by Jimmy Andrews in ue5-main branch]
2021-02-11 01:44:27 -04:00
Jimmy Andrews
e3a0af3eb9 fix ensure() being hit in voxwrap when run on an empty mesh
#jira UE-106804
#rnx
#rb trivial

[CL 15338440 by Jimmy Andrews in ue5-main branch]
2021-02-05 11:54:09 -04:00
semion piskarev
074de2d0c2 MeshModelingTools: SpaceDeform Tool improvements. Fixed modifier intensity and active range errors in bend operation, added normal normalization in flare op, made parameters be operation-specific, added nonuniform flaring and "smooth ends" option to flare op, added a "shift to center" button, added transparent original mesh view, added alignment of gizmo and intervals to world, added "lock bottom" option to twist and bend operations, added line visualization to bend operation, added option for ctrl click to not use the normal.
#rb David.Hill
#rnx
#jira none

[CL 15242629 by semion piskarev in ue5-main branch]
2021-01-28 13:06:33 -04:00
Ryan Schmidt
c48788b722 GeometryProcessing:
Add insights profiling tags to RemeshMeshOp and FRemesher. Small optimizations to FRemesher::ProcessEdge(), which has surprising overhead for no-ops (ie edge is not modified).
Add FUniqueIndexSet, alternative to a TSet for constructing list of unique indices (eg when finding set of one-ring tris of a list of vertices). Generally more efficient, particularly for large sets.
Improve FSubRegionRemesher. Make VertexROI private, provide accessors and update usage sites. Optimize InitializeFromVertexROI(), which is an expensive part of dynamic mesh sculpting. Make FullSmoothPass_Buffer() compute in parallel.

ModelingTools:
Major refactor of DynamicMeshSculptTool to improve performance (2-4x improvement on large brush sizes on 1m triangle mesh). A single FSubRegionRemesher is now created and maintained for entire brush stroke, rather than recreating every stamp. This avoids the high cost of initialzing full-mesh constraint set, and allows re-use of various allocated memory buffers. Reorganize major sub-steps computed in a single brush-stamp tick to allow Async computation where possible. Replace some ROI TSets with FUniqueIndexSet. Instrument for Insights, remove old cycle counting.

#rb none
#rnx
#jira none

[CL 15215321 by Ryan Schmidt in ue5-main branch]
2021-01-27 01:53:01 -04:00
Jimmy Andrews
4ee1441001 Add a n-ary subtract option to the voxel blend tool
#rb ryan.schmidt

[CL 15161964 by Jimmy Andrews in ue5-main branch]
2021-01-21 23:50:44 -04:00