Multiple booleans from params

   3133   8   2
User Avatar
Member
13 posts
Joined: 3月 2017
Offline
I'm trying to set up some simple architecture as a digital asset which so far consists of walls, floors and ceilings and now I'm on to cutting out the windows and doors.

I want to expose a parameter that allows for multiple input meshes, that the digital asset loops through and subtracts from the wall geometry from a boolean.

Can anyone tell me how to go about doing this? I have a custom path attribute working nicely for the wall path, but I can't work out how to import door and window geometry when there could be any number of them.

Thanks in advance!
User Avatar
Member
1743 posts
Joined: 3月 2012
Offline
If you just want to do subtractions, it should work to use the Merge node to put all of the geometry to subtract into a single detail, since Boolean can subtract an arbitrary number of connected components from something in a single node. Then, the asset would hopefully only need an input for the geometry to subtract. Would that work?
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
13 posts
Joined: 3月 2017
Offline
Are you saying to import the geometry as a group and then subtract it all at once? If so, how would I go about doing that?

I have attached some screen grabs of the set up as I imagined that would work but it isn't. If anyone could tell me what I'm doing wrong that'd be amazing.

Attachments:
Screen Shot 2017-06-05 at 11.35.46.png (2.2 MB)
Screen Shot 2017-06-05 at 11.35.57.png (2.1 MB)
Screen Shot 2017-06-05 at 11.36.19.png (1.1 MB)

User Avatar
Member
1743 posts
Joined: 3月 2012
Offline
Does the attached HIP file give a better idea of what I meant?

You can use the Merge SOP to collect all of the cutting geometry into a single detail, then make all of the subtractions in a single Boolean. If you're making an asset and you want people to be able to provide geometry to subtract, you don't need n inputs for n subtractions, you just need 1 to receive all of the geometry to subtract.
Edited by neil_math_comp - 2017年6月5日 15:41:55

Attachments:
DoorsAndWindows.hip (68.8 KB)
DoorsAndWindows.png (379.5 KB)

Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
670 posts
Joined: 9月 2013
Offline
I would not recommend booleans for that. Instead of cutting through geometry I´d rather set up and make use of existing polygons. It performs way better and is more stable, as well. Here is an alternative procedure:

1) A sine wave runs across all sides of a box.
2) By multiplying the wave you get a facade pattern.
3) Color ranges can be used to isolate specific building parts.
4) Extruding each part with different thickness values.

Attachments:
building_00.jpg (26.2 KB)
building_01.jpg (46.2 KB)
building_02.jpg (52.2 KB)
building_03.jpg (28.8 KB)
building.hipnc (114.7 KB)

https://procegen.konstantinmagnus.de/ [procegen.konstantinmagnus.de]
User Avatar
Member
13 posts
Joined: 3月 2017
Offline
Konstantin Magnus, that is really freaking cool and I'd love to put that technique to good use but I'm afraid that it parted my hair as it sailed over my head. I'm just getting started with Houdini and you lost me at sine wave.

That said, if you know of a tutorial or a set of tutorials that could help me to better understand what you've done there, I'd be incredibly grateful.
User Avatar
Member
13 posts
Joined: 3月 2017
Offline
ndickson that's what I'm after and I'd gotten that far but I want the goemetry that I'm cutting out to come from a multiparam folder in the asset's interface.

Here's my intention, just to clarify; what I want to do is create a wall from a curve in UE4 much like the one outlined in this superb tutorial [www.gametutor.com], and then place my window/door assets and feed those into the wall asset params to cut the holes for them. By doing so, I hope to have a parametric wall tool which I can use to create game levels.

Is that possible?
User Avatar
Member
1743 posts
Joined: 3月 2012
Offline
Sorry for taking so long to reply! There may or may not be a way to do it with just an Object Merge, since it's tantalizingly close to doing what you want, but I'm not sure. However, it can definitely be done with a For Loop block. Set the Iterations parameter to channel reference the multiparm parameter representing the count, change Gather Method to Merge Each Iteration, change Method on the Block Begin to Fetch Metadata, then Object Merge using the “iteration” detail attribute.

The attached file gives a bit of an example. I changed the First Instance number on the multiparm parameter (in the edit parameter interface dialog) to be 0 instead of 1, for simplicity. If you keep it at 1, you'll need to add 1 to the detail(...)expression, but in parentheses, like (detail(...)+1), so that it doesn't just append “1” to the string.
Edited by neil_math_comp - 2017年6月15日 18:12:21

Attachments:
MergeMultiparm.hip (64.5 KB)

Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
User Avatar
Member
33 posts
Joined: 6月 2020
Offline
I'm having issues similar to the above. Somehow I can't seem to get my 2nd boolean to work. Tried different ways based on what I found online. Help please. thanks



Edited by plabill23 - 2020年7月19日 12:29:22

Attachments:
2020-07-18.png (754.2 KB)
2020-07-19 (1).png (750.4 KB)
2020-07-19.png (743.4 KB)
2020-07-19 (2).png (754.2 KB)

  • Quick Links