0
$\begingroup$

Using this object as bevel curve, it is easy to generate railroad tracks. Now, how would you do add sleepers at regular intervals along the track?

bevel curve

$\endgroup$
  • 1
    $\begingroup$ with dupliframes for example? $\endgroup$ – moonboots Jan 25 at 20:11
2
$\begingroup$

Array modifier springs to mind as sleepers are somewhat of an array. It does however depend upon the way you want to extract (excuse my use of language, English is not my native language) your track.

If you intend to make some straight track, I would first create the tracks, 60 cm looks kind of right. Create a sleeper next and join it all as one object (sleeper as "root" works fine for me). I hope the included pictures enlighten you a little.

Base-unit

A straight track might look like this and can use an relative interval of 1:

Straight track

To create a curve, this method is to crude: you get a lot of jagged connection, though if the track is only a very minor part of your scene, it might work. I reduced the interval to 0.95 to avoid gaps in the outside curve.

enter image description here

As you may see from my examples, I replaced your nice track-profile with a fairly crude modified cube.

I hope this helps you a little, kind regards, Christiaan

$\endgroup$
0
$\begingroup$

Chaining the "Array" modifier and the "Curve" modifier solves the problem. The sleeper mesh should be aligned with its longest side in the y direction.

$\endgroup$
0
$\begingroup$

If you're being picky, and want continuous track and no curve-distortion on the sleepers.. you could use Dupliframes.

  1. Create the curve that will be the route
  2. Create a single curve (with two identical splines) that will be the profile of the rails
  3. Create a solid (cuboid) sleeper

enter image description here

Here, looking down in Z, the sleeper oriented as you would expect, with respect to the rail profile.

The objects are to scale with the route curve. Ensure CtrlA > all transforms are applied, and the objects therefore share a pivot point at the origin.

  1. Now Set the rail profile as the Bevel Object for the route curve in its Data > Geometry panel.
  2. Set an animation length of the number of sleepers you want to lie along the track
  3. Assign a 'Follow Path' constraint to the sleeper object Target: the route curve, 'Follow Curve' checked, Forward:Z, Up:Y. The sleeper should jump to the route. Do not hit 'Animate Path' for this method.
  4. At Frame 1 of your animation, right-click > keyframe the 'Offset' field of the constraint to 0, and at the last, key it to the last frame number.
  5. In the sleeper's Object > 'Duplication' panel set the duplication to 'Frames'.

Note that you can not key the 'Offset' field if the sleeper 'Duplication' is set; put it back to 'None' to make revisions.

You may need to select a sleeper, and go into a Graph Editor window to set the animation curve of its constraint offset to Linear, to prevent an ease in and out of the number of sleepers at the beginning and end of the route. Select its 2 Keyframes, and hit T > Linear.

enter image description here

To make the Duplis into instances, you can hit CtrlShiftA > 'Make Duplicates Real'

It's possible this method is too much fuss for the difference it makes.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.