Triangle or no triangle?
-
Thomthom is developing a [pseudo]QuadFace toolset...
-
As Adam mentions, Quads are an abstraction of geometry which many modellers include. Everything is built up of triangles at the core, but abstracting them into Quads (that can be non-planar) allows you to create a regular predictable topology which is much easier to work with and create tools for.
SketchUp does not have such support natively, you can only have a planar Quad - if you try to make it non-planar SketchUp Auto-Folds it into two separate triangles.
However, it is possible to work with Quads in SketchUp as long as the plugins do the abstraction themselves. A little bit more work, but not that hard. I've recently started a project, QuadFace Tools, where I'm building a set of tools for creating and manipulating quad based geometry in SketchUp and I try to encourage other developers to make their plugins quad-friendly.
Related Quad links:
-
@thomthom said:
As Adam mentions, Quads are an abstraction of geometry which many modellers include. Everything is built up of triangles at the core, but abstracting them into Quads (that can be non-planar) allows you to create a regular predictable topology which is much easier to work with and create tools for.
SketchUp does not have such support natively, you can only have a planar Quad - if you try to make it non-planar SketchUp Auto-Folds it into two separate triangles.
However, it is possible to work with Quads in SketchUp as long as the plugins do the abstraction themselves. A little bit more work, but not that hard. I've recently started a project, QuadFace Tools, where I'm building a set of tools for creating and manipulating quad based geometry in SketchUp and I try to encourage other developers to make their plugins quad-friendly.
Sounds cool. Will you be supporting degenerate quads?
And what about tools for stitching triangles into quads? Its fiddly to do it well.Adam
-
@adamb said:
degenerate quads
Not familiar with this definition. What is it?@adamb said:
And what about tools for stitching triangles into quads? Its fiddly to do it well.
Yes, I already have an early version of a tool that converts a triangulated mesh into quads. Starts off with two triangles (or a planar quad) selected, then it tries to find the most amount of quads around it. Then for each quad found, repeat the search until nothing is found.
It has some issues in some cases. Some bugs. WIP. I think I've rewritten that function at least five times. Fiddly indeed. I feel I'm a little over my head some times ( as always ).
Currently working on a basic UV mapping tool for the quads.
-
Interesting. Thanks very much everyone for the explanation, and thanks dsarchs for the link, I`ll have a good read of that later.
I believe degenerate quads are quads made up of two triangles, as opposed to a normal four sided one.
-
Adam,
Sorry about the lack of clarity. I understand it is triangles at the core, but practically blender will still show a quad even if one of the vertices is slightly non-planar. I rarely use blender so I have no idea what best practices are, I just meant to say that that situation can exist. Thanks for the correction.
-
@goonster said:
I believe degenerate quads are quads made up of two triangles, as opposed to a normal four sided one.
But all quads breaks down to triangles. Everything does. How can that be "degenerate"?
@dsarchs said:
I understand it is triangles at the core, but practically blender will still show a quad even if one of the vertices is slightly non-planar.
So does 3DsMax. And Maya. It's a common abstractation.
It is somewhat similar to what SU does when you smooth an edge - the faces connected to the smooth edge will be treated as one unit. Entity Info will display "Surface".
That is basically what I do with QuadFace Tools. I make two sets of triangles share a smooth edge - then when you click on one of them (assuming you don't have Hidden Geometry on) you get both selected - as one unit.
-
@thomthom said:
@adamb said:
degenerate quads
Not familiar with this definition. What is it?A degenerate quad is one with 1 or more zero length edges. Its topologically a four-sided shape, but may look like a triangle.
Quads can be useful but you often need triangles to close a surface, so having your Tools being able to handle Quads where 1 edge has been degenerated to make a "triangle shape" while still being a quad will be essential.
Basically, does your tool explode if I give it a degenerate quad.
-
@dsarchs said:
Adam,
Sorry about the lack of clarity. I understand it is triangles at the core, but practically blender will still show a quad even if one of the vertices is slightly non-planar. I rarely use blender so I have no idea what best practices are, I just meant to say that that situation can exist. Thanks for the correction.
Understood. Not to be pedantic, but Sketchup also has a planarity epsilon (error term) below which it will consider triangles coplanar. All CAD packages do, because they all use floating point which has finite precision.
-
@adamb said:
@thomthom said:
@adamb said:
degenerate quads
Not familiar with this definition. What is it?A degenerate quad is one with 1 or more zero length edges. Its topologically a four-sided shape, but may look like a triangle.
Quads can be useful but you often need triangles to close a surface, so having your Tools being able to handle Quads where 1 edge has been degenerated to make a "triangle shape" while still being a quad will be essential.
Basically, does your tool explode if I give it a degenerate quad.
Can you even create such a quad in SketchUp given its auto-merging feature?
I have been thinking of how to deal with triangles - as I do recognize that triangles are needed at times. So far triangles are ignored as I've not come up with a solution to them. (I've also not focused so much on them yet as I've put them down as edge cases and focus at the moment on the more common scenarios in order to get a tool set up and running.)
I'd love to get some input on this. -
Would it be possible to do triangles with the help of some Virtual vertices halfway to the third Vertex like this. And then apply UVs to the real vertices.
-
Any triangle can be quadded [ignoring the affects of it on its neighbors' quadness!]... A triangular face has three vertices - no more no less - but finding 4 points on it that are coplanar but not colinear is always possible - these can then be used for UV-mapping... However, deciding which side to align with is perplexing... If it's a 'closing triangle' like the blob 'torpedo' example then the alignment is to the common side to its quad neighbor.
Alternative thought...
The blob torpedo-end example COULD be made out of a set of quads with a tiny set of triangles at the 'apex' - then the UV mapping of those triangles becomes somewhat academic as they will barely have a pixel of texture on them.
If this apex 'umbrella' form is so tiny then the common point of all of the triangles can be tweaked to be coplanar with the other vertices and the unnecessary edges removed - leaving us with a tiny polygon which again can just take the one pixel of texture using the default UV-mapping...Thus we loose the triangle mapping problem as they are all now quads, albeit with one tiny side and the left over tiny polygon is no more problem than a triangle to map, and being so small any texture it has is somewhat academic? -
@tig said:
Any triangle can be quadded [ignoring the affects of it on its neighbors' quadness!]...
The affect on it neighbouring quads cannot be ignored, as they'd become pentas.
And dividing the the triangle into three quads doesn't improve the topology, which is the whole point of working with quads. Quads by them selves isn't automatically good. It's good predictable topology which is the ultimate goal - quads are just the tool. -
I appreciated in my comment that quadding a triangle is most likely to mess with it's neighbors' quadness...
However, my second plan to quadify the triangles with the insertion of a tiny fourth side and be left with one tiny polygon 'to worry about' [not] might have some mileage left in it -
hmm... I'm thinking there too many edge cases to that. And would you really want a model with lots and lots of tiny edge fragments which the user can't hardly see? Quite possibly cause incorrect snapping and whatnot...
I'd rather find a way to deal with the triangles as is. Find a way to fit them into the system.
-
Could you use the ideas in the 4 points made from my 'quadded' triangle example [you don't actually divide the faces! just find pt 4] to map the UVs onto the triangle this would take the edge shared with a quad for one alignment automatically as the pt 4 is always centered on that shared edge and offset at a right-angle giving the other alignment, with the other aligned to a joining quad edge?
Advertisement