Make your own free website on
Shaders in Sunflow

Sunflow Shaders


Below is an example of what the Diffuse shader looks like.

And here is what the shader block looks like.

shader {
   name shadername
   type diffuse
   diff 1 .5 .5

To access this shader, input 'diffuse' into the shader type.

This is a simple shader. Just a soft, single coloured, material. Just like what you have in blender, by default, only without specularity. Specularity is just a simulation of the light sources reflection, and becuase Sunflow is aiming at realism, this just wont do.

This shader doesn't have many options. Just colour, which is controled by the 3 digits after 'diff'. 1 being a colour value of 255, or FF in hexidecimal, and 0 being 000 or 00 in hexidecimal. and the digits controle RED GREEN and BLUE, in that order. So '1 .5 .5' is 100% red and 50% green and blue. This would give us a red, simmilar to the middle one in the example picture above.

It is wise to keep the colours below 1. If you do go above 1, it may get brighter than needed. As an example, see the last collom of spheres in the example picture. Notice how the green one is almost a solid colour, with no shading at all. If this is what you want, however, there are better ways to go about doing this. I'll cover that later.

< Back Next >