Index: /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc
===================================================================
--- /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc	(revision 8786)
+++ /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.cc	(revision 8787)
@@ -29,4 +29,6 @@
 #include "parser/tinyxml/tinyxml.h"
 
+Vector  CloudEffect::cloudColor;
+Vector  CloudEffect::skyColor;
 
 using namespace std;
@@ -53,8 +55,8 @@
 {
   this->deactivate();
-  
+
   if (glIsTexture(noise3DTexName))
     glDeleteTextures(1, &noise3DTexName);
-  
+
   delete shader;
 }
@@ -64,5 +66,5 @@
 {
   PRINTF(0)("Initializing CloudEffect\n");
-  
+
   this->offsetZ = 0;
   this->animationSpeed = 2;
@@ -71,10 +73,10 @@
   this->planetRadius = 1500;
   this->divs = 50;
-  
+
   this->skyColor = Vector(0.0f, 0.0f, 0.8f);
   this->cloudColor = Vector(0.8f, 0.8f, 0.8f);
 
-  noise3DTexSize = 128;
-  noise3DTexName = 0;
+  this->noise3DTexSize = 128;
+  this->noise3DTexName = 0;
 
   this->make3DNoiseTexture();
@@ -92,21 +94,21 @@
                noise3DTexSize, noise3DTexSize, noise3DTexSize,
                0, GL_RGBA, GL_UNSIGNED_BYTE, noise3DTexPtr);
-  
+
   this->skydome = new Skydome();
   this->skydome->setTexture(noise3DTexName);
-  
-  shader = new Shader(ResourceManager::getInstance()->getDataDir() + "/shaders/cloud.vert",
-                      ResourceManager::getInstance()->getDataDir() + "/shaders/cloud.frag");
+
+  this->shader = new Shader(ResourceManager::getInstance()->getDataDir() + "/shaders/cloud.vert",
+                            ResourceManager::getInstance()->getDataDir() + "/shaders/cloud.frag");
 
   this->shader->activateShader();
 
   Shader::Uniform(shader, "Noise").set(0);
-  
-  offset = new Shader::Uniform(shader, "Offset");
-  skycolor = new Shader::Uniform(shader, "SkyColor");
-  cloudcolor = new Shader::Uniform(shader, "CloudColor");
+
+  this->offset = new Shader::Uniform(shader, "Offset");
+  this->skycolor = new Shader::Uniform(shader, "SkyColor");
+  this->cloudcolor = new Shader::Uniform(shader, "CloudColor");
 
   this->shader->deactivateShader();
-  
+
   this->skydome->setShader(shader);
 }
@@ -121,9 +123,9 @@
   LoadParam(root, "cloudcolor", this, CloudEffect, setCloudColor);
   LoadParam(root, "skycolor", this, CloudEffect, setSkyColor);
-  
+
   LoadParam(root, "planetRadius", this, CloudEffect, setPlanetRadius);
   LoadParam(root, "atmosphericRadius", this, CloudEffect, setAtmosphericRadius);
   LoadParam(root, "divisions", this, CloudEffect, setDivisions);
-  
+
   LOAD_PARAM_START_CYCLE(root, element);
   {
@@ -137,5 +139,5 @@
 {
   PRINTF(0)( "Activating\n");
-  
+
   // Can only be set after the loadParams call
   this->shader->activateShader();
@@ -144,6 +146,6 @@
   this->cloudcolor->set(cloudColor.x, cloudColor.y, cloudColor.z);
   this->shader->deactivateShader();
-  
-  skydome->generateSkyPlane(this->divs, this->planetRadius, this->atmosphericRadius, 1, 1);
+
+  this->skydome->generateSkyPlane(this->divs, this->planetRadius, this->atmosphericRadius, 1, 1);
 
   this->cloudActivate = true;
@@ -158,6 +160,5 @@
 
 void CloudEffect::draw() const
-{
-}
+  {}
 
 void CloudEffect::tick (float dt)
@@ -166,9 +167,23 @@
   {
     this->offsetZ += 0.05 * dt * this->animationSpeed;
-    
+
     this->shader->activateShader();
-    offset->set(0.0f, 0.0f, offsetZ);
+    this->offset->set(0.0f, 0.0f, offsetZ);
+    this->cloudcolor->set(this->cloudColor.x, this->cloudColor.y, this->cloudColor.z);
+    this->skycolor->set(this->skyColor.x, this->skyColor.y, this->skyColor.z);
     this->shader->deactivateShader();
   }
+}
+
+
+void CloudEffect::changeSkyColor(Vector color)
+{
+  skyColor = color;
+}
+
+
+void CloudEffect::changeCloudColor(Vector color)
+{
+  cloudColor = color;
 }
 
Index: /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h
===================================================================
--- /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h	(revision 8786)
+++ /branches/atmospheric_engine/src/lib/graphics/effects/cloud_effect.h	(revision 8787)
@@ -48,8 +48,8 @@
   inline void activateCloud()
   { this->activate(); }
-  
+
   inline void deactivateCloud()
   { this->deactivate(); }
-  
+
   inline void setCloudOption(const std::string& option)
   {
@@ -57,30 +57,34 @@
       this->cloudActivate = true;
   }
-  
+
   inline void setAnimationSpeed(float speed)
-  { this->animationSpeed = speed; }
+{ this->animationSpeed = speed; }
 
   inline void setCloudScale(float scale)
   { this->scale = scale; }
-  
+
   inline void setCloudColor(float colorX, float colorY, float colorZ)
   { this->cloudColor = Vector(colorX, colorY, colorZ); }
-  
+
   inline void setSkyColor(float colorX, float colorY, float colorZ)
   { this->skyColor = Vector(colorX, colorY, colorZ); }
-  
+
   inline void setPlanetRadius(float planetRadius)
   { this->planetRadius = planetRadius; }
-  
+
   inline void setAtmosphericRadius(float atmosphericRadius)
   { this->atmosphericRadius = atmosphericRadius; }
-  
+
   inline void setDivisions(int divs)
   { this->divs = divs; }
-  
+
   virtual void draw() const;
   virtual void tick(float dt);
+
+  static void changeSkyColor(Vector color);
+  static void changeCloudColor(Vector color);
   
-  
+  static Vector    cloudColor;
+  static Vector    skyColor;
 
   void make3DNoiseTexture();
@@ -97,10 +101,8 @@
   bool             cloudActivate;
   float            animationSpeed;
-  Vector           cloudColor;
-  Vector           skyColor;
 
   // Material                 cloudMaterial;
   Skydome*         skydome;
-  
+
   // SHADER STUFF
   Shader*          shader;
Index: /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc
===================================================================
--- /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc	(revision 8786)
+++ /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.cc	(revision 8787)
@@ -26,4 +26,5 @@
 #include "shell_command.h"
 #include "light.h"
+#include "cloud_effect.h"
 
 #include "parser/tinyxml/tinyxml.h"
@@ -101,4 +102,7 @@
   this->rainFadeInDuration = 0;
   this->rainFadeOutDuration = 0;
+  
+  this->cloudColor = Vector(0.8f, 0.8f, 0.8f);
+  this->skyColor = Vector(0.0f, 0.0f, 0.0f);
 
   this->rainMaxParticles = this->rainRate * this->rainLife;
@@ -127,4 +131,6 @@
   LoadParam(root, "fadeinduration", this, RainEffect, setRainFadeIn);
   LoadParam(root, "fadeoutduration", this, RainEffect, setRainFadeOut);
+  LoadParam(root, "cloudcolor", this, RainEffect, setCloudColor);
+  LoadParam(root, "skycolor", this, RainEffect, setSkyColor);
 
   LOAD_PARAM_START_CYCLE(root, element);
@@ -177,4 +183,10 @@
   if (this->rainFadeInDuration == 0)
     lightMan->setAmbientColor(.1,.1,.1);
+  
+  // Change the cloudcolor,skycolor
+  this->oldCloudColor = CloudEffect::cloudColor;
+  this->oldSkyColor = CloudEffect::skyColor;
+  CloudEffect::changeCloudColor(this->cloudColor);
+  CloudEffect::changeSkyColor(this->skyColor);
 }
 
@@ -194,4 +206,7 @@
   // Restore Light Ambient
   lightMan->setAmbientColor(this->rainAmbient, this->rainAmbient, this->rainAmbient);
+  
+  CloudEffect::changeCloudColor(this->oldCloudColor);
+  CloudEffect::changeSkyColor(this->oldSkyColor);
 }
 
Index: /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h
===================================================================
--- /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h	(revision 8786)
+++ /branches/atmospheric_engine/src/lib/graphics/effects/rain_effect.h	(revision 8787)
@@ -18,4 +18,5 @@
 class PlainEmitter;
 class LightManager;
+class CloudEffect;
 
 #include "sound_buffer.h"
@@ -85,4 +86,13 @@
     this->rainFadeOutDuration = fadeout;
   }
+  
+  inline void setCloudColor(float colorX, float colorY, float colorZ)
+  {
+    this->cloudColor = Vector(colorX, colorY, colorZ);
+  }
+  inline void setSkyColor(float colorX, float colorY, float colorZ)
+  {
+    this->skyColor = Vector(colorX, colorY, colorZ);
+  }
 
   inline void setRainOption(const std::string& option)
@@ -122,4 +132,9 @@
   LightManager*               lightMan;
   GLfloat                     rainAmbient;
+  
+  Vector oldSkyColor;
+  Vector oldCloudColor;
+  Vector skyColor;
+  Vector cloudColor;
 
 };
