Home Technical Talk

Help creating a racetrack using splines

polycounter lvl 3
Offline / Send Message
TheAxiom polycounter lvl 3
Hello! I heard of a method recently, that I really want to experiment with further, but I'm having some trouble getting it to work efficiently.

The method involves creating a spline (I use a NURBS curve) to form the basic shape of the track. Then creating, from a spline, the shape you would like the track to be, then finally selecting your track and using Loft > Select Shape to conform the racetrack to that shape.

1xiX7by.png

That part is easy and it's all instanced so I can change the splines to modify the look of the final result any time I want.

But this is where I get stuck. I am unsure on the best way to cut the track in to pieces and have different parts of it use different track shapes, so I could have a tunnel, for example.

nXLUpC0.png

Here's a closer picture. Thanks!

Replies

  • ed_3D
    Options
    Offline / Send Message
    Thing is, there's probably no point cutting it into pieces for the track as you have it at the moment, because you'll end up with so many unique pieces and it might be better to just have the whole track as one single mesh

    If you really need to have it in pieces though, then you will probably need to modify the track to something where e.g. green = straight line piece, red = 90 degree corner piece, orange = sharp corner piece, blue = slightly curved

    frRWiD5.jpg

    or something in those lines, and then you should be able to re-use those pieces to build the track that you want inside the engine

    Also I guess it depends on the engine as well, e.g. in Unreal to create a simple road, I was able to get away with having just 1 straight piece and then attaching it to a spline created using the landscape spline tool, which basically duplicated and deformed the piece to follow the spline.

    I don't really have much experience working with roads/tracks by the way, and this is all off the top of my head, so I might be wrong :)
  • 2cat
    Options
    Offline / Send Message
    2cat polycounter lvl 5
    If you're using a Loft, as you are, then you can assign different cross section splines between steps of the layout spline. With his you can create a "regular" piece of track, road curves with camber, tunnels even if you will, as many different cross sections you can think of and need.

    It's under path parameters, pick shape I believe.
  • Bruno Afonseca
    What 2cat said, you can have multiple loft profiles. I use it for cambering on those examples, you can see the 3 loft variations:

    BrunoAfonseca_Terrain00.png
    BrunoAfonseca_Terrain01.png

    I recommend you to run a "normalize spline" modifier on your track spline though, it'll break your spline in equal segments and makes it way easier to control.
  • TheAxiom
    Options
    Offline / Send Message
    TheAxiom polycounter lvl 3
    2cat wrote: »
    If you're using a Loft, as you are, then you can assign different cross section splines between steps of the layout spline. With his you can create a "regular" piece of track, road curves with camber, tunnels even if you will, as many different cross sections you can think of and need.

    It's under path parameters, pick shape I believe.

    I know how to use pick shape, that's what I'm doing, but I can't figure out how to use pick shape for individual sections like you said. I have to select the entire track first, not just a section. Hrmm.. :/

    I was able to cut it in to pieces and just join them together, but there must be an easier way.
  • Bruno Afonseca
    Use this to walk down the spline and pick shapes as you go:

    Loftprofiles.png
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    I do wish they'd make it more accessible, though - one can dream!
  • TheAxiom
    Options
    Offline / Send Message
    TheAxiom polycounter lvl 3
    I'll try that out, thanks Fonfa! (: You are the bunny lord.
  • Xoliul
Sign In or Register to comment.