Commit Graph

37 Commits

Author SHA1 Message Date
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
f45388ffbe Rename USimpleDynamicMeshComponent to UDynamicMeshComponent. Move ModelingComponents Components and SceneProxys to /Components subdirectory.
#rb none
#rnx
#jira none
#preflight 60c4451f5c10070001ae0537

[CL 16652187 by Ryan Schmidt in ue5-main branch]
2021-06-12 14:28:52 -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
semion piskarev
34ba053cd6 MeshModelingTools: Add channel selection to displace tool.
#rb Lonnie.Li
#rnx
#jira none

[CL 16386689 by semion piskarev in ue5-main branch]
2021-05-19 11:21:56 -04:00
ryan schmidt
fbb10e331a ModelingTools: Restore constrast curve asset that was mistakenly deleted. Return a transient duplicate of contrast curve in ToolSetupUtil, so that users are not editing an Engine asset every time they modify the curve. If Property is reset to default, set back to new clone of default asset. Make the contrast curve property editable so users can assign their own curve asset, and handle register/unregister of curve listener
#rb semion.piskarev
#rnx
#jira UE-112848
#lockdown simon.tourangeau

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

[CL 15935376 by ryan schmidt in ue5-main branch]
2021-04-06 17:59:10 -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
lonnie li
e4ee7ead0f ModelingTools: ToolTarget refactor of remaining SingleSelectionTool (pt.1)
#rb jimmy.andrews ryan.schmidt
#jira none
#rnx

[CL 15742284 by lonnie li in ue5-main branch]
2021-03-18 18:26:33 -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
6cbd964b85 ModelingTools: properly initialize the recalculate normals flag in DisplaceMeshTool
#rb none
#rnx
#jira none

[CL 15149056 by Ryan Schmidt in ue5-main branch]
2021-01-20 18:11:09 -04:00
Ryan Schmidt
c6b4639cb7 ModelingTools: add option to Displace Tool to enable/disable normals recomputation on the displaced mesh. This is for use with an existing normal/displacement map set, where the normal map will be used on the displaced mesh.
#rb none
#rnx

[CL 15138738 by Ryan Schmidt in ue5-main branch]
2021-01-19 16:10:15 -04:00
Ryan Schmidt
d1f24d1e4c ModelingTools: improve performance in DisplaceMeshTool.
- Avoid launching level-4 subdivision initially, which currently happens before subdivision level is clamped, and will compute at least one subdivision before cancelling (which can take a long time on a mesh with millions of triangles)
- support ProgressCancel inside SubdivideMesh() function, which can take significant compute/memory resources for a single call
- Pass VertexID through various weightmap functions, so we can directly sample displacement at vertex when it is known
- store weightmap values in per-vertex UVs before subdivision. These are linearly interpolated during subdivision, so output mesh has weightmap value stored in VertexUV.X, and can be directly sampled, instead of using AABBTree nearest-point query
- due to above, need to invalidate subdivision if weightmap changes.
- If weight map is "None", set null ActiveWeightMap, this is cleanly handled and avoids potentially-costly weightmap sampling if it is not needed
- fix issue with subdivision-steps clamping message being shown at Tool startup, only show after the user has explicitly change the value
#rb tyson.brochu
#rnx
#jira none

[CL 15133805 by Ryan Schmidt in ue5-main branch]
2021-01-18 22:33:08 -04:00
Jimmy Andrews
a61dc4a68e Every Progress->Cancelled() gets a nullptr check
#rb semion.piskarev
#rnx

[CL 15068053 by Jimmy Andrews in ue5-main branch]
2021-01-13 12:32:53 -04:00
semion piskarev
3214eca1cb MeshModelingTools: Added contrast adjustment curve to displacement tool (for displacement maps). Fixed the displacement texture values always being interpreted as gamma compressed. Added option to show wireframe.
#rb Tyson.Brochu
#rnx
#jira none

[CL 14923666 by semion piskarev in ue5-main branch]
2020-12-14 19:16:22 -04:00
semion piskarev
034c102393 MeshModelingTools: Updated displace mesh tool. Made it work with async texture loading, added parameters for UV offset and scale and for an offset base value, updated tooltips, made non-square textures be handled properly, and fixed bug with reverting vector parameters.
#rb Ryan.Schmidt, Jimmy.Andrews
#rnx
#jira none

[CL 14893625 by semion piskarev in ue5-main branch]
2020-12-09 18:33:03 -04:00
Ryan Schmidt
31317aefbd GeometryProcessing improvements/additions
- new correspondence-finding strategy in FMeshImageBakingCache. Added a global Thickness parameter, and now preferentially uses the ray-hit found by casting inwards from Point+Thickness*Normal. This handles the cases where a greeble/etc is just layered on top of base mesh. These kind of mesh elements are only intended to show up in the normal map, so they aren't stitched in.
  - expose Thickness and World-Space options in BakeMeshAttributeMapsTool
  - initialize image in Normal and ResampleImage Bakers, otherwise initial value is garbage
