whodini Posted November 11, 2013 Share Posted November 11, 2013 Hey guys, I'm looking into a way to group primitives based on their UV tile. I know how to do this in the viewport by switching to the UV view and selecting the faces of the geometry in the tile I want and clicking group in the shelf. However, I'm looking for a way to do this in vops or using an expression. I want a procedural way to do this. I don't know if the tiles are numbered or how I would go about doing this. Quote Link to comment Share on other sites More sharing options...
acey195 Posted November 12, 2013 Share Posted November 12, 2013 (edited) well if you are using vopsops you need your UVs to be point UVs (or convert them with an attribute promote) after that you can use something like a floor to to see in which tile the UVs are. After that you could group the UVs by comparing the floor result with something. You could also use a modulo in between if you want to select every other UV tile for instance. The same logic applies for using expressions something like floor($MAPU)>0, to select everything beyond the 0-1 range or floor($MAPU)%2==0 to select every other UV tile for the V direction you can use $MAPV Edited November 12, 2013 by acey195 Quote Link to comment Share on other sites More sharing options...
whodini Posted November 12, 2013 Author Share Posted November 12, 2013 thanks! thats a great idea. I'll give it a go Quote Link to comment Share on other sites More sharing options...
DanBode Posted November 12, 2013 Share Posted November 12, 2013 Another way to do this is to use the Connectivity SOP with connectivity set to primitive, and "Use UV Connectivity" checked on. This will give you a unique class attribute for each connected set of uvs. Then just follow it up with an Partition SOP to make groups based on the class attribute. 2 Quote Link to comment Share on other sites More sharing options...
anim Posted November 12, 2013 Share Posted November 12, 2013 promote your uvs to primitive (works best from vertex), you may want to keep the original so uncheck Delete Original then just append Partition SOP and write this as a rule uvtile_`int($MAPU)`_`int($MAPV)`[/CODE] 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.