Commit Graph

561 Commits

Author SHA1 Message Date
Ryan Schmidt
da355de8a2 ModelingTools: Add basic Transfer Mesh Tool that can copy a mesh from one object to another. Add UE::ToolTarget::CommitMeshDescriptionUpdate() helper function.
#rb none
#rnx
#jira none
#preflight 60bf147e0c76f90001db699e

[CL 16583974 by Ryan Schmidt in ue5-main branch]
2021-06-08 03:51:23 -04:00
ryan schmidt
a8da674d2c ApproximateActors: Implement support for detection of thin-slabs (ie thin planar meshes that are not single-sided) in FMeshSceneAdapter. Add support for sub-mesh instancing, to reduce number of times that repeated meshes are unique'd when used with the same scaling transform. Reorganize computation so that spatial builds are processed in decreasing-mesh-size order, and do other parallel improvements, such that time to process a large assembly (total ~2.2b triangles from 37k instances of 415 unique meshes w/~44m unique triangles) reduces from 58s to 22s (with ~10s of this time being loading source mesh data) on 64-core threadripper.
#rb none
#rnx
[FYI] sebastien.lussier
#preflight 60beff3593a9d300017c2be8


#ROBOMERGE-OWNER: ryan.schmidt
#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 16583724
#ROBOMERGE-BOT: (v828-16531559)
#ROBOMERGE-CONFLICT from-shelf

[CL 16583791 by ryan schmidt in ue5-main branch]
2021-06-08 02:55:00 -04:00
Ryan Schmidt
c3c459d75d ModelingComponents: Move SubdividePoly to ModelingComponentsEditorOnly. Need this to be able to apply SubD in other contexts.
#rb tyson.brochu
#rnx
#jira none
#preflight 60be56c8883e7f00015ed9ad

[CL 16577012 by Ryan Schmidt in ue5-main branch]
2021-06-07 16:29:48 -04:00
tyson brochu
9d2b0fdde3 Move ConvexHull2, ConvexHull3, and exact predicates into GeometryCore/CompGeom. Change them all to use the UE::Geometry namespace. Copy associated TPS files as needed.
#ushell-cherrypick of 16542896 by swarm
#rb ryan.schmidt

[CL 16575323 by tyson brochu in ue5-main branch]
2021-06-07 15:02:12 -04:00
Ryan Schmidt
9bf97eae1a nonunity fixes
#rb none
#rnx
#jira none

[CL 16566594 by Ryan Schmidt in ue5-main branch]
2021-06-06 19:26:11 -04:00
lonnie li
febb75cece ModelingTools: Fix post op selection for TriEdit: Extrude, Offset, Cut Faces & Duplicate.
#rb michael.balzer
#rnx
#jira UE-114975
#preflight 60baa85f2c42ea0001d65f32

[CL 16562738 by lonnie li in ue5-main branch]
2021-06-04 19:26:45 -04:00
Ryan Schmidt
75a21c9bb9 ModelingTools: add support for creating Volumes directly from DrawPolygon, DrawRevolve, DrawPolyPath, and AddPrimitive, CombineMeshes, CutMeshWithMesh, PlaneCut, BaseCreateFromSelected Tools. Improve support for Editing volumes, eg handling mesh/volume interactions, and add configurable auto-simplification for volumes to avoid painful Editor hangs.
- Move ToolTarget implementations, DynamicMeshToVolume to ModelingComponentsEditorOnly module
- move VolumeToDynamicMesh, DynamicMeshProvider/Commiter interfaces to ModelingComponents module
- Add UCreateMeshObjectTypeProperties property set to expose mesh/volume options
- Add FCreateMeshObjectParams::TypeHintClass to allow AVolume type (or other UClass hints) to be passed to creation APIs
- Add UE::ToolTarget::ConfigureCreateMeshObjectParams() util function in ModelingToolTargetUtil, tries to determine output type in a FCreateMeshObjectParams based on input ToolTarget
- Add UEditorModelingObjectsCreationAPI::CreateVolume() implementation
- Add UEditorModelingObjectsCreationAPI::FilterMaterials() that strips out any internal materials and replaces with WorldGridMaterial. This occurs when (eg) subtracting a Volume from a StaticMesh, because the temporary volume mesh gets assigned internal materials, but the Tools don't know this. Use in EditorModelingObjectsCreationAPI when creating new objects. UStaticMeshComponentToolTarget also does this filtering in ::CommitMaterialSetUpdate().
- Add ::ComponentTypeSupportsCollision() function to ComponentCollisionUtil, use to avoid checks/ensures for Volume targets
- Add support for automatic mesh simplification in DynamicMeshToVolume. Add CVar to VolumeDynamicMeshToolTarget.h to control max triangle count (default 500). Apply auto-simplify when creating or updating an AVolume. This prevents the Editor from blocking for long periods on meshes that are too high-res for volumes (even 500 is quite high).
- DynamicMeshToVolume now emits polygroup-faces that contain holes (ie multiple boundary loops) as a set of triangles, rather than emitting separate overlapping faces for each boundary loop

#rb none
#rnx
#jira none
#preflight 60ba50632c42ea0001cb54c5

