Commit Graph

79 Commits

Author SHA1 Message Date
Ryan Schmidt
da254f4c8b ModelingComponents: Add UBaseDynamicmeshComponent::SetShadowsEnabled() and UPreviewMesh::SetShadowsEnabled() wrapper, and update Tools that are directly modifying the bCastDynamicShadow variable on Components. That doesn't work as it doesn't update the SceneProxy, and is currently causing crashes. ::SetShadowsEnabled() forces a full immediate rebuild of the SceneProxy, which is very heavy but seems to be required.
#rb david.hill
#rnx
#jira UE-118344
#preflight 60cb7d3a9f12370001350352

[CL 16715096 by Ryan Schmidt in ue5-main branch]
2021-06-17 19:18:23 -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
fdf11b67d2 ModelingComponents: Clean up DynamicMeshComponent API. Update Component and Proxy handling of Tangents to use Attribute Overlay if available. Update affected Tools and also convert most of the affected Tools to use UE::ToolTarget helper functions.
- Add UE::ToolTarget::CommitMaterialSetUpdate() and ::CommitDynamicMeshUpdate(). ::GetDynamicMeshCopy() can now return tangents if requested.
- Add IMeshDescriptionProvider::CalculateAutoGeneratedAttributes(). Default implementation does nothing, UStaticMeshComponentToolTarget implementation initializes auto-generated MeshDescription attributes. Used in ::GetDynamicMeshCopy() to get tangents (but requires a MeshDescription copy).
- Clean up handling of Tangents in Simple/OctreeDynamicMeshComponent. Add local MakeTangentsFunc() to generate the Tangents lambda, handle different cases and no-tangents fallbacks consistently.
- UDynamicMesh: add optional info arguments to EditMesh() and ChangeInfo struct. Add support for deferring change events from Edit funcs.
- Remove UBaseDynamicMeshComponent::InitializeMesh(), ::Bake() APIs, and add ::SetMesh(). Implement in Simple/Octree implementations, update all Tools that used those APIs.
- Add USimpleDynamicMeshComponent::ProcessMesh(), EditMesh(). These are now the preferred ways to read/write mesh.
- Update USimpleDynamicMeshComponent tangents handling. Externally-computed tangents are now taken directly from the FDynamicMesh3 attribute set. Autogenerated tangents are still computed and stored in an internal FMeshTangentsf, but this is no longer exposed for external updates.
- Remove UPreviewMesh pass-through functions for Tangents access, InitializeMesh() and Bake(). Add ProcessMesh()
- Update all affected Tools. In most cases these Tools have also been converted to use ModelingToolTargetUtil functions, instead of direct ToolTarget interface casting.

#rb none
#rnx
#jira none
#preflight 60c3e71d3e1b3c00015668af

[CL 16650666 by Ryan Schmidt in ue5-main branch]
2021-06-11 22:39:18 -04:00
Ryan Schmidt
fdb2bab149 GeometryProcessing: Move MeshConversion module from GeometryProcessing plugin to Runtime. Transfer necessary additional files from DynamicMesh to GeometryCore. Move functions from MeshIndexUtil and MeshAdapterUtil namespaces to UE::Geometry namespace.
#rb none
#rnx
#jira none
#preflight 60a7e75e7d6b060001c61f47

[CL 16428413 by Ryan Schmidt in ue5-main branch]
2021-05-22 01:32:46 -04:00
Ryan Schmidt
4ec1b6ae3c Gizmos: refactor Modeling Mode gizmo creation out of InteractiveGizmoManager. Editor will use other "default" transform gizmo implementations, and so the UTransformGizmo creation helper functions do not belong in GizmoManager. Instead a UTransformGizmoContextObject now provides this functionality. ModelingToolsEditorMode (and any other modes/systems that want to use these gizmo convenience functions) creates an instance of UTransformGizmoContextObject and registers it with the ContextObjectStore. Calling code can spawn a new UTransformGizmo by looking this object up in the ContextStore and calling it's helper functions. Static versions of the helper functions in the UE::TransformGizmoUtil:: namespace provide a single-line interface that replaces the previous GizmoManager call sites in the MeshModelingTools library.
IntervalGizmo is now just registered and unregistered as needed by the MeshSpaceDeformerTool, as this is the only place it is currently used.

Previous implementation in InteractiveGizmoManager is left intact as there are a few uses outside of MeshModelingTools that need to be cleaned up before it can be deleted.

UTransformGizmo now requires it's Builder to tell it which sub-gizmo identifier strings to pass to the GizmoManager to create axis/plane/rotation sub-gizmos (and the code that registers the Builder must then provide these strings). This cleans up previous explicit references to UInteractiveGizmoManager static strings from UTransformGizmo.

#rb Christina.TempelaarL, david.hill
#rnx
#jira none

[CL 16409673 by Ryan Schmidt in ue5-main branch]
2021-05-20 16:39:39 -04:00
Ryan Schmidt
e577ba63dc ModelingTools: fix backface-hit issues w/ VSculpt and DSculpt. Behavior is now consistent between the tools, and when backface-hit is disabled, the brush will not be able to jump to back-facing surfaces during the stroke. The Nearest-hit is now always computed, and then rejected if it is back-facing, instead of filtering out backfaces during the raycast (which allowed "hidden" front-facing surfaces to still be hit).
#rb none
#rnx
#jira UE-114694
#preflight 609459b04185130001cea0d5

