Commit Graph

134 Commits

Author SHA1 Message Date
Ryan Schmidt
e579178cda ModelingComponents: refactor conversion code from ExtractCollisionGeometryTool into static functions ConvertSimpleCollisionToMeshes() and ConvertComplexCollisionToMeshes()
GeometryScript: add CopyCollisionMeshesFromObject function, extracts meshed collision shapes or complex collision from various object types as a UDynamicMesh
#rb none
#preflight 62ffc256c85b7fef22f671cc

[CL 21460263 by Ryan Schmidt in ue5-main branch]
2022-08-19 13:20:33 -04:00
michael balzer
b5d0cc81b8 MeshModelingToolset: Optimize FMeshWireframeSceneProxy constructor
#preflight 62fd52200f2aefc97abf3d50

[CL 21443545 by michael balzer in ue5-main branch]
2022-08-18 11:59:38 -04:00
matija kecman
cfe02c4344 Render Capture Baking: Fix requirement that the tool is run more than once in order to get the correct result by caching the needed material shaders before rendering
This fixes a problem that occurs in both the Render Capture Baking tool and the Approximate Actors tool

#rb arciel.rekman,ryan.schmidt
#rnx
#jira UE-146097
#preflight 62fa24791e61d1ba0e294d83

[CL 21408934 by matija kecman in ue5-main branch]
2022-08-16 13:49:37 -04:00
semion piskarev
3cc8f15db4 MeshModelingTools: Various CubeGrid improvements.
- Made the tool Accept/Cancel.
- Added the ability to set block size at current power.
- Added ability to initialize the grid from a given actor, initialized to current target.
- Added the option for the grid sizes to follow the default editor grid (1, 5, 10, 50, 100, etc).
- Allowed global mode for gizmo manipulation, to allow editor grid snapping to work.
- Removed the non-useful selection plane tolerance setting

#rb Jimmy.Andrews
#jira UE-153345, UE-152029
#preflight 62f163f9185da2495f83831e

[CL 21274412 by semion piskarev in ue5-main branch]
2022-08-08 16:01:14 -04:00
Ryan Schmidt
c793d4bfa8 SelectionManager: modify Shutdown() to handle clearing active targets itself, as calling ClearActiveTargets() on editor shutdown can result in error if Component is already destroyed
#rb none
#preflight 62d976e53122bf80ae015983

[CL 21203457 by Ryan Schmidt in ue5-main branch]
2022-07-21 12:52:31 -04:00
matija kecman
f4900ae7a1 Render Capture Baking: Use depth capture to eliminate occlusion artefacts which can appear when baking non-convex shapes and look like weird sihouettes/blotches in the base color channel
Also removed artefacts that became visible after the ones fixible with a depth test were resolved. These were related to linearly interpolating data on the photosets, this was fixed since the baking framework is where texture filtering should take place

#rnx
#rb lonnie.li, ryan.schmidt
#jira none
#preflight 62d473b0dc4397d384a06bc8

[CL 21148985 by matija kecman in ue5-main branch]
2022-07-18 11:21:15 -04:00
Ryan Schmidt
dc5b1dcca4 add file that was missed in CL 21117964
#rb none
#preflight skip

[CL 21119976 by Ryan Schmidt in ue5-main branch]
2022-07-15 20:04:27 -04:00
Ryan Schmidt
986547914e Move GeometrySelection.h and GeometrySelectionUtil.h to GeometryProcessing plugin. Move types in GeometrySelection.h into UE::Geometry:: namespace. Fix up usage sites.
#rb none
#preflight 62d1c7222e3e5993c351a126

[CL 21117964 by Ryan Schmidt in ue5-main branch]
2022-07-15 17:53:52 -04:00
Ryan Schmidt
6032c02f0e ModelingMode: add Delete command for current Mesh Selection
ToolsFramework:
add UInteractiveCommand and UInteractiveCommandArguments types, base classes for 'interactive commands' which are intended to be used for atomic actions, ie stateless, no user interaction, etc
ModelingComponents:
add UGeometrySelectionEditCommand/Arguments, this is a UInteractiveCommand that uses a FGeometrySelection as an argument
add UGeometrySelectionManager::CanExecuteSelectionCommand() and ExecuteSelectionCommand()

MeshModelingTools:
add UDeleteGeometrySelectionCommand, deletes selected mesh geometry by converting input selection to list of triangles

ModelingToolsEditorMode:
add Delete command to ModelingMode and UI. ModelingToolsEditorMode currently is keeping active command set alive via new UModelingToolsEditorMode::ModelingModeCommands member.

