Greedy Mesh Module Release

Greedy Mesh module

Today i decided to open-source of this Greedy Mesh module; a powerful resource that allows to improve performance by reducing the part count with a bit of math. This is mainly used for procedural generation, because in this process a lot of unnecessary parts are created resulting in frame drops and overall lag. However this can be used in others scenarios.

Instruction

1 : Insert the module in “Replicated Storage”.
2 : Add a script in “ServerScriptService” and type:

module.new(targetFolder, outputFolderName)

targetFolder = The folder that you want to greedy mesh: can also be a model i guess.
outputFolderName = Optional, the name of the folder the result of the greedy mesh will be parented to.

Thats it, lemme know if there’s any bugs!

A special thanks to @Elttob and Haloblox2000

10 Likes

I believe you forgot to replace workspace[“3D Done”] and workspace.Planet.

I could be wrong, but just letting you know.

You should also be setting .Parent last for extra performance:

Good resource though, after you fix some of these bugs I’ll try it out.

1 Like

Ohh i feel so dumb forgetting about this, thank you so much! Ill make sure that its fixed!

here’s the updated version.

1 Like

In what way can this improve the part count of a game? How does it exactly work?

Didn’t now about this… my module is pretty useless then…

By substituting a lots of small parts at the same height, for example, with only one big part

Ohhh I see… That’s a very clever way of optimizing!

That algorithm is a very good optimization for removing unnessary polygons!

I believe you forgot about this too:

Thanks for the feedback ill update the module right now!

Everyone thanks for the feedbacks! I fixed every major bug. Now the module is fully working. Also if the color of parts is random, don’t worry: go to the line 157 and change v.BrickColor to any color you want.