2
$\begingroup$

I use Array & Curve modifiers to create roads & surrounding terrain for my racing tracks.

This is the model that gets instantiated (horizontally) along a curve:

enter image description here

Because the instantiated object is quite wide, I get a lot of overlapping geometry in every sharp turn (especially in so called "hairpins", where the road turns at 180 angle), like in this example: enter image description here

I can deal with this manually by selecting & removing the superfluous polygons, merging vertices (using vertex slide + automerge, merge by distance etc.), cutting new topology etc. And after some hours I finally get some usable mesh like this:

enter image description here enter image description here enter image description here

As you can imagine, this workflow isn't especially effective and the results are also far from being perfect, so I would like to ask - does anyone have an idea how to automatize this tedious fixing process? Any addon, modifier that could be useful?

Thank you

$\endgroup$
0

1 Answer 1

3
$\begingroup$

I see you are using a blender version <2.80 but if you think this method can save you some time, you can always do it in a newer version and export the mesh in an earlier version.

We will use the "Weld" modifier introduced in blender 2.82 and its new "Vertex group" option. Basically the weld modifier will merge the vertices under a certain threshold distance. We will use a vertex group only in the outer area of your road, which has more sparse geometry, because else the main part of your road will vanish.

So basically, add a vertex group and set the value to 1 in the outer part, which bends atrociously when the curve turns. Set the central part to 0.

enter image description here

Add a weld modifier after your other modifiers, set the vertex group to the one you created. Tweak the distance and set the duplicate limit to 0. The weld threshold has a soft limit to 1 but you can enter a higher value.

enter image description here

Result :

enter image description here

This is not the prettiest mesh, but a big part of the job is done and it is non-destructive.

Edit : I noticed that this doesn't work for U-turns. I propose a slightly different method but the results are a bit mixed. We will mask the faces which are overlapping on the road.

  • Add a plane, make it follow the curve with an array and curve modifier. Hide it.
  • Back to your road, add a new vertex group. Name it "Mask".
  • Between the "curve" modifier and the "weld" modifier, add a "Vertex Weight Proximity" and a "Mask" modifier.

  • Set your new modifiers like so (don't forget to invert the vertex group in the mask modifier with the double sided arrow on the right of the field :

enter image description here

The result will have a few artifacts but it is much more usable than before :

enter image description here

To try to correct the uvs, add a "UVProject" modifier in the end of your modifier stack, and set it to your UV map, and use your curve or your arrayed plane to project :

enter image description here

I assumed you used different materials for the road and its exterior but you may have a visible seam there... I don't know much more about this.

Note : the "vertex group" option did not work in my 2.82 version although the field is here, I had to use a 2.83 beta version, if it was a bug it was fixed by the team inbetween.

$\endgroup$
4
  • 1
    $\begingroup$ Nice :) Could not be a problem destroied UV? OP use unwrapped texture. Or does it be repainted after all anyway? $\endgroup$
    – vklidu
    Mar 8, 2020 at 18:47
  • $\begingroup$ I didn't consider this ! You are right. You can use a UvProject to try and fix it, but then you lose the radial gradient from the road, I will add a section to my answer $\endgroup$
    – Gorgious
    Mar 8, 2020 at 19:03
  • 1
    $\begingroup$ Thanks for the confirmation that vertex group is buggy for weld in 2.82, by the way. $\endgroup$
    – lemon
    Mar 8, 2020 at 19:07
  • $\begingroup$ Sorry guys - thank you for trying to help me, but while it looks it technically does the job, the resulted topology is unusable for me - compare it with my manual method. $\endgroup$ Jul 26, 2020 at 15:51

You must log in to answer this question.

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