Itoo Software Forum

Author Topic: controlling a length of bridge in between two road sections  (Read 716 times)

EB4448

  • Newbie
  • *
  • Posts: 7
http://i.imgur.com/DQ5eYBZ.jpg

Hello again. I previously posted a question about bridge support placement here http://forum.itoosoft.com/index.php?topic=2922.0 and now, I'm trying to achieve a certain level of control over the overpass bridge that runs above the support. In the image above, i have a section of the curb used on the bridge. The 'normal' road sections are in blue and the 'bridge' road section is red. Using one railclone object (and any number of generators within), i'd like to have two numeric parameters control the start and end points of all bridge elements between road sections.

When a red bridge section starts, this would mean a blue road section ends. and when a red bridge section ends, a blue section starts again.

I created the image above with three generators, so the final result might call for something similar. I'm just not completely certain how to feed the numeric parameters into the generators. perhaps they would connect to the padding of the generators somehow? I thought maybe a numeric parameter could connect to the padding of one generator and then connect to an arithmetic operator (which somehow would minus the numeric parameter input from the total spline length) that then feeds into another generator's padding? i know it's possible to just use spline mat id's but i'd prefer to put the control in the railclone object itself for flexibility. any help would be appreciated or approaches that are different from what I suggested.

Again, my only concern is having two numeric parameters that control the start and end points of the bridge section within the road. Thank you

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1490
Re: controlling a length of bridge in between two road sections
« Reply #1 on: June 25, 2015, 11:15:27 AM »
Hi,

For these purposes I would suggest you to combine two Conditional Operators using the Position condition (defining the Greater than & Less than range).

This is by default using percentage - you can define, that the other segment will be placed when the Position will be Greater than 20% of the total length of the spline and Less than 80% for example.

Anyway, as this parameter is exportable you can use the Arithmetic Operator driven by the Expression (for From Start (Input1/XSplineLength)*100 and for From End 100-((Input1/XSplineLength)*100)) to calculate these percentages automatically from values defined & easily editable directly from the UI (using the Numeric Operator). Feel free to check attached sample scene.

Hope that's you are after, but feel free to upload your scene for further clarification.

Best regards,

EB4448

  • Newbie
  • *
  • Posts: 7
Re: controlling a length of bridge in between two road sections
« Reply #2 on: June 25, 2015, 05:24:52 PM »
I can see how this might work but when I plug the arithmetic operator into the conditional operator, 3ds max crashes. very strange :/. Also, when I open the scene you provided, it appears for a moment and immediately crashes in the same way. I'm using 3ds max 2012 and railclone 2.4.7. Any idea as to why that happens?

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1490
Re: controlling a length of bridge in between two road sections
« Reply #3 on: June 25, 2015, 05:58:55 PM »
Hi,

The scene was created in newer RailClone version (2.5.0), but as I've tried opening on 2.4.7 works fine here. Attaching version saved from that release to check if that helps. As you've mentioned:
Quote
"... when I plug the arithmetic operator into the conditional operator, 3ds max crashes."

Would you please save and send us the minidump file of the crash? (You can get the minidump clicking "View report details->View report contents", checking the path of the "3dsmax_minidump.dmp" file and making a copy of it, before closing the 3ds Max Error Report window). Hopefully, it'll point to the problem source.

Generally, we always recommend to use the latest version released.

Best regards,

EB4448

  • Newbie
  • *
  • Posts: 7
Re: controlling a length of bridge in between two road sections
« Reply #4 on: June 25, 2015, 11:13:08 PM »
3ds max doesn't give me an error report window at all.... it just disappears and closes without any message of any kind. I recreated the same scene based on your post and it still happens the same way. I also don't have access to a higher version of 3ds max other than 2012 so that might be related. I'm including the test scene I created if that helps any

Michal Karmazín

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1490
Re: controlling a length of bridge in between two road sections
« Reply #5 on: June 26, 2015, 11:35:07 AM »
Hi,

We've found that the problem is caused by evaluating the Expression used by the Arithmetic Operator on 3ds Max 2012 / 3ds Max 2011 (on 3ds Max 2013 and newer versions it works well). Actually, we're working on "internal expression evaluator" for future releases, but that'll take time to develop. Meanwhile I would suggest you to control those Condition Operators by percentage (without need to link Expressions driven Arithmetic Operators). Attaching sample scene.

Best regards,