"Inconstant" DeletePOP based on Grid POP condition

I was recently experimenting with a three dimensional grid (Connectivity: Point Prims) where the number of divisions was the same across all axes like shown in the following picture:

I then tried to use the DeletePOP “Attribute” tab to delete every point that perfectly aligned with one of the axis on all three dimension so that if P(0) == 0 OR P(1) == 0 OR P(2) == 0 the point would be deleted which looks like this:

With the current setup we would expect that:

  1. Grids where op('grid1').par.cols is even are left unchanged;
  2. Grids where op('grid1').par.cols is odd have their central col/row/slice deleted.

However if we start from the lowest valid odd number and keep moving to the next following odd numbers we will notice that that is not always the case.

Valid odd number Does the central col/row/slice get deleted?
1 YES
3 YES
5 YES
7 NO
9 YES
11 NO
13 NO
15 NO
17 YES
19 NO
21 NO
23 NO
25 NO
27 NO
29 NO
31 NO
33 YES
35 NO
37 NO
39 NO
41 NO

Attaching a POPto DAT makes the problem a LOT clearer.

In the following picture I have set up the grid to have 7 divisions per dimension and then numerically sorted the table based on P(0):

Green rows are points where P(0) < 0
Blue rows are points where P(0) > 0
Red rows are points where P(0) (SHOULD) == 0 which are actually 1.4901161e-8 (or roughly 0.000000014901161)

With this setup we can determine that whilst the Delete POP is correctly deleting points that are in fact equal to zero, the Grid POP does not perfectly align to the world space, creating this odd scenario that we are seeing here.

Before concluding I want to specify that adding a Transform POP and Aligning any or all axis to the world Origin does not fix the issue (which I imagine it simply means that Aligning operations [SOP/TOP/POP] only check up to a certain level of precision).

If you made it all the way here thanks for reading this out and I hope to see a fix for this in the upcoming updates.

Ruben Jaime Papacci

Extra

Software: TouchDesigner version 2025.30060 (POPs Experimental)

O.S.: Microsoft Windows 10 Pro version 10.0.19045 Build 19045

Hardware:

CPU: AMD Ryzen 7 5800X 8-Core Processor

RAM: 32 Gb (4x8GB) Crucial Ballistix 3200 MHz RGB

GPU: NVidia GeForce RTX 3070 Ti ZOTAC Gaming AMP Holo

Hi, Ruben!
Unfortunately I’d say that this is to be expected with float values. There’ll often be precision errors and you might want to compare abs(P(0))<0.0001 or something similar to get the respective points.

2 Likes

Yea this seems to be the easiest solution (tho it would be nice if there was a way to “clamp” values to use, say, only a set number of cyphers after the comma [0.333 instead of infinite 3s, 0.000 instead of 1.4901161e-8 and so on].

I will leave the following parameters screenshots for anyone who may stumble upon this thread and yes, if you’re reading this from the future, this method works with both mathcombine POP and mathmix POP.

1 Like