[WIP]InstantMesher: automated export and import for 'Instant Meshes' (Windows/Linux)

Result from terminal


The ‘Launch Instant Meshes’ button opens the application but cannot open the .obj. When I press the OK button that’s when blender becomes unresponsive until the Instant Meshes app is closed

Interesting. That Blender blocks until Instant Meshes is closed is intentional. Otherwise Blender wouldn’t know when to re-import the obj, so it simply waits until you’re done with Instant Meshes (maybe I can figure out a way to work around that, somehow). The problem is that Instant Meshes can’t open the file, as you stated. Are you sure you have read and write permissions for that particular folder?
And for some reason this only happens with the GUI, but it works through the terminal(which is what is used when you press the “remesh” button in Blender)?

Thanks for trying again. I’ll continue to work on this some more and update the addon as soon as I’ve got a solution for the problem.

Hey teaLeaf, yeah, I am still working with these forums with the training wheels on. Though I have (officially) been here since 2010, but because I barely post (needing of moderators acceptance for post to go through being the biggest deterrent) my posts are way behind from my intentions. Anyone know how many posts I must achieve before I can post freely like normal humans? But, I digest…

I like your new iteration of code. I can see why you picked the Tool Tabs panels, but you might want to consider adding to an existing tab instead of your own tab for one tool/function. I see alot of people express concern for too many tabs needed for single functions. I alone have about twenty addon tabs condensed to about 10 through sharing tabs. I see yours as a great fit to the Retopology tab alongside Retopo-tools, Retopoflow, and etc. What do you think?

Regarding my measly added code (only a few lines, and a panel class), well, it’s pretty moot now with your new version, but here is a link for you to download so you can see the changes, and if you might want to implement the layer switching:

http://s000.tinyupload.com/index.php?file_id=42224946069818279927

I can’t wait to get home next month, and try out your addon with Instant Meshes. I look forward to trying your newly implemented auto-retopo function within Blender.

Thanks for the code, I’ll have a look at it later today, when I get home.
As for your suggestion to add the addon to the “retopology” tab to avoid clutter: That’s a really good idea, actually, and I’ll definitely change that. Tab clutter is a huge problem for me, too and it would be great if people generally adhered to the original tabs a bit more.
I do see the problem, however, in that the addon is harder to find, but I don’t think that’ll be much of a problem with mine.Great suggestion! :yes:

As far as the Mac-situation is concerned, for those interested: I still don’t have access to a mac for now (my only two sources are on holiday), but I’m looking for other options. Will update soon, hopefully.

Small update:

  • Added 3 experimental utilities (more to come)
    [LIST]

  • Clear Sharp Edges - Instant Meshes exports its meshes with all sharp edges for some reason. This function removes all of them at once.

  • Shrinkwrap to Target (active) Object - This is a convenience function which adds a shrinkwrap modifier to the object and then projects it onto the active object. This can be helpful if the remeshed object doesn’t really match the source

  • Trinagulation - Triangulates the mesh. It sometimes helps to triangulate the mesh before remeshing it.

  • Added icons

  • Reformatted the code and made it a bit more efficient.
    [/LIST]

I’m currently experimenting with modal operators to prevent the addon from locking Blender when you start Instant Meshes. We’ll see how that turns out.

I wonder what this can do for hard ops. This is awesome! I didnt know it was already added.

If you’re refering to Instant Meshes, that’s not in trunk. Don’t know if it’ll ever be.
To use my addon you have to install Instant Meshes externally. It then either starts the application or communicates with it through the commandline-interface.
My addon is basically just a simplified “bridge”.

First of all thanks, is a great script and nice timesaver, secondly I was wondering if you consider add support for this http://igl.ethz.ch/projects/sketch-retopo/sketch-retopo-license.html in the same script, cause somethimes u need more control in the retopo process

I can’t open the zip-archive for some reason. It looks interesting, though.
If the program has a commandline interface then it shouldn’t be much of a problem to include it in the addon. It would certainly fit in well with the rest of the tools.

I’ll try again later.

Thanks for the feedback!

They finally fixed the archive and I managed to download Sketch-Retopo.
You can now make use of it the same way you use Instant Meshes. The button is right below the Instant Meshes-button.
I’ve only tested it on Linux (Ubuntu) so far but I’ll try it out on Windows some time today.

I’m going to make a new video to replace the old one soon.

Wanted to try this out, but nothing happens when clicking on Send to…

Well, clearly something happens, it seems Blender is calculating something for a split second, but then nothing. I see in the console the follwing commands every time I click on the button:

bpy.ops.object.origin_set(type=‘ORIGIN_CURSOR’)
bpy.ops.ops.instantmesher(operation=“regular”)

I have tried both copypasting the path, and clicking my why to the instant meshes.exe but just doesn´t work for me …

Windows 10, btw.

Thanks for the feedback.
I made some minor alterations to the code and reuploaded it. What fixed it for me in the end after updating the code was selecting the executable to “Instant-Meshes” in the addon preferences again. It works fine now under Windows 8.1 and Ubuntu 15.04. Hopefully it works for you as well.

Worked a charm, both instant mesher and sketch retopo :slight_smile: Good job, appreciate it, it will be very helpful to me.

Great, glad it worked out.

Thanks for this, works well for me and I’m sure I’ll be using it in the future.
Too bad Instant Meshes doesn’t have symmetry options so now the only way I found is to boolean out half of the mesh, send to Instant Meshes and fiddle around until I get something I like. Then back in blender I delete the faces on the x axis and add mirror.
Any plans to automate something like that?

The lack of symmetry really is a problem. I’m not sure the developers of Instant Meshes are still working on their project and I doubt the’ll add the functionality to it (hopefully I’m wrong). I could have a look at their code and see what I can do, but that will take some time and would require me to make a new branch.
I could try to make the mesh symmetrical through Blender after the import, but other than your method I can’t currently think of a way to do that. Problem is that booleans can be very unpredictable and leave behind messy topology which isn’t always suitable for mirroring. I’ll look into it.

If you could tweak the code to support symmetry that would be amazing. Obviously that’s a lot to work.

Yeah you can also do it in blender with something like SculpTools’ Symmetrize but that does take some preparation. Well, you can’t have everything be automatic lol
Thanks again for the useful addon!

I added a tool to symmetrize the mesh which works the same as the SculptTools one. It’s only a temporary solution of course but it should do for now.

Hi teaLeaf

Thanks your great addon .

I use addon in blender win 7 64 bit . It looks that blender is freezing after i select mesh click “Send to sketch Retopo” then close sketchRetopo.But Instant Mesh is OK!

That probably means that Sketch-Retopo doesn’t start properly. It would be helpful if you could post the error report from the console. Are you sure you picked the right executable for Sketch-Retopo? The 64-bit one.