workaround for Triangulate/Quadrangulate?

   10500   2   2
User Avatar
Member
245 posts
Joined: Sept. 2008
Offline
I know it is possible to use Triangulate2D or Tetrahedralize on 2D surfaces (tetra must be put into 3D space first with adjustments to the points of the surface) in order to tessalate geometry (polys).

What I am interested in is making Quads from tessalated triangles on a surface.

Let us suppose I have the letter L drawn in a cursive way and it is a Poly that does not require the Hole SOP. Let us also suppose I resampled the edges uniformly placing evenly spaced points around the edges and tesselated the geometry.

My thinking is that I could somehow in a process take 2 groups: The first group groups 0 to n number of polys 2 at a time and the second does the same starting with the alternate beginning set of 2 polys that was not captured in the first group. I could then dissolve the inner edge of the triangle pair using a Divide SOP and removing shared edges. But what if my poly count is random? And what if the point count is random or ordered?

Would it be possible through CHOPS or some other attribute transfer method to reorder the polys according to their connection to one another? Starting with one end of the entire piece of geometry and working the way around? I have tried the connectivity and partition sops without success.

Any suggestions?
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
I implementing this this way:

- write a python sop that returns the longest edge of tris in a group as an edge group

- generate another edge groups including edges that have a large angle in between their primitives (min angle and max angle option under egde). These are your “feature” edges you do not want to lose

- subtract the long edges group with the feature edges group

- then dissolve edges in the remaining group

the result is a pretty dang decent quadrangulate sop. Works great on meshes with an obvious underlying quandrangular mesh, but not so great on meshes with very even triangles (i.e. from the remesh SOP)

I unfortunately cannot post mine due to being for my company but give this approach a whirl
-G
User Avatar
Member
245 posts
Joined: Sept. 2008
Offline
Thank you grayO . . . your explanation seems to make perfect sense. Unfortunately I am not a Houdini user (probably in the minority here) who is well versed in scripting, especially not python. I once knew a little Hscript years ago but only scratching the surface to open corrupt files and fix the display flag of a bad sop and resave.

I would like to know where I can begin to investigate how to write python scripts for Houdini. I know a little ECMA (Actionscript) but only a little, though I am learning more daily. Can you point me in the right direction? Books, links, etc? I once bought a children's python book to see how turtle works as I recall this drawing program from elementary school.
  • Quick Links