#rb none
#preflight 62d195b9a66919b6701d89a8

[CL 21113757 by Ryan Schmidt in ue5-main branch]
2022-07-15 13:49:13 -04:00
Ryan Schmidt
9c4efbe435 ModelingComponents: Add UE::Geometry::GetCurrentGeometrySelectionForTarget() util function to query current UGeometrySelectionManager for active Selection. Modify UE::Geometry::GetCurrentToolInputSelection() to return converted selection from UGeometrySelectionManager instead of using the now-disabled UPersistentMeshSelectionManager. Deprecate UPersistentMeshSelectionManager and related functions/classes.
#rb none
#preflight 62c60a31892b4d4f308ca646

[CL 20983305 by Ryan Schmidt in ue5-main branch]
2022-07-07 09:44:46 -04:00
Ryan Schmidt
6c6315d4e5 ModelingMode: add support for new element-level geometry selection system for DynamicMeshComponents
New UModelingSelectionInteraction provides click-to-select and gizmo interactions for current set of mesh objects that support selection, by manipulating the active UGeometrySelectionManager.

ModelingMode now creates a UGeometrySelectionManager and UModelingSelectionInteraction on mode startup, if 'persistent selections' are enabled in the project settings. This replaces the previous persistent selection system/manager, which is no longer created/registered.
UModelingToolsEditorMode::ShouldDrawWidget() and ::ComputeBoundingBoxForViewportFocus() updated to support active Selection.

Functions ::OnToolsContextRender(), ::OnToolPostBuild(), ::GetGeometrySelectionChangesAllowed(), ::TestForEditorGizmoHit(), ::UpdateSelectionManagerOnEditorSelectionChange() added to support selection system.

FModelingToolsEditorModeToolkit will add buttons for selection control if Persistent Selections are enabled. Dynamic updates to Palette based on active selection are initiated by EdMode. Currently the selection-actions palette is empty.

#rb none
#preflight 62c5f20c3c5171c81715f5f4

[CL 20973334 by Ryan Schmidt in ue5-main branch]
2022-07-06 16:54:57 -04:00
David Hill
4c6d43fe88 MeshModelingToolSet - DynamicMeshSelector. Make sure the correct version of shutdown is called. Fixes a static analysis warning
#jira UE-158215
#preflight 62c4e80f2f31b87c6cc5f9f8
#rb Jimmy.Andrews

[CL 20955739 by David Hill in ue5-main branch]
2022-07-05 21:51:47 -04:00
Ryan Schmidt
9ccacbd088 ModelingComponents: fix mismatched loctext key
#rb none
#preflight skip

[CL 20900253 by Ryan Schmidt in ue5-main branch]
2022-06-30 14:13:04 -04:00
Ryan Schmidt
96bcffd475 ModelingComponents: add new geometric-element Selection system
GeometrySelection.h/cpp: FGeometrySelection, FGeometrySelectionEditor, representation and manipulation of a generic element-level selection, stored as a set of uint64. Editor makes changes to Selection while tracking deltas.
GeometrySelectionUtil.h/cpp: utility and helper functions for editing/processing a mesh+selection
GeometrySelector.h: FGeometryIdentifier type used to identify target objects with element-level selection support. IGeometrySelector interface that defines API for element selection for a type of target object. Factory type for spawing instances. IGeometrySelectionTransformer interface that defines API for element-level transformation
GeometrySelectionManager.h/cpp: UGeometrySelectionManager that maintains set of 'active targets' with associated Selector, Selection, and SelectionEditor, and provides high-level API for creating and querying element selections, 3D transforms of selections, selection undo/redo, and (currently) limited debug rendering
GeometrySelectionChanges.h/cpp: FChange types for element selection changes
DynamicMeshSelector.h/cpp: implementation of IGeometrySelector for UDynamicMesh/Component

#rb jimmy.andrews
#preflight 62bdb9cbb024a2608c38b72d

[CL 20896967 by Ryan Schmidt in ue5-main branch]
2022-06-30 12:09:44 -04:00
Ryan Schmidt
c5e859dbdc GeometryCore: Add FColliderMesh::FindNearestHitTriangle() and FColliderMesh::FindNearestTriangle() wrappers around AABBTree functions. Replace most calls to these functions via AABBTree w/ calls to FColliderMesh functions. Rename ::GetAABBTree() to ::GetRawAABBTreeUnsafe() to discourage usage (intention long-term is to encapsulate the spatial data structure, so it is not exposed)
#rb jimmy.andrews
#preflight 62b5f31a3646551b1139502e

