Make your own free website on Tripod.com
Shaders in Sunflow

Sunflow Shaders
Diffuse
AO
Glass

Mirror
-Phong
Ward
Shiny
Constant
Janino

PHONG

Below is an example of what the phong shader looks like



And what the shader block looks like

shader {
   name shadername
   type phong
   diff 1 1 1
   spec 1 1 1 5
}


Set shader type to phong to use this.

When an object isn't a perfect reflector, the surface scatters the reflection giving it a blurry look, thats what this shader does.

'diff' controls the colour, and the first three numbers in 'spec' control the reflection colour. The darker the spec, the less reflective it is. Basicly the same thing as the mirror shader

But the last digit in 'spec' controls the reflections hardness, or blurryness. The lower the value, the blurrier it is.

The examples above arn't the best, so lets have a look at a more detailed model. An HDR image was used.


Again, if colour values are above 1, then the object may get too bright. ( see last collom of spheres in example )

This shader is great for a floor while showing off your model. Heres one with a hardness value of 20.


You can see that there is a faint reflection on the ground, and that the reflection is sharper when the object is closer.

Let's try again and set the hardness to 150.


The reflections are a bit more defined. Heres another one with hardness way up there at 1000.


The reflections are very sharp now, but still a bit blurry as the object gets farther away. But it all depends on the effect you want, so experiment.



< Back Next >