Tesselator Quad-Remesher


(Jeacom) #63

Remade the code from scratch and added support for topology guides.
Before, I was crying about having to learn numpy but now its being quite fun to play with it
Damn array slices! They look like puzzles.

Anyway it is still quite slow though, I guess, this will have to work on a decimated model, I hope this isn’t an issue.

And just for sake of curiosity… Would it be a settings’ overkill to allow custom trace colors?

(ambi) #64

Really cool work. Can’t wait to see what you will come up with next! :smiley:

(Bohdan Lvov) #65

so… how is it going?

(Jeacom) #66

@ostapblender, I am researching a new algorithm, I have no background in calculus so reading those papers is somewhat hard for me.

I guess I will compile C++ dynamic link libraries for windows and linux to wrap the most expensive parts of the code, which is the BVH-Tree and all the 4-RoSy smoothing stuff but before I have to learn how to implement a BVH-Tree :sweat_smile:

I could just use some pre-made libraries but I dont like the idea of selling a code that I didn’t wrote myself.

(Bohdan Lvov) #67

wicked! maybe you can do it forcing user to install them manually, as was done in D-Noise https://t.co/8jnC4wyXCk

(Jeacom) #68

The 4-rosy smoothing I can already implement since its just comverting from a numpy vectorization to raw C++.

But I guess there isnt a third-party BVH-tree library that I can tell the user to simply install, I am using the one that comes shipped with mathutils in blender but the python wrapping makes it slow for thousands of sampling operations, I guess it wouldn’t be different if I use a third party package.

It would be a different history if everything be done in C++ and just pass the results back to blender.

that’s why I what to implement it myself and make it suit the addon’s needs.

(Jeacom) #69

Attempting a different approach for a smarter direction field estimation.
This crazy algorithm looks like that:

  • select main directions based on mesh curvature.
  • randomize everything
  • smooth everything to get rid of the random noise
  • add more random noise
  • Repeat one bazillion times

(IPv6) #70

Just bougth addon… Thanks, really usefull!
One request though - is it possible not to snap to first mesh in case there is many meshes in object? Initial particles distribution use whole mesh, but then all the process snaps to first one… I mean better to “union” meshes (NOT with booleans) with remeshing. much more usecases! :slight_smile:

(Jeacom) #71

Before tesselator used a custom direction field computation algorithm, a pretty fast one.

But now I am trying a approach more similar to instant meshes but slightly simplified and with addition of a random noise to it. my theory is that the instant meshe’s smoothness energy is so efficient at selecting the best directions that adding random rotations to the vectors makes it behave like a evolutionary algorithm.

Some comparisons I did.

(Jeacom) #72

I guess the next step is to understand and implement the curl correction I found in the section 4.1 from this paper. Understanding is the though part LOL. If someone is a computer scientist and can read those crazy math formulas, I accept help :sweat_smile:

(ambi) #73

Really nice work. For me, the mesh doesn’t have to be perfect. It can have some nasty poles, but having an ability to paint strokes to guide fields (for example with grease pencil) and proper topological symmetry would be killer features.

(kabu) #74

You should use a predictable mesh for testing, something you can expect always the same number of poles/singularities… this way you can exactly check the outcomes…
Something i guess like a cube with rounded corners should do… have something with no singularities then generate some noise and perturbations…
just thinking up…

(Bohdan Lvov) #75

Looks exciting! Can you test with this mesh?
Old version gave me some abominable result with a different settings, chopping off the face and jaw of poor thing


(Jeacom) #76

I had to tune the resolution all the way up to the width of the fins, the problem is that details smaller than the size of the particles are always hard to remesh

but the jaw is still to thin, so it got messed up.

(Bohdan Lvov) #77

Holy cow, that’s still brilliant! Much better than it was.

(Jeacom) #78

Oh, well, thats intresting actually.

Since the new cross field algorithm is basically based on extracting directional information from random noise, it’s actually quite smart at dealing with well, random noise LOL.

(Jeacom) #79

Another test after some changes.
Now particle growth starts from field singularities and implemented Runge-Kutta and Midpoint methods for field sampling.

Sadly the difference is minimal.

(Jeacom) #80

Hey guys, quick question, if I get to implement a improvement to automatically scale the particles that could remove like 70% of the poles but takes two or three times longer to compute, would it be fine?

(Bohdan Lvov) #81


Everything to defeat the poles!

(Peetie) #82

Things like extruding, inset and edgeloop is what you do often and you don’t want delay on it. For remeshing it’s another story I suppose. It’s not something you need to do very frequently on the same mesh. So for me I go for defeating poles as well.