Foreach sop, recursive with own result except 1st

   2583   4   1
User Avatar
Member
26 posts
Joined: June 2015
Offline
Hi

I'm trying to have some roads cut each other out and fuse them together into a valid, fused/clean mesh.
So far, so good ….except it isn't done in a clever way, just a bunch of cookies tied together as can be seen in the example. If there would be a 4th curve, alot of nodes need to be placed extra to achieve the same clean endresult.

Is there a way with for instance the foreach sop to iterate through all the extrudes and (in the foreach loop) catch both the cut road AND the extrude from the previous attempt and cookie them together?

What would be awesome is a way that enables to input X number of curves and still cookie their horizontal extrudes out of eachother.

Kinda stuck here, thanks in advance!

regards
Bjorn

Attachments:
forWeb.hipnc (475.9 KB)

with kind regards,
Bjorn

Houdini TA @ AAA game-studio
Freelance Houdini @ www.paleopixels.com
User Avatar
Member
2528 posts
Joined: June 2008
Offline
Within your FOREACH node you can add a second each in ‘feedback’ mode. You can merge the results back in and on the next iteration of the loop you will have access to what happened in all previous iterations. This leaves the first iteration as simply a clean run.
Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
26 posts
Joined: June 2015
Offline
Hi

thank you, this looks promising, though the end result isn't as clean as expected. (lots of overlapping triangles).
with the feedback mode on in the each2 node not all cookies get evaluated…weird or is that as expected?

In the attachment is the endresult so far, can you(or someone else )
give me feedback of what I'm doing wrong? Thank you in advance.

regards,
Bjorn

Attachments:
each2attempt.hipnc (399.1 KB)

with kind regards,
Bjorn

Houdini TA @ AAA game-studio
Freelance Houdini @ www.paleopixels.com
User Avatar
Member
2528 posts
Joined: June 2008
Offline
I have been playing around with your last posted HIP file. I am posting my re-wire of your setup with a possible solution. The FOREACH still creates each wide ribbon/road. But what merges them together is the fuse SOP set to SNAP mode with the Snap Distance set fairly high. This causes the points inside intersections to effectively disappear leaving only the edge.

Attachments:
ap_merge_curves_into_single_road_mesh.hipnc (369.6 KB)
Untitled-1.jpg (203.4 KB)

Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
26 posts
Joined: June 2015
Offline
Hi

sorry for the late reply and thank you for your anwer. Looks quite ok, but it changes the original shape too much.

regards,
Bjorn
with kind regards,
Bjorn

Houdini TA @ AAA game-studio
Freelance Houdini @ www.paleopixels.com
  • Quick Links