Index: branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc	(revision 7576)
+++ branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc	(revision 7577)
@@ -28,4 +28,7 @@
 #include "parser/tinyxml/tinyxml.h"
 #include <algorithm>
+#include "box_emitter.h"
+#include "spark_particles.h"
+
 
 using namespace std;
@@ -37,8 +40,18 @@
   this->setClassID(CL_RAIN_EFFECT, "RainEffect");
 
-//   this->rainMode = GL_LINEAR;
-//   this->rainDensity = 0.001f;
-//   this->rainStart = 10.0f;
-//   this->rainEnd = 1000.0f;
+  // BoxEmitter::BoxEmitter(const Vector& size, float emissionRate, float velocity, float angle)
+
+//         <name>RainEmitter</name>
+//         <rel-coor>-1200, 300, 0</rel-coor>
+//         <rel-dir>3.1412, 0, 0, 1</rel-dir>
+//         <spread>0,.3</spread>
+//         <emission-velocity>500,50</emission-velocity>
+//         <size>1000, 1000</size>
+//         <rate>5000</rate>
+
+  this->emitter = new BoxEmitter(Vector(1000, 300, 100), 20000, 1000, M_2_PI);
+  this->emitter->setRelCoor(100, 0, 0);
+  // this->emitter->setParent(this);
+  this->emitter->setSpread(0, 0.3);
 
   if (root != NULL)
@@ -48,6 +61,4 @@
 }
 
-
-
 RainEffect::~RainEffect()
 {
@@ -60,8 +71,33 @@
   WeatherEffect::loadParams(root);
 
-//   LoadParam(root, "rain-mode", this, RainEffect, setRainMode);
-//   LoadParam(root, "rain-density", this, RainEffect, setRainDensity);
-//   LoadParam(root, "rain-color", this, RainEffect, setRainColor);
-
+//   LoadParam(root, "rel-coor", this, RainEffect, setRainMode);
+// 
+//   LoadParam(root, "rate", this, RainEffect, setRainColor);
+//   LoadParam(root, "velocity", this, RainEffect, setRainColor);
+//   LoadParam(root, "angle", this, RainEffect, setRainColor);
+// 
+//   LoadParam(root, "spread", this, RainEffect, setRainColor);
+
+  // BoxEmitter::BoxEmitter(const Vector& size, float emissionRate, float velocity, float angle)
+
+  this->emitter = new BoxEmitter(Vector(0, 1000, 0), 20000, 4000, 1);
+  this->emitter->setRelCoor(0, 100, 0);
+  // this->emitter->setParent(this);
+  this->emitter->setSpread(0, 0.3);
+
+// LOAD_PARAM_START_CYCLE(root, element);
+//   {
+//     element->ToText();
+//     // PER-PARTICLE-ATTRIBUTES:
+//     LoadParam_CYCLE(element, "radius", this, ParticleSystem, setRadius)
+//     .describe("The Radius of each particle over time (TimeIndex [0-1], radius at TimeIndex, randomRadius at TimeIndex)");
+// 
+//     LoadParam_CYCLE(element, "mass", this, ParticleSystem, setMass)
+//     .describe("The Mass of each particle over time (TimeIndex: [0-1], mass at TimeIndex, randomMass at TimeIndex)");
+// 
+//     LoadParam_CYCLE(element, "color", this, ParticleSystem, setColor)
+//     .describe("The Color of each particle over time (TimeIndex: [0-1], red: [0-1], green: [0-1], blue: [0-1], alpha: [0-1])");
+//   }
+//   LOAD_PARAM_END_CYCLE(element);
 
 }
@@ -70,9 +106,50 @@
 {}
 
-
+SparkParticles* RainEffect::rainParticles = NULL;
 
 bool RainEffect::activate()
 {
-  PRINTF(0)("Activating Rain Effect\n");
+//   PRINTF(0)( "Enabling Rain Effect, mode: %i, density: %f, start: %f, end: %f, color %f, %f, %f\n", this->rainMode, this->rainDensity, this->rainStart, this->rainEnd, this->colorVector.x, this->colorVector.y, this->colorVector.z);
+	PRINTF(0)("Activating Rain Effect\n");
+
+	if (unlikely(RainEffect::rainParticles == NULL))
+	{
+		RainEffect::rainParticles = new SparkParticles(10000);
+		RainEffect::rainParticles->setName("RainParticles");
+		RainEffect::rainParticles->setLifeSpan(2, 2);
+		RainEffect::rainParticles->setRadius(0.05, 0.05);
+		RainEffect::rainParticles->setRadius(0.04, 0.04);
+		RainEffect::rainParticles->setRadius(0.03, 0.03);
+		RainEffect::rainParticles->setColor(0, 0, 0, 1, .3);
+		RainEffect::rainParticles->setColor(0.5, 0.5, 0.5, 1, 0.2);
+		RainEffect::rainParticles->setColor(0.8, 0.8, 0.2, 0.3, 0.3);
+		RainEffect::rainParticles->setColor(1, 0.5, 0.5, 1, 0);
+
+//      <life-span>2,2</life-span>
+//      <radius>0, 0.05, 0.05</radius>
+//      <radius>1, 0.05, 0.05</radius>
+//      <mass>0,1, .05</mass>
+//      <color>0, 0, 0, 1, .3</color>
+//      <color>.5, .5, .5, 1, .2</color>
+//      <color>1,0.5, .5,1, .0</color>
+//      <precache>2</precache>
+//      <emitters>
+//       <PlaneEmitter>
+
+//       </PlaneEmitter>
+//      </emitters>
+
+	}
+
+	this->emitter->setSystem(RainEffect::rainParticles);
+//	this->size = 4.0;
+
+	RainEffect::rainParticles->debug();
+//	this->updateNode(0);
+	this->emitter->setEmissionRate(5000.0);
+	this->emitter->setEmissionVelocity(50.0);
+
+//	this->setHealth(200);
+
 }
 
@@ -81,5 +158,12 @@
 {
   PRINTF(0)("Deactivating Rain Effect\n");
-// 	glDisable(GL_RAIN);
+
+  this->emitter->setSystem(NULL);
+ // this->lifeCycle = 0.0;
+ // this->toList(OM_NULL);
+
+//  GarbageCollector::getInstance()->collect(this);
+//  this->toList(OM_DEAD);
+
 }
 
Index: branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h	(revision 7576)
+++ branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h	(revision 7577)
@@ -8,5 +8,8 @@
 #include "vector.h"
 #include "particle_system.h"
-#include "material.h"
+//#include "material.h"
+
+class SparkParticles;
+class ParticleEmitter;
 
 #include "weather_effect.h"
@@ -34,5 +37,7 @@
 
   private:
-//     GLint                   rainMode;
+    static SparkParticles*            rainParticles;
+    ParticleEmitter*                  emitter;
+
 //     GLfloat                 rainDensity;
 //     GLfloat                 rainStart;
Index: branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc
===================================================================
--- branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc	(revision 7576)
+++ branches/atmospheric_engine/src/lib/graphics/effects/volfog_effect.cc	(revision 7577)
@@ -60,5 +60,5 @@
 
   // Set fog color
-  float fogColor[4] = {0.2, 0.2, 0.2, 1.0};
+  float fogColor[4] = {0.0, 1.0, 0.0, 1.0};
 
   /* set up fog params */	
@@ -67,5 +67,5 @@
   glFogfv(GL_FOG_COLOR, fogColor);				// Set The Fog Color
   glFogf(GL_FOG_START, 0.0f);					// Set The Fog Start
-  glFogf(GL_FOG_END, 10.0f);					// Set The Fog End
+  glFogf(GL_FOG_END, 1.0f);					// Set The Fog End
   glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);	// Set The Fog based on vertice coordinates
   // glHint(GL_FOG_HINT, GL_NICEST);				// Per-Pixel Fog Calculation
@@ -111,4 +111,5 @@
 	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
+	/* Enable blending */
 	//glEnable(GL_BLEND);
 	//glBlendFunc(GL_SRC_ALPHA, GL_DST_ALPHA);
@@ -126,8 +127,8 @@
 
 	glBegin(GL_QUADS); // Roof
-		glFogCoordfEXT(5.0f);	glVertex3f(0.0f, 100.0f,0.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f( 100.0f, 100.0f,0.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f( 100.0f, 100.0f, 100.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f(0.0f, 100.0f, 100.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f(0.0f, 100.0f,0.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f( 100.0f, 100.0f,0.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f( 100.0f, 100.0f, 100.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f(0.0f, 100.0f, 100.0f);
 	glEnd();
 
@@ -135,6 +136,6 @@
 	 	glFogCoordfEXT(0.0f);	glVertex3f(0.0f,0.0f,0.0f);
 		glFogCoordfEXT(0.0f);	glVertex3f( 100.0f,0.0f,0.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f( 100.0f, 100.0f,0.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f(0.0f, 100.0f,0.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f( 100.0f, 100.0f,0.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f(0.0f, 100.0f,0.0f);
 	glEnd();
 
@@ -142,12 +143,12 @@
 	 	glFogCoordfEXT(0.0f);	glVertex3f(0.0f,0.0f,100.0f);
 		glFogCoordfEXT(0.0f);	glVertex3f( 100.0f,0.0f,100.0f);
-		glFogCoordfEXT(50.0f);	glVertex3f( 100.0f, 100.0f,100.0f);
-		glFogCoordfEXT(50.0f);	glVertex3f(0.0f, 100.0f,100.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f( 100.0f, 100.0f,100.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f(0.0f, 100.0f,100.0f);
 	glEnd();
 
 	glBegin(GL_QUADS); // Right Wall
 		glFogCoordfEXT(0.0f);	glVertex3f( 100.0f,0.0f, 100.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f( 100.0f, 100.0f, 100.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f( 100.0f, 100.0f,0.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f( 100.0f, 100.0f, 100.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f( 100.0f, 100.0f,0.0f);
 		glFogCoordfEXT(0.0f);	glVertex3f( 100.0f,0.0f,0.0f);
 	glEnd();
@@ -155,6 +156,6 @@
 	glBegin(GL_QUADS); // Left Wall
 	 	glFogCoordfEXT(0.0f);	glVertex3f(0.0f,0.0f, 100.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f(0.0f, 100.0f, 100.0f);
-		glFogCoordfEXT(5.0f);	glVertex3f(0.0f, 100.0f,0.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f(0.0f, 100.0f, 100.0f);
+		glFogCoordfEXT(1.0f);	glVertex3f(0.0f, 100.0f,0.0f);
 		glFogCoordfEXT(0.0f);	glVertex3f(0.0f,0.0f,0.0f);
 	glEnd();
