Itoo Software Forum

Author Topic: Segments not sliced when using conditional formating  (Read 152 times)

manoffoot

  • Newbie
  • *
  • Posts: 4
Segments not sliced when using conditional formating
« on: October 12, 2021, 03:44:47 PM »
I'm new to Railclone but already have an issue which is really frustrating and so I am hoping someone can help me.  I have a series of splines that we are using to create concrete walls.  The curvature of the spline is dictacting the segment we'd like to use, with a tighter curve requiring a smaller segment length to appear less faceted.  Poly count is a thing for us so we can't simply use the smallest segment everywhere.  I have 10 different segment lengths varriying from 0.3m to 10m in length and I was hoping to use mat id of the spline sections to control which segment is used.  I created a series of conditional nodes asking if mat id equals 10 then use segment which is 10m long and if not pass onto the next conditional node asking if it is 8 then use segment that is 8m long etc etc.  All of this is good except it no longer slices the segment at the end of the spline section but instead continues into the curve part of the spline we need to be smaller in size.  I believe this is because the conditional nodes are all happening before the generator which controls the slicing but if I try to create 10 generators and use the mat id limits option it crashes MAX on me and has done several times.
If someone is able to help I'd much appreciate it.   

manoffoot

  • Newbie
  • *
  • Posts: 4
Re: Segments not sliced when using conditional formating
« Reply #1 on: October 12, 2021, 04:45:24 PM »
I have managed to get the 10 generators setup working without it crashing but I now have the issue of the UVW mapping (I'm using the box mapping option) not being continuous and flowing from one section of the spline into the next but instead starting again, which will be an issue and needs to be resolved.
Is there a way of either correcting this flow of UVW mapping with multiple generators?
Or a single generator that slices the segments (as expected) when using conditional nodes to determine the mat id?
Plus another issue I realised I didn't explain with the single generator concept is that adaptive stops working as expected in that it simply stops slicing the last segment, so the model often overshoots the spline.

Dragan

  • Hero Member
  • *****
  • Posts: 879
Re: Segments not sliced when using conditional formating
« Reply #2 on: October 12, 2021, 06:14:32 PM »
Can you share the scene file so we can take a look?

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2083
Re: Segments not sliced when using conditional formating
« Reply #3 on: October 13, 2021, 09:32:15 AM »
It looks to me as though you're using conditional nodes to choose segments based on material IDs? If so I can recommend instead using the Selector operator set to X Spline Material ID mode.

In a single generator setup, you'll probably find that you can get it working by putting an smpty Segment or Transform into the Corner input and then ensuring that the vertex type between the Mat ID changes is set to generate a Corner segment. You can choose which vertex types create a corner segment in the Generator's Rules tab.




Assuming all your segments are the same length, adaptive mode should work with this setup too. As Dragan mentioned, a sample file might be handy to help further.

Best,
Paul
Paul Roberts
iToo Software

manoffoot

  • Newbie
  • *
  • Posts: 4
Re: Segments not sliced when using conditional formating
« Reply #4 on: October 13, 2021, 02:01:41 PM »
Hi Paul,
Thanks for your reply and with your input I have managed to make it work as desired.  Basically treating all vertices that border a mat id change as bezcorners in order to "insert" an empty corner node works, not only stopping segments protuding past the end of the spline sections but also fixes the adaptive segments protuding past the end of the splines.  It's worth noting that not all segments are the same length but it still works with adaptive as I mentioned.

I do question whether this workaround is actually a bug rather than a feature as if you wanted segments not to be sliced at the end of spline sections then the "Slice" tick box against segments could be unticked.  What are your thoughts?

I also like the idea of using the selector x spline mat id mode but we have developed quite a complex mat id numbering system, which requires mat id in the 1000s and seeing as you can't edit the mat ids in the selector itself, we need to use the conditional formating setup I had previously created but thanks for your advice again.