10
$\begingroup$

I have an object already created in blender, a tree, or a human, or a pipe.. and I need this to be drilled with multiple holes.

The holes are painted in an image, that is, it is an image that has a repeating an images pattern (they can be circles, squares, or any form).

Here are some examples for drilling-pattern:

enter image description here enter image description here

$\endgroup$
  • 1
    $\begingroup$ Related: How can I make a hexagonal grill? $\endgroup$ – cegaton Apr 2 '18 at 17:54
  • $\begingroup$ And How to generate a metal mesh? $\endgroup$ – cegaton Apr 2 '18 at 17:57
  • $\begingroup$ Well I try with the Knife project tool in edit mode .. it is not perfect sollution but it works... $\endgroup$ – Andres Reyes Apr 5 '18 at 20:43
  • $\begingroup$ Well, the knife project tool on edit mode is very easy, just put in front of the object to be affected, the design wished, in my case I imported an svg image and convert it to a mesh.. it works. I would to try several times with diferent sizes with the svg images. $\endgroup$ – Andres Reyes Apr 7 '18 at 18:41
  • $\begingroup$ Ok I will . I am new on this page.. $\endgroup$ – Andres Reyes Apr 8 '18 at 6:09
11
$\begingroup$

Assuming Cycles (and using your first sample image), you can achieve this effect using a volumetric material to render the insides of any 'holes' in the mesh :

result

This is achieved with the following material :

material

The 'surface' is a mix between a Transparent shader and a Diffuse shader (or whatever surface shader you want to use) - using the image as the mix factor. Unfortunately you cannot use UV coordinates for this since the coordinates need to also be used for the volumetric (and UVs don't support points below the surface - in my case I have used Object coordinates, passed through a Mapping nodes to allow them to be rotated and scales as desired.

For the 'internal' structure, the same image is used to affect the density of the volumetric - for the 'spaces' the density will be zero (ie, empty space) while for the 'solid' sections the density needs to be high so as to appear solid. This can be achieved using Maths nodes (in this case, Subtract from 1 (as the 'black' in the image was to be 'solid', the white 'trasparent') and then multiply by 15 for the 'high' density - even higher values will make the 'internal' substance less translucent). The Volume Scatter and Volume Absorption setup is the same as would be used for smoke (just higher density than would be typical for smoke).

To increase the quality of the volumetric you may need to decrease the 'step' size in the volumetric properties (although this will slow down the render). Also, don't forget to set Light Paths Volume scattering (in Render properties) to more than 0 (eg, 4 or 5 should be sufficient).

$\endgroup$
  • $\begingroup$ It looks very complex! but professional, I would to be honest, I don;t understand it.. I should learn first this new area called Cycles.. $\endgroup$ – Andres Reyes Apr 4 '18 at 4:29
  • $\begingroup$ It looks nice! It is like a very complex Boolean operation over those objects but it is automatic he! It would be very amazing if something like that would be incorporated on a script. $\endgroup$ – Andres Reyes Apr 4 '18 at 4:44
  • $\begingroup$ Thanks. Cycles is well worth the effort to learn - it's not as complicated as it looks and produces much more realistic results than Blender Internal render. From your comments on other answers it looks like you're looking for actual changes to the mesh rather than a purely visual effect (using volumetrics effects such as this cannot be 3D printed as there is no change to the underlying mesh). I suspect a 'true' boolean operation on the mesh would be better suited to your needs - which means using an image to drive the 'holes' is probably not practical. $\endgroup$ – Rich Sedman Apr 4 '18 at 5:56
  • $\begingroup$ Mmm Can be possible to import a mask from and image and apply that to the object mesh and then delete the faces selected ... ??? the faces selected should been the graphics wished.. $\endgroup$ – Andres Reyes Apr 4 '18 at 16:42
  • $\begingroup$ If you want holes in your actual mesh (rather than just the appearance of holes) I think your only option will be to create a mesh instead of the image and use Array modifiers to replicate it, and use Boolean modifier to subtract it from your mesh - but then you aren't sourcing the 'subtract' from an image. I don't believe this is possible directly from an image without creating a mesh from the image first. $\endgroup$ – Rich Sedman Apr 4 '18 at 21:59
8
$\begingroup$

It all depends on how you are going to use the model.

If all you want is an image to be rendered then use the white part of image to control the transparency of the object.

enter image description here

Or

enter image description here

$\endgroup$
  • $\begingroup$ Thank you! it looks nice but I really need true holes in the geometry because the object should be printed.. $\endgroup$ – Andres Reyes Apr 4 '18 at 4:31
  • $\begingroup$ Mmm Can be possible to import a mask from and image and apply that to the object mesh and then delete the faces selected ... ??? the faces selected should been the graphics wished.. $\endgroup$ – Andres Reyes Apr 4 '18 at 16:42
  • $\begingroup$ It's all about texture mapping. Assigning the texture you want to the faces you want to affect. $\endgroup$ – cegaton Apr 4 '18 at 17:36
5
$\begingroup$

If you need real geometry instead of a texture), you can use the image to create the base mesh for the holes

