ZBrushCentral

Converting triangles to quads for ZBrush

Hi all, long time reader, first time poster…

I work at a 3D scanning lab at Idaho State University and we use laser scanners to, well, scan stuff and I am running into a problem. We use Geomagic Studio to produce CAD models of everything we scan and Geomagic only outputs triangles. We want to use ZBrush as our texturing tool (not only for color info but also to build displacement and normal maps), but ZBrush REQUIRES quads to be able to reconstruct the subdivisions (in other words I need quads to decimate the mesh in ZBrush). I have tried to use 3ds max, maya, and blender to convert the triangles to quads, but they all fail and I always end up with some triangles.

Does anyone know of an application that can do a conversion of triangles to quads that will convert all the triangles to quads???

Yes, I have tried the re-topology stuff in ZBrish and it fails 100% of the time. Not to mention it takes forever to get to the point where it fails…

Thanks in advance

P.S. the reason I want to use ZBrush to decimate the scanned models is that I want to keep the full resolution from the scanner (we are getting on the order of 1 to 10 million polys per scanned item) but I NEED models with much less dense meshes (on the order of 5 to 10 thousand polys). So backing down the resolution tree inside ZBrush I think is the best way to go…

Hi,

Have you tried the Tri2Quad option in ZBrush? Select the PolyMesh3D tool (the star) and set Tool > Import > Tri2Quad to 90 (the highest value possible) and then press import.

I am not sure of Tri2Quad’s efficiency but it is worth a shot. However, just because you end up with a model of all quad polygons does not mean you can reconstruct subdivision levels successfully. The polygon distribution especially in relation to any open edges / holes will determine if you can reconstruct or not. It is difficult to explain (this early in the morning :slight_smile: ) so I hope the following picture will do it.

[attach=68239]Reconstruction-issue.jpg[/attach]

Attachments

Reconstruction-issue.jpg

Just to add: I think you are hoping for the impossible. It is very unlikely that you will be able to convert a scanner mesh into quads that can then be reconstructed to more than one or at the most two levels. You are likely to hit a triangle somewhere very quickly. By far the best way of working is to redo the topology at a very low level and then project the high res mesh. I’ve done this with a scanner model with excellent results, and it doesn’t take long to do the low res topology. This method will give you the best results for generating normal and displacement maps.

Tyves, I have already gone to great length to attempt to ensure a mesh that Tri2Quad can fix, but for some reason unknown to me (or anyone else including the algorithim guys at Pixologic I bet) there are ALWAYS triangles left in the mesh. It could be a poly order thing, but I don’t know. I’ll try to grab a few screen shots and post them later today so you can see some of the odd stuff that comes up with Tri2Quad. You can see the strips, and can see that where there are triangles there could have been a quad, but nope! A big wide triangle or two! When I try to do quads in other programs like Blender the triangles just seem to be randomly distributed on some meshes, but usually follow the “seams” from the scan data. We can clean up the point clouds in Geomagic Studio, but even with the clean meshes the result is the same… damm odd really.

Marcus… Love your plugin work by the way… IF I could find a walk through / tutorial that I could get to work for re-topology or projecting high to low, or in this case low to high I would go that route, but I haven’t found one that I can get to work. My background isn’t Art, it’s anthropology and information systems (specifically doing expert systems and cultural simulations). I fell into this 3D lab gig while finishing up an MBA, and to be honest it’s one of my scan-monkeys who is getting an MA in Fine arts who owns the copy of ZBrush we’re trying to get all this to work on (if we can get it to work, we can justify buying a copy for our lab to use, until then we have to shuttle between work and his apartment to test stuff). He does all his art directly in ZBrush, and spends WEEKS getting his ZSphere topology to be 100% perfect so he can rig and animate everyhting. The University doesn’t cover computer art much at all, mostly photography and old school physical sculpture and drawing, and he hasn’t gotten very far through the learning curve of ZBrush yet so he’s almost as lost as I am here.

In other words, if someone could help us figure out how to do what you are suggesting, we would be super appreciative :slight_smile:

You can take a look at some of the things we have scanned by going to our website at http://ivl.imnh.isu.edu and looking through our Specimen Library. We want to replace the current crap Viewer with one that will allow us to use Displacement and Normal maps, which is why we are trying to get all this to work. We don’t have permission to show everything we have scanned, so most of what is there is from the teaching collections of the Idaho Museum of Natural History, or is owned by our old Director. And yes, it’s mostly bones and fossils, well except for the projectile points that is :slight_smile:

The item these were taken of is a massive reduction in detail from the origional. The origional had 860,514 points off the scanner (that’s 1,721,028 triangles for those of you who care), and this model was made by doing a 2 mm sample of the point cloud. That is, we generated a new point cloud that has as distance of exactly 2 mm between each vertex. The model ended up with 7,013 points in it (which is an odd number which the reconstruct subdivide won’t like at all).

The two pic’s below are of this item zoomed intothe same place. The first is the raw model with no Tri2Quad. The second is the max setting for Tri2Quad.
LowNoTriToQuad.jpg

I admit there is a wierd bit in the center of the image, which should not be there if the sampling algorithim is actually doing what they claim it is, but you have to admit, when looking at the second image I can see Tri2Quad did a bad job of generating quads. This gets substantially worse when going up in number of points / polygons.

Like I said before, if ANYONE could make, or point me to a walkthrough or tutorial that was complete (and for COMPLETE NOOBS like me… that’s right a major hold 'em by the hand situation) and didn’t assume prior work in ZBrush at all, maybe I could figure out the “trick” to using mesh extraction and/or retopology.

Again, thanks for the help guys…

Attachments

LowTriToQuad.jpg

Here’s a quick run through:

  1. Import the mesh you wish to re-topologize.

  2. Select the ZSphere ztool, draw on canvas and enter Edit mode (‘T’).

  3. Press Tool: Rigging: Select Mesh and choose the imported mesh from the popup.

  4. Press Tool: Topology: Edit Topology.

  5. Click new points on the mesh to define the new topology. Hold Ctrl and click on a point to select it as the active point, Alt+click to delete a point. Aim to build up a low poly mesh with all quads. Press ‘A’ or Tool: Adaptive Skin: Preview to see how you’re doing.

  6. When done with the low poly mesh, set Tool: Adaptive Skin: Density to a high enough number to hold the detail. You’ll need to test things to see how you go but about a third of the polys of the original should be enough. Press ‘A’ to preview the mesh and mouse over the large Tool thumbnail to see the number of polys.

  7. With the preview off press Tool: Projection: Projection, then press ‘A’ to preview the mesh. There will be a delay while the mesh is projected.

  8. If happy, press Tool: Adaptive Skin: Make Adaptive Skin. Select the new ‘Skin’ tool for UVing and generating maps - it will have subdivision levels.
    If not happy, switch off preview and increase the Density slider before trying again.

hand01.jpg

(Obviously the new topology is not finished ! :wink: )

HTH,

Attachments

hand00.jpg

Marcus…

your description, though brief, is 100% better at actually telling me what I need to do that all the other stuff I have found here before!

Here is my Origional mesh: It’s a broken Charcaradon megladon tooth by the way.

OrigionalMesh.jpg

There is some mess along the edges of the tooth, but man this works better than I thought it would.

Now I just need to texture the thing from the photos we took of it, build displacement and normal maps, and then get the new model into the viewer and I think our manager will be more than willing to drop the cash on a copy for our lab.

Rockin’ awesome man!

Thanks!

Attachments

TopoNew.jpg

TotoNewFinal.jpg

schlrobe,

I’m glad I could help. Great tooth!

Cheers,