Beispiel #1
0
        // Draw OVR Density GUI
        private void DrawDensityOVR(string label, MaterialEditor editor)
        {
            Styles.bShowDensityOVR = NeoGUIHelper.MaterialHeaderWithToggle(_bDensityOVR, editor, label, Styles.bShowDensityOVR);

            if (!Styles.bShowDensityOVR)
            {
                return;
            }

            EditorGUI.BeginDisabledGroup(_bOVR.floatValue == 0.0f || _bDensityOVR.floatValue == 0.0f);

            bool bDensityMap = DoToggleProperty("Enable Density Map OVR", _bDensityMapOVR, editor);

            if (bDensityMap)
            {
                NeoGUIHelper.PushIndent();
                editor.TextureProperty(_DensityMapOVR, "Density Map OVR");
                DoRangeProperty("Min Density of strands OVR", _DensityMinOVR, editor);
                DoRangeProperty("Max Density of strands OVR", _DensityMaxOVR, editor);
                NeoGUIHelper.PopIndent();
            }
            else
            {
                DoRangeProperty("Density of strands OVR", _DensityOVR, editor);
            }
            EditorGUI.EndDisabledGroup();
        }
Beispiel #2
0
        // Draw OVR Color GUI
        private void DrawColorOVR(string label, MaterialEditor editor)
        {
            Styles.bShowColorOVR = NeoGUIHelper.MaterialHeaderWithToggle(_bColorOVR, editor, label, Styles.bShowColorOVR);

            if (!Styles.bShowColorOVR)
            {
                return;
            }

            EditorGUI.BeginDisabledGroup(_bOVR.floatValue == 0.0f || _bColorOVR.floatValue == 0.0f);

            bool bColorMap = DoToggleProperty("Enable Color Map", _bColorMapOVR, editor);

            if (bColorMap) // color maps
            {
                NeoGUIHelper.PushIndent();

                bool bGradientMap = DoToggleProperty("Enable Gradient Map OVR", _bGradientMapOVR, editor);

                if (bGradientMap)
                {
                    NeoGUIHelper.PushIndent();

                    DoToggleProperty("Color Gradient Root To Tip", _bGradientMapRootToTipOVR, editor);

                    //gradient map
                    editor.TexturePropertySingleLine(Styles.GradientMapLabelOVR, _GradientMapOVR);

                    NeoGUIHelper.PopIndent();
                }
                else
                {
                    // root and tip color maps
                    editor.TextureProperty(_ColorRootMapOVR, "Color Root Map OVR");
                    editor.TextureProperty(_ColorTipMapOVR, "Color Tip Map OVR");
                }

                editor.ShaderProperty(_ColorTintRootOVR, "Root Tint");
                editor.ShaderProperty(_ColorTintTipOVR, "Tip Tint");

                NeoGUIHelper.PopIndent();
            }
            else // color values
            {
                editor.ShaderProperty(_ColorRootOVR, "Root Color");
                editor.ShaderProperty(_ColorTipOVR, "Tip Color");
            }
            EditorGUI.EndDisabledGroup();
        }
Beispiel #3
0
        // Draw OVR GUI
        private void DrawOvercoat(MaterialEditor editor)
        {
            NeoGUIHelper.PushTextColor(Color.white);
            NeoGUIHelper.PushBGColor(NeoGUIHelper.Colors.LightGrey);

            Styles.bShowOVR = NeoGUIHelper.MaterialHeaderWithToggle(_bOVR, editor, "2. overcoat (OVR)", Styles.bShowOVR);

            NeoGUIHelper.PopTextColor();
            NeoGUIHelper.PopBGColor();

            if (!Styles.bShowOVR)
            {
                return;
            }

            EditorGUI.BeginDisabledGroup(_bOVR.floatValue == 0.0f);

            int prevIndent = EditorGUI.indentLevel;

            EditorGUI.indentLevel = 0;

            NeoGUIHelper.PushIndent();
            {
                EditorGUILayout.Space();
                DrawColorOVR("2.1 OVR COLOR", editor);
                EditorGUILayout.Space();
                DrawShapeOVR("2.2 OVR SHAPE", editor);
                EditorGUILayout.Space();
                DrawDensityOVR("2.3 OVR DENSITY", editor);
                EditorGUILayout.Space();
                DrawHeightOVR("2.4 OVR HEIGHT", editor);
                EditorGUILayout.Space();
                DrawLightingOVR("2.5 OVR LIGHTING", editor);
            }
            NeoGUIHelper.PopIndent();

            EditorGUI.indentLevel = prevIndent;

            EditorGUI.EndDisabledGroup();
        }
Beispiel #4
0
        // Draw UND Density GUI
        private void DrawDensityUND(string label, MaterialEditor editor)
        {
            Styles.bShowDensityUND = NeoGUIHelper.MaterialHeaderWithToggle(_bDensityUND, editor, label, Styles.bShowDensityUND);

            if (!Styles.bShowDensityUND)
            {
                return;
            }

            EditorGUI.BeginDisabledGroup(_bDensityUND.floatValue == 0.0f);

            if (isComplexProfile)
            {
                bool bDensityMap = DoToggleProperty("Enable Density Map UND", _bDensityMapUND, editor);

                if (bDensityMap)
                {
                    NeoGUIHelper.PushIndent();
                    editor.TextureProperty(_DensityMapUND, "Density Map UND");
                    DoRangeProperty("Min Density of strands UND", _DensityMinUND, editor);
                    DoRangeProperty("Max Density of strands UND", _DensityMaxUND, editor);
                    NeoGUIHelper.PopIndent();
                }
                else
                {
                    DoRangeProperty("Density of strands UND", _DensityUND, editor);
                }
            }
            else if (isOptimizedProfile)
            {
                editor.TextureProperty(_DensityMapUND, "Density Map UND");
                DoRangeProperty("Min Density of strands UND", _DensityMinUND, editor);
                DoRangeProperty("Max Density of strands UND", _DensityMaxUND, editor);
            }

            EditorGUI.EndDisabledGroup();
        }