Occlusion

Jussi Jokinen's Avatar

Jussi Jokinen

18 Jun, 2023 09:00 PM

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?

  1. 1 Posted by florisdejonge on 24 Jun, 2023 08:19 AM

    florisdejonge's Avatar

    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

  2. Support Staff 2 Posted by john on 24 Jun, 2023 10:40 AM

    john's Avatar

    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

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • sh.png 265 KB
  • occlusion-test.ndbx.zip 34.2 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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

Recent Discussions

24 Jan, 2025 07:50 AM
22 Jan, 2025 11:42 PM
21 Jan, 2025 09:43 AM
21 Jan, 2025 09:41 AM
21 Jan, 2025 09:36 AM

 

21 Jan, 2025 02:00 AM
16 Jan, 2025 08:30 PM
15 Jan, 2025 06:37 AM
04 Jan, 2025 04:09 AM
03 Jan, 2025 05:32 PM
29 Dec, 2024 12:06 PM