[CL 16561742 by Ryan Schmidt in ue5-main branch]
2021-06-04 16:04:03 -04:00
sebastien lussier
7bd11cdcac ApproximateActors - Ensure debug view modes are available when generating materials.
Use LogApproximateActors instead of LogTemp
#rb ryan.schmidt


#ROBOMERGE-SOURCE: CL 16559789
#ROBOMERGE-BOT: (v828-16531559)

[CL 16559817 by sebastien lussier in ue5-main branch]
2021-06-04 12:43:35 -04:00
aurel cordonnier
972de0d496 Fix for no unity android build
#fyi Ryan.Schmidt

[CL 16554080 by aurel cordonnier in ue5-main branch]
2021-06-03 17:50:44 -04:00
lonnie li
9adceca042 ModelingTools: Update BakeMeshAttributeMapsTool to the new baking framework.
#rb jimmy.andrews
#rnx
#jira UETOOL-3397
#preflight 60b8f8d439e5b70001bd4610

[CL 16551457 by lonnie li in ue5-main branch]
2021-06-03 15:29:38 -04:00
Ryan Schmidt
489dbc61c7 ToolsFramework: remove the AssetAPI concept from the Interactive Tools Framework. Replaced by ModelingObjectCreationAPI in ModelingComponents.
#rb none
#rnx
#jira none
#preflight 60b7e9448a2a64000126348c
#fyi brooke.hubert

[CL 16540327 by Ryan Schmidt in ue5-main branch]
2021-06-02 18:01:32 -04:00
sebastien lussier
4c88fc99af Approximate Actors HLOD
* Moved duplicated code that was constructing a IGeometryProcessing_ApproximateActors::FOptions from a FMeshApproximationSettings to FApproximateActorsImpl::ConstructOptions()
* Added mesh generation options
** bAllowDistanceField - on by default
** bSupportRayTracing - on by default
** bGenerateLightmapUVs - off by default

* Disable creation of physics body for HLOD

* Scale texture size based on grid promotion (higher z grid index -> higher area covered) - Only temporary, will probably switch to a texel density option instead

#rb ryan.schmidt, jeanfrancois.dube, luc.eygasier

#ROBOMERGE-SOURCE: CL 16538607 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v828-16531559)

[CL 16538620 by sebastien lussier in ue5-main branch]
2021-06-02 16:08:31 -04:00
Ryan Schmidt
7b214c4a33 MeshModeling: add ModelingObjectsCreationAPI, replaces existing usage of IToolsContextAssetAPI in Modeling Tools/Mode
- add new UModelingObjectsCreationAPI and associated data structures, provides abstract API for creating mesh and texture objects from Tools that is not specifically tied to StaticMesh Actors/Assets
- new helper functions in UE::Modeling:: namespace to simplify usage of an implementation of this API registered in a ContextObjectStore
- add new UEditorModelingObjectsCreationAPI implementation of above, supports hooks for higher level to provide custom paths
- add ModelingModeAssetUtils.h, provides several functions in UE::Modeling:: namespace to be used to implement those hooks (various existing path-determination code is moved here)
- ModelingToolsEditorMode now registers an instance of UEditorModelingObjectsCreationAPI in ContextObjectStore and connects up callbacks to these path functions
- AssetGenerationUtil functions and ModelingModeAssetAPI deleted
- All Tools that previously used IToolsContextAssetAPI updated to use this new system

#rb jimmy.andrews
#rnx
#jira none
#preflight 60b7c2ddae46a1000162729b

[CL 16538450 by Ryan Schmidt in ue5-main branch]
2021-06-02 15:58:00 -04:00
tyson brochu
25fc95c902 Fix some property comments
#rnx
#rb ryan.schmidt
#preflight 60b65684ae46a10001235bfa

[CL 16516779 by tyson brochu in ue5-main branch]
2021-06-01 13:11:56 -04:00
Ryan Schmidt
451511406d GeometryProcessing: Improve cylinder projection in FDynamicMeshUVEditor.
ModelingTools: Replace local code in UVProjectionOp with calls to FDynamicMeshUVEditor. Major rewrite of UVProjectionTool to support ExpMap projection, improve property handling, support world-space dimensions, support re-using previous projection to simplify world-space tiling, support input selections coming from PolyEdit/TriEdit, support ctrl+click and ctrl+shift+click interactions to reposition projection primitive.
#rb none
#rnx
#jira none
#preflight 60b57761f51cd90001f9676c

[CL 16511543 by Ryan Schmidt in ue5-main branch]
2021-05-31 22:15:32 -04:00
ryan schmidt
649499e89c ModelingTools: fix incorrect branch that was disabling Geometric Tolerance in SimplifyMeshOp
#rb none
#rnx
#jira none

#ROBOMERGE-SOURCE: CL 16511139 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v826-16501804)

[CL 16511160 by ryan schmidt in ue5-main branch]
2021-05-31 18:34:48 -04:00
ryan schmidt
2fab582c78 GeometryProcessing:
- extend FImageAdapter to support reading
ModelingComponents::
- Add AssetUtils::ForceVirtualTexturePrefetch(), ::SaveDebugImage() variants to Texture2DUtil
- Add support for debug image writing to WorldRenderCapture and SceneCapturePhotoSet
- FWorldRenderCapture now computes more accurate bounds (visible Components instead of Actors), and does an explicit VirtualTexture prefetch before doing render capture
- FStaticMeshAssetOptions now exposes Nanite settings to allow UStaticMeshes to be created with Nanite already enabled (currently NaniteSettings.PositionPrecision defaults to max)
ApproximateActors:
- IGeometryProcessing_ApproximateActors::FOptions now has settings for enabling Nanite on generated meshes
- ApproximateActorsImpl applies these settings, also enables VT on generated textures if necessary
- FMeshApproximationSettings/FMeshApproximationTool updated w/ new Nanite settings
#rb none
#rnx
#jira none
[FYI] sebastien.lussier
#preflight 60b08323f51cd90001775b98

#ROBOMERGE-OWNER: ryan.schmidt
#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 16499613 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v823-16466674)
#ROBOMERGE-CONFLICT from-shelf

[CL 16499647 by ryan schmidt in ue5-main branch]
2021-05-28 02:46:59 -04:00
Ryan Schmidt
9618dc4ff0 ModelingComponents:
- add ModelingToolTargetUtil, contains helper static functions for interacting with ToolTargets without having to manually cast things/etc
- add StoredMeshSelectionUtil, contains helper functions for interacting with stored selections
- USingleSelectionMeshEditingTool now can automatically grab an available stored selection, if it exists
- Add GroupTopologyStorableSelection::GetGroupIDs()
#rb none
#rnx
#jira none
#preflight 60b0282063fc6e000133ed3d
#fyi semion.piskarev, lonnie.li

[CL 16499566 by Ryan Schmidt in ue5-main branch]
2021-05-28 02:09:37 -04:00
ryan schmidt
a36b628de3 ModelingComponents: add support for HDR Emissive capture and texture handling
- FTexture2DBuilder has new EmissiveHDR texture type, uses PF_FloatRGBA/FFloat16Color texture format/buffers in this case. Moved most functions from header to cpp.
- new WorldRenderCapture::CaptureEmissiveFromPosition() implementation captures PreTonemapHDRColor buffer, with showflags config such that only Emissive (and possibly some GI - untested) will be included.
- ApproximateActorsImpl now stores Emissive bake in HDR texture. Update preview material to use Linear Texture Sampler for Emissive, required to use HDR texture
#rb none
#rnx
#jira none
#preflight 60b00ca67e4e6a00018b3960

#ROBOMERGE-SOURCE: CL 16495597 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v823-16466674)

[CL 16495615 by ryan schmidt in ue5-main branch]
2021-05-27 21:27:15 -04:00
Jimmy Andrews
f7785c64bd try to match the number of UV layers in the source mesh(es) when duplicating / combining meshes
#rb david.hill
#rnx
#preflight 60b00c8c7e4e6a00018b13d3

[CL 16493195 by Jimmy Andrews in ue5-main branch]
2021-05-27 18:34:25 -04:00
sebastien lussier
7aca74ae33 Work around a threading issue where the thread pool was saturated and we're blocked waiting on futures results
#rb jeanfrancois.dube, ryan.schmidt

#ROBOMERGE-SOURCE: CL 16488478 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v823-16466674)

[CL 16488483 by sebastien lussier in ue5-main branch]
2021-05-27 13:58:40 -04:00
lonnie li
04eedbdd12 ModelingTools: Refactor new bake path to bake evaluators.
Add support for variable float size and bake results per evaluator.

#rb jimmy.andrews michael.balzer
#rnx
#jira UETOOL-3397
#preflight 60aea5a35f6905000159e87b

[CL 16475935 by lonnie li in ue5-main branch]
2021-05-26 17:14:57 -04:00
danny couture
858b6baabb Add missing includes
#rb trivial
#preflight 60ae28381d78490001239969
#rnx

[CL 16466936 by danny couture in ue5-main branch]
2021-05-26 08:01:13 -04:00
ryan schmidt
4e09532b56 ApproximateActors: add support for combined Metallic/Roughness/Specular texture in ApproximateActors options and GeometryProcessingAdapters implementation. ApproximateActorsImpl now respects the baking enable/disable flags.
#rb none
#rnx
#jira none

#ROBOMERGE-SOURCE: CL 16465454 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v818-16446889)

[CL 16465458 by ryan schmidt in ue5-main branch]
2021-05-26 03:37:14 -04:00
ryan schmidt
99cbde8bd3 ModelingComponents: support Packed Metallic/Roughness/Specular (MRS) capture in WorldRenderCapture using custom postprocess render pass. Also support in FSceneCapturePhotoSet. Add Linear Color variant to FTexture2DBuilder.
#rb none
#rnx
#jira none
#preflight 60ade5d11d02bb0001883281

#ROBOMERGE-SOURCE: CL 16465354 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v818-16446889)

[CL 16465367 by ryan schmidt in ue5-main branch]
2021-05-26 03:02:11 -04:00