public VCloudsManager(SkyX skyX)
        {
            this.SkyX   = skyX;
            _height     = new Vector2(-1, -1);
            _windSpeed  = 800.0f;
            _autoUpdate = true;
            _isCreated  = false;

            _ambientGradient = new ColorGradient();
            _ambientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(1, 1, 1) * 0.9f, 1.0f));
            _ambientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.7f, 0.7f, 0.65f), 0.625f));
            _ambientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.6f, 0.55f, 0.4f) * 0.5f, 0.5625f));
            _ambientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.6f, 0.55f, 0.4f) * 0.2f, 0.475f));
            _ambientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.6f, 0.45f, 0.3f) * 0.1f, 0.5f));
            _ambientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.2f, 0.2f, 0.3f) * 0.25f, 0.35f));
            _ambientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.2f, 0.2f, 0.3f) * 0.3f, 0));

            _sunGradient = new ColorGradient();
            _sunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(1, 1, 1) * 0.9f, 1.0f));
            _sunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(1, 1, 1) * 0.8f, 0.75f));
            _sunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.8f, 0.75f, 0.55f) * 1.3f, 0.5625f));
            _sunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.6f, 0.5f, 0.2f) * 1.5f, 0.5f));
            _sunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.6f, 0.5f, 0.2f) * 0.2f, 0.4725f));
            _sunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.5f, 0.5f, 0.5f) * 0.05f, 0.45f));
            _sunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.25f, 0.25f, 0.25f), 0.3725f));
            _sunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.5f, 0.5f, 0.5f), 0.0f));
        }
        public VCloudsManager(SkyX skyX)
        {
            this.SkyX = skyX;
            _height = new Vector2(-1, -1);
            _windSpeed = 800.0f;
            _autoUpdate = true;
            _isCreated = false;

            _ambientGradient = new ColorGradient();
            _ambientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(1, 1, 1) * 0.9f, 1.0f));
            _ambientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.7f, 0.7f, 0.65f), 0.625f));
            _ambientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.6f, 0.55f, 0.4f) * 0.5f, 0.5625f));
            _ambientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.6f, 0.55f, 0.4f) * 0.2f, 0.475f));
            _ambientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.6f, 0.45f, 0.3f) * 0.1f, 0.5f));
            _ambientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.2f, 0.2f, 0.3f) * 0.25f, 0.35f));
            _ambientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.2f, 0.2f, 0.3f) * 0.3f, 0));

            _sunGradient = new ColorGradient();
            _sunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(1, 1, 1) * 0.9f, 1.0f));
            _sunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(1, 1, 1) * 0.8f, 0.75f));
            _sunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.8f, 0.75f, 0.55f) * 1.3f, 0.5625f));
            _sunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.6f, 0.5f, 0.2f) * 1.5f, 0.5f));
            _sunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.6f, 0.5f, 0.2f) * 0.2f, 0.4725f));
            _sunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.5f, 0.5f, 0.5f) * 0.05f, 0.45f));
            _sunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.25f, 0.25f, 0.25f), 0.3725f));
            _sunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.5f, 0.5f, 0.5f), 0.0f));
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="skyX"></param>
 public MeshManager(SkyX skyX)
 {
     this.SkyX = skyX;
     this.SmoothSkydomeFading  = true;
     this.SkydomeFadingPercent = 0.05f;
     this.MaterialName         = "_NULL_";
     this.Steps   = 70;
     this.Circles = 80;
 }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="skyX">skyX reference</param>
        /// <param name="options">Cloud layer options</param>
        public CloudLayer(SkyX skyX, Options options)
        {
            this.SkyX         = skyX;
            this.LayerOptions = options;

            this.AmbientGradient = new ColorGradient();
            this.AmbientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(1, 1, 1) * 0.95f, 1.0f));
            this.AmbientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.7f, 0.7f, 0.65f), 0.625f));
            this.AmbientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.6f, 0.55f, 0.4f), 0.5625f));
            this.AmbientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.6f, 0.45f, 0.3f) * 0.4f, 0.5f));
            this.AmbientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.5f, 0.25f, 0.25f) * 0.1f, 0.45f));
            this.AmbientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.2f, 0.2f, 0.3f) * 0.1f, 0.35f));
            this.AmbientGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.2f, 0.2f, 0.5f) * 0.15f, 0));

            this.SunGradient = new ColorGradient();
            this.SunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(1, 1, 1) * 0.95f, 1.0f));
            this.SunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(1, 1, 1) * 0.8f, 0.75f));
            this.SunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.8f, 0.75f, 0.55f) * 1.3f, 0.5625f));
            this.SunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.6f, 0.5f, 0.2f) * 0.75f, 0.5f));
            this.SunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.6f, 0.5f, 0.2f) * 0.35f, 0.4725f));
            this.SunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.5f, 0.5f, 0.5f) * 0.15f, 0.45f));
            this.SunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.2f, 0.2f, 0.25f) * 0.5f, 0.3f));
            this.SunGradient.AddFrame(new KeyValuePair <Vector3, float>(new Vector3(0.5f, 0.5f, 0.5f) * 0.35f, 0.0f));
        }
        private void CreateSkyX()
        {
            // Create SkyX
            _skyX = new SkyX(mogreWin.sceneMgr, mogreWin.camera);
            _skyX.Create();
            _skyX.VCloudsManager.Create();

            ////// A little change to default atmosphere settings :)
            AtmosphereManager.AtmosphereOptions opt = (AtmosphereManager.AtmosphereOptions)_skyX.AtmosphereManager.Options.Clone();
            opt.RayleighMultiplier = 0.0045f;
            _skyX.AtmosphereManager.Options = opt;
            _skyX.TimeMultiplier = 0.5f;
            // Add our ground atmospheric scattering pass to terrain material
            //var terrainMaterial = (Material)MaterialManager.Instance.GetByName("Terrain");
            //if (terrainMaterial != null)
            //{
            //    var pass = terrainMaterial.GetTechnique(0).CreatePass();
            //    _skyX.GpuManager.AddGroundPass(pass, 5000, SceneBlendType.TransparentColor);
            //}
            ////// Create our terrain
            //scene.SetWorldGeometry("Terrain.xml");

            //// Add a basic cloud layer
            _skyX.CloudsManager.Add(new CloudLayer.Options(/* Default options */));
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="skyX"> parent skyX reference</param>
 public AtmosphereManager(SkyX skyX)
 {
     this.SkyX = skyX;
     _options = new AtmosphereOptions();
 }
Exemple #7
0
 public GpuManager(SkyX skyX)
 {
     this.SkyX = skyX;
 }
 public MoonManager( SkyX skyX )
 {
     this.SkyX = skyX;
     this.MoonSize = 0.225f;
 }
Exemple #9
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="skyX"> parent skyX reference</param>
 public AtmosphereManager(SkyX skyX)
 {
     this.SkyX = skyX;
     _options  = new AtmosphereOptions();
 }
 /// <summary>
 /// Default onstructor
 /// </summary>
 /// <param name="skyX">skyX reference</param>
 public CloudLayer(SkyX skyX)
     : this(skyX, new Options())
 {
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="skyX"></param>
 public CloudsManager(SkyX skyX)
 {
     this.SkyX = skyX;
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="skyX"></param>
 public CloudsManager( SkyX skyX )
 {
     this.SkyX = skyX;
 }
 public GpuManager( SkyX skyX )
 {
     this.SkyX = skyX;
 }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="skyX">skyX reference</param>
        /// <param name="options">Cloud layer options</param>
        public CloudLayer(SkyX skyX, Options options)
        {
            this.SkyX = skyX;
            this.LayerOptions = options;

            this.AmbientGradient = new ColorGradient();
            this.AmbientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(1, 1, 1) * 0.95f, 1.0f));
            this.AmbientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.7f, 0.7f, 0.65f), 0.625f));
            this.AmbientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.6f, 0.55f, 0.4f), 0.5625f));
            this.AmbientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.6f, 0.45f, 0.3f) * 0.4f, 0.5f));
            this.AmbientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.5f, 0.25f, 0.25f) * 0.1f, 0.45f));
            this.AmbientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.2f, 0.2f, 0.3f) * 0.1f, 0.35f));
            this.AmbientGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.2f, 0.2f, 0.5f) * 0.15f, 0));

            this.SunGradient = new ColorGradient();
            this.SunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(1, 1, 1) * 0.95f, 1.0f));
            this.SunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(1, 1, 1) * 0.8f, 0.75f));
            this.SunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.8f, 0.75f, 0.55f) * 1.3f, 0.5625f));
            this.SunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.6f, 0.5f, 0.2f) * 0.75f, 0.5f));
            this.SunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.6f, 0.5f, 0.2f) * 0.35f, 0.4725f));
            this.SunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.5f, 0.5f, 0.5f) * 0.15f, 0.45f));
            this.SunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.2f, 0.2f, 0.25f) * 0.5f, 0.3f));
            this.SunGradient.AddFrame(new KeyValuePair<Vector3, float>(new Vector3(0.5f, 0.5f, 0.5f) * 0.35f, 0.0f));
        }
 /// <summary>
 /// Default onstructor
 /// </summary>
 /// <param name="skyX">skyX reference</param>
 public CloudLayer(SkyX skyX)
     : this(skyX, new Options())
 {
 }
Exemple #16
0
 public MoonManager(SkyX skyX)
 {
     this.SkyX     = skyX;
     this.MoonSize = 0.225f;
 }