- add TSampledScalarField2::BilinearSampleGradientClamped and fix typo in BilinearSampleClamped() that resulted in incorrect interpolation
- add Texture2DUtil, contains functions for reading a TImageBuilder from a UTexture2D. Can read from source data if available.
- ColorConstants now returns white for group 0
- add double version of FMeshDescriptionToDynamicMesh::CopyTangents()
- add support for computing on subset of vertiecs in FMeshConvexHull
- fix up template export in TMeshTangents
- make mesh const in TImplicitMorphology, TImplicitSolidify
- accessor/etc additions in TDenseGrid2, TImageBuilder, TSampledScalarField2, TIndexedWeightMap
- add source UStaticMesh reference in FPhysicsDataCollection, function to initialize from a UStaticMesh
  - update Tools affected by above changes
- add TSampleSetStatisticBuilder::ComputeMultiPass() helper function to compute stats for iterable collections in one line
- remove dead code in UVLayoutOp.cpp

#rb tyson.brochu
#rnx
#jira none

[CL 14769759 by Ryan Schmidt in ue5-main branch]
2020-11-17 22:32:38 -04:00
ryan schmidt
e7f3baf1ca Edigrate Dev-Editor updates to InteractiveToolsFramework, GeometryProcessing, MeshModelingToolset, and ModelingTools Editor Mode Plugins. Update a few files in new MeshPaint Plugin for UInteractiveTool rename of ::Tick() to ::OnTick().
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 12908995 via CL 12908996 via CL 12909001
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v682-12900288)

[CL 12909003 by ryan schmidt in Main branch]
2020-04-18 18:42:59 -04:00
ryan schmidt
112920fcb1 Enable autocalculated tangents for most mesh editing tools. This preserves appearance when editing meshes with normal maps. However these tangents are not written back to the MeshDescription, we current assume that the build settings will result in tangents being recomputed on Accept.
#rb none
#rnx
#jira UE-84211

#ROBOMERGE-SOURCE: CL 12026998 in //UE4/Release-4.25/... via CL 12027009
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 12049347 by ryan schmidt in Main branch]
2020-03-07 10:52:46 -05:00
michael daum
cbe314bb30 MeshModelingTools : Clean up update logic during progressive computation in DisplaceMeshTool
#jira UE-90165
#rb none
#rnx

#ROBOMERGE-SOURCE: CL 12019172 in //UE4/Release-4.25/... via CL 12019188
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v656-11643781)

[CL 12019227 by michael daum in Main branch]
2020-03-06 15:43:31 -05:00
robert manuszewski
b938e59c9b Reimplementing FProperty changes from //UE4/Main
+ Reimplemented FProperty related fixed from //UE4/Main:
CL#10791312, 10804850, 10851666, 10855122, 10855198, 10942138, 11030611, 11030639, 11032261, 11061515, 11136964,11138881, 11214238, 11214865

#rb none (previously reviewed in Dev-Core)
[FYI] Chris.Bunnner, Daniel.Lamb


#ROBOMERGE-OWNER: robert.manuszewski
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 11302985 via CL 11303011 via CL 11303019
#ROBOMERGE-BOT: (v0-11244347)

[CL 11303183 by robert manuszewski in Main branch]
2020-02-10 08:06:56 -05:00
Max Chen
b4881d8bf8 Copying //UE4/Dev-Editor to Dev-Tools-Staging (//UE4/Dev-Tools-Staging) @11123875
#rb none
#jira none

[CL 11123880 by Max Chen in Dev-Tools-Staging branch]
2020-01-27 20:11:15 -05:00
JeanMichel Dignard
70d074639f Merging //UE4/Dev-Main @ 10886849 to Dev-Tools-Staging (//UE4/Dev-Tools-Staging)
#rb none
#rnx

[CL 10906274 by JeanMichel Dignard in Dev-Tools-Staging branch]
2020-01-08 13:26:18 -05:00
jeanmichel dignard
2ce7666d2d Copying //UE4/Dev-Core [at] 10708550 to Dev-Main (//UE4/Dev-Main)
#rb none

#ROBOMERGE-OWNER: jeanmichel.dignard
#ROBOMERGE-AUTHOR: robert.manuszewski
#ROBOMERGE-SOURCE: CL 10708666 in //UE4/Main/...
#ROBOMERGE-BOT: TOOLS (Main -> Dev-Tools-Staging) (v626-10872990)

[CL 10898071 by jeanmichel dignard in Dev-Tools-Staging branch]
2020-01-07 15:54:23 -05:00