Merge multi-file textures into single OBJ in MeshMixer

Merge multi-file textures into single OBJ in MeshMixer

Anonymous
Not applicable
12,521 Views
20 Replies
Message 1 of 21

Merge multi-file textures into single OBJ in MeshMixer

Anonymous
Not applicable

ey, 

I do have a problem. I have exported VRML from ArcScene as it is the only format possible to be exported. The number of texture files depends on its resolution so there is no control over it. Then I opened the VRML in Meshlab and exported as OBJ to run it in MeshMixer. 

Unfortunately the imported mesh is kind of gridded - every texture file is a single tile (see screentshot). The problem is that I want to have it 3D-printed in full-colour but I cannot control it in any way (such as extrude option).

Is there any option to merge/bake these tiles into single file so that I could make a printable solid out of it? Perhaps I could do it in some other software? When I tried Join option in Rhino 1 texture file applies to every tile making it useless.

Thanks, Kuba.

 

Post has been copied from the old forums: http://meshmixerforum.com/index.php?topic=4864.0 

 

PS. Bridge function and Weld Boundaries does not work.

screen1.png

0 Likes
Accepted solutions (1)
12,522 Views
20 Replies
Replies (20)
Message 2 of 21

Anonymous
Not applicable

I already gave some hints at the old forum you linked to.

 

If those steps in MM don't work for you I can only offer to look into your issue if you upload an example source file to some server and send me the link via PM.

 

0 Likes
Message 3 of 21

Anonymous
Not applicable

Unfortunately it didn't work. Would be glad if you took a look at the files attached.

 

I will send them via PM

 

Thanks in advance!

0 Likes
Message 4 of 21

Anonymous
Not applicable
Accepted solution

Thanks for the file. Makes it a lot easier.

 

If you run EDIT/SeparateShells you'll see that it contains 40 surfaces where you need 16 only.

Two rows (2 and 4) of patches come with 4 subdivision levels of the same patch. The other two rows (1 and 3) come with the highest subdivision level only (which is fine). Selecting on such multiple surfaces in one object results in several selections. You need exactly to selections at a boundary to bridge or weld. You need to get rid of the lower level versions in row 2 and 4.

 

To do this drag the 1. grey SHADER sphere to an empty space of the scene to switch off texture shading. Show the wireframe hitting W at your keyboard.

Now you should see the problem.

Run EDIT/SeparateShells. This results in 40 separate objects. Activate all objects of row 1 and 3(keeping Shift pressed) and combine them to one "SingleSurface". Hide all other shells via object browser. Show them one by one and decide if its resolution fits to the combined shells. If Yes: combine it to "SingleSurface". If Not: Discard the object.

When you are through and all is combined you might drag the texture shader to the scene again. Run CloseCracks first to close some of the cracks and weld the other manually (which should work now).

 

0 Likes
Message 5 of 21

Anonymous
Not applicable

After getting rid of those redundant surfaces it might be easier to weld in Meshlab with a single click:

Export from MM to .obj.

Import in Meshlab and run Filters/CleaningAndRepairing/MergeCloseVertices (Seems default settings work fine here).

 

0 Likes
Message 6 of 21

Anonymous
Not applicable

That really does the job! I would never think of it myself, thanks!

 

Now I would like to prepare it for full-colour 3D printing but I wanted to get rid of these black spots to save on printing cost and time. Is there any option to cut the mesh along an outline? Then, will it keep the texture and allow me to "make solid" to have it 3D printed.

 

Thanks again!

 

Kuba

0 Likes
Message 7 of 21

Anonymous
Not applicable

Think the easiest way is:

 

Switch your view to top view.

