cancel
Showing results for 
Search instead for 
Did you mean: 

Medium Export Cleanup Workflow

rms8080
Protege
I see a few people posting about using Medium sculpts in other apps. This is a bit tricky because the exported meshes have (1) high polycounts and (2) lots of cracks. I will describe a way to repair this, that will produce a mesh you can cleanly import into other tools for further editing (zbrush, mudbox, etc).

This workflow uses Autodesk Meshmixer (I was the author of that software, so you are getting all the secrets  😉   Meshmixer is free, get it here: http://www.meshmixer.com

A Medium export might look nice in Meshlab, but if you import into Meshmixer you will see that it is filled with cracks (the blue edges). This, I would imagine, is due to how Medium piecewise-meshes the level set surface. These cracks will be a big problem if you try to edit the mesh in other software, but we can fix that up.

mntuouvbvmwj.png


Load the exported OBJ into meshmixer. If you don't see the colors, hold down the spacebar and click on the blue smooth-shaded sphere that says Color next to it. Now click the Edit button on the left bar, then Close Cracks. This will resolve most of the problems. Or it will crash Meshmixer. If the latter...sorry! That is *literally* my fault. You should get a pretty clean mesh, as shown below-right, but also possibly with some small issues (eg by the arrow).

4dgwv8ymcc7q.png

Next up, Inspector tool under the Analysis tab. When you first start, you will probably see a ton of pink spheres. Drag the Small Thresh slider to 0 and they will go away, and instead you will see blue and/or red ones. Click on Auto Repair All. They should all go away. However, this might leave some small un-colored spots.
 
1sewe02ethxi.png


You can fix those spots in several ways, for example using the Paint Vertex brush (a bit of explanation in the manual). But another way is to Select that area and replace it, which will interpolate the neighbour colors. Images below show basically what to do - click Select on the left, paint a bit, then do Erase and Fill under the Edit submenu. I forgot to take an "after" picture, but rest assured, it is green. You can use this same process to clean up other little glitches, for example if the Auto Repair can't fix something. Just paint it and Erase-and-Fill.

gd884mm1hfj0.png


You might be happy with how the mesh looks now, but it almost certainly has far more triangles than necessary. This is because the Medium export mesh is created with some variant of the Marching Cubes algorithm, which produces lots of little sliver triangles. No other software wants that. So, do a Select-All by hitting Ctrl+a, then do Reduce under the Edit submenu. You should be able to safely drag the slider up to 75% without really changing the surface. 

mn1d3m0een4u.png

You can also try the Max Deviation mode, the default number will be too high but if you use lower values you'll get better shape preservation for extreme reducing. Medium exports at very small dimensions, so if you can't set the number lower in Reduce, try canceling out with Escape until the selection is cleared, then hit t to start the Transform tool (manual page here). Then click on the little white box in the 3D gizmo to scale up your model, and try again. 

If you are losing too much detail, don't do select-all, paint areas manually. double-clicking in the select tool will let you select whole connected areas. for example I probably should have left the teeth alone, they lost a bit of detail. For an even cleaner mesh, you can try the Remesh tool, but you probably want to read the manual page first.

Here is the original vs reduced version for the model above, at 75%  reduction on the right. You'll see it actually *looks smoother*. This is because all those little sliver triangles mess with the surface normal estimation, when you get rid of them, the smoothness of the shape comes through. 

a8xtcmpzz3v1.png


Happy sculpting! -RMS
(and if you want to try your hand at some other VR 3D shape-making, try Simplex !)

56 REPLIES 56

ker2x
Protege

rms8080 said:

if one of your posts your examples I can probably show you how to work around that crash



i'll try. The .obj is huge 🙂

Edit : only 60MB when compressed. Currently uploading.

ker2x
Protege
@rms8080 : https://www.wetransfer.com/downloads/6c16f881091ee972f21759ec8c212a9920161210165504/7419c07d70d132b1bff7b205fa3025a820161210165504/e43f1d

ker2x
Protege
Mmmmm, i did the first step (close cracks), exported to a new obj. closed, reopened, now i can do the analysis

ker2x
Protege
Tadaaaaaam ! https://skfb.ly/XyVt
With an Exported OBJ of 28MB instead of 325MB :dizzy:

Amazing ! Thank you @rms8080 ❤️ 

rms8080
Protege
well, that works better than everything I tried =). The close cracks is creating some broken geometry, but round-tripping through an export helps because on import it does some automated checks & cleanups for that that kind of broken geometry...

BTW the steps above say to set the Small Threshold to 0, but it looks like some problems aren't resolved by the first pass. After I ran Inspector a second time with a non-zero small threshold, I got a clean, no-boundaries mesh.

ker2x
Protege
We really really need a wireframe view in Oculus Medium to avoid the stupidly high resolution mesh like my model :blush:

ker2x
Protege
Is there an option to remove edges that are too short for their own good ? (or i can do it in blender, it's an option to remove "duplicate" where you set the distance)

rms8080
Protege
in meshmixer? nope, sorry, no way to set a smallest-edge threshold in Reduce. The Make Solid tool has that setting, but it remeshes the entire object first (although for Medium sculpts you might not notice, as the way it remeshes is very similar to how medium represents the objects internally...) 
http://www.mmmanual.com/make-solid/

splicer12
Protege
This looks like it may be the solution to a workflow problem I have been pondering. Will this app export models in a format where I can bring them into a Unity project? I am really hoping I can use Medium to design resources to be used in development of Unity VR applications.

rms8080
Protege
if you get to a clean model in meshmixer, and then export as Collada (.dae) format, you can bring the vertex-colored mesh into Unity, with vertex colors. You need to assign a per-vertex-color shader to see them, though.

You can also bake the vertex colors to UV maps, various tools do this automatically (MeshLab is a free one). But the auto-generated uv maps & vertex are usually not very efficient, ie you'll end up using a lot more memory than if you use the vertex-colored mesh.