Jump to content

Help with porcedural building

Recommended Posts


Hello :)

I'm working on a procedural building and actually i'm stuck with something. I've tried many thing but it doesn't work.
I'm trying to add or remove the number of the window when I change the size of the building.
I've wrote this and i've tried to add an offset to keep a space between 2 windows but I didn't find how.

vector mypt = getbbox_size("../box1")/getbbox_size("../box2"); //box2(window), box1(building)
float dist = distance(@P, mypt);
if(dist > ch("distance")){
removepoint(0, @ptnum);
if(dist < ch("distance")){
addpoint(0, @ptnum);

Is someone can help me with that :)
Thank you



Edited by StrangerSam

Share this post

Link to post
Share on other sites

With vector mypt you're kind of finding how many small boxes fit into a bigger one...

But distance from a point to that vector (mypt) doesn't make any sense.

You should start from this.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now