Commit Graph

14 Commits

Author SHA1 Message Date
ryan schmidt
4061f31c7c ModelingTools: Add IMeshDescriptionProvider::GetMeshDescriptionLOD() which returns current LOD for a ToolTarget. Implement in StaticMesh Tool Targets. Add UE::ToolTarget::GetTargetMeshDescriptionLOD() which wraps this function
#rb jimmy.andrews
#preflight 646631103660522200164f0c

[CL 25529470 by ryan schmidt in ue5-main branch]
2023-05-18 13:52:35 -04:00
jimmy andrews
e5b9310407 add support for querying LOD support in a mesh description provider, and use this to add an option to apply Bake Transform and Pivot tools to all LODs
#jira UE-182339
#rb ryan.schmidt
#preflight 6439a35c8e019684483b37dd

[CL 25068419 by jimmy andrews in ue5-main branch]
2023-04-17 11:09:56 -04:00
matija kecman
dfe144b82b Render Capture Baking: Remove sub-classing of BakeRC from UBakeMeshAttributeMapsToolBase and implement a few fixes
Fixed materials in the BakeRC tool missing UV layer switches or controls for brightness of the Base Color, Subsurface Color or Emissive channels
Removed the unused AO Multiplier setting that appeared in the Preview panel of the tool UI
Improved performance of BakeRC tool baking step by not recomputing the target mesh spatial index and uv charts
Improved the clarity of the analytics code since the sub-classing has enabled us to more easily use custom BakeRC analytics


#rb lonnie.li
#rnx
#preflight 63cfaa1ed83c1837b182104b
#jira none

[CL 23828120 by matija kecman in ue5-main branch]
2023-01-24 05:18:59 -05:00
ryan schmidt
0e4ddc8e1a ModelingTools: add new modeling-mode Tool/Operator for extruding Mesh Selections
Add UE::ToolTarget::SupportsIncrementalMeshChanges() and ::ApplyIncrementalMeshEditChange(), these allow a Tool to directly edit a DynamicMeshComponent in the level (and emit corresponding MeshChange) so that a Tool can emit multiple undoable edits on a DynamicMesh
Add new USingleTargetWithSelectionTool base tool class, this is a USingleSelectionTool that can receive a FGeometrySelection. USingleTargetWithSelectionToolBuilder configures this type of Tool as necessary.
Add new LinearExtrusionOp dynamic mesh operator, provides linear-extrusion API to FOffsetMeshRegion using new Operator design (mesh shared via FSharedConstDynamicMesh3, CalculateResultInPlace() function to simplify direct usage in geometry script/etc)
Add new ExtrudeMeshSelectionTool, subclass of USingleTargetWithSelectionTool, exposes new LinearExtrusionOp, uses above ToolTarget functions to directly edit DynamicMeshComponent where possible
Enable new Tool in Modeling Mode

Add a few new functions to UMeshOpPreviewWithBackgroundCompute to simplify configuring InProgress and Secondary materials
Small additions to USingleSelectionTool

#preflight 639a3e250a671525500d8a7e
#rb none

[CL 23520421 by ryan schmidt in ue5-main branch]
2022-12-14 17:43:16 -05:00
David Hill
91e7948122 Mesh Modeling and Dynamic Mesh. Provide ability to store and read a vertex mapping with a DynamicMesh inthe case that the source data is non-manifold.
ModelingTools - MeshAttributePaintTool and SkinWeightsPaintTool.  Use non-maniforld vertex ids when provided.  fixes a crash
SplitMeshesTool - removed an unsed mesh conversion.
ModelingComponents - ModelingToolTargetUtil  - request non-manifold vertex Ids on dynamic meshes when converted for tools.
DynamicMeshViaMeshDescription - request non-manifold vertex Ids on dynamic meshes when converted for tools.
ModelingObjectCreation - make sure to strip the any src vertex IDs from a dynamic mesh during object creation.

#rb Ryan.Schmidt
#preflight 63867a97f213a116eb4e9ed1

MeshConversions - MeshDescriptionToDynamicMesh - Add ability to capture non-manifold source veretx IDs in the form of a vertex attribute.

