Commit Graph

166 Commits

Author SHA1 Message Date
tyson brochu
178838db35 ContainmentTests: use full level set grid transform, not just translation
#jira UE-155269
#rb jimmy.andrews
#preflight 62967f5b9d75300f41bdee51

[CL 20444082 by tyson brochu in ue5-main branch]
2022-05-31 18:55:26 -04:00
David Hill
6de27c1a94 GeometryCore: SparseNarrowBandMeshSDF. Update the way distance sign is computed for a block far from the narrow band to make it consistent with the existing dense grid version (SweepingMeshSDF.h)
all the voxels in a block far from the mesh surface should share the same state (inside or outside) for water-tight meshes,  but the counting method used for sign assignment may produce odd results for non water-tight meshes where the block may have both inside and outside elements.  this change accounts for that behavior.

#preflight 629528bc91004dd61c9d6b00
#rb Tyson.Brochu

[CL 20438913 by David Hill in ue5-main branch]
2022-05-31 13:07:58 -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
Jimmy Andrews
d20f4f4012 Fixes to FPriorityOrderPoints:
1. Actually use the SpatialLevels argument
2. Only allow early stopping at level boundaries, so the priority ordering can properly sort points at the same spatial level. Fixes points being spatially clumped when early stopping is enabled.
3. Stop referring to some of the importance weights as "curvature" (we often weight by things other than curvature)
4. Expose OffsetResFactor to allow more control of how clumpy the distribution is (value was hardcoded at 4, but I think 1 or 2 tends to space things better)

#rb david.hill
#preflight 628fb6d48c23e52ef0fbec28

[CL 20381323 by Jimmy Andrews in ue5-main branch]
2022-05-26 13:37:41 -04:00
Jimmy Andrews
ac6d4e5e8e automatically fix mesh orientation when geometry script functions transform meshes with negative scale
#jira UE-151319
#rb semion.piskarev
#rb ryan.schmidt
#preflight 6282a2f3734d0657703f17b7

[CL 20232088 by Jimmy Andrews in ue5-main branch]
2022-05-16 17:07:25 -04:00
matija kecman
b47e74f1a8 Render Capture Baking: Move visibility raycast from evaluators to detail sampler
Benchmark configuration:
- Test scene with 4 meshes: a mossy stone nanite mesh, a beach ball, a ball with an emissive blue cross and a hut mesh
- Target mesh: 11.8k triangles mesh, created by voxel wrapping the meshes in the test scene elements
- 4096x4096 output texture with 16x multisampling baking BaseColor, Emissive, PackedMRS and Normal maps
- 4096x4096 photo capture resolution

Unreal Insights reports the following times for the Bake call:
- Before this change: 2 mins 45 seconds
- After this change: 55.9 seconds

Aside: (Unaffected by this change) In both cases the photo capture, which is done on the game thread, took about 1 min

#jira none
#rb
#rnx
#preflight 627e64e01748fbc85bb24a42

[CL 20221383 by matija kecman in ue5-main branch]
2022-05-16 05:13:25 -04:00
tyson brochu
c28aec2fe7 LineSegmentGenerators - actually use the given box center when computing box lines
#rb Rinat.Abdrashitov
#preflight 627ecc211748fbc85bcd6904

[CL 20189754 by tyson brochu in ue5-main branch]
2022-05-13 17:32:21 -04:00
Jimmy Andrews
10153ffb90 Deprecate TTransformSRT3::Inverse() and attempt to fix usages of it and also FTransform::Inverse() in the modeling code
#rb david.hill
#preflight 627d2b99a82f3adab87fb87f

[CL 20165573 by Jimmy Andrews in ue5-main branch]
2022-05-12 12:08:26 -04:00
Jimmy Andrews
970e58581c Fix instability in initializing quaternions almost aligned to -Z axis, or generally rotating almost 180 degrees w/ a TQuaternion::FromTo() call
#rb tyson.brochu
#preflight 627af36ae713fc6e2c693705

[CL 20132490 by Jimmy Andrews in ue5-main branch]
2022-05-10 20:29:30 -04:00
matija kecman
998174e108 Render Capture Baking: Reimplement infill in new baking framework using callbacks
#rb lonnie.li
#rnx
#preflight 627a5feffc07e0a9b4fda490
#jira none

[CL 20121863 by matija kecman in ue5-main branch]
2022-05-10 09:01:17 -04:00
David Hill
bc7cab5826 Geometery Core: extends the blocked 3d grids and adds narrow band sparse SDF generation using these blocked grids.
unittests are included for the blocked grids and sdf generation, as well as benchmarks for sdf generation.
( This CL flushes out an old shelf of Ryan's.)

#preflight 62713371fe09c0cfbc3719a1
#rb Tyson.Brochu

[CL 20042490 by David Hill in ue5-main branch]
2022-05-04 11:28:18 -04:00
Jimmy Andrews
dca6504e55 fix type mismatches in GeometryCore DynamicVector and RefCountVector
#rb david.hill
#preflight 62713d28e16e280be60f166d

[CL 20025789 by Jimmy Andrews in ue5-main branch]
2022-05-03 10:49:24 -04:00
ryan schmidt
a20c04fa0f Fix indexing bug in FStaticMeshLODResourcesToDynamicMesh::Convert. Remove unnecessary template type on TImageBuilder::SampleNearestUV
#preflight 626c00ac7272eba608712119

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 19979955 via CL 19980094 via CL 19980365
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19985827 by ryan schmidt in ue5-main branch]
2022-04-29 17:04:42 -04:00
Jimmy Andrews
20f8e9cd7e Make a new triangulation fill mode that supports explicit boundary and hole edges
Update Arrangement2d's triangulation functions to use that fill mode, and also to be explicit about whether the boundary group is expected or not

