Noise (GMS)

Description

The noise shader can be used to change the way ligtht reflect and refracts in an material.  In a normal softimage reflection an incomming lightbeam is reflected perfectly around the surfacenormal and this makes a ‘clean’ reflection. With this shader you can make a ‘noise’ reflection where an incomming cone of light is reflected in your material, which makes the reflection look blurred. Likewise you can choose to let a material refract a cone instead of a ray. The size of the cone can be set by a noise-parameter - If you set the noise to zero, you get a normal refraction/reflection.  In the picture above the noiseshader is used to give the lamps reflection in the table a blurry look. The noisefactor is set rather high. 
 

Tutorial

Load the scene “Noise_tut1” from the GMS_Tutorial database (Get->Scene). The scene consist of 3 balls and a checkerboard. The balls all have a reflection of 0.5 (Render the picture if you wanna see how this looks). Now we are gonna put diffrent noisefactors on the 3 balls to se the effect of  the noiseshader: 
 
  • We are not gonna touch the first ball so this will show us how a noisefactor of 0 is looking.
  •  On the second ball we add a little noise: Select the second ball and enter the material-dialoge (Matter/material). Select the GMS shader from the NF-shaders database as the balls material shader and press edit to edit its parameters. In the reflection section (the one to the left) enter the following values: Noise=0.2 and  Number of  samples=10.
  • On the third ball we add alot of noise: Assign the GMS shader to the third ball and enter the following parameters in the reflection section: Noise=0.5, Number of samples=25.
Now render the scene (and remember to do it with Mental Ray): 
 

Now lets take a look at the rendered picture. The refletion in the first ball is a normal reflection. The reflection in the second is little noisy. Notice how the reflection is blurred when the checkerbord switches from black to white and compare the gray balls reflection in the red by the green balls reflection in the grey. 

The noiseshader takes 2 parameters: Noise and Number of samples. The noisevalue decides how big the reflected/refracted cone is and the effect of this parameter is easily seen on the picture above where the noisefactor increases from the left to the right. To calculate the incomming light of the cone some samplerays is cast inside the cone. The number of rays is decided by the ‘Number of samples’ - parameter. This is kind of a critical parameter - The higher you set this parameter the better results you get, but the rendertime also increases. If you set it too low the reflection will not look like a reflecton but as random noise. The green ball is for example a little undersampled. 

  • Now experiment a bit with the scene to see how many samples is necesary in the diffrent reflections: Try to decrease and increase the Noisevalue and the number of samples on the balls. See that a the higher the noisefactor is the larger amount of samples is requires to get a good result. It also matters how far the reflected objects is from the reflecting objects. If the distance is high, the cone gets bigger wich results in a bigger area to sample.
Now we have learned what the shader does so lets apply it to a little more realistic scene. 
  • Delete the ballscene (Delete->Al l) and load the scene called: “Noise_Tut2” from the GMS_Tutorial database.  The scene consist of a lamp on a table and we now want to assign diffrent noise-values to the table. The GMS shader has allready been added to the table since the filter has been used to make the reflection in the table a little nicer. Now first render the scene, then render it where the noiseparameters of reflection is set to: Noise=0.1 and Samples=10 and finaly render it where Noise=0.3 and Samples=10. (It not necesary to set the Number of sampleparameter this high. Try fx in the last picture to set the Number of samples to 1! )
 

The pictures you have made is one with no noise, one with little noise and one with alot of noise in the reflection and they should look like this: 
 

 

 

 
 
 
 
 

(To make the shadows look like the ones in the top picture activate softshadows in the lights edit-dialog)