Steven Biederman

2303279

Cosc 4V98

Final Project

 

This final project is composed of two different winamp visualizations.  Both of which were written in C++ making use of the openGL library.  Creating a winamp visualization from scratch proved to be a task that seemed to be far beyond the scope of this project.  Because of this, the winamp SDK and a template found on the internet were used to create the skeleton code for both visualizations.  Both visualizations are compatible for winamp version 3 and up.  They both start and remain in full screen mode, and they both use the same screen resolution.

 

Mosh Pit

 

Mosh Pit was more of a test than an effort to create a good looking winamp plug-in.  I was basically trying to get a plug-in to work, so I started messing around and ended up with Mosh Pit.  Although it was just a learning curve more then anything, it does hold the one property that I feel all good plug-ins should have, and that is when the music/sound stops, so should the scene. 

 

 

Particles:

The two lines in the image above are the right and left Mosh Pits.  They are fueled by the energy of the right and left channels in the music.  Each particle is given a certain place to remain through out its life.  When no music energy is given to the particles, they will remain in a line, if however energy is given, they move in a random direction with a distance proportional to the energy it receives by the music.  If a particle is out of place, it will try to return back to its place in line, but it is still available to be effected by the music. 

 

Colours:

The colours of each channel are randomly generated.  To create the effect of a smooth transition from one colour to another, each colour (R,G,B) for each channel is given a velocity variable, which is random generated.  In this way, a smooth colour effect is created without any evidence of repetition.  Every particle has a tail, the colour of the right channels’ tails is the same colour of the left channels’ particles, and the colour of the left channels’ tails is the same colour of the right channels’ particles.  This gives the effect of some connection between the two channels.

 

 

 Stars:

Each star in the star field has an x, y, and z coordinate.  The stars are random generated and are only affected by a velocity variable.  The colour of the stars are affected by their z value, the closer to star is the camera, the brighter it becomes.  Notice that no 3D openGL commands are used, its all done in 2D. The velocity variable for the stars is smoothed to give a smoother velocity effect.  It is proportional to the distance of each particle to its resting place, this in affect, makes the stars move faster when the music is more intense, and slows down and even stops the stars when no music is played.

 

The cool thing about this plug-in is that it is affective for any kind of music, heavy, soft or what ever. 

 

 

Storm

 

The second plug-in I created was a vision I had while watching a storm come in from the lake one night.  It is totally 3D and makes use of some cool shading affects.  Although it may not seem as responsive to the music, it does depend on the music for the cloud generation and lightning. It also has the property of slowdown when the music stops, although it comes in a different form.  Basically, there is always clouds moving across the sky, but only clouds of a certain depth are drawn.

 

 

The image above is an example of what this visualization looks like when no sound is present.  Notice the randomly generated tree, ground, and stars.

 

 

The picture above is an example of what this plug-in looks like when lots of sounds is present.  The clouds become larger, deeper and sharper as the music becomes faster and more aggressive.  To prove this, the first picture was taken while listening to Neil Young, the second was taken while listing to Tool.  I will now explain the effects in this plug-in.

 

Clouds:

The most complex of objects in the plug-in is the clouds generated by the sound energy.  Clouds are only drawn if the there is enough sound to make them large enough to see, this allows the stars to shine through on some parts, but not too much to take away from the lightning affect.  The clouds are composed of a 100 by 100 grid of triangles.  This grid constantly move towards the screen, but is translated on an angle (the movement is in fact a translation as well).  When one line in the grid moves off of the screen, it is redrawn back behind the ground on the horizon; it is also given a new cloud pattern which is generated by the energy of the music.  The new cloud form that is generated also makes use of a smoothing function I created to give the clouds a smoother affect.  This works by considering the depth of the grid at point close to the one point being considered at any time.  The shading of the clouds is not created using the normals of the polygons, or even global lighting at all.  It is a function I created which makes the pixels brighter the closer they are to the ground and the closer they are to the camera.  Also, like all objects, if lightning strikes, the colour is made brighter by the intensity of the lightning.

 

Tree:

The tree is the second most complex object in the scene; notice that the tree is randomly generated every time.  It is generated recursively every time the plug-in is started.  This is basically done by generated one branch, and then randomly generating an angle between the current branch and the next 2 branches.  This angle dictates the size of each branch.  Then the algorithm is called on the next 2 branches. 

 

Stars, Lightning, and Ground:

The stars’ positions are simply randomly generated.  Their colour is determined by how high they are in the sky; also they are given a slight random flicker affect.

The lighting is generated every once and awhile, while there is a lot of sound created by the music, a random bolt position is created, and each frame that the lightning is still alive (also random) the bolt is built a little larger.

The final object is the ground, which is also simply random generated.

 

 

This visualization works best with soft music, or music that stars soft and increases in intensity.  This lets the plug-in display both stars and great cloud effects with lightning.

 

 

Bugs:  there is a bug that exists for both visualizations, where it may crash winamp after about 15 minutes of playing.  I was unable to find out why, might be a memory leak somewhere. Also, for the storm visualization, the clouds sometimes become so low that they cut right through the tree and ground; however this does not occur often.

 

 

Resources:

 

http://www.winamp.com/  - The home page for winamp, includes the winamp SDK

http://www.dev-gallery.com/programming/opengl/winamp/tutorial1/main.htm - a good winamp visualization page

http://www.geocities.com/viper_venom_dk/realintro.html  - great openGL page, may not still be up.

http://freespace.virgin.net/hugo.elias/ - gave me the idea for the tree.

 

 

Back to COSC 4V98 Gallery