[CL 20813267 by Ryan Schmidt in ue5-main branch]
2022-06-24 14:08:36 -04:00
Ryan Schmidt
636abcceee SceneSnappingManager: add ::PauseSceneGeometryUpdates() and ::UnPauseSceneGeometryUpdates(), these temporarily disable/re-enable geometry updates (eg BVH rebuilds) on DynamicMeshComponents, for use in live-edit situations where we can't defer mesh updates (because render geometry needs to update) but don't want a per-frame BVH build
#rb none
#preflight 62ab7bb82804d6adf7f72f97

[CL 20692560 by Ryan Schmidt in ue5-main branch]
2022-06-16 15:25:58 -04:00
Marc Audy
2666d80819 Non-unity and Static analysis fixes
#rnx
#preflight

[CL 20680993 by Marc Audy in ue5-main branch]
2022-06-16 00:49:39 -04:00
nathan mitchell
3ba92badec UVEditor: Enable support for selection mechanics within in the 3D viewport.
#rb semion.piskarev
#preflight 62aa68f9102b5101ccdc6d13

[CL 20679008 by nathan mitchell in ue5-main branch]
2022-06-15 19:31:42 -04:00
Ryan Schmidt
422c289493 GeometryFramework: add support for configuring color and normal overrides on BaseDynamicMeshComponent & DynamicMeshComponent. This allows the user to configure a DynamicMeshComponent to display vertex colors, group colors, or a (configurable) custom color, as well as facet normals, in the Actor properties.
A new lit vertex color material is added and used if the ModelingComponents module is loaded (to avoid adding a new engine material, if only GeometryFramework is loaded, then the engine-default vertex color material is used). This class-wide vertex color material can be overridden via UBaseDynamicMeshComponent::SetDefaultVertexColorMaterial()

Facet Normals / Flat Shading is now separately configurable, this overrides the normals at the vertexbuffer setup level, so it works independently of material.

Support also added for configuring the wireframe material used for BaseDynamicMeshComponent, and also for setting the wireframe color.

#preflight 62aa2330a40a4dc3a04052c6
#rb tyson.brochu

[CL 20676782 by Ryan Schmidt in ue5-main branch]
2022-06-15 16:49:13 -04:00
matija kecman
c128de6a9a Fix Editor Mac which broke in Horde Issue #180297: Compile errors in Module.ModelingComponents.cpp and SceneCapturePhotoSet.cpp
#rnx
#rb jimmy.andrews
#jira none
#preflight 62a7511aaf7ad033effcec61
#preflight 62a7511aaf7ad033effcec61

[CL 20627748 by matija kecman in ue5-main branch]
2022-06-13 11:19:07 -04:00
matija kecman
6f80932e2b Render Capture Baking: Add messages warning users about missing tangents or UVs
#rnx
#rb lonnie.li
#jira none
#preflight 62a72d695a44fbc402908e21

[CL 20626847 by matija kecman in ue5-main branch]
2022-06-13 10:27:34 -04:00
Ryan Schmidt
bc8042333e Add additional capture locations to FSceneCapturePhotoSet::AddStandardExteriorCapturesFromBoundingBox(), on upper and side box edge midpoints. Enable by default in Approximate Actors and BakeRenderCaptureTool.
#rb jimmy.andrews
#preflight 62a11612e820a589df5e36dd
#fyi matija.kecman

[CL 20570945 by Ryan Schmidt in ue5-main branch]
2022-06-08 23:39:09 -04:00
Nickolas Drake
1400b65d56 ModellingComponents: Add optional corner point visualization to PolyEdit
#rb Simeon.Piskarev
#jira none
#preflight 629fc9d185333f26645be644

[CL 20546816 by Nickolas Drake in ue5-main branch]
2022-06-07 18:25:43 -04:00
Benn Gallagher
8757cb3641 Physics interface cleanup.
* Removed deprecated or dead code paths
* Simplified build system setup for physics support
* Deprecated build system flags and unsupported macros

#jira none
#rb Chris.Caulfield, Kriss.Gossart
#preflight 62963ec0fe779f23c8ea0c5e

[CL 20450744 by Benn Gallagher in ue5-main branch]
2022-06-01 06:59:18 -04:00
tyson brochu
e78697a2c1 SetCollisionGeometryTool: add Mesh to Level Set / SDF conversion
#rb jimmy.andrews
#preflight 62952aa7e61254772f6b4b5e

[CL 20432875 by tyson brochu in ue5-main branch]
2022-05-30 16:48:48 -04:00