I’m trying to make a system where you can draw a spline and it show the drawn spline and it’s borders, for reference it would be pretty similar to the Cities Skylines districts:
I tried test with Render Targets, it kinda worked but the texture is 8192x8192 and it’s already warning about VRAM usage (~256mb now) and it would probably need a bigger render target, so what would be the way to achieve this effect?
Your best be would be simple procedural mesh that fans out from the middle of the area to the specific points on the outlying path (that could be built with quads).
You could do render targets but you would need to reduce the resolution drastically.
That’s one way, my only concern is that as it should also follow the terrain it has some complexity to it, as I would probably need to split the spline into many triangle to have it smoothly follow the terrain, also considering that the generated spline is probably not convex, which may be feasable but I wonder if a material only approach would be more appropriate in this case
Ok so a deferred decal can do something similar in unreal though I’ve never tested if it can be used in combination with an RT. Ok just checked, yep it can be used in a combination
Decals have their extent. It’s a box that can have varying side lengths that is projected onto the underlying area. You would have to extend the box dynamically with each outer stroke and then do the rt scaling with it, or go the route of a couple of smaller decals and split it so that culling could optimize it.
I think it would make sense to have many small decals, would be easier to manage too, as each spline represents a separated zone, but the decals are basically projected textures, right? so I would end up needing the Render Targets anyway to make custom decals (custom textures) at runtime, right?
if the shapes repeat then you would have predefined segments that are just textures. You could then build up the decals from corners & wall combinations