7
$\begingroup$

I created a terrain in blender. I have on it a base layer. The base layer comprised of two textures. These are a dirt and rock texture mixed together using another texture as a mask. On top of this texture I would like to create a road. I have another mask texture for the road. I am using tiling textures for the base layer, only the masks are non-tiling: they take up the entire UV space. The road also must be tiling somehow, I cannot create a 32k texture.

enter image description here

How can I have a tiling road texture follow a path so that it looks like an actual road? This is an example of a tiling road that correctly follow a path.

enter image description here

blend file textures are packed and set up is clear

$\endgroup$
  • 1
    $\begingroup$ I don't think there is a way to deform the texture like that. Your not just showing the road texture, you want to bend it to follow a section of the mask. I would make a small section of road then use an array and curve modifiers and shrinkwrap it to the terrain. $\endgroup$ – sambler Mar 6 '14 at 11:17
  • $\begingroup$ how do game engines do this? $\endgroup$ – Vader Mar 6 '14 at 23:06
  • $\begingroup$ Not game engine, 3d modelling. Not certain if you have to apply modifiers for the bge but it would probably help performance. $\endgroup$ – sambler Mar 7 '14 at 6:30
8
$\begingroup$

Create a small section of road.

enter image description here

Add a curve to define the path the road will follow.

enter image description here

Back on the road section, add an array modifier, a curve modifier and a shrikwrap modifier. You set the array to fit the length of the curve. Then it follows the curve and the shrinkwrap sticks it to the terrain surface.

enter image description here

Giving a final result -

enter image description here

The curve can then be hidden. Or you can apply the modifiers and join the road mesh to the terrain mesh so they are one. Applying separate materials to each section of mesh.

|improve this answer|||||
$\endgroup$
5
$\begingroup$

It can be done with Attribute node, using another Vector/UV coordinate to define the "road path".

Unfortunately, for complicated meshs like this terrain, it will take quite a bit of work to unwrap a specific UV set for this node. Also ,the result is not very cleaned up:

enter image description here

For a better UV set, you have to re-model the mesh and unwrap that part before doing so:

enter image description here

Considering the complexity for such work, I personally recommend to assign different materials for the road and terrain area, which can be controlled better (although not very good for fading material boders).

|improve this answer|||||
$\endgroup$

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.