[CL 23330671 by David Hill in ue5-main branch]
2022-11-30 10:38:46 -05:00
ryan schmidt
6ad26b69f0 rename UE::Geometry::TTransform3 to TTransformSRT3, update references
#rb none
#rnx
#jira UE-139757
#preflight 61f572d9e52a8a4a910990f1

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18784197 in //UE5/Release-5.0/... via CL 18784203 via CL 18784222
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18784226 by ryan schmidt in ue5-main branch]
2022-01-29 14:37:53 -05:00
nathan mitchell
d817f21d71 Modeling Tools: Provide support for the IMeshDescriptionProvider to provide "empty" MeshDescriptions, for cases where such instances are desired such as changing topology. This change creates extendable infrastructure parallel to the existing MeshDescription provider implementations so clients of the empty MeshDescription instances do not need localized specialization based on ToolTarget subclasses.
This change addresses the errors found with applying certain modeling tools to skeletal meshes due to the old code not using the appropriately setup MeshDescription for skeletal meshes.

#rb Ryan.Schmidt
#rnx
#jira UE-138420
#preflight 61d8dbc4430de36baa5fd904

#ROBOMERGE-AUTHOR: nathan.mitchell
#ROBOMERGE-SOURCE: CL 18588220 in //UE5/Release-5.0/... via CL 18588227 via CL 18588243
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Test -> Main) (v899-18417669)

[CL 18588249 by nathan mitchell in ue5-main branch]
2022-01-12 14:53:07 -05:00
ryan schmidt
27ba71e214 ModelingTools: Add support for reading and writing to a specific LOD via IMeshDescriptionProvider/Committer. Refactor various other aspects of MeshDescription access. Update MeshTransferTool to be able to transfer from and to specific LODs.
Add new MeshTargetInterfaceTypes.h file, move EStaticMeshEditingLOD there and rename to EMeshLODIdentifier. Add FGetMeshParameters and FCommitMeshParameters types.

IMeshDescriptionProvider::GetMeshDescription() now takes FGetMeshParameters to optionally specify LOD.
Added IMeshDescriptionProvider::GetMeshDescriptionCopy() function, to handle copy-case.
removed IMeshDescriptionProvider::CalculateAutoGeneratedAttributes(). This was only being used to force Tangents computation, which can now be done via GetMeshDescriptionCopy() and FGetMeshParameters.bWantMeshTangents option

IMeshDescriptionCommitter commit functions now take a FCommitMeshParameters to optionally specify target LOD.

StaticMeshComponentToolTarget::GetMeshDescriptionCopy() added, optionally computes auto-generated MeshDescription attributes on the copy

StaticMesh(Component)ToolTarget updated to support FCommitMeshParameters target-LOD.

SkeletalMesh, Volume, and DynamicMesh ToolTargets updated for new APIs but do not currently support any of the new LOD parameters. These should never be called w/ LOD parameters in the current codebase, ensures added to catch any errors (they would be non-fatal).

UE::ToolTarget::GetMeshDescription() and GetMeshDescriptionCopy() in now take FGetMeshParameters argument.
Removed bWantMeshTangents param to GetMeshDescriptionCopy(), now done via FGetMeshParameters. Updated call sites.

TransferMeshesTool now supports specifying read and write LOD (numbered or HiRes) for StaticMeshComponent source/target, via above functions.
TransferMeshesTool can now also target a new LOD in a StaticMeshComponent, index is 1 larger than current maximum source LOD.

#rb lonnie.li, rinat.abdrashitov
#rnx
#jira none
#preflight 61b8d56b2e65a1df046aa5e1

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18461686 in //UE5/Release-5.0/... via CL 18461725
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v899-18417669)

[CL 18461778 by ryan schmidt in ue5-release-engine-test branch]
2021-12-14 18:40:01 -05:00
ryan schmidt
45cf4af720 ModelingComponents: register StaticMeshDescription attributes in UE::ToolTarget::CommitMeshDescriptionUpdateViaDynamicMesh for full-update path, and read back a copy of MeshDescription before updating for partial-update path
#rb none
#rnx
#jira UE-136900
#preflight 61b13a550e59fd0ab018179f

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18414192 in //UE5/Release-5.0/... via CL 18414194
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18414198 by ryan schmidt in ue5-release-engine-test branch]
2021-12-08 18:46:29 -05:00
ryan schmidt
17cefb1dd1 ModelingTools:
Reduce surface area of MeshDescriptionProvider/Committer, replace with UE::ToolTarget:: calls where possible.

