Creating seamless material

Generic forum to discuss Octane Render, post ideas and suggest improvements.
Forum rules
Please add your OS and Hardware Configuration in your signature, it makes it easier for us to help you analyze problems. Example: Win 7 64 | Geforce GTX680 | i7 3770 | 16GB
Post Reply
franchais
Licensed Customer
Posts: 104
Joined: Fri Mar 02, 2012 2:44 pm

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
I7 2600k | EVGA gtx 680 FTW 4gb | Win 7 x64 | 16gb RAM
HHbomb
Licensed Customer
Posts: 1374
Joined: Wed Jun 30, 2010 8:45 pm
Contact:

you need to combine multiple turbulence textures with different scales and orientations, there will still make tiles but at very far pov
YOKO Studio | win 10 64 | i7 5930K GTX 3090 | 3dsmax 2022.3 |
Renart
Licensed Customer
Posts: 70
Joined: Mon Jul 04, 2016 8:21 pm

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
franchais
Licensed Customer
Posts: 104
Joined: Fri Mar 02, 2012 2:44 pm

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?
I7 2600k | EVGA gtx 680 FTW 4gb | Win 7 x64 | 16gb RAM
User avatar
bepeg4d
Octane Guru
Posts: 10352
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

Hi franchais,
you need 3.08test 6, to try out OSL nodes.
before
before
after
after
texturetiling.orbx.zip
(2.5 MiB) Downloaded 404 times
ciao beppe
franchais
Licensed Customer
Posts: 104
Joined: Fri Mar 02, 2012 2:44 pm

Thanks Bepe, that worked. Just one thing, where did you gett the osl editor on the bottom right of your image?
I7 2600k | EVGA gtx 680 FTW 4gb | Win 7 x64 | 16gb RAM
User avatar
bepeg4d
Octane Guru
Posts: 10352
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

Hi franchais,
you need to enable the Script development option in Preferences/Application:
5483A275-4501-44BC-BC09-577DCB844A21.jpeg
ciao beppe
User avatar
v-cube
Licensed Customer
Posts: 491
Joined: Fri Jul 22, 2011 11:02 am
Location: Aachen, Germany
Contact:

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
Architectural Rendering Services
1 x 4090 GTX, 1 x 3090 GTX
http://www.v-cube.de
User avatar
bepeg4d
Octane Guru
Posts: 10352
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy
Contact:

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
Post Reply

Return to “General Discussion”