Commit Graph

26 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
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
Ryan Schmidt
b62db3ed4d ModelingComponents: Add UDynamicMesh class, wraps FDynamicMesh3 in a UObject. Use as mesh storage inside SimpleDynamicMeshComponent and OctreeDynamicMeshComponent. Clean up SimpleDynamicMeshComponent and BaseDynamicMeshComponent API and headers.
#rb david.hill
#rnx
#jira none
#preflight 60c15e9cc612640001ac7350

[CL 16632323 by Ryan Schmidt in ue5-main branch]
2021-06-10 18:37:34 -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
ryan schmidt
0b81f8bc56 ModelingTools: Add LODManagerTool, supports viewing different LODs in-viewport, including HiRes LOD. Action buttons to clear/reset HiRes LOD, and to remove unused materials (these are used in AutoLOD tool workflows). Minor API additions to UPreviewMesh and UPreviewGeometry. Move AutoLOD and this new Tool to a separate section of Modeling Mode toolbar
#rb none
#rnx
#jira none

#ROBOMERGE-SOURCE: CL 15526011 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v771-15082668)

[CL 15526045 by ryan schmidt in ue5-main branch]
2021-02-25 00:36:48 -04:00
semion piskarev
a776dc57e4 MeshModelingTools: Split the material-related functions into a separate interface in the tool target system, made them match the existing PrimitiveComponentTarget signatures, made CommitMaterialSet support applying to the component rather than the asset.
#rb Jimmy.Andrews
#rnx
#jira none

[CL 15253840 by semion piskarev in ue5-main branch]
2021-01-28 19:08:26 -04:00
Ryan Schmidt
72700cc221 ModelingComponents: Add support for fast update of index buffers in decomposed buffer sets in DynamicMeshComponent/Proxy. Add support for MeshRenderDecomposition to UPreviewMesh. Add UPreviewMesh::NotifyRegionDeferredEditCompleted() functions to allow triangle subsets to be updated.
MeshSelectionTool: enable new decomposition support to improve painting performance on large meshes. Fix code that was doing repeated linear searches to remove elements from a potentially-very-large array. Make brush-ROI tri centroid point rendering optional.
#rb jimmy.andrews
#rnx
#jira none

[CL 15175542 by Ryan Schmidt in ue5-main branch]
2021-01-24 16:05:21 -04:00
semion piskarev
c58d14bad3 MeshModelingTools: Added ability to speed up tool preview mesh updates when mesh topology remains constant. Used it in LatticeDeformer tool. Also made preview object move the result mesh rather than do a copy.
#rb Jimmy.Andrews
#rnx
#jira none

[CL 15066690 by semion piskarev in ue5-main branch]
2021-01-13 10:21:41 -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
7379fa99c5 Merging //UE5/Release-Engine-Staging to Main (//UE5/Main) @ 14229157
[CL 14233282 by Marc Audy in ue5-main branch]
2020-09-01 14:07:48 -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
robomerge
538204b3d4 Added modeling tool to convert BSP brushes to static meshes.
#rb ryan.schmidt
#rnx

#ROBOMERGE-SOURCE: CL 13149574 via CL 13149576 via CL 13149578
#ROBOMERGE-BOT: RELEASE (Release-Engine-Staging -> Main) (v688-13145358)

[CL 13149579 by robomerge in Main branch]
2020-05-04 12:45:17 -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
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
Marc Audy
360d078ca3 Second batch of remaining Engine copyright updates.
#rnx
#rb none

[CL 10871248 by Marc Audy in Main branch]
2019-12-27 09:26:59 -05:00
Chris Gagnon
346a4b05ea Copy up from Dev-Editor @10681378
#rb none

[CL 10837446 by Chris Gagnon in Dev-Tools-Staging branch]
2019-12-19 18:07:47 -05:00
Jimmy Andrews
079f79cab6 make plane cut allow multiple cuts without leaving tool
to support that: adds some support for packing multiple meshes into one dynamic mesh via a triangle attribute, a meshreplacementchange, and some improvements to the plane cut algo

#rb none
#rnx

[CL 10494329 by Jimmy Andrews in Dev-Editor branch]
2019-12-03 00:44:07 -05:00
Ryan Schmidt
b1d9c2be8f ModelingTools: Multiple Material Support on DynamicMesh Components
- MeshDescriptionToDynamicMesh now always enables MaterialID attribute
- add FComponentMaterialSet and FComponentTarget::GetMaterialSet() that returns for current object (eg set of Material Slot materials on StaticMesh)
- move FMeshRenderBufferSet to BaseMeshSceneProxy.h, add new FBaseDynamicMeshSceneProxy, centralizes management/initialization of RenderBuffers, default GetDynamicMeshElements implementation draws buffer set returned by subclasses
- FSimpleDynamicMeshSceneProxy and FOctreeDynamicMeshSceneProxy now subclass FBaseDynamicMeshSceneProxy, implement necessary functions/etc
- UBaseDynamicMeshComponent now manages its own set of Materials. New OverrideMaterial can be set to replace existing materials with override material during render calls (does not affect material set)
- FSimpleDynamicMeshSceneProxy now builds per-material RenderBuffers, new FastUpdateVertices function to update positions/normals/colors. Removed shared-vertex construction, now only builds split-triangle buffers.
- UPreviewMesh gets wrapper functions to manage materials, override material, tangents of contained Component
#rb none
#rnx

[CL 10313312 by Ryan Schmidt in Dev-Editor branch]
2019-11-19 17:08:48 -05:00
Ryan Schmidt
ad628a83aa ModelingTools: Add WorldGrid Snap Support in DrawPolygonTool and EditMeshPolygonsTool
#rb none
#rnx

[CL 10104139 by Ryan Schmidt in Dev-Editor branch]
2019-11-11 16:57:51 -05:00
Ryan Schmidt
bb43e6f69e ModelingTools: add Create Group option to Selection Tool. Add ability to show PolyGroup Colors in Selection Tool. Custom TriangleColor TFunction of DMesh-backed Components now takes Mesh as parameter (to be able to look up group w/o complex captures)
#rb none
#rnx

[CL 10091508 by Ryan Schmidt in Dev-Editor branch]
2019-11-09 21:49:15 -05:00
ryan schmidt
02e951088b ToolsFramework: hide transient actors for gizmos and preview meshes in scene outliner
#rb none
#rnx
#jira UE-82069

#ROBOMERGE-SOURCE: CL 9841779 in //UE4/Release-4.24/...
#ROBOMERGE-BOT: RELEASE (Release-4.24 -> Main) (v546-9757112)

[CL 9841785 by ryan schmidt in Main branch]
2019-10-25 13:48:47 -04:00