Thursday, February 24, 2005

Materials Demo





MaterialsDemo
MaterialsRenderer

Here is the first version of a JOGL demo displaying some of the effects of materials. The demo consists of a stationary glutSolidSphere at the origin, with one directional light positioned relatively far away, and three positional lights(represented by three smaller spheres) positioned closer. The three positional lights have red, green, and blue diffuse values, so that the user can see the effect of each type of light on a certain material.

At the top left there are controls which allow you to manipulate the material properties of the sphere. Note that if using the editable combo boxes to input your own custom value, the Enter key must be pressed for the changes to take effect. Also, there is nothing in place to account for incorrect non-numerical values being entered into these combo boxes, so any such bad input will freeze up the demo. This will be fixed in the next version.

The little slider will control the rotational speed of the three lights. This is only for aesthetic purposes currently. On the top right hand side of the screen, there are controls for moving and turning off the three lights. Currently the directional light can't be manipulated.

As it stands, this demo provides some basic insight into what different material values will look light in certain light situations. I would like to add some more features in the upcoming future, so there will likely be a next version. While working on that, I plan on getting started on a texture demo, using a similar Swing GUI interaction model.


0 Comments:

Post a Comment

<< Home