Jump to content

turn texture details into geometry


Recommended Posts

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?

Link to comment
Share on other sites

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 by coltonmil
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...