Community
Arnold General Rendering Forum
abbrechen
Suchergebnisse werden angezeigt für 
Anzeigen  nur  | Stattdessen suchen nach 
Meintest du: 

Easier way to create a procedural grid with individual tiles that can be larger than 3x3?

6 ANTWORTEN 6
Antworten
Nachricht 1 von 7
Anonymous
487 Aufrufe, 6 Antworten

Easier way to create a procedural grid with individual tiles that can be larger than 3x3?

 
6 ANTWORTEN 6
Nachricht 2 von 7
madsd
als Antwort auf: Anonymous

Can you show an example?

Nachricht 3 von 7
Anonymous
als Antwort auf: Anonymous

Something like the tiles in this wood shader

Nachricht 4 von 7
madsd
als Antwort auf: Anonymous

If you can load OSL shaders, I can try cook up a solution one of the next days.

Nachricht 5 von 7
Anonymous
als Antwort auf: Anonymous

yes i can load osl shaders, thanks...

Nachricht 6 von 7
madsd
als Antwort auf: Anonymous

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.

3408-ww.png

3407-qwe.png



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;

}

Nachricht 7 von 7
Anonymous
als Antwort auf: madsd

ok i'll try it...thank you..good luck on finishing.

Sie finden nicht, was Sie suchen? Fragen Sie die Community oder teilen Sie Ihr Wissen mit anderen.

In Foren veröffentlichen  

Autodesk Design & Make Report