I’ve been working on generating meshes for the streets in Cryptovoxels. So instead of having one big ground plane, I’ll have geometry with a street, road markings, and a raised footpath on each side of the street. I have a json array with all the street coordinates in 2d, and what I’ve been doing is creating boxes that extrude those lines into 3d, then using CSG to merge the meshes and generate a city-wide streetmap. However, I’ve found this is far too slow to use in realtime, since the CSG merging seems to be o(n^2). So I’ve got two options:
- Precompute the street geometry and slice it into a grid of meshes
- Do something else clever I haven’t thought of
Is there some better solution to this that I’m missing?