Lighting and shading

The render modes Compositing and First Hit support a phong reflection model. The voxels are lit by a point light source and are shaded according to reflection coefficients. The related options are visible by default and can be enabled via View > Lighting Options

Reflection

The coefficients for the Phong reflection model can be set via the sliders. For the ambient, diffuse and specular values the very left position means zero and the very right position means one. The slider for shininess adjusts the exponent which defines the size of the highlight of the material. The left position of the slider represents the value 1 and the right one represents the value 8.

The reflection model needs a normal vector to compute the reflection vectors. The normal is approximated by the gradient of a voxel. The gradient is computed by central difference.

Light source

For the lighting a point light source is used. The position can be set in the fields x, y and z. The point (0,0,0) in the scene is located in the middle of the volume. Because a right-handed matrix system is used, the z-value points out of the screen.

main page