/// <summary> /// Displays Anisotropy Injection Tab /// </summary> private void DisplayAnisotropyInjectionTab() { EditorGUILayout.BeginVertical(); GUILayout.Button(new GUIContent(" Anisotropy Injection", injectionIconTexture), GuiStyles.areaTitleBarStyle); GuiHelpers.DrawContextualHelpBox("The \"Anisotropy Injection\" parameters allows you to add/remove anisotropy inside the system.\n\nIn other words, you will be able to modify how light from light sources will bounce inside the micro particles and will be deviated by them. Typically, how \"wet\" the micro particles are.\n TIP :The \"Strength\" parameter will accept negative values. Meaning that you will be able to remove Anisotropy as well."); EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); _anisotropyInjectionBoolProperty.boolValue = EditorGUILayout.ToggleLeft("Enabled", _anisotropyInjectionBoolProperty.boolValue); if (_anisotropyInjectionBoolProperty.boolValue) { EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); GuiHelpers.DrawArea <VolumeInjectionCommonParameters>(ref _anisotropyInjectionParametersProperty, "Parameters", (_textureMaskBoolProperty.boolValue ? 1 : 0) + (_noiseMaskBoolProperty.boolValue ? 2 : 0)); EditorGUILayout.EndVertical(); } EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); }
/// <summary> /// Displays Color Injection Tab /// </summary> private void DisplayColorInjectionTab() { EditorGUILayout.BeginVertical(); GUILayout.Button(new GUIContent(" Color Injection", injectionIconTexture), GuiStyles.areaTitleBarStyle); GuiHelpers.DrawContextualHelpBox("The \"Color Injection\" parameters allows you to add/remove color inside the system.\n\nIn other words, you will be able to add/remove light inside a defined area.\n TIP :The \"Strength\" parameter will accept negative values. Meaning that you will be able to remove Color."); EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); _colorInjectionBoolProperty.boolValue = EditorGUILayout.ToggleLeft("Enabled", _colorInjectionBoolProperty.boolValue); if (_colorInjectionBoolProperty.boolValue) { EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(_colorInjectionColorProperty); GuiHelpers.DrawArea <VolumeInjectionCommonParameters>(ref _colorInjectionParametersProperty, "Parameters", (object)((_textureMaskBoolProperty.boolValue ? 1 : 0) + (_noiseMaskBoolProperty.boolValue ? 2 : 0))); EditorGUILayout.EndVertical(); } EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); }
/// <summary> /// Displays Noise Mask Area /// </summary> private void DisplayNoiseMaskArea() { EditorGUILayout.BeginVertical(); GUILayout.Button(new GUIContent(" Noise Mask", noiseMaskIconTexture), GuiStyles.areaTitleBarStyle); GuiHelpers.DrawContextualHelpBox("The \"Noise Mask\" parameter allows you to assign a dynamic morphing noise mask to the volume.\nThis noise will be used for masking the data injected."); EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); _noiseMaskBoolProperty.boolValue = EditorGUILayout.ToggleLeft("Enabled", _noiseMaskBoolProperty.boolValue); if (_noiseMaskBoolProperty.boolValue) { EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); GUILayout.Button("Parameters", EditorStyles.boldLabel); EditorGUILayout.BeginVertical(EditorStyles.helpBox); GuiHelpers.DrawFloatField(ref _noiseMaskSpeedProperty, "Speed"); EditorGUILayout.Separator(); GuiHelpers.DrawFloatField(ref _noiseMaskOffsetProperty, "Offset"); EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); GuiHelpers.DrawArea <TransformParameters>(ref _noiseMaskTransformProperty, "Transform"); EditorGUILayout.EndVertical(); } EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical(); }
/// <summary> /// Displays Density Injection Tab /// </summary> private void DisplayDensityInjectionTab() { EditorGUILayout.BeginVertical(); GUILayout.Button(new GUIContent(" Density Injection", injectionIconTexture), GuiStyles.areaTitleBarStyle); GuiHelpers.DrawContextualHelpBox("The \"Density Injection\" parameters allows you to add/remove density inside the system.\n\nIn other words, you will be able to increase/decrease the amount of micro particles inside a defined area.\n TIP :The \"Strength\" parameter will accept negative values. Meaning that you will be able to remove Density, Color or Anisotropy as well."); EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); _densityInjectionBoolProperty.boolValue = EditorGUILayout.ToggleLeft("Enabled", _densityInjectionBoolProperty.boolValue); if (_densityInjectionBoolProperty.boolValue) { EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); GuiHelpers.DrawArea <VolumeInjectionCommonParameters>(ref _densityInjectionParametersProperty, "Parameters", (object)((_textureMaskBoolProperty.boolValue ? 1 : 0) + (_noiseMaskBoolProperty.boolValue ? 2 : 0))); EditorGUILayout.EndVertical(); } EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical(); EditorGUILayout.Separator(); }
/// <summary> /// Displays Texture Mask Area /// </summary> private void DisplayTextureMaskArea() { EditorGUILayout.BeginVertical(); GUILayout.Button(new GUIContent(" Texture Mask", textureMaskIconTexture), GuiStyles.areaTitleBarStyle); GuiHelpers.DrawContextualHelpBox("The \"Texture Mask\" parameter allows you to assign a volumetric texture mask to the volume.\nThis texture will be used for masking the data injected.\n\nThe channels of the texture are used as followed :\nRGB -> Will multiply the \"Strength\" parameter of the Color Injection.\nA -> Will multiply the \"Strength\" parameter of the Density and Anisotropy Injection."); EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); GUILayout.Button(new GUIContent(" Experimental Feature", experimentalFeaturesIconTexture), GuiStyles.topCenteredMiniGreyLabel); EditorGUILayout.HelpBox("\nATTENTION : \n\nThis feature is still at experimental stage.\n\nThis means that it can lead to performance, stability and/or visual issues.\n\nFeel free to contact me if you have any comment about it.\n", MessageType.Warning); EditorGUILayout.Separator(); _textureMaskBoolProperty.boolValue = EditorGUILayout.ToggleLeft("Enabled", _textureMaskBoolProperty.boolValue); if (_textureMaskBoolProperty.boolValue) { EditorGUILayout.BeginVertical(); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(_textureMaskTextureProperty); GuiHelpers.DrawArea <TransformParameters>(ref _textureMaskTransformProperty, "Transform"); EditorGUILayout.Separator(); GUILayout.Button("Other Parameters", EditorStyles.boldLabel); EditorGUILayout.BeginVertical(EditorStyles.helpBox); EditorGUILayout.PropertyField(_textureMaskWrapModeProperty, new GUIContent("Wrap Mode")); EditorGUILayout.Separator(); EditorGUILayout.PropertyField(_textureMaskFilterModeProperty, new GUIContent("Filter Mode")); EditorGUILayout.Separator(); _textureMaskClipOnAlphaProperty.boolValue = EditorGUILayout.Toggle("Clip on Alpha", _textureMaskClipOnAlphaProperty.boolValue); if (_textureMaskClipOnAlphaProperty.boolValue) { EditorGUILayout.BeginVertical(); GuiHelpers.DrawSlider(ref _textureMaskClippingThresholdProperty, 0.0f, 1.0f, "Clipping Theshold"); EditorGUILayout.EndVertical(); } EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical(); } EditorGUILayout.Separator(); EditorGUILayout.EndVertical(); EditorGUILayout.EndVertical(); }