Ellyfish Posted January 25, 2018 Share Posted January 25, 2018 Say I get a model with a flat face of arbitrary shape and size, UV unwrapped and with a texture. The texture consists of a black background with different shapes on it. Each shape has a unique value for its blue channel, and no two shapes are overlapping without the black background between them. Would it be possible to cut those shapes out, giving me separate, non-touching flat pieces? What about adding an attribute to the resulting geometry that stores the blue value from the shape? Quote Link to comment Share on other sites More sharing options...
coltonmil Posted January 25, 2018 Share Posted January 25, 2018 (edited) Hey Ellyfish! In a pointvop you can use a texture node to pass the color to points, and then use the color as a threshold to remove black areas in a wrangle like so: if (@Cd.b == 0){ removepoint(geoself(),@ptnum); } though typically I like to use a slider for the threshold: if (@Cd.b < ch("thresh")){ removepoint(geoself(),@ptnum); } This will inherently leave the Cd attribute on the points, so that will be a record of the level of blue for each point. Subdividing before the pointvop can provide more fidelity in the process if needed. (The removal of points can be done in the VOP as well, I just prefer the vex method as it's a little quicker and tidier to set up) After the process you can use a connectivity node to give each individual island a unique piece # Edited January 25, 2018 by coltonmil Quote Link to comment Share on other sites More sharing options...
Ellyfish Posted January 25, 2018 Author Share Posted January 25, 2018 Aha. I was having trouble with that method, but then I realized that the UV data is originally a vertex attribute and I had to promote it to a point attribute to access it with the point VOP first. Whoops! Thank you for the speedy help! 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.