How can I get a racing line?

Hi,

I’ve made a simple road like this:

Is it possible to make a racing line from the road as a Bezier curve or just vertices?

If it helps. I’ve applied the modifiers. Now I have a mesh road. I’ve outer vertices. I could also make center vertices.

Thanks in advance.

You could try geonodes and shortest path, but I dont think its going to give the racing line, without some more work…

2 Likes

you can use a texture:


texture_on_curve.blend (103.3 KB)

Thanks for the answers. The best solution which I found is to do the racing line by hand with a Bezier curve. Never thought that building a racing line would be such a big topic.
:slightly_smiling_face:

I was trying to find the same think and also ended up here.

This is what I got so far. I created two identical paths, but I ajusted the weights for each control point in the second one so it’s more os less proportional to the degree of the curve.

A nice way to find that value is to modulate the weight by the apex angle. It’s inverse, the greater the angle, lower will be the weight:
Captura de tela de 2022-12-10 20-14-26

The result is a very angular and fake racing line. But if we scale all the weights up, if starts to resemble more of a real racing line. Something that I noticed is that if you down do that scaling, the racing line resembles a F1 line. So you can try to scale it up for a more safer feel or scale it down for faster feel.

If the original spline sits on the center of you track, this line will move around it in a way that looks more realistic. But I’m not sure this is an accurate aproximation of the real thing.

Good luck

2 Likes

The result: I had to make this second post because my account is new and I can only send one picture per post.

Another thing, if you move the position of the second path you can move the path earlier or later. The point of the B-Spline control the properties of the apexis of the curves. Changing their weight and position can help you create the racing line faster.

The real thing depends on many more factors like the car the engine position the width of the car the camber of the track, none of which we know here!

So there is only guessing and maybe an aesthetic solution?

2 Likes

It depends on the result you are trying to achieve in the asthetics. I’m trying to find a way to rotate the car body to convey the inertia of the car. For me, if it feel fast it’s good, I don’t think people will notice it’s a “bad racing line”

You should be able to do it with color ramp if I’m not mistaken. Don’t quote me on that though.

I think I got the nodes setup.


It does most of the things that I talked earlier in the post, now I want to add some controls for an apex offset, so it gets easier to set it earlier or later.

I don’t think I undestand what you said. Where I would use the ColorRamp?

1 Like