New decimate

Update FANTASTIC




Hrmmmm… looks like this could be a temporary relacement for a Delaunay generator too. Time to test.

EDIT: Bah, unfortunately not :confused:

Seems amazing! Can’t wait to try

YES YES YES… yes :smiley:

What’s a Delaunay generator and what it does it do for 3D artists?

Delaunay is a method of triangulating surfaces with a random but even distribution of points and connections. It is used in production for cloth/skin/soft body simulations to give better results than a quad mesh can. A quad mesh (for ease of texturing) is then “wrapped” to the result of the Delaunay sim to get the best of both worlds. Visual explanation found here and here.

I’m pretty sure that Blender’s new decimate algorithm is supposed to keep as much detail as possible as long as possible, that’s why you would see varying amounts of edge collapse based on mesh detail. In areas like dyntopo sculpting where models often have tight edges, I don’t see how a Delaunay algorithm would be able to produce the absolute minimum amount of geometry while keeping the look of the model about the same.

Delaunay isn’t about decimation, it’s about giving a good distribution for simulation. I just thought this might be able to achieve something similar based on the bottom right image in the first post, but I’ll just have to keep 3DS installed for Garment Maker for the time being :confused:

@@m9105826

why don’t you use dyntopo to do that?
using the ‘constant detail >> detail flood fill’ option.

While it’s totally a cool new feature, we need something for game dev too. 2.74 suits game assets better because of less triangles generated. Should keep it as an option.

Btw, does new method keep UVs / vcolors / etc. after decimation ?

This isn’t a new decimate, check the commit.
https://developer.blender.org/rBaa54d93a29b3ed8525670ddb76b2d86ef091142e
It’s only a few lines of code to tweak on the existing method to reduce errors on flat surfaces.

Though I did investigate more advanced weighting for topology and the simple test just happened to work the best.

Theres a lot of room for better re-meshing tools, but its not likely they show up as a decimate option. We probably want some different modifier for that.

Oh, I see. Well, maybe a “LOD Tool” specifically designed for game dev ? :wink:

@motorsep. whats wrong with the current decimator for generating LOD’s?

Nothing wrong. Better (smarter) topology (especially on “hard” surface models), and less distortion on UVs and more accurate weighs transfer would be welcomed :slight_smile:

For example:

The top mesh is hand-optimized. The bottom one is Decimate modifier “optimized”.

It would be nice to have a button that add some polish after decimation level was chosen. This way artist wouldn’t have to fiddle with slider to find that most optimized “topology”, but rather get close to what it should be using slider, then press a button and bam!, a mesh that looks like hand-optimized is available.

Note I don’t mean for it to have proper loops and such. Just smart edge orientation to avoid long and skinny triangles as much as possible and the minimum tris on the flat surfaces (clearly can be seen what I mean on my example).

For organic meshes it would be nice to have some lower poly loops on joints, but I don’t think it’s possible and hand optimization will be always required. In this case I’d probably use weight transfer tool after tweaking decimated organic model.

@ideasman42 - I wanted to implement an addon that detects whole loops with smallest weight to remove - something that could optimize meshes after subsurf applied, but keep nice topology.
It could detect median weight for removal of all edges along the loop, or take a minimum of all edges, so if a loop defines an important detail along the way, it isnt removed.
I didn’t have time to do this work yet, so writing down the idea here.

motorsep - seems like for totally flat surfaces -> limited dissolve -> triangulate -> beautify ?

@pildanovak, a loop-based decimator could work well. In some cases this is ideal.

You could use quadric error calculation for this just as with the existing decimator, and accumulate the error cost of each. Then collapse loops with the lowest cost (as existing method does).

It seems that my proposal is more automated, thus desirable, as time = money. There are a lot of things could be done in Blender AA > BB >> CC >> DD >> … Z >> GOAL, when in real production world AA >> BB >> GOAL is what’s needed.

motorsep - well, I meant it the same way as what you say. the question was what a smart algorithm should do.

Whatever it needs to do to achieve hand optimized mesh as in my example :slight_smile: If I was a programmer, I’d probably found a way and made a patch. I am a designer / artist, so I provided example if what happens now, and how it would be nice for it to work.

the new decimate looks cool!

but I don’t know why when I apply the modifier take so much time, it looks like Blender calculate again the modifier before apply it.