Itoo Software Forum

Author Topic: Auto scale bridge pillars to an uneven ground plane.  (Read 1011 times)


  • Newbie
  • *
  • Posts: 20
Auto scale bridge pillars to an uneven ground plane.
« on: December 30, 2014, 03:11:48 PM »
In the bridge tutorial, you can scale the pillars down to the ground using the Arithmetic “XplineCoords” function. But what do I need to do if the floor isn’t flat but hilly. Is there a way to scale to a ground plane that’s uneven?

One thing I can think of is to duplicate the spline, and model the beziers conforming the ground plate, scatter a dummy object and use that XplineCoords .z data to compensate the pillar scale. But without trying I think this is not going the work because the length of the spline differs from the master spline(Going up and down the hill) and the dummy object won’t be exactly below the pillars anymore.

Anyway, I was wondering if there’s a way to scale the pillars to an uneven ground plane?
« Last Edit: December 30, 2014, 03:32:54 PM by satoer »

Paul Roberts

  • iToo Software
  • Hero Member
  • *****
  • Posts: 1517
Re: Auto scale bridge pillars to an uneven ground plane.
« Reply #1 on: December 31, 2014, 11:44:07 AM »

Unfortunately at present this is a tricky problem to solve. Ideally we would add a new generator that uses two parallel splines, this is on our to-do list but there are some technical issues that must be ironed out before we can implement it.

In the meantime there are a couple of possible workarounds that may be useful. Firstly, if the geometry allows it, you can telescope the top section of the bridge inside the bottom section. In this example the top section works exactly as described in the bridges tutorial but the RailClone object's z position is moved so that the geometry continues through the ground plane. The pillar base is then added using the same spline but with a surface to position it on the Z Axis. Because this uses the same spline to position both the top and bottom of the pillars, they shouldn't have any problems lining up.

If you cannot intersect the top and bottom of the pillars then the second alternative is to use the technique you suggest.

Using two generators with the RailClone objects Z coordinate between the top and bottom of the bridge you can scale the two halves to meet in the middle. Because of the different spline lengths it will be necessary to position the pillars by adding them to the Corner input instead of Evenly. In this way you can manually add a pillar by creating a vertex of a given type. I would do this for the top spline first to create the correct position and path for the bridge. When this is correct, clone the spline to create the bottom and move the vertices constrained to the Z axis down to the ground plane. Because the vertices line up in the top view, the pillars should align.

I hope this helps to solve your problem, I've attached a simplified demo file to help illustrate. If you have any further questions please let me know.


Paul Roberts
iToo Software


  • Sr. Member
  • ****
  • Posts: 406
Re: Auto scale bridge pillars to an uneven ground plane.
« Reply #2 on: December 31, 2014, 12:28:18 PM »
Phenomenal !


  • Newbie
  • *
  • Posts: 20
Re: Auto scale bridge pillars to an uneven ground plane.
« Reply #3 on: December 31, 2014, 02:47:12 PM »
Hi Paul,

Thanks again for the solution, although it isn’t a solution for my particular case because the pillars needed to scale between the foot and the top. Tried adjusting the second solution by using the arithmetic xspline data from the lower pillar added to the scale of the top pillar. But this seems impossible because of the way the internal calculations of railpro works. It’s a bit vague how the Arithmetic operator gets its input data: Without any inputs it still knows data from the attached generators even though its attached at the end of the sequence.
Anyhow, thanks for the reply. Again, I really appreciate the comprehensive support over here . The easiest method for me is pacing the pillars by hand, no big deal. Next time I design the pillars to drive through the ground, this seems the easiest and best looking solution :)