enter image description here

Then use the Mesh Tissue Addon to create a new mesh with the holes in it.

enter image description here

The tissue addon lets you use two meshes, one for the final shape of the object and one for the geometry of each of the faces. A third new tesselated shape is created that way.

enter image description here

enter image description here

For detailed instructions on how to use the addon use this link: http://www.co-de-it.com/wordpress/code/blender-tissue

$\endgroup$
  • $\begingroup$ Honestly, when I saw your solution I was very happy.. but a human object is very complex .. have thousands of faces and this add-on could not handle that complexity.. the computer was freezes several times. :( $\endgroup$ – Andres Reyes Apr 4 '18 at 4:34
  • $\begingroup$ Other issue found with this solution was than the object have a lot of different faces, about sizes and rotations. $\endgroup$ – Andres Reyes Apr 4 '18 at 4:36
  • $\begingroup$ There are quite a few options to use the Mesh Tissue addon. For complete control you can use the UVs to determine how the faces are affected. $\endgroup$ – cegaton Apr 4 '18 at 4:38
  • $\begingroup$ Can you please tell me more about that UVs area... $\endgroup$ – Andres Reyes Apr 4 '18 at 4:47
1
$\begingroup$

You could use the Boolean modifier to alter the base mesh (making 'real' holes rather than just the appearance of holes). This can be achieved directly from the image by way of a Displace modifier - however, this is far from efficient due to the very large amount of subdivision required, so be warned!

Add a plane to the scene and add a Texture set to the image to use for the mask.

plane texture

Add a Subdivision Surface modifier to the plane. Ensure it's set to 'Simple' (so it subdivides without distorting the original mesh). You may need to add multiple Subdivision Surface modifiers to get the required subdivision levels (there's an upper limit of how many levels of subdivision each modifier can apply). Below the Subdivision Surface modifiers, add a Displace modifier using the texture created from your image as shown below :

plane modifiers

Adjust the Displace settings (Midlevel and Strength) until you get a surface suitable for carving out from your mesh :

plane displaced

Next you need to ensure your target mesh is manifold - effectively a complete solid - since the Boolean can produce unexpected results if the mesh is not manifold (it cannot determine what is 'in' and what is 'out'). The default Suzanne mesh is not manifold, due to the eyes, and so needs some minor tweaks - I removed the 'eyes' and filled in the sockets to make it manifold :

manifold suzanne

Now you can add a Boolean modifier. Set the Operation to Intersect and the Solver to 'Carve' (this allows the 'cutting' object to be non-manifold, to slice out sections of the target mesh).

Boolean

This can produce the following result. Note that you'll need to crank up the levels of subdivision to get sufficient detail from the image for well defined rounded holes (otherwise it becomes very 'pixelated'). The resolution of your image is also significant here.

result

Note that this method is very CPU intensive due to the very large number of generated faces required. A better method would be to dispose of using an image and to model the 'mask' mesh directly - eg, by creating a cylinder and using Array modifiers to duplicate it into a grid.

$\endgroup$
0
$\begingroup$

Well, I use the knife project tool on edit mode. Just I put in front of the object to be affected, the design wished, in my case I imported an svg image and convert it to a mesh.. it works. It is like boolean operation but it is more fast. When those finish it just mark the faces affected, if you are agree with them then just deleted them, or you can modify the selected faces and choose more or less..

I would to try several times with diferent sizes with the svg images.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.