Itoo Software Forum

Author Topic: Checking if a segment crosses the spline boundary  (Read 450 times)

TV2634

  • Newbie
  • *
  • Posts: 5
Checking if a segment crosses the spline boundary
« on: May 15, 2023, 07:46:34 PM »
Hello everyone, I am creating a pattern for the ceiling, it consists of two elements - a metal segment and a light segment. The elements had to be generated randomly, and there was a problem with the light segment of the ceiling hitting the structural elements of the building (columns, walls, etc.) (shown in the attached). this should not be the case. I decided to make a contour on the spline of all structural elements, and then uncheck the slice checkbox in the light segment, and in the 2S1 array, when scrolling through the clipping area settings, select remove in the no-slice item so that all light segment are removed when crossing the spline boundary. But instead of them there is a void, and I have not found how to replace empty elements with metal parts. And then I came to a dead end.

Logically, it is necessary to somehow check whether the railclone segment crosses the spline boundary, and, depending on this condition, if it crosses, then use a metal segment, if not, then generate metal segment with light segment.

The question is, how do I check if the segment crosses the spline boundary in railclone?
Or maybe there is some other logic so that the setting I need from metal and light segments is generated and does not fall on the structural elements?

I attached the scene below, 3ds max 2022. I hope for your help, thank you.
« Last Edit: May 15, 2023, 09:12:52 PM by TV2634 »

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2482
Re: Checking if a segment crosses the spline boundary
« Reply #1 on: May 16, 2023, 09:48:52 AM »
Hi,

As mentioned in this tightly related post: “Unfortunately there is no way to detect if a segment has been cut because the clipping operation takes place after the graph has been evaluated. The only way I can think of to do this would be to create two styles, one with lights and one without ...”

I hope that helps a bit.

Best regards,

TV2634

  • Newbie
  • *
  • Posts: 5
Re: Checking if a segment crosses the spline boundary
« Reply #2 on: May 16, 2023, 07:23:07 PM »
It is a pity that it is impossible to determine the border. The attached ceiling theme turned out to be useful, thanks for your answer!

TV2634

  • Newbie
  • *
  • Posts: 5
Re: Checking if a segment crosses the spline boundary
« Reply #3 on: May 17, 2023, 12:20:48 PM »
In general, I have found probably the best solution to my question at the moment. Thanks again to Michal Karmazín for link on a similar topic, there I came up with the idea to use 2 generators instead of one. The idea itself is that we use 2 splines and change the value in the generator - for no-slice, and depending on the situation we use the remove or preserve parameter

below I have attached a small spoiler of the work and scenes from 3ds Max 2022, maybe this will be useful to someone
« Last Edit: May 17, 2023, 12:27:52 PM by TV2634 »