Itoo Software Forum

Author Topic: Evenly spacing segments on a L1s array  (Read 568 times)

AknightwhosaysNi

  • Newbie
  • *
  • Posts: 8
Evenly spacing segments on a L1s array
« on: November 12, 2020, 06:01:01 PM »
Hi, my first attempt at Railclone so go easy on me!

I'm modelling a balustrade with regular upright posts and a handrail running on top of this. Every 10th and 12th posts there are lights which are fitted to the top of the posts, the lamp posts continue up through the handrail.

I want to be able to make adjustments to the length of the balustrade and spacing of the posts, and Railclone to add/remove lights or posts so that the spacing of the lights stays consist in true parametric stylie.

I've tried using conditional operators connected into a compose operator but alas failed miserably, any suggestions?

Max file attached.

Thanks

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Evenly spacing segments on a L1s array
« Reply #1 on: November 12, 2020, 06:20:56 PM »
Please, can you downgrade the file for Max2018?

AknightwhosaysNi

  • Newbie
  • *
  • Posts: 8
Re: Evenly spacing segments on a L1s array
« Reply #2 on: November 12, 2020, 07:13:12 PM »
Yep, here it is.


Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Evenly spacing segments on a L1s array
« Reply #3 on: November 12, 2020, 09:12:44 PM »
Hi,
Here is a possible solution. I`m in the middle of a project so I could not do more but I think you will get an idea of how everything works.
I exposed just two parameters: Evenly Distance for Handrail and Post_Counter for placing the post on every # number.
If you have more questions do not hesitate to ask.

Best Regards
Dragan


AknightwhosaysNi

  • Newbie
  • *
  • Posts: 8
Re: Evenly spacing segments on a L1s array
« Reply #4 on: November 12, 2020, 11:20:30 PM »
Wow. Thanks for your help and speedy response Dragan, much appreciated.
I've run out of coffee today so I'll get my head round it tomorrow.

Thanks again.

AknightwhosaysNi

  • Newbie
  • *
  • Posts: 8
Re: Evenly spacing segments on a L1s array
« Reply #5 on: November 13, 2020, 11:51:58 AM »
I've had look and everything works except i dont  seem to beable to make the lamposts into the grouping I need.

I'm trying to have a lampost then a mid post then a lampost, then a run of 9 mid posts and then lampost/mid post/lampost and then 9 mid posts etc..

Thanks

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Evenly spacing segments on a L1s array
« Reply #6 on: November 13, 2020, 12:25:45 PM »
I don't have Max right now to test it but it should work.
Instead Conditional Node that has a Segment Pole Counter place Sequence Node and connects Transform nodes in the order you need:
lampost/mid post/lampost/mid post
Then set the Counters in the Sequence properties 1/1/1/9
Connect this Sequence node to the Evenly Connector of the Generator (I think it is named as Linear_2)

Keep in mind this will distribute Sequence along all spline following  Evenly distribution so it is possible that positions of the Lampost will not be on some position you presume to be because of the corners.
For that more complex distribution, I assume we should introduce some Mat ID limits  ;)

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Evenly spacing segments on a L1s array
« Reply #7 on: November 13, 2020, 01:00:15 PM »
ok. I found another computer with Max.
Here is the file...but you will see the problem because Sequence is `counting` Evenly positions.

For better control, you should probably Index spline with different Mat ID and then using Conditional or multiple Generators with Limit by ID to create Style that will fit your needs.

It seems complicated right now, but when you have `initial` Style configured in the right way additional set up should not be so scary  ;D
« Last Edit: November 13, 2020, 01:27:07 PM by Dragan »

AknightwhosaysNi

  • Newbie
  • *
  • Posts: 8
Re: Evenly spacing segments on a L1s array
« Reply #8 on: November 13, 2020, 02:43:57 PM »
Perfect, works like a dream. :)

Thanks again for your time and help.

Dragan

  • Hero Member
  • *****
  • Posts: 1419
Re: Evenly spacing segments on a L1s array
« Reply #9 on: November 13, 2020, 05:13:31 PM »
Glad to help.. Here is a modified Style with some Limit by Mat ID and multiple Generator. Just to make it interesting.

Imagine that you need LightPost only on Approach Sides and not on the `Square one`. I have change MatID on spline 1 for Square and 2 & 3 for the Approach Sides.
Then I rearranged Style by making a few Copies and set the limits to assign each Generator to Mat IDs. After that, I did some different setup on Generators Inputs to avoid intersecting corners/start/end segments.
It took me just a few minutes to do it. 
I left some Notes that will help understand.

Let me know if you need more info.
Best Regards

« Last Edit: November 13, 2020, 05:23:29 PM by Dragan »