#rb david.hill
#rb rinat.abdrashitov
#preflight 6269606c8c2782e4f2327a34

[CL 19941732 by Jimmy Andrews in ue5-main branch]
2022-04-27 12:30:18 -04:00
brandon dawson
aef20889f4 Add IsInsideOrOn method to the circle type
#preflight 6266e9859337eeaec40226e3

#ROBOMERGE-AUTHOR: brandon.dawson
#ROBOMERGE-SOURCE: CL 19937737 via CL 19937757 via CL 19937767
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19939041 by brandon dawson in ue5-main branch]
2022-04-27 10:06:45 -04:00
ryan schmidt
1fa75e7ad9 GeometryScript: add SampleTexture2DAtUVPositions function that returns texture colors (nearest or bilinear sampled) at UV positions.
GeometryProcessing: add TImageBuilder::NearestSampleUV() function to simplify nearest sampling
#preflight 62682fc8430b9997ebe6a47d

#ROBOMERGE-AUTHOR: ryan.schmidt
#ROBOMERGE-SOURCE: CL 19928418 via CL 19928912 via CL 19929469
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19931478 by ryan schmidt in ue5-main branch]
2022-04-26 19:04:45 -04:00
matija kecman
929525effb Render Capture Baking: Support correspondence sample validity checking, use BSpline filtering and enable multisampling
#rb lonnie.li
#rnx
#jira none
#preflight 6262d4dbd558dfdec3934905

[CL 19899614 by matija kecman in ue5-main branch]
2022-04-25 05:41:52 -04:00
tyson brochu
087f3b0d0f Remesh Tool: initial implementation of (optional) boundary constraint projection:
- Constrained edges along a boundary are allowed to collapse, and vertices are allowed to move, but they are projected back to the original boundary curve geometry
- Additionally, vertices at boundary "corners" (defined using an angle threshold criterion) are constrained to not move or be deleted


#jira UE-149616
#rb rinat.abdrashitov
#preflight
#preflight 6262dc97e87284a93cd6bd44

[CL 19867177 by tyson brochu in ue5-main branch]
2022-04-22 12:56:47 -04:00
matija kecman
9717d7fa19 Modeling Tools: Fix some incorrect comments
#rb lonnie.li
#rnx
#jira none
#preflight 625e77029c09ef439d8b5c4b

[CL 19805534 by matija kecman in ue5-main branch]
2022-04-19 05:05:04 -04:00
jonathan adamczewski
78010a6fff MeshWindingNumberGrid.h: Don't proceed through Compute() if the bounding volume is empty.
Avoids overflow errors from msvc for certain target configurations.

#jira none
#rb halfdan.ingvarsson
#rnx
#preflight 625dfa31b72cfbaf9626f1f4

[CL 19798652 by jonathan adamczewski in ue5-main branch]
2022-04-18 20:08:49 -04:00
jonathan adamczewski
5a8e211992 Add some missing #includes
#jira none
#rnx
#trivial
#preflight 625df492b72cfbaf9624e8af

[CL 19798322 by jonathan adamczewski in ue5-main branch]
2022-04-18 19:39:12 -04:00
Jimmy Andrews
106e92e91f Add PolyPath functionality to Geometry Script
PolyPath is an optionally-closed polyline/polygon with 3D vertices + some utility functions and automatic conversion to/from arrays

Also add a USplineComponent->PolyPath conversion function

#rb lonnie.li
#preflight 625dbb5348670f31a626cc9f

[CL 19792613 by Jimmy Andrews in ue5-main branch]
2022-04-18 15:46:38 -04:00
Jimmy Andrews
b91c89e1b4 improve convex decompositions by adding a concept of 'too thin' parts that the decomposition must remove in the merge phase
also fix handling of splitting into connected components when some of the components don't have a valid convex hull (by bailing on the component split in that case)

#rb rinat.abdrashitov
#preflight 6255ec9eef3d24a90eb4e00f

[CL 19730210 by Jimmy Andrews in ue5-main branch]
2022-04-12 17:42:14 -04:00
Jimmy Andrews
ec5013e106 change FArrangement2d and TConstrainedDelaunay2 to use new FDelaunay2 code for triangulations
#rb david.hill
#preflight 6247dfee3a5a4c1622eb077b

[CL 19628412 by Jimmy Andrews in ue5-main branch]
2022-04-05 14:07:13 -04:00
Jimmy Andrews
4f0c122342 Add optional error tolerances to guide convex decomposition
#rb tyson.brochu
#preflight 62465633df7d23dbfe12e1f7

[CL 19582884 by Jimmy Andrews in ue5-main branch]
2022-03-31 21:49:52 -04:00