Procedural and modular realistic stairs for archviz

   804   0   1
User Avatar
7 posts
Joined: Feb. 2019

I thought I'd show my current project since I haven't seen anyone do stairs like this. My goal is to make a tool that can quickly reproduce wooden stairs you'd see in new houses or duplex, only using a small amount of data as input. The tool can generate straight or turning chunks of stairs that are arranged in 3D space to create the final staircase. It has procedural UV, and you can tweak pretty much anything you want although it is very much aimed at making realistic stairs so pushing any parameter beyond that will not result in a usable object.

Here is a video [] of the .hip:

The parameters could be more artist friendly but they are great for making accurate stairs from plan, just measure each straight part lengths on the plan, each angles for turns, and you are good to go.

A few things that are noteworthy:

I use a main controller with all the settings for the overall staircase and each individual parts/chunks.

I have a main "brain" Attribute Wrangle that output a start position and rotation for each chunks, calculate the number of steps for each chunks, the height of each chunks, etc. All of that data is outputted to detail attributes that are then fed into the 5 HDA (the tool can handle 5 parts, but I could add more if needed). Can you use setdetailattribute() in a vex for loop to output an infinite number of detail attributes or do you have to explicitly write them? Because this is what I did to keep it simple, therefore there is a lot of repeating code for each parts which could use some refactoring.

I had to create an HDA for the chunks because I couldn't figure out how to make this work with a for-loop or make some kind of linked subnets. I tried to use the "iteration" detail attribute in expressions on the subnet parameters to call detail attributes from the brain wrangle. To iterate through data_1, data_2, etc... I'd write something like:
detail("../brain/", "data_" + detail("../foreach_count","iteration",0),0)
But I could never get it to work, not because of errors in syntax but because the results were buggy at best even when trying to debug with Single Pass.

I'm wondering how can I share the .hip since it use HDA, can I embed them or do I need to upload them separately?

I never realized how much work procedural UV needs when you start worrying about wood grain direction. Especially for the stringers (diagonal strip of wood on the sides) I had to do quite a bit of vex to calculate all the angles to make sure I was projecting the UV without any stretching, especially on the turning chunks. Anyway here is an overview of the HDA:

Thank you for reading

Beveling and soft normals
Adding rails
Edited by medieval_cortex - April 29, 2022 13:35:22

Untitled.mp4 (7.8 MB)
render.JPG (54.9 KB)
One_Chunk.JPG (265.3 KB)
Main.JPG (281.3 KB)
HDA_data_input.JPG (127.5 KB)
brain.JPG (322.1 KB)

  • Quick Links