Hey, so I’m trying to do sort of noise part generation, but the problem is it creates lots of parts for each pixel, and I do want finer 1x1x1 parts in the detail, but for all the adjacent parts that share the same height and size, I want them to combine into larger parts for optimization, as you can’t tell the difference anyways.
Sort of like combining all of these into long strips or just one square part.
I tried doing some sort of system where after generation, each part is looped through and raycasts forwards to delete adjacent parts and stretch forward, but I’m unsure how to get it to stretch itself until there’s no more neighboring parts.
What do you mean by noise part generation? As in every part should have a different, noisy height? Elaborate. If the picture isn’t of the final thing then show that as well.
If it’s fast enough to do real-time, maybe. But the primary purpose was to just to pre-generate terrain for the map to copy and paste and not generate real-time.
Oh actually, nevermind, there probably isn’t a much better algorithm, so it doesn’t matter much.
The greedy meshing approach is described pretty well here imo