How to create a group from UV seams?

   13823   8   5
User Avatar
Member
466 posts
Joined: Aug. 2014
Offline
Hello.
I'm trying to group all UV seams together, so I can apply hard edges to them with a Normal SOP. My UVs are stored as vertex attributes and must remain as such.

I tried approaching the problem with a Group SOP, but I'm unsure of what grouping expression should I be using to achieve the goal. I found an HScript function called “seampoints”, but it works on “seam” point attribute which, from what I reckon, is related to DOPs.

I'd appreciate any suggestions, because resolving this problem will let me to eliminate an extra step from my pipeline, which involves the use of 3rd party software just to perform this specific operation.

AJ
User Avatar
Staff
107 posts
Joined: Feb. 2009
Offline
Hello,

This isn't completely an answer to your question, because it will not result in an edge group. However, if you're goal is to generate hard edges between UV seams, you can do the following:

Add a ‘vertex split’ node, with the attribute set to UV ( This requires vertex uvs ).

This will cause your mesh to split along the UV seams.

Add a normal SOP and do you normal calculation, because the UV seams are ‘split’ the seams will naturally become ‘hardened’.

Add a ‘Fuse’ SOP, which will fuse the points back together, but your Vertex Normals should be fine!

Good luck.

Cheers,
Scott
—————-
Scott Keating
Product Designer
SideFX Software
—————-
User Avatar
Member
99 posts
Joined: Sept. 2006
Offline
I am looking into simmilar problem
want to group uv islands , shells and also borders
UV flatten does island attribute but how do i get to borders?
through delete isolating primitives and then grouping unshared edges?
is there any better way to do it?
User Avatar
Member
2624 posts
Joined: Aug. 2006
Offline
ajz3d
Hello.
I'm trying to group all UV seams together, so I can apply hard edges to them with a Normal SOP. My UVs are stored as vertex attributes and must remain as such.

AJ

hard edges ?

http://circusmonkey.com.au/circusmonkey/Shops.html [circusmonkey.com.au]

Interesting problem originally posted on the list > how on earth to get hard edges and use displacement without tearing.

•Create a new user N
•Copy that N to the geometry
•Add vertex cusp N , set to Cusp N
•In your shader create a parameter > using you new user N > transform that N from object to camera.
•So we are cusping with N and we are using a new user N for our shading.


scene file :- rse_cuspCube_X11_001.hip
Gone fishing
User Avatar
Member
466 posts
Joined: Aug. 2014
Offline
Many thanks for your suggestions guys.

@Scott, I followed the steps you have provided, and it almost works. However I have two problems with a result that this solution returns.
The first problem is that vertex normals that it outputs are slightly different from what I get in my modelling program where I usually “harden” them. This results in different shading. I attached two images as an example.
It is possible that I did something wrong though. I used 180 degrees cusp angle in the Normal SOP, the rest of the operators I left at their defaults, except of the Vertex Split SOP, where I typed “uv” as an attribute name, just like you said.
But the main problem is that the number of points changes, while I need to keep it intact. It needs to be equal to what I have in my input geometry. Point order could be preserved too, because it never hurts to have it the same.

@Circusmonkey, I see that this solution involves Houdini shaders. The problem is that I'm taking this object for normal map baking in xNormal, so anything applied to the shader will be ignored. I should have probably mentioned the fact that this is a game model that will not be rendered in Mantra. Sorry about that.

Attachments:
nvil_vxN.jpg (97.8 KB)
houdini_vxN.jpg (98.2 KB)

User Avatar
Member
466 posts
Joined: Aug. 2014
Offline
Bump. Does anyone know a solution for this problem?
User Avatar
Member
402 posts
Joined: June 2014
Offline
Hi AJ,

If you're happiest getting a group setup then you could use the vertex split from Scott's suggestion, use a group sop with the ‘unshard edges’ option, and then fuse back together. You could also smash a connectivity SOP in there before fusing to be able to reference the islands later on.

You shouldn't be noticing an change in point numbers after the fuse, I haven't had issues with that myself yet, but there is always a first time!

Hope that helps and I haven't missed something dumb…

Cheers,

Henry
Henry Dean
User Avatar
Member
466 posts
Joined: Aug. 2014
Offline
friedasparagus
Hi AJ,

If you're happiest getting a group setup then you could use the vertex split from Scott's suggestion, use a group sop with the ‘unshard edges’ option, and then fuse back together. You could also smash a connectivity SOP in there before fusing to be able to reference the islands later on.

You shouldn't be noticing an change in point numbers after the fuse, I haven't had issues with that myself yet, but there is always a first time!

Hope that helps and I haven't missed something dumb…

Cheers,

Henry
Fantastic. Many thanks, Friedasparagus and sorry for replying a little bit late. I made an HDA that includes Scott's solution and your suggestion, and so far it seems to be working like a charm. I've only had a chance to use it with two models since you posted, but it seems that point order remains untouched.
Thanks again!
User Avatar
Member
4 posts
Joined: April 2014
Offline
This is an old question, but i've stumbled upon it and found solution - Group from Attribute Boudary SOP - Group type: Edges, Attibutes: uv
  • Quick Links