Commit Graph

10 Commits

Author SHA1 Message Date
sebastien lussier
aaf2762f1f Approximate Actors
Exclude from the mesh generation all mesh sections that are using materials for which the material domain isn't "Surface" (ex: decals)
Those will still be rendered properly in the material baking phase.
Prevent black patches in places where decals aren't resting on surfaces
#rb ryan.schmidt


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

[CL 16733173 by sebastien lussier in ue5-main branch]
2021-06-21 16:32:50 -04:00
ryan schmidt
dd142ab4b2 ModelingComponents: improve handling of thin objects in FMeshSceneAdapter. Add Weld step before connected components. Per-Instance transforms are now extracted outside of Component-level processing, and 'thin' detection is now tested under this transform set, for each connected component. This improves handling of (eg) extreme scaling applied to create thin instances. Check AABB dimensions in IsThinPlanarSubMesh() before using normals, this handles many thin parts that are not "box-like" (will still not work if part is rotated). Seed points now generated on offset surfaces, if required, to avoid failures in surface rootfinding. Add support for filtering tiny objects (enabled in ApproximateActorsImpl, for 10% of voxel dimension)
#rb none
#rnx
#preflight 60c844582da78400011f4ef7


#ROBOMERGE-SOURCE: CL 16670139
#ROBOMERGE-BOT: (v834-16658389)

[CL 16670142 by ryan schmidt in ue5-main branch]
2021-06-15 02:47:13 -04:00
Ryan Schmidt
e196c256e4 GeometryProcessing: remove forwarding headers used in GeometryCore transition, and update all affected includes.
#rb none
#rnx
#jira none
#preflight 60c52c5db9446100014da02d

[CL 16653115 by Ryan Schmidt in ue5-main branch]
2021-06-13 00:35:22 -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
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
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
ryan schmidt
6191a7ce3c ApproximateActors updates:
- FMeshSceneAdapter updates
   - if bThickenThinMeshes is enabled, then all instance meshes are converted to DynamicMesh and decomposed to find non-closed regions. Those regions are uniqued into separate meshes. The remaining closed geometry is separated out and kept as instanced.
   - various utility functions added to support above
   - previous code to explicitly 'thicken' open meshes into solids is removed. Instead unsigned distance is used to determine inside/outside and generate a 1/0 winding number
   - instances are now sorted into an octree to speed up winding number evaluations
   - If all meshes are closed (or effectively closed via above, ie will return integer winding number) then winding number query can early-out as soon as it finds a non-zero value
- Add hard-normals options in IGeometryProcessing_ApproximateActors (not exposed in MergeActors tool options yet)
- Added hard-normal callucation to ApproximateActorsImpl, and additional profiling
- Allow specification of actual  ECollisionTraceFlag options in CreateStaticMeshUtil, instead of just a boolean
- Add FSparseDynamicOctree3::ContainmentQueryCancellable() variant that can early-exit

#rb none
#rnx
#jira none
#preflight 60a686274c320300018d3841

#ROBOMERGE-SOURCE: CL 16410125 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v804-16311228)

[CL 16412542 by ryan schmidt in ue5-main branch]
2021-05-20 19:35:43 -04:00
Ryan Schmidt
9defa23f46 GeometryProcessing:
- Add FImageAdapter, wraps TImageBuilder of different types and provides a consistent interface, so that other code doesn't need specializations for each image type
- FMeshSceneAdapter now supports the ability to detect and thicken "thin" meshes, by flattening the instances into unique mesh copies (generally necessary due to scaling). Can also now return statistics about the mesh scene, return a full flattened mesh (for debugging), and automatically generate a "closing mesh" that can help to cap off the base of mesh assemblies when trying to generate a solid/etc.

ModelingComponents:
- FWorldRenderCapture now writes via FImageAdapter instead of an Image4f
- FSceneCapturePhotoSet now stores less data for photo sets. BaseColor/Emissive/WorldNormal are 3f, Roughness/Specular/Metallic are 1f
- IApproximateActors and implementation now support optional base-capping, occluded mesh removal, geometric-tolerance simplification, thin mesh auth-thickening. Now creates MICs based on an input Material, instead of new Material. Added ability to emit a flattened debug mesh, and print debug info.

MergeActors:
- Expose above improvements to IApproximateActors

#rb none
#rnx
#jira none
#preflight 609ef005f6c6e3000144c5e2

[CL 16338550 by Ryan Schmidt in ue5-main branch]
2021-05-14 21:11:51 -04:00
Ryan Schmidt
e80d853a06 GeometryProcesing: add TImageBuilder::FastDownsample. Add AntiAliasMultiSampling parameter to ApproximateActors API and Impl. Expose WindingNumber parameter in ApproximateActors API. Modify FMeshSceneAdapter to compute winding number sum instead of max.
#rb none
#rnx
#jira none
#preflight 6091c88590631e000100c55b

[CL 16201057 by Ryan Schmidt in ue5-main branch]
2021-05-04 19:08:26 -04:00
Ryan Schmidt
f99091e243 GeometryProcessing: add basic TTransformSequence3, allows storing multiple separate transforms in list, transforming points
ModelingComponents: add FMeshSceneAdapter, generates "flattened" mesh representation for a set of Actors, with support for instancing to avoid duplication, and creates minimal set of AABBTree/FWNTrees for the unique meshes. Does not make copies of any mesh data, uses MeshAdapter to allow queries directly on MeshDescriptions.
#rb none
#rnx
#jira none

[CL 16148184 by Ryan Schmidt in ue5-main branch]
2021-04-28 16:17:03 -04:00