2 Replies Latest reply on Nov 27, 2011 4:56 PM by Cillas

    Image Size in Graph

    Cillas

      Hi im trying to build a Graph Image Filter but get stuck.

       

      for the single kernel it works perfect if i get the image size by

       

        parameter float2 srcSize

          <

          parameterType: "inputSize";

          inputSizeName: "src";

          >;

       

      tried that too with a graph parameter and metadata, but the single kernels wont get the actual size, how can i do that?

        • 1. Re: Image Size in Graph
          chauffeurdevan Level 2

          Hi,

           

          I've found that a few months ago, and by the way, it seems the only way to get the sourceSize working in After Effects.

           

           

          The glogal graph parameter :

           

          <parameter type="float2" name="sourceSize" >

              <metadata name="minValue" type="float2" value="1"/>

              <metadata name="maxValue" type="float2" value="4096" />

              <metadata name="defaultValue" type="float2" value="1920., 720." />

              <metadata name="aeUIControl" value="aePoint" />

              <metadata name="aePointRelativeDefaultValue" type="float2" value="1, 1" />

          </parameter>

           

           

          In every kernel that you need it :

           

          parameter float2 sourceSize<

              parameterType : "inputSize";

              inputSizeName : "src";

          >;

           

          You also need to connect it in the node's evaluate parameter :

           

          <node id = "yourKernel" name ="yourKernel" namespace = "yourNamespace" vendor = "yourVendorName" version ="1">

              <evaluateParameters>

                  <![CDATA[void evaluateParameters() {

                      yourKernel::sourceSize = sourceSize;

                  }]]>

              </evaluateParameters>

          </node>

           

           

          Voilà

           

          Jocelyn Tremblay

          1 person found this helpful
          • 2. Re: Image Size in Graph
            Cillas Level 1

            wow, i found that out by myself but u answered me another question s great thanks to you.

             

            After Effects is unable to get the size without these

             

               <metadata name="minValue" type="float2" value="1"/>

                <metadata name="maxValue" type="float2" value="4096" />

                <metadata name="defaultValue" type="float2" value="1920., 720." />

                <metadata name="aeUIControl" value="aePoint" />

                <metadata name="aePointRelativeDefaultValue" type="float2" value="1, 1" />

             

            so thanks!