Commit Graph

42 Commits

Author SHA1 Message Date
Jimmy Andrews
5bae2ab300 make sparse dynamic octree use range iteration to find relevant root cells for point containment and range queries, when there are enough root cells for this to make sense
#rb david.hill
#preflight 63bf9c094b018bfa80e42e39

[CL 23670550 by Jimmy Andrews in ue5-main branch]
2023-01-12 17:26:31 -05:00
Jimmy Andrews
d7b600d398 Add BRIO point ordering and update Delaunay2/3 to use it, to improve performance e.g. for grids of points
#rb rinat.abdrashitov
#rb tyson.brochu
#preflight 63b8a33b221aab21e09c6756

[CL 23607591 by Jimmy Andrews in ue5-main branch]
2023-01-07 13:23:14 -05:00
benoit gadreau
55200a5060 fixed wrong test from CL 23258977
#jira UE-173052
#rb ryan.schmidt
#preflight skip

[CL 23567478 by benoit gadreau in ue5-main branch]
2023-01-03 12:22:36 -05:00
henrik karlsson
0f2ff3a256 Fixed non-unity (with orphaned headers compiled independently) compile errors
#preflight 639278e767018b14b5b68597
#rb none

[CL 23460523 by henrik karlsson in ue5-main branch]
2022-12-08 21:34:12 -05:00
matija kecman
f13206dc11 Fix an unused TDenseGrid2 constructor
#preflight 638f3ca21776b8c21c8df1b8
#rb ryan.schmidt
#jira none

[CL 23407847 by matija kecman in ue5-main branch]
2022-12-06 10:28:27 -05:00
matija kecman
7d5f7f6cc9 GeometryScript: Support sampling UTextureRenderTarget2D at UV positions
#rb ryan.schmidt,lonnie.li,rinat.abdrashitov
#jira UE-167913
#preflight 638f335c7e0feab0b743c8c7

[CL 23406217 by matija kecman in ue5-main branch]
2022-12-06 07:34:37 -05:00
halfdan ingvarsson
04d78f9b09 Move the skin binding op to a shared location in ModelingOps. Placed the implementation of the occupancy grid into its own helper header, as FOccupancyGrid3.
#preflight 6381cedffa053c489a910673
#rb ryan.schmidt
#rnx

[CL 23301139 by halfdan ingvarsson in ue5-main branch]
2022-11-28 20:24:14 -05:00
ryan schmidt
2a75179958 GeometryCore: Add TSparseGrid3::RangeIteration, that iterates over any allocated cells in sub-region of sparse grid. Remove default bAllocateIfMissing=true on ::Get() to avoid accidental grid expansion. Add FVector3i::operator< to allow sorting of integer vectors.
Various improvements to FSparseDynamicPointOctree:
- replaced FSmallListSet with new TSparseListSet<int>
- removed ValidPointIDs flag array, can be inferred from PointIDToCellMap
- replaced checks with checkSlow
- added some variants of internal functions for box center, width, etc, that can work off level/index directly, instead of requiring a cell
- range query functinos use new TSparseGrid3::RangeIteration to avoid iterating over all root cells
- added ::ParallelInsertDensePointSet() which can do parallel octree build into fully-expanded leaf nodes
- added ::ConfigureFromPointCountEstimate() which can estimate MaxDepth and RootDimension given an estimate of point count, useful primarily with ParallelInsertDensePointSet()
- added ::RemovePointUnsafe() which skips various range checking etc

#rb jimmy.andrews
#preflight 37e92f8cc307d6fa52d41c7

[CL 23258977 by ryan schmidt in ue5-main branch]
2022-11-24 09:52:08 -05:00
Jimmy Andrews
afa310b560 make TPointHashGrid queries not create arrays to iterate cell points, and test the center cell first
+ add a find-any variant that can early out
+ fix the FindPointsInBall return value to return the number of points found, not the number of points in the append array (matching the comment, and the behavior if 0 points are present)

#rb david.hill
#preflight 637e47a72a05dabce9d5c735

[CL 23253099 by Jimmy Andrews in ue5-main branch]
2022-11-23 14:44:15 -05:00
Jimmy Andrews
acd52ca4c2 Clean up old code in FastWinding.h and fix accidentally not using the cached triangle data when computing weighted centroids
+ move down some sqrts that only need to be called on the final value

#rb david.hill
#preflight 637ce97e4004f73f62b1239b

[CL 23236502 by Jimmy Andrews in ue5-main branch]
2022-11-22 11:20:15 -05:00
Jimmy Andrews
33df34ee15 Add a 'IsWithinDistanceSquared' to the Mesh AABB Tree class, which can early-out faster than the standard FindNearestTriangle
#rb david.hill
#preflight 637874303377450900a61aa9

[CL 23236438 by Jimmy Andrews in ue5-main branch]
2022-11-22 11:14:05 -05:00
henrik karlsson
2b3ad519a5 Fixed compile error surfaced when orphaned headers got compiled (they were never included in their own module so compiler warning settings was never applied)
Changes include
* Removed #pragma once in cpp files
* Removed dll export on templated types
* Fixed code in headers that didn't compile (probably never included anywhere
* Added casting for code going from int to float. Header was never compiled in the owning module that had warnings as errors

