Line 448 of ICloudSceneNode.cpp appears to have been commented out by accident.
Here are lines 445 through 451:
Code: Select all
p[1+idx].Pos.X = particle.pos.X + h.X - v.X;
p[1+idx].Pos.Y = particle.pos.Y + h.Y - v.Y;
p[1+idx].Pos.Z = particle.pos.Z + h.Z - v.Z;
//p[1+idx].Color = particle.color;
p[1+idx].Normal.X = view.X;
p[1+idx].Normal.Y = view.Y;
p[1+idx].Normal.Z = view.Z;
I found it while trying to integrate the WeatherManager into my 3d viewer. I’m using my existing directional light, with it’s own set of controls for the diffuse/ambient ratio, so I removed the sunlight and the calls to setAmbientLight2 in IWeatherManagerAtmosphere.cpp. When I did that, I found that large portions of each cloud were green instead of gray if ambient light was less than 100%. Removing the comment on line 448, helped a lot, but there was still a small green spot on each cloud. I couldn’t find where the green was working its way into the cloud color, so I added the 2 lines shown below to ICloudSceneNode.cpp, forcing the colors to be grayscales:
Code: Select all
// make each particle
for (i=0; i < ParticleCount; i++)
{
core::vector3df tmppos = ParticleData[i].pos;
ParticleData[i].color.setRed(ParticleData[i].color.getBlue()); // added by CES
ParticleData[i].color.setGreen(ParticleData[i].color.getBlue()); // added by CES
// rotate
m.transformVect(tmppos);
--Carl