Copy vertex order?

   6884   4   3
User Avatar
Member
129 posts
Joined: July 2005
Offline
Hi, I am trying to find some solution to adjust imported geometry that has its primitive vertex order randomly unordered.

Is it possible to copy vertex order from one primitive to another primitive?
And if so would it be possible to copy vertex order from a singel primitive and apply it to another geometry or rest of current geometry?
User Avatar
Member
7733 posts
Joined: July 2005
Offline
That's not an easy problem to fix in general. First try to see if the SOP_MatchPrimPoints from proto_install works. If that doesn't work, you could try to continue on using the MatchTopology SOP or replace it with the MatchTopology SOP instead.
User Avatar
Member
344 posts
Joined: July 2005
Offline
I vaguely remember trying to do this a couple months ago. I think what I did was assign an attibute to the unordered surface containing the appropriate point index for the desired order and then used a sort SOP, with sort by expression.
User Avatar
Member
321 posts
Joined: July 2005
Offline
SoulVector
Hi, I am trying to find some solution to adjust imported geometry that has its primitive vertex order randomly unordered.

Is it possible to copy vertex order from one primitive to another primitive?
And if so would it be possible to copy vertex order from a singel primitive and apply it to another geometry or rest of current geometry?
The tough part is that vertex order is not an attribute that you can just randomly assign. Vertex order is the actual order of the points that make up the primitive. Change the vertex order, and the connections change.

That being said, there are only two things that can be adjusted: the direction, e.g. clockwise or counter-clockwise, and the starting place, i.e. vtx #0. The challenge of determining clockwiseness is that it is a spatial thing, not a list-thing, i.e. clockwiseness is different depending on point of view. To align two the direction of two primitives, you have to orient them the same. The validity tests for that depend entirely on your geometry and you!

Once you have oriented your two polys the same, you now get to find the zero vertex. At this time, you just count how many vertices off you are, and use the vertex shift feature of the primitive SOP.
Antoine Durr
Floq FX
antoine@floqfx.com
_________________
User Avatar
Member
129 posts
Joined: July 2005
Offline
Thanks for the reply guys.

Edward: I´ve tried both operators and with no luck really.

Antoine: What you say about the vertex order being the order for points in primitives becomes apparent when trying to convert to nurbs since it creates the U and V from the vertex order. If each polygon dont have the same direction and startingplace similar to previous face Houdini will try to create rows&columns from what is.

My idea was originally that I could perhaps Import polygonal geometry and extract “patches” from a quad only topology and create some sort of script in reverse or primitive SOP that could do something like; if any primitive VTX order is different from Primitive X then adjust order to align. Was it something like that you were able to do in Sort SOP MichaelC?

The other thought was that I could transfer VTX order from another geometry that has same amount of faces but a more desirable VTX numbering. It can of course be achieved manually with shift but it would nice to be able to automate it.

Cheers.
  • Quick Links