#preflight 637b10c6fa348e848054bd0d
#rb none (devin.doucette for a couple files)

[CL 23218414 by henrik karlsson in ue5-main branch]
2022-11-21 03:22:34 -05:00
henrik karlsson
b5164ac775 Fixes to make modules compile with IWYU. We've added to IWYU toolchain so it compiles "orphaned" headers which does not have a owning cpp file. This identified lots of headers that couldn't be compiled by themselves (or if they were to included first)
Change consist of only forward declaration and additional includes

#preflight 63789c1de30d438849c48188
#rb none

[CL 23218412 by henrik karlsson in ue5-main branch]
2022-11-21 03:22:23 -05:00
jimmy andrews
1fb9676459 Make mesh symmetry detection detect more symmetry cases, more robustly, so VSculpt will recognize symmetry after using Mirror Tool
#jira UE-159448
#rb david.hill
#preflight 63237c365a44869a7d0922f8

[CL 22040790 by jimmy andrews in ue5-main branch]
2022-09-15 18:44:06 -04:00
Bryan sefcik
b4a6e947d8 Ran IWYU on Public headers under Engine/Source/Runtime/...
Headers are updated to contain any missing #includes needed to compile and #includes are sorted.  Nothing is removed.

#ushell-cherrypick of 21065896 by bryan.sefcik
#preflight 62d4b1a5a6141b6adfb0c892
#jira

#ROBOMERGE-OWNER: Bryan.sefcik
#ROBOMERGE-AUTHOR: bryan.sefcik
#ROBOMERGE-SOURCE: CL 21150156 via CL 21151754 via CL 21154719
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v972-20964824)
#ROBOMERGE-CONFLICT from-shelf

[CL 21181076 by Bryan sefcik in ue5-main branch]
2022-07-20 11:31:36 -04:00
David Hill
bd6eef7ea1 Geometry Core, Geometry Processing. Fix implicit cast warnings encountered during clang build.
GeometryCore: StairGenerator.cpp, SweepGenerator.{h,.cpp}, UVPacking.cpp, ParallelTransformReduce.h, CurvewUtil.h, SweepingMeshSDF.h FastWinding.h

GeometryProcessing:  Remesher.cpp, AdaptiveTessellate.cpp, UniformTessellate.cpp, GeometrySelectionUtil.cpp, MeshSimpleApproximation.cpp

#rb Lonnie.Li
#preflight 62d5bfa347779a730a46bc55

[CL 21161422 by David Hill in ue5-main branch]
2022-07-19 09:31:09 -04:00
Ryan Schmidt
f3812c4df5 GeometryCore: add FSegmentTree3, an AABBTree for 3D line segments. Supports finding Nearest Segment to 3D point, and FindNearestVisibleSegmentHitByRay() which raycasts into a set of boxes based on a "visibility" metric, similar to FGeometrySet3::FindNearestCurveToRay().
Modify FGeometrySet3::FindNearestCurveToRay to use a single visibility metric, instead of branches. The previous code was dependent on the order in which segments were processed, and for the purposes of 3D UI hit testing, did not seem to do any better than the current code.

Add basic tests for FSegmentTree3 queries.

#rb rinat.abdrashitov
#preflight 62d5db7547779a730a49033b

[CL 21156801 by Ryan Schmidt in ue5-main branch]
2022-07-18 21:55:20 -04:00
David Hill
a23bc609a2 GeometryCore: Spatial and Implicit: fix type conversion warnings with MeshWindingNumber, CachingMeshSDF and SparseNarrowBandMeshSDF
#rb Jimmy.Andrews
#preflight 62bc6796fd062511870fdd5e

[CL 20897980 by David Hill in ue5-main branch]
2022-06-30 13:02:44 -04:00
tyson brochu
ba94d8c122 ParallelTransformReduce: fix implicit 64-bit to 32-bit conversion
#preflight 62b20b46c400b5ee2f5b8150

[CL 20762804 by tyson brochu in ue5-main branch]
2022-06-21 14:48:21 -04:00
Jimmy Andrews
e6a1ec147c Rule-of-5-or-0 fixes for some geometry types:
- remove TGeneralPolygon2 and IntBoxTypes.h copy constructors, to allow everything to be autogenerated (especially so that a proper move should be generated for TGeneralPolygon2)
 - add explicit moves + delete copies for TSparseGrid3 and FProgressCancel::ProgressScope, as these have custom destructors and the default move/copy behavior would cause bugs
 - make voro++ move assignment protect vs self-move

#rb ryan.schmidt
#preflight 62a8acbb1a6b7dcd549b3239

[CL 20709684 by Jimmy Andrews in ue5-main branch]
2022-06-17 16:58:10 -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
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
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
Jimmy Andrews
bc4f091865 Expose optional second importance weight to the FPriorityOrderPoints class
#rb rinat.abdrashitov
#preflight 623e11818330d27ee37434d4

[CL 19519241 by Jimmy Andrews in ue5-main branch]
2022-03-25 18:00:27 -04:00