Itoo Software Forum

Author Topic: corner elements - padding issue  (Read 1416 times)

ChrisV

  • Newbie
  • *
  • Posts: 25
corner elements - padding issue
« on: May 05, 2014, 06:37:05 PM »
Hi guys,

sorry, me again... I just tried to create a simple style where corner elements are placed when exact 90 degree angles are available, which almost works - except for the default segments overlapping the corners.

I tried using padding on the corner element but that moves the corner further out instead of pushing back the default segments
I also tried different bevel modes, and tried to use empty compose elements but did not succeed to keep the default elements cut nicely to the corners. maybe I` just got a brain-freeze or something... anyone any ideas?

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
Re: corner elements - padding issue
« Reply #1 on: May 05, 2014, 10:01:38 PM »
Hi Chris,

This is a bit tricky because you need two different bevel types on the same style for this to work properly. I've resolved it in the attached file but only by using material IDs to control which bevel type to use. The issue is further compounded because whether a corner is interior or exterior changes the need for padding. To resolve this the style uses 3 material IDs

ID 1 Used for spline sections with 90 and 270 degree bends
ID 2 Used for spline sections that are not right angles and do not require padding on the corner.
ID 3 Used for spline sections that are not right angles and do require padding on the corner.

This was achieved as follows:
  • Used two generators, one for 90 degree bends with Bevel Mode set to Noneand another for everything else with Bevel Mode set to Extend.
  • Limit Generator 1 to ID 1, Limit generator 2 to IDs greater than 1
  • Add empty segment with 15cm padding to start and end inputs of generator 2.
  • Add a conditional operator to the empty segment which tests true when Material ID equals 2
  • All segments have their Alignment options set to Automatic. I used the Generator's Y offset mode to position them correctly in relation to the spline.

I hope that helps. If I think of a simpler way to solve this I'll post it here.

Thanks,

Paul
« Last Edit: May 05, 2014, 10:06:32 PM by Paul Roberts »
Paul Roberts
iToo Software

ChrisV

  • Newbie
  • *
  • Posts: 25
Re: corner elements - padding issue
« Reply #2 on: May 06, 2014, 09:04:53 AM »
Hi Paul,

thanks for the solution! more complex then I thought it had to be :). the minor caveat with that is that it starts getting unwieldy using too many ids for too many different things. currently I`m already using them to detect bend/curved segments and I use them to get controlled variations on evenly, start/end and corners. will have to test this with real assets, as it might overcomplicate the pipeline in the end. Nevertheless it's great to see how this can be made to work at all. Would be great if it worked something like: if there is a point defined as corner put a gap in on both sides with x amount of padding. on the other hand if it is bezier corner, put no gap in (using the defined bevel style) - (since the problem seems to be the gap, as detecting the angles is more of a straight forward issue... but then again since I can't wrap my head around it completely it might be more complicated to do it that way, if possible at all)...

Thanks very much again, I really appreciate you taking the time.

cheers,
Chris

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
Re: corner elements - padding issue
« Reply #3 on: May 06, 2014, 06:25:05 PM »
Hi Chris,

I thought it might be helpful to know for your pipeline planning that the issue whereby using Evenly segments converts splines from lines to curve has been resolved and will be available in the next update due to be released soon.

Thanks,

Paul

Paul Roberts
iToo Software

ChrisV

  • Newbie
  • *
  • Posts: 25
Re: corner elements - padding issue
« Reply #4 on: May 08, 2014, 07:06:42 PM »
Hi Paul,

thats awesome news actually! Our current test level contains so much railclone that optimizations like that will directly be reflected in productivity. Thanks a lot for fixing this and keeping me in the loop! Makes me feel really good about the decision to use Railclone in game production :)

cheers,
Chris

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1551
Re: corner elements - padding issue
« Reply #5 on: May 08, 2014, 07:18:41 PM »
Hi Chris,

No problem, glad to hear you're finding the plugin useful. I personally feel that RailClone has lots of potential in Game design. I look forward to seeing what you're up to  :)

Cheers,

Paul
Paul Roberts
iToo Software