Ok.
I compiled a base for the planks.
There is a float value called PlankLength which is the only variable except UV info I have hooked up.
For now, its a fully self contained procedural noise pr brick, there is also a grout scaler which is also fully procedural ( the noise is build into the shader directly )
I will look at wiring things out so you can use textures, as input pr tile at a point.
Just figured I would upload what I got for now.
Copy this to a clean osl shader and compile it, and hope it works.
-----------------
// Complied by Mads Drøschler 14.3.2019
vector fract ( vector x ){
return x-floor(x);
}
vector hash3( vector p )
{
vector q = vector( dot(p,vector(127.1,311.7,0)),
dot(p,vector(269.5,183.3,0)),
dot(p,vector(419.2,371.9,0)) );
return fract(sin(q)*43758.5453);
}
float iqnoise( vector x )
{
vector p = floor(x);
vector f = fract(x);
float va = 0.0;
float wt = 0.0;
for( int j=-2; j<=2; j++ )
for( int i=-2; i<=2; i++ )
{
vector g = vector( float(i),float(j),0 );
vector o = hash3( p + g );
vector r = g - f + o;
float d = dot(r,r);
float ww = pow( 1.0-smoothstep(0.0,1.414,sqrt(d)), 1. );
va += o[2]*ww;
wt += ww;
}
return va/wt;
}
shader ProceduralTiles(
point Po = P,
float PlankLength = 200,
output color Out = 0,
output color OutA = 0,
)
{
float zoomout = .3;
vector uv = Po/zoomout;
float distortion = (iqnoise(uv/128.));
uv += (distortion*(15.*zoomout));
vector col = vector(0.5);
float a = (iqnoise(uv/4.)/2.)*2.;
col *= a+(iqnoise(uv/64.)/2.);
float mx = mod(uv[0],PlankLength);
float my = mod(uv[1],100.);
if ((my < 20.) ||(fmod(uv[1],200.) < 100. && mx < 20.) ||(fmod(uv[1],200.) > 100. && mx > 100. && mx < 120.)){
a = iqnoise(uv)/2.;
col = vector(.4+a);
}
Out = pow(vector(col),2.2);
// OutA = a;
}