2
$\begingroup$

I'm making a animation where a cart on a rail track is going downwards a mine. I made a curve outside geometry nodes and then started to procedurally generate things on it. The trouble is that at some places, the distance between the rail tracks reduces and thus the wheels of the cart appear to be flying and not following the cart. Further, The tracks are placed on U shaped supports that twist weirdly in between the curve. Please check the screengrabs I've attached. I am also adding the .blend in the post. enter image description here This is the overall shape of the curve and the track that follows. enter image description here This is how the track begins, this is the intended distance between tracks. enter image description here Somewhere along the way, distance between the tracks drops down and thus a cart passing this would appear floating and not "on track". The distance between the tracks increases again further along the curve. enter image description here The element that's looking out of place in this image is one of the supports I placed under the tracks, now coming apart in between at one place, it aligns again later on in the curve. enter image description here Nodes that make up the tracks and the supports. This is a part of the node tree.

What am i missing ? I'm trying to generate this entire thing procedurally on one curve. Would love some help and guidance.

$\endgroup$
2
  • 2
    $\begingroup$ Curve to Mesh can use a profile curve that has multiple distinct offset curves within it. If you have a single curve in the center of your tracks, and then use a profile curve with two circles separated across the origin, you’ll get a pair of rails/tubes consistently equidistant. $\endgroup$
    – Phrogz
    Commented Sep 19 at 5:32
  • $\begingroup$ Got it. that seems to be working as of now. Thank you $\endgroup$
    – samar
    Commented Sep 19 at 5:42

1 Answer 1

2
$\begingroup$

The Curve to Mesh node (or curve Bevel Object) can take a profile curve with multiple separated parts. If you have a single curve in the center of your tracks, and then use a profile curve with two shapes separated across the origin, you'll get a pair of rails consistently equidistant.

one curve with geometry nodes using Curve to Mesh to bring in a profile with two circles, producing offset tubular rails

However, I can't figure out how to change the material for the left rail and right rail independently. If this is important, you can use two separated profiles, offset from the origin:
Geometry node using two Curve to Mesh nodes with separate profiles and materials

$\endgroup$
1
  • 1
    $\begingroup$ Thanks a lot. As per your earlier comment I have found success in your method. Only change is that i made the profile curve inside geonodes itself. And its working perfectly. Thanks again $\endgroup$
    – samar
    Commented Sep 19 at 15:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .