Semi-automatic retopology tool : prototype 3

These 3 hands were retopologyized in 5 mins, this addon is just a prototype and is not released yet.

Update:
That’s how the workflow works currently:

44 Likes

Yes. Magic. Of course.

Looks awesome.

That’s really cool… will it work for a whole body?

I think so, the only drawback is speed, the more vertices a mesh has, the slower the simulation runs.
but I think we can get away with that by splitting the retopo mesh in multiple smaller pieces.

Looks nice!

Is it possible to set up corresponding pinning points on both meshes like ZWrap? Or is running the simulation and fudging the topology in realtime the only way to do this?

1 Like

for 2.79 too please, its for free i guess?

Looks great, I’d buy it!

Maybe there could be a way to semi-automate splitting and merging heavier meshes based on UV islands or vert groups? Just trying to think of production examples with meshes in the 1-300k polygon range.

1 Like

I’m wondering what’s the performance of this? Thinking of using Numba or Cython?

Answer: pretty poor performance, even with numpy.

Yes, I’m thinking of using cython.

well, I’ve added pinning points already, (the empties) I dont see a point on setting them twice, I preffer setting once and moving them, to the target position,

humm, sounds like a good idea, if I manage to place the seam vertices first them fill each island seppararely.

1 Like

If Blender had a more solid UV based bind or a UV based vertex position transfer it could even be used in combination with generating a lowres driver mesh/cage for the simulation, and only start actually simulating the highres parts once it’s already in a good spot.

Just thinking, with a highres character model even the seam verts could add up to a large number, but in most cases like cylindrical parts of the body you wouldn’t need a lot of vertices to roughly follow the curvature.

1 Like

This is fantastic! Real-time interactive Wrap3 inside Blender. Great work. Looks very promising.

@dan2, you are a genius!
I think your idea is totally doable, if I manage to take in account only a few sparse vertices at the beginning and move the other vertices accordingly it could run proportionally faster, maybe I can use the unsubdivide operator to make a proxy plus some barycentric transformations for moving the final vertices, it would run way faster.

Thinking a bit more, maybe thats what wrap3 does with that “subdivision” thing.

Yes, exactly - and it goes in iterations automatically as well.

The same way you’re adjusting the stiffness of the simulation, wrap would set a higher stiffness for the first iteration, and gradually lower the stiffness as the iterations go up, at the same time increasing the subdivisions. 2 helpful settings you can set beforehand - the hand is a good example. Use 3 levels of subdivisions, starting and end stiffness/smooth value of so and so, and make this evaluate through a number of iterations.

Also, for the pinning, it could also work like wrap’s point selection node. You set a pin on your topology, an other one on the scan, do a copy location with a hook, and it’d move the finger tips automatically. It’s just a matter of creation order, making sure the user doesn’t create the correspondance points (empties) randomly, but in a way so you can create the relations in the script.

Thinking about it you can create a button like “create points on source mesh” which let’s you place empties, display their names in the viewport, another button “create points on target mesh” with a tooltip “create them in the same order as on the source” - after that it’s just a matter of setting up the corresponding copy transforms and blending in the influence.

I see where you are going into.
I am not sure if I can make this simulation fully automatic, sometimes it doesn’t go to the right place and I have to manually move it, that’s why I added the option to grab the mesh with the mouse.

image

I am afraid it’s not very reliable for a fully automatic matching, so I made the pining be more like marvelous.

Yes, it’d probably be best to keep the option to adjust settings by default.

I was just thinking since you’re pinning the fingertips in every case, might as well specify those points to be moved automatically, based on a selection order. Kinda like this,

only instead of a rigid transform it’d be using a hook and a copy transform to move the pinned point to it’s destination. The I’d just key the stiffness, smoothing and target snapping values to see if there’s some coherent values that work best, maybe even store those as a preset.

Anyway, looks like a really handy tool, can’t wait to give it a try! Lots of potential in there as well.

1 Like

I like your idea, but I don’t know how to align a point set like this, (some sort of funky matrix magic?)
To be honest the addon I’m implementing is very simple, only a few hundred lines, I don’t deal well with harsh concepts like least squares and energy minimization, so I’ll do my best but am not sure if I’ll succeed.

I wanted to go the simpler way and rely on the user manually providing main alignment while the addon tries to move and side the topology around as the user wishes.

I was thinking more in terms of enabling an option to select source points, that’d put them in a list in the given selection order, enable another option for the target points, use the same selection order to select the same number of points on the corresponding parts of the target mesh, and just create a copy transforms constraint between each point pair with a value of 0. Gradually ramping up the value would bring all the empties which act as a hook driver to their destination on the target mesh - once the mesh is in place they can be deleted, or kept as pins. The mesh could still be manipulated to fine tune the loop positions on the surface. The main reason I though of it is that if I have a full body mesh with 10 fingers, 10 toes, a face, relying only on direct manipulation could take some time.

I get what you’re saying though, and I like your idea, it’d be a really cool feature to have! Just couldn’t help brainstorming :smiley:

ah, right, I though you were talking about that mesh alignment thing, maybe I could implement but I’m not sure.

the ordered points are entirely doable tho, maybe I can make some custom drawing just like those numbered points on the video.

1 Like

Yes, I was showing that only for the point selection, going into non-rigid ICP’s might be overkill :slight_smile:

1 Like