Creating seamless material

Forums: 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

Creating seamless material

Postby franchais » Wed Dec 13, 2017 11:57 pm

franchais Wed Dec 13, 2017 11:57 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
franchais
Licensed Customer
Licensed Customer
 
Posts: 104
Joined: Fri Mar 02, 2012 2:44 pm

Re: Creating seamless material

Postby HHbomb » Thu Dec 14, 2017 7:14 am

HHbomb Thu Dec 14, 2017 7:14 am
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 |
HHbomb
Licensed Customer
Licensed Customer
 
Posts: 1307
Joined: Wed Jun 30, 2010 8:45 pm

Re: Creating seamless material

Postby Renart » Wed Dec 20, 2017 12:18 pm

Renart Wed Dec 20, 2017 12:18 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
Renart
Licensed Customer
Licensed Customer
 
Posts: 70
Joined: Mon Jul 04, 2016 8:21 pm

Re: Creating seamless material

Postby franchais » Mon Jan 08, 2018 3:49 am

franchais Mon Jan 08, 2018 3:49 am
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
franchais
Licensed Customer
Licensed Customer
 
Posts: 104
Joined: Fri Mar 02, 2012 2:44 pm

Re: Creating seamless material

Postby bepeg4d » Mon Jan 08, 2018 10:31 am

bepeg4d Mon Jan 08, 2018 10:31 am
Hi franchais,
you need 3.08test 6, to try out OSL nodes.
0565D28E-D7AD-4C6B-A681-88489BA983A5.jpeg
before

8FB449EB-9A26-456F-A8FD-AC46A5C6D84D.jpeg
after

texturetiling.orbx.zip
(2.5 MiB) Downloaded 351 times

ciao beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9951
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: Creating seamless material

Postby franchais » Tue Jan 09, 2018 3:04 am

franchais Tue Jan 09, 2018 3:04 am
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
franchais
Licensed Customer
Licensed Customer
 
Posts: 104
Joined: Fri Mar 02, 2012 2:44 pm

Re: Creating seamless material

Postby bepeg4d » Tue Jan 09, 2018 8:31 am

bepeg4d Tue Jan 09, 2018 8:31 am
Hi franchais,
you need to enable the Script development option in Preferences/Application:
5483A275-4501-44BC-BC09-577DCB844A21.jpeg

ciao beppe
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9951
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Re: Creating seamless material

Postby v-cube » Tue Jan 16, 2018 12:53 pm

v-cube Tue Jan 16, 2018 12:53 pm
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
v-cube
Licensed Customer
Licensed Customer
 
Posts: 485
Joined: Fri Jul 22, 2011 11:02 am
Location: Aachen, Germany

Re: Creating seamless material

Postby bepeg4d » Wed Jan 17, 2018 9:59 am

bepeg4d Wed Jan 17, 2018 9:59 am
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
User avatar
bepeg4d
Octane Guru
Octane Guru
 
Posts: 9951
Joined: Wed Jun 02, 2010 6:02 am
Location: Italy

Return to General Discussion


Who is online

Users browsing this forum: No registered users and 11 guests

Tue Apr 16, 2024 12:40 pm [ UTC ]