You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm looking to implement decals and paths on the terrain - essentially simple path/road textures which are blended in place of the strongest texture at that particular point. The road position would (ideally) be defined as a series of x/z positions and then mapped in the shader or projected. I need the texture to rotate along the path of the road, as the texture includes white lines/tyre ruts/etc. I don't need physical shapes for the paths (except the heightmap level). To illustrate the sort of thing I want:
I don't want to add meshes for the roads/paths if I can help it because it would add a lot of triangles and be full of Z-fight errors. I'm also happy to get stuck in and experiment. But I wonder if I could ask if you had any advice about how best to implement this sort of behaviour.
My initial thoughts were to add the road texture as one of the TextureArray layers, and then blend it using a splatmap. However, I can't figure out how I would progressively rotate it (in the xz axis) to create curves in the road. I thought I could use a spare layer of a splatmap to hold a rotation in radians for the texture to be rotated at that vertex, but that wouldn't work for multiple roads because of the tiling:
I also wondered about the Godot decal plugin, and stamping road tiles like a decal (I could live with that being slightly blocky) but that only seems to work with meshes. Perhaps what I want to do is too advanced, and I shall have to settle for generating meshes in Blender. Or, perhaps there is another way to project the texture on to the terrain to create decal-like behaviour, in a separate shader.
Any ideas are welcome!
The text was updated successfully, but these errors were encountered:
That would be nice to have, but I have no time dedicated to work on this currently.
I wonder if I could ask if you had any advice about how best to implement this sort of behaviour.
I also don't know how it would actually be rendered. Only road systems I know still use meshes or at least some kind of extra drawing, and are a bit complicated, especially when having to cobble it up with GDScript.
My initial thoughts were to add the road texture as one of the TextureArray layers, and then blend it using a splatmap
That wouldn't work at all because that doesn't contain direction information and will lack precision, it would end up the same as yet another paintable ground texture, which is not going to give you the result you want.
I also wondered about the Godot decal plugin
No need for plugins, Godot already has a Decal node built-in. But for roads I'm still not sure how it would work. If your goal is to not create any geometry, you could eventually work out a solution without even touching the terrain plugin, by placing "road tiles" using decal nodes? But if you want full spline support with any number of bends and intersections then that's an order of magnitude more complex to implement.
I'm looking to implement decals and paths on the terrain - essentially simple path/road textures which are blended in place of the strongest texture at that particular point. The road position would (ideally) be defined as a series of x/z positions and then mapped in the shader or projected. I need the texture to rotate along the path of the road, as the texture includes white lines/tyre ruts/etc. I don't need physical shapes for the paths (except the heightmap level). To illustrate the sort of thing I want:
I don't want to add meshes for the roads/paths if I can help it because it would add a lot of triangles and be full of Z-fight errors. I'm also happy to get stuck in and experiment. But I wonder if I could ask if you had any advice about how best to implement this sort of behaviour.
My initial thoughts were to add the road texture as one of the TextureArray layers, and then blend it using a splatmap. However, I can't figure out how I would progressively rotate it (in the xz axis) to create curves in the road. I thought I could use a spare layer of a splatmap to hold a rotation in radians for the texture to be rotated at that vertex, but that wouldn't work for multiple roads because of the tiling:
I also wondered about the Godot decal plugin, and stamping road tiles like a decal (I could live with that being slightly blocky) but that only seems to work with meshes. Perhaps what I want to do is too advanced, and I shall have to settle for generating meshes in Blender. Or, perhaps there is another way to project the texture on to the terrain to create decal-like behaviour, in a separate shader.
Any ideas are welcome!
The text was updated successfully, but these errors were encountered: