Commit Graph

197 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
4688af8512 Fix constrained delaunay triangulation failing on cavity fill by switching to a different (simpler) cavity fill algorithm
Should be faster in most practical cases, though can be slower if an inserted edge must cross a lot of existing edges.

#rb rinat.abdrashitov
#preflight 62845c74ac1a933d478fcc0b

[CL 20261922 by Jimmy Andrews in ue5-main branch]
2022-05-18 11:50:40 -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
Steve Robb
f4d1564ffe New BitCast<>() function which works like C++20's std::bit_cast<>().
Deprecation of FPlatformMath::IsNegative*() functions.
New FPlatformMath::IsNegativeOrNegativeZero().
Fix up of existing usage to either use < 0 or IsNegativeOrNegativeZero where appropriate.
Fixes for aliasing problems in various FMath functions, including IsNegative*().

Resubmission of CL# 19833778 with fixes for problematic Mac and Android toolchains, causing spurious errors while building PCHs.

#rb devin.doucette, charles.bloom, will.damon, chris.babcock
#jira UE-148435
#preflight 6260764d91376845adf9893f

[CL 19840896 by Steve Robb in ue5-main branch]
2022-04-20 19:05:47 -04:00
Jimmy Andrews
cd48240c04 fix CIS asan failure: exact predicates accessing 1 past the end of local stack arrays
#jira UE-149726
#rb tyson.brochu
#preflight 6260735673187d30d0c4989d

[CL 19838426 by Jimmy Andrews in ue5-main branch]
2022-04-20 17:23:03 -04:00
Steve Robb
5c1f45e9a8 Undo //UE5/Main/Engine/... changelist 19833778 due to Mac and Android compilation failure.
#rb none
#jira none
#preflight none
#fyi will.damon

[CL 19835840 by Steve Robb in ue5-main branch]
2022-04-20 15:09:51 -04:00
Steve Robb
a9e89c3ed6 New BitCast<>() function which works like C++20's std::bit_cast<>().
Deprecation of FPlatformMath::IsNegative*() functions.
New FPlatformMath::IsNegativeOrNegativeZero().
Fix up of existing usage to either use < 0 or IsNegativeOrNegativeZero where appropriate.
Fixes for aliasing problems in various FMath functions, including IsNegative*().

#rb devin.doucette, charles.bloom
#jira UE-148435
#preflight 625ece48f16e0d2accab15d9

[CL 19833778 by Steve Robb in ue5-main branch]
2022-04-20 13:38:10 -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