Thursday, October 17, 2013

Simulate Disco Box using OpenGL

During my first semester of advanced diploma, I have learnt OpenGL programming as well, in my assignment, I was instructed to simulate a disco box with appropriate lighting and camera projection.


The black box you see is actually the disco box I have created without making it transparent, after I make a tweak to the alpha channel of the box.

Ta da!


As you can see in the disco box I have created contain six different color of lighting projected out from the sphere within, I rotate the sphere in random direction to produce disco lighting effects.

Smooth Shader

Also, while moving the mouse, we can alter the camera viewpoint, just like first person view. In my assignment, I use perspective camera as main camera.

Flat Shader

Tessellation

As we can see, different shader produce different effects of the reflected lighting on the disco box.

No comments:

Post a Comment