Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: IL2267 on October 24, 2018, 12:01:25 PM

Title: variable size by spline ID question
Post by: IL2267 on October 24, 2018, 12:01:25 PM
Hello,
I would like to know if there is possible to use a array2S generator with a variable Y size parameter, driven by the base spline ID.
Title: Re: variable size by spline ID question
Post by: Rokas on October 24, 2018, 01:49:36 PM
You can't wire that directly. Maybe there is workaround in Your case. Something like works:

(https://i.imgur.com/xHYt55u.png)
Title: Re: variable size by spline ID question
Post by: IL2267 on October 24, 2018, 02:47:08 PM
Thank's for the reply.
For a better understanding of my question here is a very simplified version of my railclone object and setup.
Currently, the height of the building is set by the No_of_floors parameter.
So, the question is, how can I use the same approach and also have some height variation on the three splines without scaling my segments?

I've managed to do this for the facade, but I cannot link the offset of the roof with the rest of the building.
you can see the issue in the second and third attachment.
Title: Re: variable size by spline ID question
Post by: IL2267 on October 24, 2018, 02:56:43 PM
I have around 20+ types of buildings that I intend to use for context buildings in our projects. This is ok as long as you have specific building heights. The problem is when you just need to generate a random city.
I need to introduce a random numeric value that would use the spline IDs to add or subtract floors.
Example: I input a value of 10 - all the resulting buildings will have 10 floors
enable variation - this will add/subtract, let's say, 5 floors so the buildings will be from 5 to 15 floors high.
Title: Re: variable size by spline ID question
Post by: Rokas on October 24, 2018, 04:53:20 PM
Nice Building!
You can variate height by using selector node and using arithmetic node with some condition from Your style.
Hope this helps. If not I would love to help You on this one. Please use this form  (https://secure.itoosoft.com/userpanel/contact_form.php) to contact us if You can't attach files publicly.
Also You can use WeTransfer (https://wetransfer.com/) if compressed file is bigger than 6MB and paste the link in the message.

Title: Re: variable size by spline ID question
Post by: IL2267 on October 24, 2018, 05:44:47 PM
Thanks Rokas, I'm sending you the file right now.
If you have any other idea on how to achieve similar result using this workflow for the buildings feel free to give me any tips.

Title: Re: variable size by spline ID question
Post by: Rokas on October 25, 2018, 09:32:51 AM
Hi

We have tried here to find a solution for You. And I can only suggest Pauls solution- randomize by material ID. Unfortunately no additional variation can be added on top of that.
You can set MatID= 11 and it will be 11 storey building.
(https://i.imgur.com/93OIQG5.gif)

Attached scene also script to randomize Editable Splines materials.
Title: Re: variable size by spline ID question
Post by: IL2267 on October 25, 2018, 10:54:25 AM
Hello Rokas,
Thanks for the file. I've managed to alter it a bit and adapt it to my original idea. Now it works! It was just what I needed.
I have a on/off switch that enables the random variation (by spline ID) on top of the initial number of floors the user inputs.
The randomize id script you provided is very useful but would it be possible to alter it so you can input a range for the IDs before they are randomized?
This would be very useful for example if I have a whole street where buildings have more than 10 floors and I also want some kind of variation so I can set the random IDs, let's say, between 10 and 15.
Thanks a bunch!
Title: Re: variable size by spline ID question
Post by: Rokas on October 25, 2018, 11:03:59 AM
The randomize id script you provided is very useful but would it be possible to alter it so you can input a range for the IDs before they are randomized?
This would be very useful for example if I have a whole street where buildings have more than 10 floors and I also want some kind of variation so I can set the random IDs, let's say, between 10 and 15.
Thanks a bunch!
First two lines are exactly for this reason.
Title: Re: variable size by spline ID question
Post by: IL2267 on October 25, 2018, 11:06:03 AM
sorry for that, I think I've missed something. There wasn't any visual feedback when I ran the script. It just randomized the IDs. I'll double check.
Title: Re: variable size by spline ID question
Post by: Rokas on October 25, 2018, 11:18:59 AM
Yes, this is simple script without User Interface. Feel free to open it in MAXScript editor and edit for Your needs.
Title: Re: variable size by spline ID question
Post by: IL2267 on October 26, 2018, 10:41:34 AM
Hello Rokas,
Following your advice I managed to update my Building Generator.
The final version has 6 user inputs for better control:
-number of base floors
-height for the base floor
-number of top floors
-height for the top floor
-on/off switch for height variation (my take on this one was to use the info you provided and add this random height on top of the current building height; so if you have an initial input of 2(base)+5(top) and the spline ID is 5, the total number of floors will be 2(base)+5+5(top)
-on/off switch for interior lights (to use for night shots)
*I've also added randomized curtains in the style.
(https://i.imgur.com/S2I1tmT.gif)
Thanks again for all the help!
Title: Re: variable size by spline ID question
Post by: Rokas on October 26, 2018, 10:45:37 AM
Great use of RailClone. !