Page 1 of 2
Box or Gaussian filtering on bump
Posted: Thu Apr 12, 2018 8:04 am
by aybekdes
Hello everyone,
Is it possible to add/use filtering not only to displace maps but to the bump maps as well?
I know that I can achieve this by slightly blurring in photoshop, but then I will have to use 2 images (1. clear 2.blurred) just to bump up or down the image.
like in this example

Maybe it is already implemented and Im missing it somewhere?
Or any other tricks to achieve it?!
P.S. I hope i could explain with my broken English.
Re: Box or Gaussian filtering on bump
Posted: Thu Apr 12, 2018 10:03 am
by bepeg4d
Hi,
try with the OSL GaussianBlur texture node created by Mojave, you need to set the projection of the input texture as OSL UV, then plug the Texture in the input pin of the OSL texture node, load the GaussianBlur.osl script, and finally connect the OSL texture to the desired channel of the material:
ciao Beppe
Re: Box or Gaussian filtering on bump
Posted: Thu Apr 12, 2018 1:29 pm
by aybekdes
Thank you Beppe!
Re: Box or Gaussian filtering on bump
Posted: Thu Oct 25, 2018 2:39 pm
by frankmci
I think it would be well worth paying Mojave to include this OSL in the standard distribution, or better yet, include a hard coded blur node that includes the most common modes, like directional blur, box, radial, gaussian, etc. It's honestly a bit mind-boggling that this has been missing from Octane's basic toolset for so long.
Re: Box or Gaussian filtering on bump
Posted: Fri Oct 26, 2018 3:54 am
by mojave
As a matter of fact I am part of the Octane team, so that should suffice
I just shared this as an example of what users can achieve by extending Octane via OSL nodes.
We would like to add samples like this to the LiveDB so they are easily accessible by everyone so if you have anything to share please let us know.
Re: Box or Gaussian filtering on bump
Posted: Fri Oct 26, 2018 4:48 pm
by frankmci
Hehe, excellent, Mojave, and thanks!
I think using OSL in the LiveDB to extend the functionality of Octane is a great option, as long as those functions are decently documented. Otherwise, I think, "Oh, you could do that with OSL," get's to be a frustrating response to requests for things that are basic features in most systems.
Perhaps (I realize this is probably a plugin developer thing), often-used OSL nodes could be optionally docked right along the other hard coded nodes in the Node Editor. Ahmet has already kindly agreed to look into better organization of the scripts menu in the OSL Code Editor in C4D.
Thanks again for this node; it's something I and the rest of my team had been sorely missing in Octane.
Re: Box or Gaussian filtering on bump
Posted: Fri Nov 02, 2018 12:09 pm
by Notiusweb
Could we get the non-C4D version of this OSL?
thank you so much!
Re: Box or Gaussian filtering on bump
Posted: Fri Nov 02, 2018 1:27 pm
by milanm
This is the original link @mojave posted in the Facebook group (of which I am not a big fan). Make sure to set the projection of your texture to OSL UV for this to work.
https://gist.github.com/anonymous/18de5 ... 93eec13587
And here it is as .osl text file:
Thanks again Arturo, I learned a lot from that code.
Cheers
Milan
Re: Box or Gaussian filtering on bump
Posted: Fri Nov 02, 2018 2:40 pm
by Notiusweb
Hi thank you very much again.
With a colored RGB image, it warps the coloring, almost winds up looking like an "invert".
Any thoughts on how to maintain the integrity of color while still blurring?
Thx!
Re: Box or Gaussian filtering on bump
Posted: Fri Nov 02, 2018 4:22 pm
by milanm
It's hard to say, I guess it depends on the case. In my experience it works best if you keep stepSize to small values (low blurring amount). High iterations (Step count) improve the quality but slow down the rendering a lot. So, to avoid that, I like to lower the resolution by half or quarter using the baking texture node first and then feed that into the GaussianBlur node. That way I can keep Step count to a low number (faster to render) and also reduce the 'infinite sharpness' of procedurals a bit before blurring.
Cheers
Milan