Drawing textured/dashed lines in 3D?

Godot Version

4.2

Question

dashed-lines

Hi! Recently moved from Unity to Godot and loving it.

One thing I’m struggling to figure out is the best way to draw textured lines (see screenshot, ie not just simple lines Mesh.PRIMITIVE_LINES) in a 3D scene. These maps are procedurally generated so the curve and geometry cannot be predefined in the editor. Ideally the lines are in true 3D space so would be occluded by map geometry if applicable.

Any help thinking about a) the curves themselves; and b) how to texture/render/generate the visuals would be greatly appreciated!

Pretty much this, but might be a simpler setup, but you’d loft a mesh across the Path3D, then on that mesh if you got the UV’s right, you could have any texture on it with some opacity setup to do any sort of visuals you want.

That Path3D could be made at runtime too, the points, the lofting, etc.

I think the one trick might be how to make sure that the sorting is right if the pathway geometry is really close to the ground.