Commit Graph

24 Commits

Author SHA1 Message Date
Jimmy Andrews
c9d7cbdf94 fix issues w/ overlay that can leave ref counts and indices in invalid state
#rb ryan.schmidt
#rnx

[CL 16864593 by Jimmy Andrews in ue5-main branch]
2021-07-15 13:39:58 -04:00
tyson brochu
24304a0722 Allow construction of a Laplacian mesh deformer on a mesh type that has only edges and vertices (no triangles, polygons, volumes, etc.) A uniform weighted Laplacian must be used in this case.
Several internal constructors/functions are changed to operate on generic (template) mesh types. The public-facing ConstructUniformConstrainedMeshDeformer() in ConstrainedMeshDeformer.h uses an abstract mesh class instead, to avoid exposing those internal headers.

#rnx
#rb ryan.schmidt
#preflight 60ede964a34bf50001e53dbd

[CL 16842683 by tyson brochu in ue5-main branch]
2021-07-13 17:03:47 -04:00
Jimmy Andrews
8c460e8c8e make mesh booleans handle degenerate sliver triangles: fix their intersection not being detected + the mesh cut not properly cutting through them
#rb david.hill
#rnx

[CL 16841428 by Jimmy Andrews in ue5-main branch]
2021-07-13 15:46:51 -04:00
Jimmy Andrews
272164ebff add a few missing tests for valid triangle id when doing parallelfor to max ID
#rb tyson.brochu
#rnx
#preflight 60ec625b925f1400015871ce

[CL 16829784 by Jimmy Andrews in ue5-main branch]
2021-07-12 15:21:00 -04:00
tyson brochu
097ba42ae8 FOptionallySparseIndexMap: fix crash when adding a new key/value pair and we're using sparse map type
#rnx
#rb jimmy.andrews
#preflight 60d39bf13b61630001284590

[CL 16763842 by tyson brochu in ue5-main branch]
2021-06-23 18:06:30 -04:00
David Harvey
4a609f3e1e workaround internal compiler error on MSVC2019 + ASan
#jira none
#rb dan.phillips
#rnx

[CL 16758221 by David Harvey in ue5-main branch]
2021-06-23 11:54:42 -04:00
Ryan Schmidt
7393d0f0f5 ModelingTools: Fix various issues related to Tangents. FDynamicMeshEditor was using hardcoded 0 index instead of loop-variable NormalLayerIndex in several places. FDynamicMeshTangents did not handle invalid overlay triangles. UEditorModelingObjectsCreationAPI::CreateDynamicMeshActor() was not enabling Tangents on new DynamicMeshComponents. UDynamicMeshComponentToolTarget was not transferring tangents between FDynamicMesh3 and FMeshDescription when converting.
#rb none
#rnx
#jira none
preflight 60d25e9678c3b000012438cc

[CL 16751529 by Ryan Schmidt in ue5-main branch]
2021-06-22 19:34:47 -04:00
Ryan Schmidt
ac3dde0f63 GeometryProcessing: Move FDynamicMesh3 serialization to a separate file and add local versioning so we can iterate without having to bump stream version
#rb lonnie.li
#rnx
#jira none
#preflight 60d0f16671002f000192e9c9

[CL 16734659 by Ryan Schmidt in ue5-main branch]
2021-06-21 17:44:44 -04:00
michael balzer
fd81a24cf6 GeometryProcessing: Reset existing UVs before Unwrap
#jira UE-116883
#rb ryan.schimdt
#rnx

[CL 16710839 by michael balzer in ue5-main branch]
2021-06-17 16:27:03 -04:00
tyson brochu
4054062d07 Parallelize expansion coefficient computation in fast winding number tree construction
#rnx
#rb ryan.schmidt

#ushell-cherrypick of 16611645 by tyson.brochu
#preflight 60ca518d9f12370001f5d847


#ROBOMERGE-OWNER: tyson.brochu
#ROBOMERGE-AUTHOR: tyson.brochu
#ROBOMERGE-SOURCE: CL 16696473
#ROBOMERGE-BOT: (v835-16672529)
#ROBOMERGE-CONFLICT from-shelf

[CL 16696702 by tyson brochu in ue5-main branch]
2021-06-16 17:25:31 -04:00
tyson brochu
671f2ea697 Optimize occupancy map construction for large textures by removing lock
#rnx
#rb ryan.schmidt lonnie.li
#pf 60ca206d4ce02c0001885e5f


#ROBOMERGE-SOURCE: CL 16690851
#ROBOMERGE-BOT: (v835-16672529)