Go to SELECT and switch to Lasso mode (at the flyout's top).

Draw the outline at the border of color and black now. You may sample up several strokes if you start a new stroke near the end of the previous one. If you reach the start of the first stroke the selection will be orange as usual. Invert the selection (if necessary)to get the black area selected. Discard hitting X.

Now SelectAll and run Modify/SmoothBoundary with PreserveMeshBoundary disabled. This will give a smoother outline.

Still all selected run Edit/Extrude. Set Direction to Y-axis (or another axis if needed) and EndType to Flat. Now pull down the Offset slider to some negative value to get the desired thickness of the solid.

 

You can't use MakeSolid if you want to keep the texture. MakeSolid will not keep the UV's but will transfer the texture's color information to per vertex color. Means: The color conversion quality depends on the resolution you set in MeshDensity.

 

0 Likes
Message 8 of 21

Anonymous
Not applicable

Well this is a solution but I would rather try something more accurate. I do have an outline in vector (polyline) format. Can I somehow import it into the project and split or trim the mesh into two parts with this outline?

 

Thanks!

0 Likes
Message 9 of 21

Anonymous
Not applicable

Unfortunately there's no way to import curves to MM. Surfaces only...

 

You might extrude the polyline in Rhino and export this extrusion to a .obj mesh file.  Keep an eye on Rhino's export options (set some max. edge length) to avoid big slim triangles.

This imported (and both objects activated) you may try BooleanIntersection. But be aware: Booleans on textured meshes need computation time and bigger system resources and MM might even crash. So save your current state before trying this.

0 Likes
Message 10 of 21

Anonymous
Not applicable

Big thanks for all your help! Now I am able to move forward with the project. Would be glad if you didn't close the topic as some issues may arise along the way later on.

 

Cheers!

 

Kuba

0 Likes
Message 11 of 21

Anonymous
Not applicable

Hello,

 

I just got back to this project after a long time. The reason behind it is that I finally have some funds to make it physical with CJP printing.

 

I was playing around in order to improve texture quality as after first trials the last time (printed some samples) - texture quality got really bad after number of transformations. This time it looks fine up to this step. The problem is that I can't close cracks. Is there any restriction regarding the maximum size of a shell in MeshMixer? After importing I had >300 surfaces. Deleted most of the unnecessary ones and closed cracks. 12 shells still remain and after combining them, the 'close cracks' tool does nothing. This is a real issue because when I go for 'smooth boundary', MM smooths all the cracks as well which results in 'rounded' corners (see screen attached). Is there any way to make this whole surface into 1 piece?

 

Best Regards,

 

Kuba2.PNG3.PNG

0 Likes
Message 12 of 21

Anonymous
Not applicable

Welcome back

CloseCracks only works if there are (at least some) very same vertices at the patches to join.

If this does not work you need to use WeldBoundaries or Bridge. Both tools need a non-interrupted selection  pair on two corresponding parts of a split mesh like this:

Bridge1.jpeg

Imagine you've built a bridge between the selected banks of a river.

Accept. Bridge keeps the bridge surface selected (maybe to tiny to be visible). So hit S to start with a new selection of another pair. Avoid selecting the crossings. Again run Bridge...Repeat this (in this case 4 times).

This ends with a connected surface with still an open boundary at the crossing. Use Inspector to close it:

Bridge2.jpeg

Click on the sphere marker(s) pointing to the crossing(s) to close these holes (do not AutoRepairAll - this would close the outer boundary too).

 

Now you might smooth the small outside gaps using SCULPT or crop your object after this joining operation.

 

 

0 Likes
Message 13 of 21

Anonymous
Not applicable

First of all thank You for Your fast answer.

 

I do not have access to all the files now but what concerns me is the texture quality. For sure after sculpting the resolution gets reeeeally bad which is unacceptable in this case. I wonder if the same thing might happen while using inspector.

 

Besides, weld boundaries did not really work the last time, although I was performing a similar selection to Yours in the image. It was saying something like 'fatal error'.

 

Anyway, I will try it tomorrow if this worked. Perhaps there is a way to fix it in some other software?

0 Likes
Message 14 of 21

Anonymous
Not applicable

If Bridge or WeldBoundaries fails you didn't do a proper selection. A single face missed and it fails.

Anyway if MM needs to add faces it needs to interpolate texture for the new faces. This might be visible in a later print.

Here CloseCracks would be the best option. There's a SULPT brush "Zipper". This sucks vertices on boundaries to a averaged common position. This distorts the texture on the modified faces but might help to get CloseCracks working (at least partially) and distortion might be acceptable if the faces aren't that big.

SCULPTing on textured meshes: Try it with Refinement disabled. 

0 Likes
Message 15 of 21

Anonymous
Not applicable

Did you try to join in Meshlab as suggested above?

0 Likes
Message 16 of 21

Anonymous
Not applicable

Oh my gosh... The operation in MeshLab actually works! I am almost sure that I tried all the filters available in MeshLab! Thanks a lot! I hope I will finish the project now and successfully print it 🙂

0 Likes
Message 17 of 21

Anonymous
Not applicable

Hello, I have an unrelated question that led me here and you seemed really helpful so I would like to ask you.  I am a new MM user and importing a 3d scan.  The download does not show file type but I was able to import elsewhere as a ply file.  see below

import icon.png

When I import it into MM it looks like this: see below

imported file.png

There is another file, maybe a texture file but anyway this is where I'm at and would like to stay with MM as it was highly recommended.  

Thank you

0 Likes
Message 18 of 21

Anonymous
Not applicable

Concerning .ply MM can't import textured files, sorry. This results in such garbage... 

Also .ply using stuff like attributes gives such trouble.

Use .obj instead.

If the source application can't  do .obj export or you got the file asa it is:

Meshlab can read textured .ply. So import there and do File/ExportMeshAs to convert it to .obj.

MM should import just fine.  

0 Likes
Message 19 of 21

Anonymous
Not applicable

Wow, can't thank you enough for getting back to me so soon, and on the weekend.  It is much appreciated!

I downloaded through meshlab and it worked!!!

I see what you were saying about the results.  Do you think this would even print?  Could this be cleaned up or beyond repair?  It's just a test scan of a pillow on  top of some blankets.

imported obj file.pngMaybe the 3d scanning app I am trying to use isn't going to cut it.  (trnio)

Or is it just the way ply is going to import always?..

Anyway thank you again for your help!!!!!

0 Likes
Message 20 of 21

Anonymous
Not applicable

Don't think you can print it in that state. You'll need to repair and get a watertight object first...

As a first step: Try EDIT/CloseCracks.

Do you need the texture for a multi color print or are you planing a monochrome print?

0 Likes