FMP 2- Developing the Generator

 After many crashes and errors, the tool is coming towards the end of development. The new features include: Windows, multiple floors, ceilings, more automated input and stairs. All of these features are now fully functional except for the multiple floors, which seem to be clamped to 1.


I decided to have two options for window placement, one automatic and one manual. The biggest challenge of the window placement was to place them correctly, which involved a lot of node order tweaking to delete the correct points. The automatic placement is controlled by a group by range node, which is exposed for the user to change the spacing and offset. The custom placement is similar to the door function, where a carve node controls the placement. For loops allow the window parameters to be unique to each floor, as the user may have different rooms on each level. These multiple floors are created by transforming the input curve upwards for each multiparm input. 

Beginning of automatic window for-loop

There are also two options for the ceilings: flat and arched. The flat option uses the bricker-divided floor plane as placement, while the arches use the edge points of the same plane. The arches were more challenging, as I had to find a way to include specific corner sections. For this, I took the convex corner points and copied a corner piece to them. This also fixed any intersections. The arched ceiling is then added to the transform of the floor plane for each level, as swapping between that and the flat ceiling distance would not add anything to the tool, instead causing problems with the stairs. I also included a switch to allow the user to activate/deactivate the ceiling, due to the fact that it blocks all visibility.

Ceiling for-loop

I realised that making the user input the size of the main wall manually was slightly inconvenient, so I decided to automate this by getting the sphere bound radius of the input piece and detail referencing this attribute instead of the input parameter. This means the main wall can be any size, and the tool will work as long as the other pieces are the correct proportions. I also added a scale option for the walls, which would automate the process entirely, but that made the file crash, so I had to leave it out. I also used this for the doors, so the door can be either full or half sized and will be placed accordingly, with the relevant pieces being deleted. This process was quite difficult, as the points for deletion constantly seemed to be offset incorrectly. Two resample nodes (one half the length of the other) subtracting from one another solved many of my problems, as they allowed me to properly offset pieces based on their size. 

Semi-automation using bounds

Switch based on door size

Subtracting resamples- get points in between

The stairs also used a carve node to control placement, but to delete the relevant points I had to transform the box at the pivot point upwards and sideways, to make a doorway for each end. I also multiplied the carve amount by 0.1, otherwise the input would have required too much precision to get the correct placement. Another setting I realised the user would require is a multiple staircase option, as each floor would probably need more than one staircase. This was interesting to solve, as I knew I needed a nested for-loop, but wasn't sure how it worked in Houdini. Eventually I found that the referenced sub parameter in the multiparm needed an underscore between the two iteration values when referenced, so I just added this as a string.

Stair section: nested for-loop

Stairs with deleted doorways

Each room and staircase references the floor multiparm to decide on placement, while the rooms can also have multiple levels themselves. The multiple room levels are not divided by ceiings, however, and I will probably add mezzanine levels/ balconies to these extra levels later on. The placement and scale of every piece depends on the width and height of the main wall, which I think makes the tool quite flexible and robust.




Comments

Popular Posts