1
$\begingroup$

Would there be any way to generate a 3D mesh (that would conserves the shape of the original textured object as if shrinkwraped) from a black and transparent 2D texture?

For example, on the image below, the objective would be to generate a mesh from the black color only, (separating it from the transparent part of the texture)

enter image description here

$\endgroup$
1
  • $\begingroup$ What do you mean by "shrinkwrapped" plane and "3D object"? The texture only has 2 dimensions, meaning that as a plane it'll be a XY two-dimensional object. Did you mean create a mesh with surface only there's black in your example (ignoring what was said about planes because it has nothing to do with the question)? $\endgroup$
    – Rhaenys
    May 29, 2022 at 20:22

3 Answers 3

1
+50
$\begingroup$

This question is confusing and the OP didn't clarify it yet, but I don't want to risk losing the drafted answer to what I think is the issue, so here it is.

Geometry Nodes make it simple to generate a mesh from a texture applied on something.

The idea is to capture the texture in the base mesh points, deleting those falling outside the value threshold. This will leave you with a mesh containing only the vertices painted in the desired value.

Texture-based mesh cutout

Most work here is done to ensure the mesh is dense enough to capture the texture faithfully. Use the basic Subdivide Mesh node whenever possible, because the Subsurf one is much more performance-intensive.

This texture was created directly in Geometry Nodes. You can load external ones using the Image Texture node instead, plugging your UVmap in the vector input.

It's a good idea to Decimate the resulting mesh, because it's likely to be dense enough to slow blender to a crawl.

$\endgroup$
1
$\begingroup$
  1. Enable "Add Images as Planes" Add-on.
  2. Add an image of choice:

  1. In numbers panel remove the rotations of the object.
  2. Create a Geometry Nodes setup:

  1. You can now disable the material's transparency by changing Material Properties > Settings > Blend Mode to Opaque, and yet the object will remain transparent:

  1. The reason why it's so slow is that the topology has to be dense in order to hit the edges with the vertices. You can now apply the modifier (perhaps you want to apply it without the Extrude Mesh node), and then use Decimate to limit the amount of geometry.
$\endgroup$
2
  • 1
    $\begingroup$ Do the 2 Subdivide Mesh nodes prevent the flat-shaded artifacts or what are they good for? (You could enter the number 10 to exceed the slider limit of 6). -- Wow the Extrude Mesh node creates a lot of inner faces. You noted that in point 6, right? Wouldn't a Solidify node be a better choice? $\endgroup$
    – Blunder
    May 30, 2022 at 15:50
  • $\begingroup$ @Blunder that must be because I left Individual selected, I didn't actually investigate the mesh, as it was laggy enough to demotivate from playing with it... I know how soft limits work and I'm pretty sure I checked if I can input manually more than 6, so either it was fixed recently or... Or maybe it's one of the cases where I'm pretty sure but still wrong :D $\endgroup$ May 30, 2022 at 15:53
1
$\begingroup$

By now there are already two answers, but I'm posting my started answer anyway because it shows how to use the UV map and it features the Compare node with colors. Maybe it will help someone.

The Subdivision Surface modifier is used because the Catmill-Clark mode gives you a smoother result than the Subdivide Mesh node in Geometry nodes that basically has only the Simply mode. (You can see the "flat-shaded" artifacts of Simple mode on a sphere.)

The "3D sculpts" have also a Solidify, Smooth and Decimate modifier to reduce the poly-count. Warning: Don't try to move around such a mesh with all the modifiers active because it creates a crazy lag and makes Blender unresponding. Turn them off with the "monitor icon" before you move the object.

The sphere at the top left is the textured original model. The other ones are created with the modifiers.

example

$\endgroup$
2
  • $\begingroup$ There's Subdivision Surface node: i.imgur.com/xSaLWTS.png $\endgroup$ May 30, 2022 at 15:50
  • 1
    $\begingroup$ Oh, thanks! I see, this is what Rhaenys mentioned. So, Subdivide Mesh is kinda like the Subdivision Surface modifier in Simple mode and the Subdivision Surface node is like the Subdivision Surface modifier in Catmill-Clark mode: i.sstatic.net/xPyyH.jpg $\endgroup$
    – Blunder
    May 30, 2022 at 16:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .