Jump to content
Sign in to follow this  
substep

group by UV's

Recommended Posts

Hi, sorry if this is silly question. but how can I create a point group based on UV's? I can see I have Uv's in the details view, and I'd like to group the points whose UV value U == 1 or V ==1. it seems simple enough, but i'm unable to figure it out. Thanks! Or is there a better way to group outside points?

Share this post


Link to post
Share on other sites

use "Group by expression" mode in Group SOP with something like

point(opinputpath(".",0), $PT, "uv", 0) == 1 && point(opinputpath(".",0), $PT, "uv", 1) == 1

or the same using local vars..

Edited by bloomendale

Share this post


Link to post
Share on other sites

ahh this works for me now, I was missing the attribute create sop, which was creating a uv attribute? I thought I already had a UV attribute from the UV texture sop. I can see in details, it changes from uv[0] etc, to uv[x]. please forgive my ignorance, but could you explain this a bit please?

Share this post


Link to post
Share on other sites

to use local variables ($***) you have to create them. Bunch of nodes creates attribs but not the local vars. So you need to add attrib create sop to create them.

uv[x] is a component of a vector attrib while uv[1] - component of the 3-float attrib.

while it seems the same vector attribs will be transformed with your geometry (transform sop etc) but 3-floats won't.

Share this post


Link to post
Share on other sites

ok, that makes sense. I was under the impression it created the variable automatically. not that it matters, but to help me understand, is there any reason some nodes do, and some don't create the variable? I guess that's what I'm seeing in the 'detail' pane of the details view, right?

Your expression was much more clever than mine. I used $UVX == 1 || $UVX == -1 || $UVY == 1 || $UVY == -1 lmao

thanks for the help guys.

Share this post


Link to post
Share on other sites

you don't have to create uvs with attrib create

just access them using $MAPU and $MAPV which Group SOP maps automatically to current uvs

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×