[CL 16690858 by tyson brochu in ue5-main branch]
2021-06-16 13:00:13 -04:00
Ryan Schmidt
32cbbe9b99 GeometryProcessing: add FDynamicMeshTangents helper class to simplify access to FDynamicMesh3 tangent attribute overlays. Add functions to FMeshTangents and TDynamicMeshVectorOverlay to simplify getting a single triangle-vertex tangent/bitangent. Fix paste-o in FDynamicMeshAttributeSet::SetNumNormalLayers()
#rb none
#rnx
#jira none
#preflight 60c3b0bf8d00b80001b85366

[CL 16647280 by Ryan Schmidt in ue5-main branch]
2021-06-11 17:11:27 -04:00
sebastien lussier
d76f7fa374 World Partition HLODs - Added automatic texture size selection based on hints
Supports either:
* From texel density
* From expected mesh screen size
* From expected mesh draw distance

Compute best texture size, taking UV map waste into account.
Currently only supported by the Approximate Actors merge method, to be integrated in the ProxyLOD later.
#rb ryan.schmidt, luc.eygasier


#ROBOMERGE-SOURCE: CL 16635038
#ROBOMERGE-BOT: (v831-16623017)

[CL 16635077 by sebastien lussier in ue5-main branch]
2021-06-10 21:49:51 -04:00
semion piskarev
cf40dc417f MeshModelingTools: Tweaked tool target requirements object storage default and added a convenience function to add requirements. Also added several comments in places.
#rb Lonnie.Li, Tyson.Brochu
#rnx
#jira none

[CL 16606399 by semion piskarev in ue5-main branch]
2021-06-09 11:50:54 -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
sebastien lussier
ddb8ac3ae5 make_level_set3_parallel_floodfill()
Array access overflow - Overflowing NumSections (256) when accessing GridSections/SectionQueues
#rb ryan.schmidt


#ROBOMERGE-OWNER: sebastien.lussier
#ROBOMERGE-AUTHOR: sebastien.lussier
#ROBOMERGE-SOURCE: CL 16575584
#ROBOMERGE-BOT: (v828-16531559)
#ROBOMERGE-CONFLICT from-shelf

[CL 16575656 by sebastien lussier in ue5-main branch]
2021-06-07 15:29:07 -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
tyson brochu
baf3935886 Adding parallel transform-reduce
#rnx
#rb ryan.schmidt michael.balzer
#preflight 60b906136c4454000193e6bd

[CL 16550787 by tyson brochu in ue5-main branch]
2021-06-03 15:00:25 -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
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
Ryan Schmidt
8fd2394228 GeometryProcessing:
- Add MakeBoundsFromIndices() utility functions to TAxisAlignedBox3 to simplify computing bounding-box of point sets
- FDynamicMesh3::GetVertexFrame() can now take an externally-provided normal, and so now can be used without computing VertexNormals attribute
- Add FModuloIteration to IteratorUtil for doing quasi-random-ish iterations over index ranges
- Add CollectVertexPositions() to MeshIndexUtil.h, for creating arrays/sets of vertex positions as a one-liner
- Add FMeshWeights::CotanWeightsBlendSafe() to support cotan-based smoothing of arbitrary properties
- Add TMinVolumeBox3::SolveSubsample() which will (quasi-randomly) subsample a set of the input points to reduce cost of box computation
#rb david.hill
#rnx
#jira none

[CL 16450731 by Ryan Schmidt in ue5-main branch]
2021-05-25 12:13:39 -04:00
Ryan Schmidt
fdb2bab149 GeometryProcessing: Move MeshConversion module from GeometryProcessing plugin to Runtime. Transfer necessary additional files from DynamicMesh to GeometryCore. Move functions from MeshIndexUtil and MeshAdapterUtil namespaces to UE::Geometry namespace.
#rb none
#rnx
#jira none
#preflight 60a7e75e7d6b060001c61f47

[CL 16428413 by Ryan Schmidt in ue5-main branch]
2021-05-22 01:32:46 -04:00
Jimmy Andrews
079eda18aa make fracture UVs try to align to major axes
#rb none
#rnx
#preflight 60a82b9b3df6e300011420fe

[CL 16428122 by Jimmy Andrews in ue5-main branch]
2021-05-21 23:33:18 -04:00
Ryan Schmidt
623e4f96fe GeometryCore: create new GeometryCore Module. Move GeometricObjects code from GeometryProcessing plugin to this new module, as well as core FDynamicMesh3 classes (attributes, aabbtree/octree, change tracking). Update module Build.cs files that reference GeometricObjects.
#rb none
#rnx
#jira none
#preflight 60a713700569f300014a064a

[CL 16415082 by Ryan Schmidt in ue5-main branch]
2021-05-21 01:04:38 -04:00