Chalk lines as borders on uneven terrain?

Hello, Unity beginner here :slight_smile:

I want to create game environment that looks like racing track but is drawn with chalk on pavement (something like Micro Machines). I’m on the modeling side, my friend will do the programming part. When surface is flat I can model a couple of polygonal elements (straight line, rounded corner etc) and used them to build my track, that’s easy.

But I have no idea how efficiently create track on uneven surface, like bumpy pavement blocks, ramps etc. I need a method to draw lines that will align to surface underneath (like decals), will be textured with transparent shader and will interact with player model (when he crosses the line he will be teleported back to start line or something like that).

Basically it would look like this (outer lines only, without inside color):

Any method to do this?

You could use projectors, where you use textures of the straight lines, corners, etc. as tiles. The thing to keep in mind with projectors is that each one causes any objects it touches to be drawn again, so for performance reasons you’d want to break the level up into smallish pieces to prevent the entire thing from being drawn over again many times because of all the projectors.

–Eric

Thanks for answer, I’ll give them a try :slight_smile: