Beispiel #1
0
 protected void ReadRegistry( Nuaj.Cirrus.Utility.FloatTrackbarControl _Trackbar, string _KeyName, float _DefaultValue )
 {
     string	sValue = m_ROOT.GetValue( _KeyName, _DefaultValue.ToString() ) as string;
     float	Value;
     if ( float.TryParse( sValue, out Value ) )
         _Trackbar.Value = Value;
 }
Beispiel #2
0
 private void integerTrackbarControlCubeMapSize_ValueChanged( Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue )
 {
     m_AppKey.SetValue( "CubeMapSize", _Sender.Value.ToString() );
 }
Beispiel #3
0
 private void floatTrackbarControlTerrainHeight_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.TerrainHeight = _Sender.Value;
     UpdateMMF();
 }
Beispiel #4
0
 private void floatTrackbarControlNoiseShapingPower_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.NoiseShapingPower = (float) Math.Pow( 10.0, _Sender.Value );
     UpdateMMF();
 }
Beispiel #5
0
 private void floatTrackbarControlIsotropicScattering_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.CloudIsotropicScattering = _Sender.Value;
     UpdateMMF();
 }
Beispiel #6
0
 private void floatTrackbarControlFogRefAltitude_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.FogReferenceAltitudeKm = _Sender.Value;
     UpdateMMF();
 }
Beispiel #7
0
 private void floatTrackbarControlFogAmount_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.FogScattering = _Sender.Value * 0.004f;
     m_Instance.FogExtinction = m_Instance.FogScattering / 0.9f;	// Hardcoded for the moment... Should we need to make it a parameter too?
     UpdateMMF();
 }
Beispiel #8
0
 private void floatTrackbarControlCloudThickness_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.CloudThickness = _Sender.Value;
     UpdateMMF();
 }
Beispiel #9
0
 private void floatTrackbarControlWhitePoint_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     panelGraph_Hable.WhitePoint = _Sender.Value;
 }
Beispiel #10
0
 private void floatTrackbarControlScaleY_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     panelGraph_Hable.ScaleY = _Sender.Value;
     outputPanelFilmic_Insomniac.ScaleY = _Sender.Value;
 }
Beispiel #11
0
 private void integerTrackbarControlPhiD_ValueChanged( Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _FormerValue )
 {
     Redraw();
 }
Beispiel #12
0
 private void floatTrackbarControlWarpFactor_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     Redraw();
 }
Beispiel #13
0
 private void floatTrackbarControlScaleFactor_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
 }
        protected void DisplayCloudLayer( Nuaj.ModuleCloudLayer.CloudLayer _Layer, int _LayerIndex )
        {
            _Layer.Enabled = GUIHelpers.CheckBox( new GUIContent( "Enabled", "Enables or disables the layer.\nRemember that you can only have up to 4 active layers of any kind at the same time." ), _Layer.Enabled, (_Layer.Enabled ? "Disable" : "Enable") + " Cloud Layer" );

            using ( GUIHelpers.GUIEnabler( _Layer.Enabled ) )
            {
                // General parameters
                _Layer.Altitude = GUIHelpers.Slider( new GUIContent( "Altitude", "Sets the cloud's altitude (in kilometers) relative to sea level." ), _Layer.Altitude, 0.0f, 20.0f, "Change Cloud Altitude" );
                _Layer.Thickness = GUIHelpers.Slider( new GUIContent( "Thickness", "Sets the cloud's thickness (in kilometers)." ), _Layer.Thickness, 0.0f, 1.0f, "Change Cloud Thickness" );
                _Layer.CastShadow = GUIHelpers.CheckBox( new GUIContent( "Cast Shadows", "Tells if the layer casts shadows." ), _Layer.CastShadow, "Change Layer Cast Shadow" );

                if ( GUIHelpers.FoldOut( ref m_bFoldOutAppearance[_LayerIndex], "Appearance" ) )
                {
                    Indent();

                    _Layer.Coverage = GUIHelpers.Slider( new GUIContent( "Coverage", "Sets the cloud coverage." ), _Layer.Coverage, -1.0f, 1.0f, "Change Coverage" );
                    _Layer.Density = 0.02f * GUIHelpers.Slider( new GUIContent( "Density", "Sets the cloud's density cloud density that influences the capacity of the cloud to absorb and scatter light." ), 50.0f * _Layer.Density, 0.0f, MAX_DENSITY, "Change Cloud Density" );
                    _Layer.NormalAmplitude = GUIHelpers.Slider( new GUIContent( "Normal Amplitude", "Sets the importance of the normal map.\nA large amplitude may increase the impression of volume but too large a value can look more water than cloud.\nThis way, you can create a more \"stormy look\" below the layer." ), _Layer.NormalAmplitude, 0.0f, 1.0f, "Change Normal Amplitude" );
                    _Layer.Smoothness = GUIHelpers.Slider( new GUIContent( "Smoothness", "Sets the smoothness of the cloud." ), _Layer.Smoothness, 0.0f, 8.0f, "Change Smoothness" );
                    _Layer.CloudColor = GUIHelpers.ColorBox( new GUIContent( "Cloud Color", "Sets the internal color of the cloud.\nDefault is white but you can create funky clouds as well." ), _Layer.CloudColor, "Change Cloud Color" );

                    UnIndent();
                    GUIHelpers.Separate();
                }

                if ( GUIHelpers.FoldOut( ref m_bFoldOutNoise[_LayerIndex], "Noise" ) )
                {
                    Indent();

                    _Layer.NoiseTiling = 0.006f * GUIHelpers.Slider( new GUIContent( "Noise Tiling", "Sets the tiling of the noise texture." ), _Layer.NoiseTiling / 0.006f, 0.0f, 10.0f, "Change Noise Tiling" );
                    _Layer.NoiseOctavesCount = GUIHelpers.SliderInt( new GUIContent( "Octaves Count", "Sets the amount of noise octaves.\nEach new octave adss more fine detail to the cloud but also eats more time." ), _Layer.NoiseOctavesCount, 1, 4, "Change Noise Octaves" );
                    _Layer.FrequencyFactor = GUIHelpers.Slider( new GUIContent( "Frequency Factor", "Sets the frequency factor for each new octave.\nThis guides the increase in tiling size as we use more noise octaves." ), _Layer.FrequencyFactor, 0.0f, 4.0f, "Change Frequency Factor" );
                    _Layer.FrequencyFactorAnisotropy = GUIHelpers.Slider( new GUIContent( "Frequency Anisotropy", "Sets the frequency anisotropy in the Y direction.\nThis allows you to squeeze or stretch the cloud in a particular direction to make them more wispy." ), _Layer.FrequencyFactorAnisotropy, -2.0f, 2.0f, "Change Frequency Anisotropy" );
                    _Layer.AmplitudeFactor = GUIHelpers.Slider( new GUIContent( "Amplitude Factor", "Sets the amplitude factor for each new octave.\nThis guides the increase in amplitude (weight) as we use more noise octaves." ), _Layer.AmplitudeFactor, 0.0f, 4.0f, "Change Amplitude Factor" );

                    if ( GUIHelpers.FoldOut( ref m_bFoldOutAppearanceTextures[_LayerIndex], "Noise Textures" ) )
                    {
                        GUIHelpers.Separate();

                        GUIHelpers.BeginHorizontal();
                        GUIHelpers.IndentSpace();
                        GUIHelpers.ShrinkableLabel( new GUIContent( "Noise Presets" ) );
                        if ( GUIHelpers.Button( new GUIContent( "Standard", "Applies standard settings" ), GUILayout.Width( 80.0f ) ) )
                            ApplySettings( _Layer, CLOUD_NOISE_PRESETS.STANDARD );
                        if ( GUIHelpers.Button( new GUIContent( "Wispy", "Applies wispy settings" ), GUILayout.Width( 80.0f ) ) )
                            ApplySettings( _Layer, CLOUD_NOISE_PRESETS.WISPY );
                        if ( GUIHelpers.Button( new GUIContent( "Bumpy", "Applies bumpy settings" ), GUILayout.Width( 80.0f ) ) )
                            ApplySettings( _Layer, CLOUD_NOISE_PRESETS.BUMPY);
                        if ( GUIHelpers.Button( new GUIContent( "Webby", "Applies webby settings" ), GUILayout.Width( 80.0f ) ) )
                            ApplySettings( _Layer, CLOUD_NOISE_PRESETS.WEBBY);
                        GUIHelpers.EndHorizontal();

                        _Layer.NoiseTexture0 = GUIHelpers.SelectTexture( new GUIContent( "Noise Texture 0", "Sets the Normal (RGB) + Height (A) noise texture for octave #0." ), _Layer.NoiseTexture0, "Change Layer Noise Texture 0" );
                        _Layer.NoiseTexture1 = GUIHelpers.SelectTexture( new GUIContent( "Noise Texture 1", "Sets the Normal (RGB) + Height (A) noise texture for octave #1." ), _Layer.NoiseTexture1, "Change Layer Noise Texture 1" );
                        _Layer.NoiseTexture2 = GUIHelpers.SelectTexture( new GUIContent( "Noise Texture 2", "Sets the Normal (RGB) + Height (A) noise texture for octave #2." ), _Layer.NoiseTexture2, "Change Layer Noise Texture 2" );
                        _Layer.NoiseTexture3 = GUIHelpers.SelectTexture( new GUIContent( "Noise Texture 3", "Sets the Normal (RGB) + Height (A) noise texture for octave #3." ), _Layer.NoiseTexture3, "Change Layer Noise Texture 3" );
                    }

                    UnIndent();
                    GUIHelpers.Separate();
                }

                if ( GUIHelpers.FoldOut( ref m_bFoldOutAnimation[_LayerIndex], "Animation" ) )
                {
                    Indent();

                    _Layer.WindForce = GUIHelpers.Slider( new GUIContent( "Wind Force", "Sets the force of the wind." ), _Layer.WindForce, 0.0f, 1.0f, "Change Wind Force" );
                    _Layer.WindDirectionAngle = Mathf.Deg2Rad * GUIHelpers.Slider( new GUIContent( "Wind Direction", "Sets the 2D direction of the wind." ), _Layer.WindDirectionAngle * Mathf.Rad2Deg, -180.0f, 180.0f, "Change Smoothness" );
                    _Layer.EvolutionSpeed = GUIHelpers.Slider( new GUIContent( "Evolution Speed", "Sets the speed at which the clouds evolve.\n(only works if you have more than 1 octave of noise !)" ), _Layer.EvolutionSpeed, -10.0f, 10.0f, "Change Evolution Speed" );

                    UnIndent();
                    GUIHelpers.Separate();
                }

                if ( GUIHelpers.FoldOut( ref m_bFoldOutAdvanced[_LayerIndex], "Advanced" ) )
                {
                    Indent();

                    _Layer.FactorZeroScattering = GUIHelpers.Slider( new GUIContent( "Zero Scattering", "Sets the zero scattering factor." ), _Layer.FactorZeroScattering, 0.0f, 10.0f, "Change Zero Scattering Factor" );
                    _Layer.FactorSingleScattering = GUIHelpers.Slider( new GUIContent( "Single Scattering", "Sets the single scattering factor." ), _Layer.FactorSingleScattering, 0.0f, 100.0f, "Change Single Scattering Factor" );
                    _Layer.FactorDoubleScattering = GUIHelpers.Slider( new GUIContent( "Double Scattering", "Sets the double scattering factor." ), _Layer.FactorDoubleScattering, 0.0f, 1000.0f, "Change Double Scattering Factor" );
                    _Layer.FactorMultipleScattering = GUIHelpers.Slider( new GUIContent( "Multiple Scattering", "Sets the multiple scattering factor." ), _Layer.FactorMultipleScattering, 0.0f, 1.0f, "Change Single Scattering Factor" );
                    _Layer.FactorSkyColor = GUIHelpers.Slider( new GUIContent( "Sky Scattering", "Sets the sky scattering factor for sky light passing though the clouds." ), _Layer.FactorSkyColor, 0.0f, 0.1f, "Change Sky Scattering Factor" );
                    _Layer.FactorTerrainColor = GUIHelpers.Slider( new GUIContent( "Terrain Scattering", "Sets the terrain scattering factor for light reflected on the terrain." ), _Layer.FactorTerrainColor, 0.0f, 0.1f, "Change Terrain Scattering Factor" );

                    UnIndent();
                    GUIHelpers.Separate();
                }
            }
        }
Beispiel #15
0
 private void integerTrackbarControlRaysCount_SliderDragStop( Nuaj.Cirrus.Utility.IntegerTrackbarControl _Sender, int _StartValue )
 {
     GenerateRays( _Sender.Value, m_SB_Rays );
 }
Beispiel #16
0
 private void floatTrackbarControlCloudPhaseIso_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.CloudAnisotropyIso = _Sender.Value;
     UpdateMMF();
 }
Beispiel #17
0
 private void floatTrackbarControlCloudScatteringRatio_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.CloudScattering = floatTrackbarControlCloudExtinction.Value * _Sender.Value;
     UpdateMMF();
 }
Beispiel #18
0
 protected void WriteRegistry( Nuaj.Cirrus.Utility.FloatTrackbarControl _Trackbar, string _KeyName )
 {
     m_ROOT.SetValue( _KeyName, _Trackbar.Value.ToString() );
 }
Beispiel #19
0
 private void floatTrackbarControlCloudVerticalLooping_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.NoiseLoVerticalLooping = _Sender.Value;
     UpdateMMF();
 }
Beispiel #20
0
 private void floatTrackbarControlAlbedoMultiplier_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.TerrainAlbedoMultiplier = _Sender.Value;
     UpdateMMF();
 }
Beispiel #21
0
 private void floatTrackbarControlFogAnisotropy_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.FogAnisotropy = _Sender.Value;
     UpdateMMF();
 }
Beispiel #22
0
 private void floatTrackbarControlAltitudeOffset_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.AltitudeOffset = _Sender.Value;
     UpdateMMF();
 }
Beispiel #23
0
 private void floatTrackbarControlGodraysStrength_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.GodraysStrength_Mie = _Sender.Value;
     UpdateMMF();
 }
Beispiel #24
0
 private void floatTrackbarControlCloudAltitude_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.CloudBaseAltitude = _Sender.Value;
     UpdateMMF();
 }
Beispiel #25
0
 private void floatTrackbarControlNoiseOffsetTop_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.NoiseOffsetTop = _Sender.Value;
     UpdateMMF();
 }
Beispiel #26
0
 private void floatTrackbarControlCloudHiFactor_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.NoiseHiStrength = _Sender.Value;
     UpdateMMF();
 }
Beispiel #27
0
 private void floatTrackbarControlSunTheta_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.SunTheta = 0.01745329251994329576923690768489f * _Sender.Value;
     UpdateMMF();
 }
Beispiel #28
0
 private void floatTrackbarControlCloudLowFrequency_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.NoiseLoFrequency = _Sender.Value;
     UpdateMMF();
 }
Beispiel #29
0
 private void floatTrackbarControlTerrainShadowStrength_ValueChanged( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fFormerValue )
 {
     m_Instance.TerrainCloudShadowStrength = _Sender.Value;
     UpdateMMF();
 }
Beispiel #30
0
        private void floatTrackbarControlShotInfos_SliderDragStop( Nuaj.Cirrus.Utility.FloatTrackbarControl _Sender, float _fStartValue )
        {
            PrepareDatabase();

            // Update white reflectance to show correction factor
            UpdateWhiteReflectanceUI();
        }