Hi,
I've noticed that using the OSL node "blur" works well, but increase a lot the render times, when pushing iterations up.
Is there an other way/node to blur input textures without increasing render times ?
Thank you
Blur OSL node and render time
Moderators: ChrisHekman, aoktar
Yes, this is awful that Octane doesn't have real built-in blur node. Even simple contrast in color correction node doesn't work well.
Sometimes you can achieve good result using Baking node with low resolution. It is effective for smoothing bumps and roughness.
Sometimes you can achieve good result using Baking node with low resolution. It is effective for smoothing bumps and roughness.
Architectural Visualizations http://www.archviz-4d.studio
How have you manged to get the Blur.OSL to work?
I was following this tut (for RS) and trying to mimic it in Octane for 3dsmax (not that it matters much)- but couldn't.
could you elaborate on how you did it? or maybe post a screengrab of the flow?
Darby Edelen's wonderful set:
https://github.com/.../RedshiftOSLSha.. ... /README.md
How to apply in RS:
https://youtu.be/D65HyxaC35o?si=mew5R61-2-ooIH3v
Here is a link to FB where I've asked the community for assistance:
https://www.facebook.com/groups/OctaneR ... 278479467/
I was following this tut (for RS) and trying to mimic it in Octane for 3dsmax (not that it matters much)- but couldn't.
could you elaborate on how you did it? or maybe post a screengrab of the flow?
Darby Edelen's wonderful set:
https://github.com/.../RedshiftOSLSha.. ... /README.md
How to apply in RS:
https://youtu.be/D65HyxaC35o?si=mew5R61-2-ooIH3v
Here is a link to FB where I've asked the community for assistance:
https://www.facebook.com/groups/OctaneR ... 278479467/
Oops. I thought I had added a picture in my reply. Here you go. The setting is in the standard Texture Projection node.ofirgardy wrote:Yes. I understood this just like you did. But failed to recreate.
Do you have any idea how to implement this (even in C4D) I guess I could match it in Max.
Animation Technical Director - Washington DC
I can see you've started with a specular material.
then plugged what? the Blur.OSL into the Albedo? or is it another type of OSL there?
Then second is the Checkers? or is the Second one titled "Image Texture" is that the Blur.OSL?
the last one - the delayed Projection - this one is straight forward
then plugged what? the Blur.OSL into the Albedo? or is it another type of OSL there?
Then second is the Checkers? or is the Second one titled "Image Texture" is that the Blur.OSL?
the last one - the delayed Projection - this one is straight forward
It'sofirgardy wrote:I can see you've started with a specular material.
then plugged what? the Blur.OSL into the Albedo? or is it another type of OSL there?
Then second is the Checkers? or is the Second one titled "Image Texture" is that the Blur.OSL?
the last one - the delayed Projection - this one is straight forward
Projection Node (OSL Delayed UV) >>
Image Texture Node (just a standard UV check grid image) >>
Gaussian Blur OSL Node>>
Gloss Material (Diffuse channel)
This is the GaussianBlur.osl that currently ships with Octane C4D:
Code: Select all
#include <octane-oslintrin.h>
#define MAX_ITERATIONS 10
#define MAX_KERNEL_SIZE 11 // MAX_ITERATIONS + 1
// OSL sample implementation of gaussian blur for Octane Render
shader GaussianBlur(
color in = 0
[[string label = "Input texture"]],
int iterations = 5
[[int min = 0, int max = MAX_ITERATIONS,
string label = "Step count",
string description = "Number of steps"]],
float stepSize = 0.001
[[float min = 0.00001, float max = 0.01,
string label = "Step size",
string description = "UV distance between steps"]],
output color out = 0)
{
if (iterations == 0)
{
// just return the input with the right UV mapping
out = _evaluateDelayed(in, u, v);
}
else
{
float kernel[MAX_KERNEL_SIZE];
// initialize the kernel
float normFactor = 0;
for (int i = 0; i <= iterations; ++i)
{
// use normal probability density function with sigma = 7
float n = 0.05699175 * exp(-0.01020408 * i * i);
normFactor += i == 0 ? n : 2*n;
kernel[i] = n;
}
// average the neighbours
color c = 0;
for (int i = -iterations; i <= iterations; ++i)
{
float n = kernel[iterations - abs(i)];
for (int j = -iterations; j <= iterations; ++j)
{
float f = n * kernel[iterations - abs(j)];
c += f * _evaluateDelayed(in, u + i * stepSize, v + j * stepSize);
}
}
// calculate the final value
out = c/(normFactor*normFactor);
}
}
Last edited by frankmci on Thu Mar 21, 2024 5:48 pm, edited 1 time in total.
Animation Technical Director - Washington DC
Oh... so it's a different type of bluring OSL, different than the one on the yt video. Yes?
Since that "blur.osl" doesn't have an in-connection for hooking an rgb texture (at least not in the manifestation of it on 3dsmax).
I'll search for another OSL solution.
Since that "blur.osl" doesn't have an in-connection for hooking an rgb texture (at least not in the manifestation of it on 3dsmax).
I'll search for another OSL solution.