Add new UE::ToolTarget::CommitMeshDescriptionUpdateViaDynamicMesh() function. This is being used for now to avoid potential regressions as UE::ToolTarget::CommitDynamicMeshUpdate will preferentially use DynamicMeshCommitter, and I am not certain it is functionally equivalent in all cases.
Add new UE::ToolTarget::CommitDynamicMeshNormalsUpdate(), similar to existing UV version
Add new Move-variant of UE::ToolTarget::CommitMeshDescriptionUpdate(), uses new Move-variant of IMeshDescriptionCommitter::CommitMeshDescription.
Make existing IMeshDescriptionCommitter::CommitMeshDescription callback interface protected, to prevent usage of this function at public API level (will be removed in future).

Tool updates should not change, just using cleaner APIs.
EditNormalsTool now uses CommitDynamicMeshNormalsUpdate(), which does go via DynamicMeshCommitter preferentially, where it previously went via MeshDescriptionCommitter. In light testing the results appear equivalent.
AttributeEditorTool now operates on MeshDescription copies in various update functions. These are not performance-critical.

#rb rinat.abdrashitov
#rnx
#preflight 61ae45998358693a22c28d1b

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18384350 in //UE5/Release-5.0/... via CL 18384361
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v896-18170469)

[CL 18384373 by ryan schmidt in ue5-release-engine-test branch]
2021-12-06 12:42:19 -05:00
ryan schmidt
f0828c943b Expose component/asset physics data via a ToolTarget interface
ToolsFramework:
- add PhysicsDataSource ToolTarget Interface, that exposes UBodySetup and CollisionDataProvider interfaces
ModelingComponents:
- Add tooltarget accessor/utility functions in UE::ToolTarget namespace.
- Implement PhysicsDataSource for StaticMeshComponentToolTarget and DynamicMeshCompnentToolTarget.
- Update FPhysicsDataCollection::InitializeFromComponent() to support DynamicMeshComponent and BrushComponent.
ModelingTools:
- update ExtractCollisionGeometryTool and PhysicsInspectorTool

#rb lonnie.li
#rnx
#jira none
#preflight 61a150004803629015d5a09b

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 18302043 in //UE5/Release-5.0/... via CL 18302049
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18302051 by ryan schmidt in ue5-release-engine-test branch]
2021-11-26 16:37:25 -05:00
semion piskarev
6e652b7735 MeshModelingTools: Change the dynamic mesh provider interface to return a mesh by value so that it can be used with UDynamicMesh and better aligns with the use in ModelingToolTargetUtil.
#rb Ryan.Schmidt
#rnx
#jira none
#preflight 619f024bd87e4a573fdc63d6

#ROBOMERGE-AUTHOR: semion.piskarev
#ROBOMERGE-SOURCE: CL 18292224 in //UE5/Release-5.0/... via CL 18292232
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18292237 by semion piskarev in ue5-release-engine-test branch]
2021-11-24 23:55:31 -05:00
jimmy andrews
32d22502b1 make to/from static mesh conversion not crash if it winds up with a null meshdescription (but still ensure, because something has gone quite wrong in this case)
#rb lonnie.li
#rnx

#ROBOMERGE-AUTHOR: jimmy.andrews
#ROBOMERGE-SOURCE: CL 18271057 in //UE5/Release-5.0/... via CL 18271086
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18271096 by jimmy andrews in ue5-release-engine-test branch]
2021-11-23 11:37:51 -05:00
michael balzer
a49c74b915 MeshModelingToolset: Move ModelingOperators and ModelingOperatorsEditorOnly modules out of experimental plugin
#jira UETOOL-3823
#rb lonnie.li
#preflight 617b1aea5794a500014f544a

#ROBOMERGE-AUTHOR: michael.balzer
#ROBOMERGE-SOURCE: CL 17972239 in //UE5/Release-5.0/... via CL 17972248
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v885-17909292)
#ROBOMERGE[STARSHIP]: UE5-Main

[CL 17972256 by michael balzer in ue5-release-engine-test branch]
2021-10-28 19:47:45 -04:00