Monday, October 23, 2006

Rain, Rain

It's been raining for five days & I'm soaking wet like a dog (it's a long way to the bus). "Stay inside & work on Renderman and go to nice warm dinner parties, Raphe."





//using RFE_noise, setting up a noiseDriven scenerio (add an ADD & MULT noise)
#include "/usr/home/raphe/rman/RFE_noise.h"
surface
learn_srf(

)
{

point PP = transform("object", P);

float warpNoiseA;
float warpNoiseB;
float warpNoiseC;
float warpNoise;

float freqNoiseA;
float freqNoiseB;
float freqNoiseC;
float freqNoise;

float dimNoiseA;
float dimNoiseB;
float dimNoiseC;
float dimNoise;

float lacNoiseA;
float lacNoiseB;
float lacNoiseC;
float lacNoise;

float oldMinNoiseA;
float oldMinNoiseB;
float oldMinNoiseC;
float oldMinNoise;

float oldMaxNoiseA;
float oldMaxNoiseB;
float oldMaxNoiseC;
float oldMaxNoise;

float compNoiseA;
float compNoiseB;
float compNoiseC;
float compNoise ;

float globalScale = .1;

float test = 0;

if (test != 0){

warpNoise = 0;
freqNoise = 10;
dimNoise = .5;
lacNoise = 2;
oldMinNoise = 0;
oldMaxNoise = 1;

}else{

//warp noise
warpNoiseA = RFE_noise(globalScale * PP * .5 + 33, .5, 2, 5);
warpNoiseB = smoothstep(.3, .7, warpNoiseA);
warpNoiseC = warpNoiseB * 0;
warpNoise = warpNoiseC;

//frequency noise (radial effect, like lacunarity?!)
freqNoiseA = RFE_noise(globalScale * PP * 6 + 42, .5, 2, 1);
freqNoiseB = smoothstep(.2, .8, freqNoiseA);
freqNoiseC = freqNoiseB * 0 + 10;
freqNoise = freqNoiseC;

//dimension noise
dimNoiseA = RFE_noise(globalScale * PP * 2, .5, 2, 1);
dimNoiseB = smoothstep(.3, .7, dimNoiseA);
dimNoiseC = dimNoiseB * .5;
dimNoise = dimNoiseC;

//lacunarity noise (why does it have a radial quality -- when octaves are turned up?)
lacNoiseA = RFE_noise(globalScale * PP * 1 + 3278, .5, 2, 7);
lacNoiseB = smoothstep(.3, .7, lacNoiseA);
lacNoiseC = lacNoiseB * 0 + 2;
lacNoise = lacNoiseC;

//oldMin noise
oldMinNoiseA = RFE_noise((globalScale * PP * 3 + 2), .5, 2, 1);
oldMinNoiseB = smoothstep(.3, .7, oldMinNoiseA);
oldMinNoiseC = oldMinNoiseB * .4;
oldMinNoise = oldMinNoiseC;

//oldMax noise
oldMaxNoiseA = RFE_noise(globalScale * PP * 3, .5, 2, 1);
oldMaxNoiseB = smoothstep(.3, .7, oldMaxNoiseA);
oldMaxNoiseC = oldMaxNoiseB * .4 + .5;
oldMaxNoise = oldMaxNoiseC;
}

//composite noise
compNoiseA = RFE_noise(globalScale * PP * freqNoise + warpNoise, dimNoise, lacNoise, 5);
compNoiseB = smoothstep(oldMinNoise, oldMaxNoise, compNoiseA);
compNoiseC = compNoiseB * 1;
compNoise = compNoiseC;

Ci = compNoise;

}

No comments: