Anyone have any optimization techniques for (non-Union) merging/combining lots of adjacent parts into larger parts?

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.

Thanks!

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.

You mean greedy meshing?

It’d be rounded, in my case, leaving a lot of unnecessary parts. Especially if I’m using something like a height map or another generation like this.


I’ve been manually editing these and just stretching out the parts to optimize, but it takes a really long time.

I believe so, I wasn’t sure what it was called.

Wait are you trying to do this in real-time, or just in studio to make a map or such?

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

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.