Occlusion
Hi (John),
I was wondering if Occlusion node should or shouldn't work in this attached case?
There's only paths as input into Occlusion node, but it doesn't seem to work. Maybe I'm missing smth.
Or is it because occlusion takes time and should be waited?
- sh.png 265 KB
- occlusion-test.ndbx.zip 34.2 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by florisdejonge on 24 Jun, 2023 08:19 AM
Hi Jussi,
If I am not mistaken the shapes ought to be sorted by either x- or y-axis to work. It only works one way unfortunately (or I might have missed an update).
btw: this plot looks awesome!
Floris
Support Staff 2 Posted by john on 24 Jun, 2023 10:40 AM
Jussi,
Sorry for the delay; I only just now saw your note.
Floris is correct that you have to sort your list of shapes into your desired Z order (sorted from bottommost shape to topmost shape). Because you generate these in blocks this may not produce the results you intended. I would suggest feeding the ungrouped shape into my order_LRTB node to order them left to right, top to bottom before applying the occlude node.
But that is not your problem. Occlude does work with this list, I think, but it just takes too long. You have a total of 42 x 36 = 1512 shapes. Occlude bogs down after a few hundred shapes (depending on how many overlaps there are) and gets exponentially slower as the number of shapes increase.
To test this I first sliced your list to take only the first 180 shapes - that took about 20 seconds on my machine. I then tried the first 360 shapes (see attached PNG) - that took over five minutes! I'm afraid even if you let it run overnight it still couldn't handle 1512 shapes.
As a comprise I created a modified version of your design with only a quarter of your shapes. First I sampled half as many points from your freehand curve (21 instead of 42). Then I shuffled the shapes and took every other one to reduce it again by half, for a total of only 378 shapes. Occlude managed that in about three and half minutes (see screenshot).
So I think occlude works, but it's too slow to handle thousands of shapes.
John