4 Replies Latest reply on Aug 21, 2011 1:31 AM by TheDarkIn1978

    slider in Pixel Bender Toolkit




      little question. I like to adjust parameter values with sliders (as described in examples) but

      I only get input where I can write the values. This is a bit annoying, if you want o play around.

      Any chance to get sliders? I looked and searched but didn´t get an answer to this issue.

        • 1. Re: slider in Pixel Bender Toolkit
          Felix Dames Level 1

          Please take a look into "Adobe Pixel Bender Developer's Guide" PDF. It's located under the menu item help inside the toolkit.

          The topic of your interest is "Metadata Hinting" -> "Parameter type specialization element" it's all documented very nice...


          your parameter for a slider with a float value should look like this:


          parameter float your_variable_name

          minValue: float(1.0);                      // the minimum value of the parameter
          maxValue: float(100.0);                  // the maximum value of the parameter
          defaultValue: float(100.0);               // the default value of the parameter

          stepInterval: float(1.0);                    // a step interval for the parameter if needed otherwise delete this line of code
          description: "your description";       // a description of the parameter



          but take a closer look into the help file for other parameter types like:



          parameter float angle


          parameterType: "angleDegrees";

          minValue : 0.0;

          maxValue : 359.9;

          defaultValue : 30.0;

          previewValue : 15.0;

          description : "measured in degrees";

          displayName : "vector angle";

          minValueName : "no angle";

          maxValueName : "full rotation";

          stepInterval : 5.0;



          parameter float2 mousePos


          parameterType : "position";

          minValue : float2(0.0);

          maxValue : float2(1024.0);

          defaultValue : float2(512.0);


          • 2. Re: slider in Pixel Bender Toolkit
            MartyGer Level 1

            Ah, thanks a lot.

            • 3. Re: slider in Pixel Bender Toolkit
              unique_screenname_here Level 3

              The Pixel Bender Toolkit only presents slider controls if your parameter contains "minValue" and "maxValue" metadata attributes. There's some debate as to whether this is the correct behavior but it is the current behavior. I recommend you add "defaultValue," "minValue," and "maxValue" metadata to all your controls.

              • 4. Re: slider in Pixel Bender Toolkit
                TheDarkIn1978 Level 1

                to add to Felix Dames' answer, if your parameter is grouped, for example if it's a pixel4, you can group your sliders like this:


                parameter pixel4 color


                    minValue:       pixel4(0.0, 0.0, 0.0, 0.0);

                    maxValue:       pixel4(1.0, 1.0, 1.0, 1.0);

                    defaultValue:   pixel4(1.0, 1.0, 1.0, 1.0);