Preserving a UV map while removing internal geometry

Preserving a UV map while removing internal geometry

gryphern
Observer Observer
2,950 Views
6 Replies
Message 1 of 7

Preserving a UV map while removing internal geometry

gryphern
Observer
Observer

 So, you can't preserve UV mapping when making a solid in MeshMixer.
But now, color 3D printers are thing and I want to do more than have have colored faces, I want to print using UV maps.

 

Is there a workflow where I could make a watertight, hollow shell from two UV mapped OBJ files?

In other software I could...
Select only the visible external faces, invert my selection and delete, then close the boundaries.

Tell the computer to "clean up" all but the external faces.

 

I can't leave my model "as-is" because the printers can't make sense of it and try to wall off the opening.


Any ideas?And OBJ and an STL aligned. I want to print as a single pieceAnd OBJ and an STL aligned. I want to print as a single piece

 

0 Likes
2,951 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable

1. PerVertexColor vs Texture:

MakeSolid transfers texture's color information to PerVertexColor. Each vertex (note: not equal to a face) gets some color information. In this sense a vertex is your 3D pixel. As the resolution in 2D depends on the number of XY-pixels it's the same in 3D: The number of color-(pixels/voxels)-dots determines the quality of your result. The denser your 3D grid (the smaller CellSize is in MakeSolid's SolidAccuracy and MeshDensity) the better will be the conversion result.

Basically a 3D printing slicer will interpolate texture information using some 3D-grid too.  What happens if your MakeSolid cell is smaller than the printer's minimal layer height? Isn't it pretty the same result?

 

2. Combining objects with different textures and UVs:

You can use MM and many of its tools to merge, join or combine textured objects while keeping UV's of the source objects. MM will NOT create a new merged texture image. Instead it will use different material informations in a .mtl file where each material will point to the native image file(s).

2.1. Check your target application:

It's all wasted energy if your target application (slicer) isn't able to handle multiple material definitions on a single files bundle (obj + mtl + several images ).

2.2. Check the sources:

If you plan to merge different textured files in MM check their native material definitions at first:

Open all .mtl files of objects to merge in a text editor. There need to be unique material names.

Let's say you want to merge a textured  A.obj with B.obj:

If both corresponding .mtl files use the very same material label you need to edit one of the files.

e.g:

.mtl of A.obj uses

newmtl defaultMat

.mtl of B.obj uses

newmtl defaultMat

as well.

So you've to edit b.mtl to something different (e.g.):

newmtl defaultMat2

Now that's not enough. You've to edit B.obj as well in a text editor. Search for "defaultMat" in this obj and replace it with "defaultMat2"

 

Got it? There need to be unique definitions. That done MM can merge and export the result while keeping the right texture and local UV's (if there are equal material labels it will result in a obj using the same texture for different resulting regions).

 

3. Your special example(rather hard to guess from your screenshot):

MM offers SelectVisible (actually currently visible surface) in SELECT. You may sample up different aspects running the tool while keeping Shift pressed and discard it finally (hotkey "X")(maybe easier to try EDIT/GenerateFaceGroups and discard the outer group ). After getting rid of the redundant surface you might combine obj and stl to one object and fill the gab selecting the boundaries and Join (or Weld or Bridge) them....

0 Likes
Message 3 of 7

gryphern
Observer
Observer

Thanks so much for engaging on this topic!  I'm really trying to develop a workflow that is easy to train new people on, and MeshMixer seems like it should be a part of it. But I'm, I think, the first person really using the color printing here so I'm scratching my head a lot.

 

1. PerVertexColor vs Texture:

The problem with making the triangle mesh so refined that it matches human visual resolution is the enormous size of the models.  For a complex model the size of an Objet 750 print envelope (19.3 x 15.35 x 7.9 in.) we could easily get into the multi-gig size. That much data is a big slowdown, as uploading takes >20 minutes, then filechecking operations to check that the model is ready for print will often crash. Weird things start to happen when you max out what the pipeline can handle for these sorts of tasks.

When I was combining CT data slices (like when people get their bones imaged by a doctor) I was able to make files so large that they crashed the slicing process on one of the Stratasys print setups I use. While it was kind of awesome it also showed that the process is NOT unlimited.  Smiley Tongue

2. Combining objects with different textures and UVs:
I hadn't thought what would happen if my mtl references had the same file names! This would be really valuable to consider for a large project where several people are producing the files to be used.


3. Your special example (rather hard to guess from your screenshot):

Ooh.  Ooh. THANK YOU!!!!!!   THANK YOUOUOUOOUUUU!  This mostly works!!!!!

 

I've been messing with it for about 40 minutes following your suggestions and I see the direction your pointing me to.  Select visible is problematic since it's not possible to select under overhangs, or the back of the object.

Notes: Select visible replaces the previous selection UNLESS one holds  the "shift" key while entering the command.  The process requires that the shells are combined into one object, otherwise the software things I can "see" through the other shells.

Once the external geometry of the combined object is painstakingly selected, I can invert and delete the unselected internal geometry, but in the case of this model, where there are internal threads, it's not possible to select them all using the select visible.  I used a small sphere brush to select under the overhangs, but it requred repeated slection actions.  To select everything is roughly a 20 minute job, so i wish there was a "select most external triangles" function.

Then I can zipper the edges, and repair the holes from the tiny triangles missed during selection, which is ugly and slow.  This is a work around that is not functional for a daily workflow.


 

0 Likes
Message 4 of 7

gryphern
Observer
Observer

To select the external faces of a combined set of UV mapped shells, then delete the internal triangles, then repair the problems caused by deletion, then weld the boundaries is at least 1 hour per model.  I can't finish it because the software crashes partway through the process repeatedly, but I think one hour or more. 

There needs to be a way to autodetect then separate a single external shell in order to preserve UV mapping.

0 Likes
Message 5 of 7

Anonymous
Not applicable

2. Combining objects with different textures and UVs:

The problem isn't the file name but the materials defined by .mtl and .obj. If different source files use the same material label you'll run into issues.

 

3. Your special example:

Your problems are not related to UVs in any concern. You should take a closer look at SELECT options to avoid errors you need to repair later on (and if you don't repair these errors properly risk crashes). Besides SelectVisible there are options as:

- A nice trick to check if you've missed some region is to run Modify/SmoothBoundary (but don't Accept). As it highlights selection boundaries you see what you've missed.

- There's ExpandRing and ContractRing. ExpandRing adds a loop of neighbour faces to the selection while Contract shrinks. Now you can get rid of tiny missed areas by growing the selection X-times and shrinking it X-times.

- There are RMB-drag Expand modes (requires Meshmixer navigation mode): GeodesicDistance  and CreaseAngle based (ColorSimilarity is based on PerVertexColor).

- Instead of discarding a selection the saver way if you are not sure to have selected all you want is to Separate the selection to a new object X. If there were missing regions go back to the source object, select the missing region and Separate it to an object Y. Now Combine X and Y and run EDIT/CloseCracks to weld.

- If there are watertight intersecting objects A and B. A is the active object. Now in SELECT double clicking at B selects all faces of A within B

- DoubleClicking a FaceGroup selects all faces of that group. You need to set GroupColor as MeshColorMode to see them.

Sharp edged objects (as your interior surface) are ideal for that. Run EDIT/GenerateFaceGroups and use its EdgeAngle Mode. Define the AngleThresh ( higher results in less groups) and SizeThresh (higher results in less groups) until you get a meaningful result. Now you have groups you can easily select.

.....

Not knowing your partial shells:

Separate your two shells to two objects.

On the outer (textured?) egg surface select its outer surface, invert and discard its inside (if there's any). Close the open boundary using Inspector. This should result in something like a solid egg shaped half sphere.

From the inside object (use FaceGroups for that) select the groups pointing to the inside. Invert/Discard. SelectAll and FlipNormals. Close the upper hole and extrude this new surface a little bit . This should result in some negative part.

Activate the outer surface object first and (holding shift) add the inside object. Now run BooleanDifference.

 

This should be a 2min job you are familiar with the toolset.

 

0 Likes
Message 6 of 7

gryphern
Observer
Observer

I've been working with the tools as you describe though I'm a little slow to use them well. When I expand my selections it will expand to the internal geometry I'm trying not to select.  That sort of thing.

You seem to have a stronger grasp on them, are you available as a consult to teach me over, say, a shared Skype screen?

I could send you the file sand work along with you.  I'd be cool paying for a session if you take consults.  I really want to develop a workflow my students can use.

0 Likes
Message 7 of 7

Anonymous
Not applicable

Since years it's a honour for me to support a freeware as Meshmixer for free.

If you find my advice useful please donate to niatech (a prosthetic project RMS and MM supported before).

 

Best if you'd upload your source files to some file server and send me the link via PM. If you agree to use your files I'd post a screencast movie in this forum. Else we'll find a way to communicate...

 

0 Likes