Page 1 of 1
Creating seamless material
Posted: Wed Dec 13, 2017 11:57 pm
by franchais
Hi,
I've been trying to create seamless/non tiling grass material. I've tried using turbulence and the new uvw mapping but I can still see the tiles.
Any texture gurus out there that can help me out?
Thanks
Re: Creating seamless material
Posted: Thu Dec 14, 2017 7:14 am
by HHbomb
you need to combine multiple turbulence textures with different scales and orientations, there will still make tiles but at very far pov
Re: Creating seamless material
Posted: Wed Dec 20, 2017 12:18 pm
by Renart
You can use an OSL Texture node:
Code: Select all
// Shader : Texture Tiling OSL shader
// Author : Hayssam Keilany
//
// Description :
//
// Meant to "break" the repeating patterns on textures
// Very simple version, could be improved by anyone if they feel like it :)
// REMINDER : YOU NEED TO USE "OSL UV" IN THE PROJECTION NODE
#include <octane-oslintrin.h>
color dissolve(color tex1, color tex2, float mix, float noisescale)
{
float rnd = noise("noise", P * noisescale);
color c;
if(rnd < mix)
c = tex2;
else
c = tex1;
return c;
}
shader Texture_Tiling
(
color texinput = color(1,1,1)
[[string label = "Input (Texture)"]],
float scale=4.0
[[string label = "Tiling Scale", float min=0.0, float sliderexponent=4,float max=10]],
int pixelate = 1
[[string label = "Enable Pixelation",string widget = "boolean"]],
int blurmode = 0
[[string label = "Enable Blur Mode",string widget = "boolean"]],
float blursize = 0.5
[[string label = "Blur Size",float min = 0.0, float sliderexponent=4, float max=1]],
float noisescale = 6
[[string label = "Noise Size",float min = 0.0, float sliderexponent=4, float max=100]],
output color c=0
)
{
float u_tile; float v_tile;
// "pixelize" the texture
if (pixelate)
{
u_tile = floor(u * scale);
v_tile = floor(v * scale);
}
else
{
u_tile = u;
v_tile = v;
}
// offset it
// can be changed to "cell" but voronoi looks more natural
float u_jit = noise("voronoi", u, v_tile * scale + v_tile);
float v_jit = noise("voronoi", v, u_tile * scale + u_tile);
// add with untouched UV
float xoffset = u + u_jit;
float yoffset = v + v_jit;
// declare the textures to blur
color tex1 = _evaluateDelayed(texinput, xoffset , yoffset );
color tex2 = _evaluateDelayed(texinput, xoffset+blursize , yoffset );
color tex3 = _evaluateDelayed(texinput, xoffset , yoffset + blursize);
color tex4 = _evaluateDelayed(texinput, xoffset - blursize, yoffset - blursize);
// choose between dissolve or blur
if (blurmode) c = (tex1 + tex2 + tex3 + tex4) / 4;
else
{
color c1 = dissolve(tex1, tex2, 0.5, noisescale);
color c2 = dissolve(c1 , tex3, 0.5, noisescale);
c = dissolve(c2 , tex4, 0.5, noisescale);
}
}
Just plug your map in the Input and don't forget to change the projection to OSL
Re: Creating seamless material
Posted: Mon Jan 08, 2018 3:49 am
by franchais
thanks guys. How do I use the OSL text you have shown below? sorry abit new to this. I tried looking for the OSL node on standalone but I couldn't find it?
Re: Creating seamless material
Posted: Mon Jan 08, 2018 10:31 am
by bepeg4d
Hi franchais,
you need
3.08test 6, to try out OSL nodes.

- before

- after
ciao beppe
Re: Creating seamless material
Posted: Tue Jan 09, 2018 3:04 am
by franchais
Thanks Bepe, that worked. Just one thing, where did you gett the osl editor on the bottom right of your image?
Re: Creating seamless material
Posted: Tue Jan 09, 2018 8:31 am
by bepeg4d
Hi franchais,
you need to enable the Script development option in Preferences/Application:
ciao beppe
Re: Creating seamless material
Posted: Tue Jan 16, 2018 12:53 pm
by v-cube
Hi bepeg4d,
I just tried this out and I have to say that this is totally A W E S O M E
That is for me like a real new feature of Octane! I tried this aproach with very bad tiling textures and got acceptable outcome!
I think this is a game changer for texturing with with bitmaps... and I could imagine it is just the beginning...
I really hope It will work within the Rhino plugin soon ...
thank you so much for posting!
best
Andreas
Re: Creating seamless material
Posted: Wed Jan 17, 2018 9:59 am
by bepeg4d
Hi Andreas,
happy to hear that you are having fun with OSL nodes

Thanks to Hayssam Keilany for sharing this great script

Happy GPU-OSL Rendering,
ciao beppe