2
$\begingroup$

I'm trying to create a track for Assetto Corsa (a racing game) based on a real mountain road that's close to where I live. It's an ambitious endeavour, but I hope to learn a lot in the process - even if I won't eventaully finish the whole road.

What I've already done is: I imported an SRTM elevation file with this excellent plugin which turns it into a georeferenced mesh. I had to delete big parts of this mesh because it was huge, but now I have the mountain ready.

Next I imported an OSM file containing the road in question with a plugin written by the same author. Now I have two gereferenced objects which superimpose perfectly from what I can tell.

Perspective view

Perspective view with the road floating above the mesh

The problem is that, while the mesh is 3D and ready to use, the road is a 2D path. What I want is to have a 3D path of the road (with elevation) which I can then use as the basis of the road for the game as explained in this tutorial.

Top down view

Top down view

I think I can obtain this path by:

  1. Intersecting an extrusion of the 2D road path with the 3D mesh, but how do I do this? I went as far as creating the extrusion, but I don't know how to do the intersection.
  2. Using Knife Project to cut the mesh with the road's projection. Again, I tried, but Blender crashes, so I'm not sure if I'm doing it right.

Any help appreciated.

$\endgroup$
4
$\begingroup$

you can do that with the shrink wrap modifier as follows :

original mesh

enter image description here

enter image description here

Add the shrink wrap modifier :

enter image description here

and you will get this

enter image description here

if the road is not curved enough " didnt follow the mountain exactly " try to subdivide it before applying the modifier

$\endgroup$
  • $\begingroup$ don't use the subsurf modifier use the subdivide tool "w in edit mode" so you don't lose the details of the road $\endgroup$ – Chebhou Feb 5 '15 at 22:26
  • 5
    $\begingroup$ The Subsurf is the best way to go, you just need to change the method from Catmull-Clark to simple, in-order to retain details. $\endgroup$ – GiantCowFilms Feb 6 '15 at 0:08
  • $\begingroup$ Exactly what I was looking for! Thanks for your answer. But now I hit another bump in the road. Pun intended. :-) $\endgroup$ – janosrusiczki Feb 6 '15 at 12:20

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.