Пример #1
0
        public static void GX_Volumes_GlobalAnisotropyNoise()
        {
            GaiaSceneInfo gaiaSceneInfo = GaiaSceneInfo.GetSceneInfo();

            GameObject globalVolumeObject = AuraVolume.CreateGameObject("Aura Global Volume", VolumeTypeEnum.Global);

            globalVolumeObject.transform.position = gaiaSceneInfo.m_centrePointOnTerrain;
            AuraVolume globalVolume = globalVolumeObject.GetComponent <AuraVolume>();

            SetupVolumeDefaultNoise(globalVolume);
            globalVolume.density.injectionParameters.enable = false;
            globalVolume.color.injectionParameters.enable   = false;
            SetupVolumeDefaultAnisotropy(globalVolume);
        }
Пример #2
0
        public static void GX_Presets_Dawn()
        {
            Aura mainComponent = SetupAura();

            mainComponent.frustum.settings.density       = 0.1f;
            mainComponent.frustum.settings.anisotropy    = 0.75f;
            mainComponent.frustum.settings.color         = Color.HSVToRGB(0.0777f, 0.50f, 1);
            mainComponent.frustum.settings.colorStrength = 0.25f;

            AuraLight[] lights            = SetupLights();
            AuraLight[] directionalLights = SortOutLightsByType(lights, LightType.Directional);
            if (directionalLights.Length == 0)
            {
                directionalLights    = new AuraLight[1];
                directionalLights[0] = AuraLight.CreateGameObject("Aura Directional Light", LightType.Directional).GetComponent <AuraLight>();
            }
            for (int i = 0; i < directionalLights.Length; ++i)
            {
                Vector3 tmpRotation = directionalLights[i].transform.rotation.eulerAngles;
                tmpRotation.x = 10.0f;
                directionalLights[i].transform.rotation = Quaternion.Euler(tmpRotation);

                directionalLights[i].GetComponent <Light>().color     = Color.HSVToRGB(0.0777f, 0.92f, 1.0f);
                directionalLights[i].GetComponent <Light>().intensity = 1.0f;

                directionalLights[i].strength = 1.0f;
                directionalLights[i].enableOutOfPhaseColor   = true;
                directionalLights[i].outOfPhaseColor         = Color.HSVToRGB(0.025f, 0.6f, 1);
                directionalLights[i].outOfPhaseColorStrength = 0.5f;
            }

            AuraVolume[] auraVolumes = GetVolumes();
            DisableActiveAuraVolumes(auraVolumes);
            AuraVolume globalVolume = AuraVolume.CreateGameObject("Aura Global Volume", VolumeTypeEnum.Global).GetComponent <AuraVolume>();

            globalVolume.noiseMask.enable                     = true;
            globalVolume.noiseMask.transform.scale            = Vector3.one * 5.0f;
            globalVolume.density.injectionParameters.enable   = true;
            globalVolume.density.injectionParameters.strength = 0.1f;
            globalVolume.density.injectionParameters.noiseMaskLevelParameters.contrast = 5.0f;
            globalVolume.color.injectionParameters.enable        = false;
            globalVolume.anisotropy.injectionParameters.enable   = true;
            globalVolume.anisotropy.injectionParameters.strength = 0.1f;
            globalVolume.anisotropy.injectionParameters.noiseMaskLevelParameters.contrast       = 3.0f;
            globalVolume.anisotropy.injectionParameters.noiseMaskLevelParameters.outputLowValue = -1.0f;
        }
Пример #3
0
        public static void GX_Volumes_DarkArea()
        {
            GameObject volumeObject = AuraVolume.CreateGameObject("Aura Dark Area Volume", VolumeTypeEnum.Cylinder);

            SetSpawnTransform(volumeObject);

            AuraVolume volume = volumeObject.GetComponent <AuraVolume>();

            volume.volumeShape.fading.widthCylinderFade     = 0.5f;
            volume.volumeShape.fading.yNegativeCylinderFade = 0.0f;
            volume.volumeShape.fading.yPositiveCylinderFade = 0.75f;
            SetupVolumeDefaultDensity(volume);
            volume.density.injectionParameters.strength = 0.75f;
            volume.color.injectionParameters.enable     = true;
            volume.color.color = Color.HSVToRGB(0.49f, 0.0f, 1.0f);
            volume.color.injectionParameters.strength = -10;
            SetupVolumeDefaultAnisotropy(volume);
            volume.anisotropy.injectionParameters.strength = 1.0f;
        }