Itoo Software Forum

Author Topic: Method to check MatID change within a Spline  (Read 3717 times)

suppenhuhn

  • Full Member
  • ***
  • Posts: 125
Method to check MatID change within a Spline
« on: September 27, 2017, 11:24:20 AM »
Hi,

in my RC-Object ( Array 2S ) i got 2 Variations : Window with opening Wings ( assigned to MatID 1 ) and a fixed Frame (  assigned to MatID 2 ). Both are using Inner-Corner Elements.

Works fine as long there is a seperate spline for each MatID  ( attached Screenshot: upper / middle Spline )

But often i need to combine those 2 variations in one spline ( Screenshot: lower Spline ) so i have to check on Vertex V2 if it's a inner corner or not. Because in this case i need:
  • a different Right-Slide / Top-Right-Corner / Bottom-Right-Corner for the Object on MatID 1
  • a different Left-Slide / Top-Left-Corner / Bottom-Left-Corner for the Object on MatID 2


I'm sure this could be fixed with Expressions and/or Conditions ... but to be honest i have no glue which Expressions are needed :-/ Or is there a Tutorial which covers this "requirement" ?

Would be thankful for every hint:)
« Last Edit: September 27, 2017, 11:52:23 AM by suppenhuhn »
iToo has probably the best support & community i know !!

I'm using it with Max 2019 & Vray 6

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 2447
Re: Method to check MatID change within a Spline
« Reply #1 on: September 27, 2017, 03:20:45 PM »
Hi,

As mentioned here: "... to handle this kind of situations, there are two attributes: XSplineMatID & XSplineNextMatID. The XSplineMatID for Corners returns ID of segment BEFORE the corner and the XSplineNextMatID, which in case of Corners returns ID of segment AFTER the corner."

Hope that helps.

Best regards,

suppenhuhn

  • Full Member
  • ***
  • Posts: 125
Re: Method to check MatID change within a Spline
« Reply #2 on: September 28, 2017, 10:30:18 AM »
Awesome - thank you! :-)
iToo has probably the best support & community i know !!

I'm using it with Max 2019 & Vray 6