[CL 16227051 by Ryan Schmidt in ue5-main branch]
2021-05-06 18:29:00 -04:00
semion piskarev
5e412667c8 MeshModelingTools: Added the ability to use a transparent or custom material to the sculpt tools.
#rb Ryan.Schmidt
#rnx
#jira none

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

[CL 15896726 by semion piskarev in ue5-main branch]
2021-04-01 17:33:33 -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
ryan schmidt
06c2c5bc32 ModelingTools: disable lazy/spacing/flowrate settings in DynamicMeshSculptTool because they aren't supported there yet
#rb none
#rnx
#jira none

#ROBOMERGE-SOURCE: CL 15833023 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v785-15821902)

[CL 15834666 by ryan schmidt in ue5-main branch]
2021-03-25 18:52:15 -04:00
lonnie li
e4b41a3d8c ModelingTools: ToolTarget refactor for Sculpt tools
#rb semion.piskarev ryan.schmidt
#jira none
#rnx

[CL 15741814 by lonnie li in ue5-main branch]
2021-03-18 17:20:32 -04:00
Ryan Schmidt
9495a8a112 GeometryProcessing: remove FTransform3f/d and FPlane3f/d from ExplicitUseGeometryMathTypes.h and clean up fallout
#rb none
#rnx
#jira none

[CL 15739090 by Ryan Schmidt in ue5-main branch]
2021-03-18 12:46:27 -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
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
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
ryan schmidt
47311d8f7e ModelingTools UX: change tool names so that label now visible in the main viewport corresponds to icon name. Update accept/cancel/complete tooltips and button styles.
#rb none
#rnx
#jira none

#ROBOMERGE-OWNER: ryan.schmidt
#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 15348621 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)
#ROBOMERGE-CONFLICT from-shelf

[CL 15360215 by ryan schmidt in ue5-main branch]
2021-02-08 17:02:09 -04:00
Marc Audy
cac1fe0019 Merge UE5/Release-Engine-Staging @ CL# 15299266 to UE5/Main
This represents UE4/Main @ CL# 15277572

[CL 15299962 by Marc Audy in ue5-main branch]
2021-02-03 14:57:28 -04:00
Ryan Schmidt
7d107a617b ModelingTools: restore skip of stamp processing in every second stamp in DynamicMeshSculptTool, it does in fact improve editor responsiveness, in very low fps situations
#rb none
#rnx
#jira none

[CL 15255426 by Ryan Schmidt in ue5-main branch]
2021-01-28 20:34:25 -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
Marc Audy
bc88b73a29 Merge Release-Engine-Staging to Main @ CL# 15151250
Represents UE4/Main @ 15133763

[CL 15158774 by Marc Audy in ue5-main branch]
2021-01-21 16:22:06 -04:00
Ryan Schmidt
b9d10187f2 ModelingTools: improve performance in DynamicMeshSculptTool by making some of the sub-computations asynchronous. Add button inside the Tool to discard attributes, rather than forcing user to round-trip through another Tool.
#rb none
#rnx
#jira none

[CL 15142732 by Ryan Schmidt in ue5-main branch]
2021-01-20 00:15:28 -04:00
Ryan Schmidt
2a8984fe77 MeshModelingToolset
- add support for VertexColor shader mode in EMeshEditingMaterialModes, handle in sculpt tools
- MeshSculptToolBase: add ability to hide view and brushop properties, add ability to show surface or volumetric indicator, add tracking of last-hit triangle ID
- add UPolygroupLayersProperties, standard property set for listing and picking from available Polygroup layers for a mesh
- add MeshGroupPaintTool, uses above extensions to allow for painting per-triangle integer polygroups
#rb none
#rnx
#jira none

[CL 14861461 by Ryan Schmidt in ue5-main branch]
2020-12-04 19:51:25 -04:00
Marc Audy
a7f9391231 Merge UE5/Release-Engine-Staging @ 14811410 to UE5/Main
This represents UE4/Main @ 14768117

For ReleaseObjectVersion.h
#lockdown Marcus.Wassmer

[CL 14811440 by Marc Audy in ue5-main branch]
2020-11-24 18:42:39 -04:00
Marc Audy
4c1bb11c29 Merge UE5/Release-Engine-Staging to UE5/Main @ 14548662
This represents UE4/Main @ 14525125 + cherrypicked fixes
#skipundocheck

[CL 14551026 by Marc Audy in ue5-main branch]
2020-10-22 19:19:16 -04:00
Marcus Wassmer
3b81cf8201 Merging using //UE5/Main_to_//UE5/Release-Engine-Staging @14384769
autoresolved files
#rb none

[CL 14384911 by Marcus Wassmer in ue5-main branch]
2020-09-24 00:43:27 -04:00
Marc Audy
11f5b21210 Merging //UE5/Release-Engine-Staging @ 13752110 to Main (//UE5/Main)
#rnx

[CL 13753156 by Marc Audy in ue5-main branch]
2020-06-23 18:40:00 -04:00