Point indices for vertices along uv seams

   4394   5   0
User Avatar
Member
22 posts
Joined: Oct. 2011
Offline
Hi all
I have notice that houdini produces separated vertices for each polygon, almost like and unwelded model. Can anyone point me the right direction on how to get a point list of only those vertices along the seems of the uvmap.

This is for a custom exporter.
User Avatar
Member
1390 posts
Joined: July 2005
Offline
rom12345
Hi all
I have notice that houdini produces separated vertices for each polygon, almost like and unwelded model. Can anyone point me the right direction on how to get a point list of only those vertices along the seems of the uvmap.
This is for a custom exporter.

hmm… in Houdini lingo vertex is a corner of a polygon, not a point this corner is attached to. Houdini doesn't have to produce unwelded geometry (i.e. npoints==nvertices) and in most cases it doesn't. It's just listing vertices besides points.

Anyway, if your uv is a vertex attribute, you could promote it to a points class, and then group with point expression like:
point(path, $PT, “uv”, 0) ==1 || point(path, $PT, “uv”, 1) == 1

Python code without promoting uv along the line:
geo = mySOP.geometry()
seam =
for prim in geo.prims():
for v in prim.vertices()
if True in ]:
seam.append(v.point().number())

seams = tuple(set(seams))
User Avatar
Member
22 posts
Joined: Oct. 2011
Offline
Many thanx
Will have to chew on this for a bit…
User Avatar
Member
22 posts
Joined: Oct. 2011
Offline
I think I'm understanding, but let me be a little more explicit in what I am trying to achieve.

I would like to transfer geometry to the Unity Game Engine. i know I can use objs, but I would like to transfer 2 uv sets & vertex color via a network socket.

A requirement here is for the number of (unity) vertices (vector3) to match the number of uvs(Vector2).

I am getting a result, as this is the case with each polygon containing discreet vertices, however I end up with a lode of vertices and a unwelded mesh.

What I need to resolve is discontinuous uvs ie those vertices/points which will have more than one uv coord in order to generate extra verts in unity.

so i guess an “unweld along uv seams” is in order.

I suppose I could handle this on the unity side, but sending so much additional data through the socket really slows things down.
User Avatar
Member
51 posts
Joined: Oct. 2006
Offline
Use VertexSplit SOP on you geometry for “uv” attrib, enable “Promote to Point Attribute”. Then just forget about vertices and work with points directly (in other words, after VSplit, Houdini points == Unity vertices).
User Avatar
Member
22 posts
Joined: Oct. 2011
Offline
thanx axebeak
this sounds like it may be “the silver bullet”
  • Quick Links