Quads?

Next
 From:  FelixPQ (FELIX)
4600.1 
Hi Michael,

I'm curious to know if there is a reason why the OBJ export format doesn't have an option for quads only? Is it because the library you use doesn't provide it or something else.

Thanks,
Felix
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
4600.2 In reply to 4600.1 
I wondered that too, as it seems like poly guys really like "All quads"...
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  DannyT (DANTAS)
4600.3 
Isn't N-gons the same as just quads?

-
~Danny~
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Rich_Art
4600.4 In reply to 4600.3 
No N-gons are polygons with more than 4 vertexes..

Peace,
Rich_Art. ;-)

| C4DLounge.eu | Our Dutch/Belgium C4D forum. Cinema4D R13 Studio + VrayForC4D + UVLayout Pro + 3DCoat
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  ycarry
4600.5 
>> as it seems like poly guys really like "All quads"... <<
because
use of Catmull–Clark subdivision surface generate QUADrilaterals
(from triangles or NGons or... quads)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  FelixPQ (FELIX)
4600.6 In reply to 4600.2 
From the little I know, quads seems to work better with the Catmull-Clark sub-d method.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  SteveMacc (STEVEH)
4600.7 
You won't be wanting to apply sub-d to an exported MoI model. Neither will you be using character animation. In which case, the combination of quads and n-gons gives the best results.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4600.8 In reply to 4600.1 
Hi Felix,

> I'm curious to know if there is a reason why the OBJ
> export format doesn't have an option for quads only?

It's because "quads only" requires a much different meshing algorithm.

The current mesher (which actually I wrote myself, it doesn't use the geometry library's meshing functions because I didn't like the results they gave) does initially subdivide the underlying surface into quads, but then there are trim curves to deal with. Trim curves are marker curves that live on a surface and mark different areas as being holes, and the trim curves do not necessarily align in any way with the underlying surface's UV quad structure. So the underlying surface quad mesh then gets intersected with the trim curves and that produces n-gons.

This meshing strategy makes for an optimal minimum polygon count structure and cleanest/sparsest wireframe, with things like a trimmed plane being just 1 n-gon, like the cap of this object here:



You can see that's a great mesh for a goal of "sparsest wireframe" - the top face is just one single polygon.

To make "all quads" out of this example would require a much different mechanism - something that tiled the top face with numerous quads, sort of tracing and collapsing the trim curves inwards towards each other and trying to combine them together well when they collide with one another. That's a pretty difficult mechanism to make robust. In the future I would like to work on some approaches for it but I expect for it to take a lot of time and effort to make a good mechanism for doing that, so I don't really know when it will be possible to schedule things like that which require such a large quantity of work.

Triangulation is very different - a big n-gon like that top face can get triangulated by connecting lines between its outline points and not inserting any new vertices into the middle of the polygon, it doesn't have to worry about things like different "waves" of trim curves and inserted points colliding into each other like an all-quad mesher would need to do.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4600.9 In reply to 4600.3 
Hi Danny,

> Isn't N-gons the same as just quads?

On an untrimmed surface they will be the same - that's because the mesher starts out with quads that come from the subdivided underlying surface.

If the trim curves on the surface are aligned with the natural boundaries of the underlying surface, then you'll get an all quad mesh for that case.

But if you have trim curves that are not aligned with the underlying mesh's UV directions then those trim curves will basically trim the surface quad and become an n-gon. That's for areas near a trim boundary - pieces of the surface that do not intersect the trim boundary will be quads.

The easiest example that I can show to help explain it is the image I posted above:



Here the top cap surface is a simple plane surface that is trimmed to an irregular outline.

It's easy to see in this example that the n-gon formed by the top cap has a lot of points in its boundary, it's made up of many edges and is not just a quad. There are still quads in other areas though like the side wall parts which is an untrimmed surface (trim curves on it are the natural edges of the underlying surface).

So an "all quad" mesh is a much different kind of mesh than an "n-gon" mesh, I hope this example helps illustrate the difference.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4600.10 In reply to 4600.5 
Hi ycarry,

> because use of Catmull–Clark subdivision surface generate
> QUADrilaterals
> (from triangles or NGons or... quads)

That's true, but that doesn't mean it magically forms nice quads out of any kind of n-gon.

Part of the Catmull-Clark subdivision process involves connecting pieces to the centroid of the polygon. If you have a complex n-gon that is non-convex like the top face of the example I posted above, it will make for a messy folded-over-itself result.

That's basically why you can't use the kind of n-gon mesh that MoI generates as the input to sub-d smoothing - sub-d smoothing requires a particular kind of topology to the inputs to it in order to produce good results, and that topology is best built by hand.

But you don't need to apply sub-d smoothing to MoI generated meshes anyway - MoI exports vertex normals to make the shaded result already look nice and smooth, you just directly render the mesh that MoI exports and you shouldn't try to apply sub-d smoothing to it.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
4600.11 In reply to 4600.6 
Hi Felix,

> From the little I know, quads seems to work better
> with the Catmull-Clark sub-d method.

It's not just simply having quads - to get good subdivision results also requires a suitable topology.

There are all kinds of bumps and wrinkles and artifacts that can be caused by poorly suited topology being used for sub-d, see this video for a good overview of that:
http://vimeo.com/2158706

That video covers a variety of sub-d smoothing artifacts, and how to best arrange your input mesh structure to avoid them.

If you want to produce sub-d smoothing, your best bet is to create the mesh for it by hand, following a strategy that produces a good sub-d friendly topology. It's a whole different modeling process than building stuff in MoI and exporting an n-gon mesh.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  FelixPQ (FELIX)
4600.12 In reply to 4600.11 
Thanks for the video link Michael,

I saw it before but it's still quite interesting. Also, thanks as well for all the info you gave on quads as well.

Regards,
Felix
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All