32
$\begingroup$

For a Cycles material I need to blur a texture. If the texture where a Texture Image node, I can blur the image before adding it but in my case I need to blur a Voronoi Texture and so I can't do it.

I have searched but I didn't find a blur node. Can this be achieved?

$\endgroup$
  • $\begingroup$ The only thing I can think of is to bake it first, then use as an Image Texture node, which is a fairly dirty way however. See the coming new feature Cycles Baking. $\endgroup$ – Leon Cheung May 15 '14 at 15:40
  • $\begingroup$ Interesting future that can help doing what you said. $\endgroup$ – PhoneixS May 15 '14 at 16:27
  • 1
    $\begingroup$ Possible duplicate of How to smooth or blur a procedural texture? $\endgroup$ – 10 Replies Dec 9 '16 at 13:39
  • 1
    $\begingroup$ @10Replies This question was asked over two years before that one. $\endgroup$ – JakeD Dec 9 '16 at 15:24
  • 1
    $\begingroup$ @10Replies It doesn't matter, it still isn't a duplicate. You can link to it as another question that could provide a good answer, but it isn't a duplicate just the same. $\endgroup$ – JakeD Dec 9 '16 at 17:37
22
$\begingroup$

I have found that b°wide NodePack contains a blur node! It's called ImageBlur.

What it does is play with the vectors to blur it, something like if a ray comes it collide to multiple points (effectively blurring the texture). I don't know exactly how, but here is a screen capture of the node expanded.

Image of the group node

Note that in the background I have used it for testing in a ImageTexture node with a camera vector, that is processed by the ImageBlur and then passed to the ImageTexture vector input.

You can see all its nodes for your use (it is in public domain) from b°wide nodepack for blender and you can download it in blendswap. It have many usefull nodes.

$\endgroup$
10
$\begingroup$

Sadly, filter, matte, or distort nodes, like the ones in the compositor, are not available for the textures in the material nodes.

But a work around it is to use the "Map UV" node in the compositor to "remap" or alter the texture of a rendered object, based on the UVs of an object.

On this example the cube and the sphere have a voronoi texture as a texture on the their diffuse shader materials.

enter image description here

To blur the texture on the Cube this is what you'd do:

UV unwrap your object.

Assign a material and give it a pass index number.

enter image description here

Enable the UV and Material in the render layer passes.

enter image description here

Hit F12 to render.

In the compositor you would remap the UVs of the rendered object with a texture that has a blur filter applied to it.

Use the Index MA output and ID Mask of the material as the factor to mix the unblurred elements with the blurred ones.

enter image description here

enter image description here

Details on the MapUV node: http://wiki.blender.org/index.php/Doc:2.4/Manual/Composite_Nodes/Types/Distort

The MapUV technique works also for masks and keys and other nodes not available for texturing. It can also be used to replace the textures on images that have already been rendered and saved as Open EXR in multilayer mode.

If what you're looking for is to affect a texture used as a displacement on a material this solution will not work for you.

$\endgroup$
9
$\begingroup$

To blur such a procedural texture, you can't simply add a 'blur' node or similar. Instead, you need to manipulate the input Vector to distort the texture and then rely on the Render Samples to produce the blurring.

One easy way of achieving this is to add the nodes shown.

blur nodes

Use the relevant output of the Texture Coordinate node (Generated, Object, UV, etc) depending on how you want the texture (and blurring) to be applied. The 'Subtract' node is set to its default (mid-gray) with factor set to 1.000 - this is to adjust the Noise texture to ensure the blurring is even. The Noise texture is set to a very high scale and the Factor of the Add node can be adjusted to change the strength of the blur (0 = no blur, 1.0 is maximum blur).

As mentioned, you should set your Render Samples (on the Render properties) to a higher value so as to allow the rendering enough samples to produce a clean 'blur'.

Samples

Examples showing no blurring and blurring :

no blurblurred

$\endgroup$
9
$\begingroup$

This method will help you to blur an image in cycles (not using compositor)

The b°wide NodePack has a node group called IMAGEBLUR which can blur a texture in cycles.

The download is on blendswap.

Download the 'b-wide node pack' and follow the instructions:

  1. Unpack the downloaded file
  2. Open BLENDER, go to the cycles material node editor, and setup image texture you want to blur

enter image description here enter image description here

  1. Click FILE--> APPEND--> (FIND THE UNPACKED 'b-wide_NodePack' FOLDER)--> b-wide_NodePack.blend--> NodeTree--> ImageBlur, and then LINK/APPEND FROM LIBRARY

enter image description here

  1. In Node Editor window press SHIFT+A--> Group--> ImageBlur

enter image description here

  1. Place the ImageBlur node between Texture Coordinate and Image Texture nodes and adjust the blurriness factor

enter image description here

6.Don't go too far ;)

enter image description here

The blurred image is quite grainy, but you can improve its quality increasing the number of Samples in Render Settings

enter image description here

$\endgroup$
  • 3
    $\begingroup$ Isn't this exactly what the answer at the top already shows? $\endgroup$ – Ray Mairlot Nov 1 '14 at 18:11
  • 1
    $\begingroup$ It is the same. But this one explain how to use it. $\endgroup$ – PhoneixS Nov 3 '14 at 8:00
  • $\begingroup$ @Gonzou Please, for other post that you make, please use less uppercase words. Instead, use italics (surround with *) or inline code-block (surround with `). $\endgroup$ – PhoneixS Nov 4 '14 at 10:52
1
$\begingroup$

You could make sure resolution is high and vertex paint with a voronoi brush texture, then blur it with vertex paint tool. Then mix into nodes with the Col attribute.

$\endgroup$
  • 1
    $\begingroup$ Whomever downvoted this answer should have explained why! I think it's very rude to do that to a person: an explanation would have been much more appreciated and civil so we can all learn from it! $\endgroup$ – Miracles Happen Aug 13 '18 at 13:17
1
$\begingroup$

Sadly blender node cycles material editor doesn't have any kind of convolution matrix to start with so here's the only way I can think of doing it, so I tried to apply this convolution matrix

0 1 0

1 2 1

0 1 0

for that purpose I created 5 identical textures and to each one connect the same texture coordinates displaced by a certain amount, then sum up the normalized contributions of each texture to get 1

and this is the result I get enter image description here This is the texture not blurred for reference enter image description here I respond so maybe anyone could came with a better idea based on translating the UV texture coordinates because this is by far not practical. With this approach even displacement maps could be blurred.

$\endgroup$
  • $\begingroup$ I've created a 5x5 convolve at blendswap.com/blends/view/90979 . Sampling function is in a node group so that it can be changed and affect all 25 lookups. Should work well enough for this purpose. $\endgroup$ – Nathan Apr 18 '18 at 16:41

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.