Quantcast
Channel: Adobe Community : Popular Discussions - After Effects SDK
Viewing all 73444 articles
Browse latest View live

efficient rendering

$
0
0

Hi.

 

I'm about to make a small program that will render a number of shapes on screen.

 

The way it works now (I'm extending an example) is that the render buffer is scanlined , and my program gets called width*height number of times, starting from top left to bottom right. This is good for some cases when you want to do color alterations etc on the entire buffer.

 

Now, what I want to do is draw a number of shapes. With current setup im forced to check if a pixel is inside any of my shapes for every pixel, which can be very heavy if I have a lot of shapes. Something much, much more efficient would be to actually render JUST the shapes as they are, say triangles, ontop of the buffer. This way each pixel would be processed without even one pixel of "spill".

 

With the current setup of getting a callback for each pixel I dont see this will ever be feasable , is this really the only way to draw things to the screen?

Isnt it possible to access the framebuffer in raw , like a simple SetPixel(x,y,value) type of call?

 

Another question I would like to squeeze in here is; how can I find out if i'm currently rendering a preview or a quality render? (I guess preview should using much faster code)

 

Many thanks,

 

Bill


How to set camera type to One-Node in AEGP

$
0
0

I am writing an AEGP plugin that creates a camera in After Effects. The camera needs to be set to One Node, however the default appears to be Two-Node, and I cannot find any way of controlling this in either the initial AEGP_CreateCameraInComp method on AEGP_CompSuite6, or after the fact on AEGP_CameraSuite2, which would seem to be the obvious place to look.

 

Am I looking in the wrong places, or is there really no way to control whether a camera is One or Two node when creating it via an AEGP?

Exporting light radius

$
0
0

I'm trying to export lighting information from After Effects, but I'm not seeing a parameter for exporting the light's falloff distance.

 

 

 

The following candidates look good:

 


AEGP_LayerStream_LIGHT_FALLOFF_START,

AEGP_LayerStream_LIGHT_FALLOFF_DISTANCE,

 

But FALLOFF_START is giving me 0 and FALLOFF_DISTANCE is giving me the radius value.

 

 

 

My question is two-fold: What is FALLOFF_START? and how can I get the value of the falloff distance parameter?

Newbie SmartFX Plugin Help

$
0
0

Hi,

 

I'm starting out with the SDK in an attempt to convert my Pixel Bender plugins to native so they'll run faster and work in CS6. It's important that they work in 32-bit (as I guess all new plugins should anyway for max compatability) so I'm dispensing with the old-style and going straight for SmartFX.

 

At the moment all I want to do is get the input and fill it with a colour depending on the bit depth, just so I can learn how things happen and I'll work the rest out later. I can compile and build the plugin OK but when I apply it to a layer, the layer just turns black, with no RGB or A info. I'm guessing that I'm doing something wrong during the Pre-Render call, in that I'm not setting the result rectangles correctly, but as I've based it on the supplied SmartyPants example plugin, it should work ok.

 

Here's the PreRender and SmartRender code:

 

// PreRender

static PF_Err PreRender(

          PF_InData                                        *in_data,

          PF_OutData                                        *out_data,

          PF_PreRenderExtra                    *extra)

{

          PF_Err err = PF_Err_NONE;

  PF_RenderRequest req = extra->input->output_request;

          PF_CheckoutResult in_result;

 

  // Check out input

          ERR(extra->cb->checkout_layer(          in_data->effect_ref,

                                                                                                MY_INPUT,     // Defined as 0

                                                                                                MY_INPUT,

                                                                                                &req,

                                                                                                in_data->current_time,

                                                                                                in_data->time_step,

                                                                                                in_data->time_scale,

                                                                                                &in_result));

 

  // Set the result rectangles

          UnionLRect(&in_result.result_rect,                     &extra->output->result_rect);

          UnionLRect(&in_result.max_result_rect,           &extra->output->max_result_rect);

 

          return err;

}

 

 

// ActuallyRender...

static PF_Err ActuallyRender(

          PF_InData                    *in_data,

          PF_EffectWorld           *input,

          PF_OutData                    *out_data,

          PF_EffectWorld          *output)

{

          PF_Err                                        err           = PF_Err_NONE,

                                                            err2           = PF_Err_NONE;

          PF_Point                              origin;

          PF_Rect                                        src_rect, areaR;

          PF_PixelFormat                    format          =          PF_PixelFormat_INVALID;

          PF_WorldSuite2                    *wsP          =          NULL;

 

 

          PF_PixelFloat                    red_float = {0.0, 0.0, 1.0, 1.0};

          PF_Pixel16                              green_deep = {0, 32767, 0, 32767};

          PF_Pixel8                              blue_norm = {255, 0, 0, 255};

 

          AEGP_SuiteHandler suites(in_data->pica_basicP);

 

          src_rect.left           = -in_data->output_origin_x;

          src_rect.top           = -in_data->output_origin_y;

          src_rect.bottom = src_rect.top + output->height;

          src_rect.right           = src_rect.left + output->width;

 

 

          ERR(AEFX_AcquireSuite(          in_data,

                                        out_data,

                                        kPFWorldSuite,

                                        kPFWorldSuiteVersion2,

                                                                                                            "Couldn't load suite.",

                                        (void**)&wsP));

 

  if (!in_data->sequence_data) {

              PF_COPY(input, output, &src_rect, NULL);

              err = PF_Err_INTERNAL_STRUCT_DAMAGED;

          }

 

 

          if (!err){

                         ERR(wsP->PF_GetPixelFormat(input, &format));

                         switch (format) {

                                        case PF_PixelFormat_ARGB128:

 

                                                       ERR(suites.FillMatteSuite2()->fill_float(in_data->effect_ref,

                                                                                                                                                            &red_float,

                                                                                                                                                            NULL,

                                                                                                                                                            input));

                                                       break;

 

                                        case PF_PixelFormat_ARGB64:

 

                                                       ERR(suites.FillMatteSuite2()->fill16(in_data->effect_ref,

                                                                                                                                                            &green_deep,

                                                                                                                                                            NULL,

                                                                                                                                                            input));

                  break;

 

                                        case PF_PixelFormat_ARGB32:

                                                        ERR(suites.FillMatteSuite2()->fill(in_data->effect_ref,

                                                                                                                                                            &blue_norm,

                                                                                                                                                            NULL,

                                                                                                                                                            input));

                                                       break;

 

 

                                        default:

                                                       err = PF_Err_BAD_CALLBACK_PARAM;

                                                       break;

                              }

                              err = PF_COPY(input, output, &src_rect, NULL);

          }

          ERR2(AEFX_ReleaseSuite(          in_data,

                                                                           out_data,

                                                                           kPFWorldSuite,

                                                                           kPFWorldSuiteVersion2,

                                                                           "Couldn't release suite."));

          return err;

}

 

// SmartRender

static PF_Err SmartRender(

          PF_InData                                        *in_data,

          PF_OutData                                        *out_data,

          PF_SmartRenderExtra                    *extra)

{

          PF_Err                              err                    = PF_Err_NONE,

                                                  err2           = PF_Err_NONE;

 

          PF_EffectWorld          *input_worldP          = NULL,

                                                  *output_worldP  = NULL;

 

  // checkout input & output buffers.

          ERR((extra->cb->checkout_layer_pixels(          in_data->effect_ref, QPMM_INPUT, &input_worldP)));

          ERR(extra->cb->checkout_output(          in_data->effect_ref, &output_worldP));

 

          ERR(ActuallyRender(          in_data,

                                                                 input_worldP,

                                                                 out_data,

                                                                 output_worldP));

 

          return err;

}

 

Please forgive my coding - it's been 15 years since I did any C++, and I was never much good at it!

 

Any help pointing me in the right direction will be much appreciated.

 

Thanks,

 

Christian

Can my plugin detect whether or not we're in a Linearized working space?

$
0
0

I would like my plugin to be able to detect if the user has checked 'Linearize working space' in the project settings.

 

Is this possible? and if so, how do I access that information?

 

cheers,

-Gareth

What should I use to create ui for a AEGP plugin in mac

$
0
0

Hey there,

 

     I'm new to plugin development, but I been doing script development for quite a long time though. I'm tring to develop a AEGP plugin. I'm going over  the "Panelator" example project(from AE CC SDK), but I don't know how to create ui stuff for the plugin panel.

 

     The example project doesn't have any example code for doing this on a mac computer, I found the examle code for windows though.

 

     So, can someone generously tell me how to do this? Should I do it with cocoa? But from what I understand, I can only use Objective-C to write cocoa ui.

 

     Thank you very much!!!!

PF_ADD_POINT with PF_ParamFlag_SUPERVISE flag set doesn't get PF_Cmd_USER_CHANGED_PARAM events in Premiere when dragged

$
0
0

Has anyone else run into this?

 

Problem Description:  An AE plugin with a point parameter defined by PF_ADD_POINT with PF_ParamFlag_SUPERVISE flag set doesn't get PF_Cmd_USER_CHANGED_PARAM events when the point is dragged in the Program window. But it does get PF_Cmd_USER_CHANGED_PARAM events when the point coordinates are changed in the Effect UI.

 

Steps to Reproduce: Make a small change to the CCU example in the After Effects SDK.

1) Modify the CENTER_DISK_ID def.flags in the Params_Setup function by setting

       def.flags = PF_ParamFlag_SUPERVISE;

just before the call to PF_ADD_POINT

2) Insert a code fragment to handle the PF_Cmd_USER_CHANGED_PARAM event in EntryPointFunc

  case PF_Cmd_USER_CHANGED_PARAM:

  err = PF_Err_NONE;

  break;

3) Set a breakpoint at the line err = PF_Err_NONE;

4) Apply the effect to a layer in Premiere Pro (CS6, CC, or CC2014)

5) Select the effect in the effects window so that the point appears in the Program monitor window

6) Drag the point

 

Actual Result:  The break point is not hit because the PF_Cmd_USER_CHANGED_PARAM  event never occurs.

 

Expected Result: The break point should be hit. The PF_Cmd_USER_CHANGED_PARAM event should occur as it does when the point coordinates are changed in the effect UI

 

Any Workarounds: There is no workaround. My effect must be notified that the point has been changed.

Detecting when user clicked Reset Parameter

$
0
0

I am setting the PF_ParamFlag_SUPERVISE flag for my slider like this:

 

PF_ADD_FLOAT_SLIDERX("MySlider", 0, 256, 0, 256, 123, PF_Precision_INTEGER, PF_ValueDisplayFlag_NONE, PF_ParamFlag_SUPERVISE, MY_SLIDER_DISK_ID);


I am receiving the PF_Cmd_USER_CHANGED_PARAM command when I change the slider value (Case 1). I also receive the command when I hit the "Reset Parameter" button on the right (Case 2) in the Effect Controls panel.

 

Is there any way I can distinguish Case 2 from Case 1? I need to perform extra steps for Case 2 but PF_UserChangedParamExtra only contains param_index.


Many thanks


GLator for dummies (and from dummy...)

$
0
0

Hi every one!

 

I open this post to summarize what I've been grabing here and there about the GLator sample. It's been discussed a lot already, but it still drives a lot of people nuts!

If you have any usefull info about it, please share! And may be one day we'll all have a proper OpenGL structure to work with...

 

Finally, here is a complete working version of GLator:

 

So let's take it point by point:

 

First of all, one shoud start from the CC example as it's more stable. If you build for lower versions and some suites are not available, just change the suites number.

 

For simplicity's sake, I have (and probably will) edited this post.

 

 

1_Window / context:

 

The GLator example doesn't set context's size, and it crashes when the size of the picture is over 1024x1024, when user purge the cache...

To solve this, one has to remove the AESDK_OpenGL_InitResources() function from GlobalSetup(), and paste it in Render() call. Now in render call, one can set width and height like this:

 

First use SetPluginContext()

 

Then

 

if( (error_desc = AESDK_OpenGL_InitResources(S_GLator_EffectCommonData, Width, Height)) != AESDK_OpenGL_OK)

  {

  PF_SPRINTF(out_data->return_msg, ReportError(error_desc).c_str());

  CHECK(PF_Err_INTERNAL_STRUCT_DAMAGED);

  }

 

Then, all the functions using S_GLator_EffectCommonData.mRenderBufferWidthSu and S_GLator_EffectCommonData.mRenderBufferHeightSu should be replaced by width and height.

 

And then switch back to AE with SetHostContext()

 

EDIT: once the context has been switched back to AE, I used to delete the plugin context and window like so (windows code):

wglDeleteContext( S_GLator_EffectCommonData.mHRC );

DestroyWindow( S_GLator_EffectCommonData.mHWnd);

 

It's working in CS5 and CS5.5, but mess everything up starting from CS6! So let opengl do the cleaning...

 

IMPORTANT EDIT: what's written above does work, but something important is missing: the use of AESDK_OpenGL_Startup() and AESDK_OpenGL_Shutdown()

 

In the sample, AESDK_OpenGL_Startup() is set during GlobalSetup, while AESDK_OpenGL_Shutdown() is called during SequenceSetdown. This is a mistake! One should add a GlobalSetdown function and move the AESDK_OpenGL_Shutdown() from SequenceSetdown to GlobalSetdown. Otherwise, the plugin will seem to work fine, but won't be able to render if a new project is opened. It would work again if you close and re-open AE. The reason is GlobalSetup (and so AESDK_OpenGL_Startup()) will be called only once per AE session, and SequenceSetdown (and so AESDK_OpenGL_Shutdown()) will be called everytime a project is closed.

 

2_AE to OpenGL camera

 

Use the code in the Resizer sample (getting camera matrix) as a base.

 

Then I see 2 options:

 

A_The matrix conversion:

 

You can find more details in this thread (the whole code's a bit long): Help with AE camera matrix >> Opengl Matrix? | Adobe Community

and this one https://forums.adobe.com/thread/1357716

 

convert the output matrix from AEGP_GetLayerToWorldXform() to column-order and serializing it in a float array.

On the OpenGL side, use the following snippet before drawing:

 

Thanks to Tobias Fleischer (reduxFX) for sharing his code:

 

void my_gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)

{

  GLdouble xmin, xmax, ymin, ymax;

 

  ymax = zNear * tan(fovy * 3.14159265358979323 / 360.0);

  ymin = -ymax;

  xmin = ymin * aspect;

  xmax = ymax * aspect;

 

 

  glFrustum(xmin, xmax, ymin, ymax, zNear, zFar);

}


then


{

    ...

    glMatrixMode(GL_PROJECTION);

    glLoadIdentity();

    my_gluPerspective(45.0, (GLdouble)widthL / heightL, 0.1, 1000.0 );

    glViewport(0, 0, (int)(dataP->w[0]), (int)(dataP->h[0]));

    glMatrixMode(GL_MODELVIEW);

    glLoadIdentity();   

    glClearDepth(1.0f);                           

    glEnable(GL_DEPTH_TEST);                       

    glDepthFunc(GL_LEQUAL);                           

    glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);

    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

    dataP->glMatrix[12] -= widthL*0.5f;

    dataP->glMatrix[13] -= heightL*0.5f;

    glLoadMatrixf(dataP->glMatrix);

    ...

}


With this code, we're almost there. I must say I still had troubles to get the proper perspective distortion when I tried to include it in my own OpenGL process. But I'm far from being an opengl expert!

 

So I finally tried to develop my own camera conversion:

 

B_the gluLookAt() option:

 

I grab the camera matrix the same way. Then I define:

 

A_longWidth, Height, FullWidth, FullHeight;

 

Width = outputP->width;
Height = outputP->height;
FullWidth = Width*in_data->downsample_x.den;
FullHeight = Height*in_data->downsample_y.den;

 

//Define th Fov

float Fov = 2.0 * PF_DEGREE_PER_RAD * atan(FullHeight / (2.0 * camDataD.zoom));

 

  gluPerspective( Fov, (GLdouble)Width / Height, 10.0, 10000.0 );

 

  glViewport( 0, 0, Width, Height);

  glMatrixMode( GL_MODELVIEW );

  glLoadIdentity();

 

  point3 target;

  float distCam = distance3D(    camDataD.matrix.mat[3][0] - FullWidth*.5,

                                              camDataD.matrix.mat[3][1] - FullHeight*.5,

                                              camDataD.matrix.mat[3][2]);

 

 

  target.x = camDataD.matrix.mat[2][0] * distCam + camDataD.matrix.mat[3][0];

  target.y = camDataD.matrix.mat[2][1] * distCam + camDataD.matrix.mat[3][1];

  target.z = camDataD.matrix.mat[2][2] * distCam + camDataD.matrix.mat[3][2];

 

A_Matrix4invMat = camDataD.matrix;

 

 

ScaleMatrix4(&invMat, 1.0,1.0,-1.0);
invMat = invertMatrix4(invMat);

 

 

point3orientation_vector = {0,1,0};

 

 

orientation_vector.x = invMat.mat[0][1];
orientation_vector.y = invMat.mat[1][1];
orientation_vector.z = invMat.mat[2][1];

 

 

normalize( &orientation_vector);

 

 

gluLookAt(camDataD.matrix.mat[3][0],
camDataD.matrix.mat[3][1],
-camDataD.matrix.mat[3][2],
target.x,
target.y,
-target.z,
orientation_vector.x,
orientation_vector.y,

orientation_vector.z);


If like me you're more used to AE than OpenGL, then this method is more intuitive. The lookAt function acts just like an after effects camera, showing a world using the same coordinates than AE world. Then grabing lights or other layers becomes "easy" as developping can be...

 

This part caused me the biggest headaches, so if you want to use it, you owe me a beer!

 

 

 

3_Using GLator to render polygons.

 

I've tried rendering polygons and hit a wall: antialiasing. Though you can still use glEnable(GL_LINE_SMOOTH); for antialiased lines, GL_POLYGON_SMOOTH is now deprecated. It means antialiasing has to be done another way. I couldn't figure it out, but see 2 options: MultiSampling, or post-process AA through Shader. If someone successfully used MultiSampling, I'm curious to see how.

 

EDIT: another option is superSampling (write to a bigger buffer, and resize it to layer's size). Though it's a bit of an overkill, openGL speed makes it a not so bad option...

 

4_Using Shaders:

 

In the sample, in order to use Shaders, one has to define

#define USE_SHADERS 1

I personnally took the option to add a checkbox parameter and embed the shader functions in a "if (params[USE_SHADER]->u.bd.value) {}" statement.

 

To use the shaders properly, one should replace "GL_TEXTURE_2D" by "GL_TEXTURE_RECTANGLE_ARB", and in the Shaders, "sampler2D" by "sampler2DRect" and "texture2D" by "texture2DRect".

This tip comes from Gutsblow in this thread: GLator Quirks..Help needed!

 

Anyway, I must say, though the shaders compile fine and are actually used by my plugin, I can't see it act on the final render... I probably set the functions in a wrong place, so any help will be appreciated...

 

Edit: in fact, the shaders work just fine! My knowledge of shaders was too close to the ground to see it was actually working...

 

Actually, the "GL_TEXTURE_2D" to "GL_TEXTURE_RECTANGLE_ARB" switch is not only for shaders and should be done anyway to avoid troubles.

 

 

5_Red and Alpha channels swap

 

When using OpenGL colors, Red and Alpha channels will be swapped.

One shoud use glReadPixels() with GL_ABGR_EXT instead of GL_RGBA, only colors will be swapped, and alpha operations (blending and so on...) will be OK. If you swap the BLUE/RED colors before rendering, it should work without losing speed.


This depends on what you ask OpenGL to render: textures or polygons.



I write this post as answered, but if any of you have any tip to share and make it better / stronger, please share!


Cheers,

François

Supersampling

$
0
0

Hey everyone,

 

I'm trying to implement something like RE:Map and I pretty much have it working close to perfect.

The issue no is that even using 16 bit UV pass edges stay jagged and I'd like to do some supersampling, but I have no clue on what the best way forward is.

 

The code was clean and readable until I started hacking away at giving supersampling a go. :/

This is the mess I've currently going. (Note this is my first time playing around with the SDK.)

 

static PF_Err
RemapFunc16(  void *refcon,  A_long xL,  A_long yL,  PF_Pixel16 *in,  PF_Pixel16 *out)
{  PF_Err err = PF_Err_NONE;  double tmp_u, tmp_v;  PF_Fixed sample_u, sample_v;  RemapInfo *contextP = reinterpret_cast<RemapInfo*>(refcon);  if (contextP)  {  // Define `in_data` (required for PF_SUBPIXEL_SAMPLE)  PF_InData *in_data = contextP->in_data;  AEGP_SuiteHandler suites(in_data->pica_basicP);  if (contextP->supersamplingMode != 1) // Supersampling!?  {  int ss;  if (contextP->supersamplingMode == 2) ss = 2; // 2x Supersampling!  else if (contextP->supersamplingMode == 3) ss = 4; // 4x Supersampling!  else if (contextP->supersamplingMode == 4) ss = 8; // 8x Supersampling!  double divisor = 1 / ((double)ss + 2.0);  int half = ss / 2;  double src_u, src_v;  int totalSamples = ss * ss;  double sampleWeight = 1.0 / (double)totalSamples;  A_u_short red = 0;  A_u_short green = 0;  A_u_short blue = 0;  A_u_short alpha = 0;  A_long xLF = ((A_long)xL << 16);  A_long yLF = ((A_long)yL << 16);  PF_Fixed sample_src_u, sample_src_v;  //PF_Fixed sample_u, sample_v;  for (int x = -half; x <= half; x++)  {  // Get supersampled u source  src_u = (double)x * divisor;  //src_u += xLF;  sample_src_u = xLF + LONG2FIX(src_u);  for (int y = -half; y <= half; y++)  {  // Get supersampled v source  src_v = (double)y * divisor;  //src_v += yLF;  sample_src_v = yLF + LONG2FIX(src_v);  // Set source point to `sourceLayer`  contextP->samp_pb.src = contextP->sourceLayerData;  // Sample src color  suites.Sampling16Suite1()->subpixel_sample16(in_data->effect_ref,  sample_src_u,  sample_src_v,  &contextP->samp_pb,  out);  // Get UV based on Red/Green from input pixel  tmp_u = ((double)out->red / (double)PF_MAX_CHAN16);  tmp_v = ((double)out->green / (double)PF_MAX_CHAN16);  tmp_u *= (double)contextP->textureLayer->u.ld.width;  tmp_v *= (double)contextP->textureLayer->u.ld.height;  sample_u = LONG2FIX(tmp_u);  sample_v = LONG2FIX(tmp_v);  // Set source point to `textureLayer`  contextP->samp_pb.src = &contextP->textureLayer->u.ld;  // Sample from `map` at UV and set `out` pixel.  suites.Sampling16Suite1()->subpixel_sample16(in_data->effect_ref,  sample_u,  sample_v,  &contextP->samp_pb,  out);  /*  red += (A_u_short)(out->red * sampleWeight);  green += (A_u_short)(out->green * sampleWeight);  blue += (A_u_short)(out->blue * sampleWeight);  alpha += (A_u_short)(out->alpha * sampleWeight);  */  }  }  //out->red = (A_u_short)red;  //out->green = (A_u_short)green;  //out->blue = (A_u_short)blue;  //out->alpha = (A_u_short)alpha;  }  else { // No Supersampling!  // Get UV based on Red/Green from input pixel  tmp_u = ((double)in->red / (double)PF_MAX_CHAN16);  tmp_v = ((double)in->green / (double)PF_MAX_CHAN16);  tmp_u *= (double)contextP->textureLayer->u.ld.width;  tmp_v *= (double)contextP->textureLayer->u.ld.height;  sample_u = LONG2FIX(tmp_u);  sample_v = LONG2FIX(tmp_v);  // Set source point to `textureLayer`  contextP->samp_pb.src = &contextP->textureLayer->u.ld;  // Sample from `map` at UV and set `out` pixel.  suites.Sampling16Suite1()->subpixel_sample16(in_data->effect_ref,  sample_u,  sample_v,  &contextP->samp_pb,  out);  }  if (contextP->preserveAlpha == TRUE)  {  out->alpha *= (in->alpha / PF_MAX_CHAN16);  }  }  return err;
}

Create Puppet Pin programmatically

$
0
0

Hi all,

 

I'd like to ask whether is it possible to create puppet pins programmatically...

 

I have tried to copy stream structure ("ADBE FreePin3", "ADBE FreePin3 Mesh", "ADBE FreePin3 PosPin Position", ...) of manually created pins with

corresponding values, but when I create streams this way they are disabled (AEGP_DynStreamFlag_DISABLED - and greyed out in UI).

 

I suppose that the vertex index "ADBE FreePin3 PosPin Vtx Index" is just an index to the array stored internally as arbitrary data so the mesh and pins must be created somehow before setting these values.

 

I've found this thread where they try to do the same thing using scripting (also without success  )Create Puppet Pin on existing mesh via scripting

 

I have some ideas about how this could be done using SDK, but all of them involve diving in very dark waters..

- call the EffectSuite::AEGP_EffectCallGeneric method with fake mouse click events (PF_Cmd_EVENT) or some direct PF_Cmd_COMPLETELY_GENERAL commands if the FreePin effect supports it

- use "FreePin Suite" - which is not a part of public SDK but can be aquired using AquireSuite... - but as it's not public I suppose it operates with memory which is not so safe to touch even if I managed to get/create proper header file for this suite

 

Maybe there is a simple elegant way of creating these pins which I completely overlooked, so I would be really thankful for any suggestions

 

Thanks a lot!

 

Martin

Sequence_data different in PF_Cmd_RENDER and PF_Cmd_USER_CHANGED_PARAM

$
0
0

Hi all!

 

I have a really anoying issue with in_data->sequence_data and After Effects CC 2015.

I'm storing data in Sequence_data.

The problem is: I don't get the same data in Render and UserChangedParams...

 

The exact same code works fine with After Effects CS5.5. First, I thought it might be because of the new flattening calls, but I have the same issue even when I first apply my FX and change one parameter value (I don't receive any other call).

 

Did anyone run into a similar issue? Any solution?

 

Cheers,

François

New After Effects CC 2017 plug-in SDK is live

How to approach multithreading

$
0
0

Hello. I have created a box blur plugin using the following guide:

http://elynxsdk.free.fr/ext-docs/Blur/Fast_box_blur.pdf

 

Unfortunately it only uses one thread. My question is, would it be easier to somehow modify the code that I have written to make it multithreaded, or would it be easier to remake the plugin using the convolve function defined in PF_WorldTransformSuite1?

 

The SDK mentions that using existing functions is good because they are already optimised for multithreading. Thank you.

Distributing AE plugin sources under GPL license?

$
0
0

Hi guys,

today I have a special question for you:

What if a plugin uses some third-party libraries that come with GPL license?

Can I then just distribute the final plugin non-commercially also under GPL with full sources?

 

I think not, as Adobe apparently explicitly forbids open source components in their AE SDK (http://www.adobe.com/devnet/aftereffects/sdk/cc2017/eula.html) :

"6. Open Source Software.

Developer is not licensed to (and Developer agrees not to) integrate or use the SDK, other than third-party software described in Section 14.6, with any Open Source Software in a manner that requires disclosure, distribution or licensing of all or any part of the SDK in source code form, for the purpose of making derivative works, or at no charge. For the purposes of this Section 6, “Open Source Software” shall mean software licensed under the GNU General Public License, GNU Affero General Public License (AGPL), the GNU Lesser General Public License or any other license terms that could require, or condition Developer’s use, modification or distribution of such software on, the disclosure, distribution or licensing of any other software in source code form, for the purpose of making derivative works, or at no charge. Any violation of the foregoing provision shall immediately terminate all of Developer’s licenses and other rights to the SDK granted under this Agreement."

 

But then again, there are quite a lot of free AE plugins out there that come with sources and are licensed under GPL or similar, e.g.:

http://www.andrewdavidson.com/aeflame/

http://www.3dcg.net/

 

Also, an AE plugin for the popular OpenColorIO (proprietary license by Sony) exists that also does not seem to conflict with the Adobe SDK: http://opencolorio.org/License.html

 

And there are also commercial plugins that interface libraries like FFMPEG under GPL/GPL, like this: http://aescripts.com/aempeg/

 

Can anyone from Adobe shed any light on this or does any other developer have any experience already in that regard?


Disable multithreading

$
0
0

Hi all,

 

I'm writing an effect where code in Render() function is not thread-safe. Now AE stucks in my plugin if "Multiprocessing" option is enabled (AE 2014 and older).

 

So my question is about multithreading disabling. Is there any opportuniny to completely disable MT option for my plugin (something like DO_NOT_USE_MT flag)? In other words I want to say After Effects that my plugin doesn't support MT. Is it possible or not?

 

 

Thanks!

How to use AEGP_XformWorkingToViewColorSpace()

$
0
0

I'd like to transform my output image into view color space - given there's a working color profile - in my render function using the ColorSettingsSuite2's AEGP_XformWorkingToViewColorSpace() call. I can't find any documentation on how to use the functions provided by ColorSettingsSuite2.

 

The idea is to display a preview image using the correct color profile in my GUI.

 

I can successfully detect whether a working color profile is selected using the following sequence:

 

A_Boolean hasProfile = false;

AEGP_ItemViewP mruView;

 

AEGP_ItemH itemH;

err = suites.ItemSuite8()->AEGP_GetActiveItem(&itemH);

 

suites.ItemSuite8()->AEGP_GetItemMRUView(itemH, &mruView);

err = suites.ColorSettingsSuite2()->AEGP_DoesViewHaveColorSpaceXform(mruView, &hasProfile);

 

However, trying to transform from the selected profile into view color space during my render function using

 

PF_LayerDef output2;

PF_NEW_WORLD(params[0]->u.ld.width, params[0]->u.ld.height, params[0]->u.ld.world_flags, &output2);

 

err = suites.ColorSettingsSuite2()->AEGP_XformWorkingToViewColorSpace(mruView, (AEGP_WorldH) output, (AEGP_WorldH) &output2);

...

PF_DISPOSE_WORLD(&output2);

 

results in an exception when calling into AEGP_XformWorkingToViewColorSpace().

Any hints on how to retrieve the correct AEGP_WorldH handles from given PF_LayerDefs?

 

Thanks!

how can I fix Jagged issue in edges?

$
0
0

Hi, everyone!.

 

I am building a plugin that draws some Polygons on Layer.( by injection mode).

But I am getting jagged issue now.

Default shapes smoothed it.

 

 

 

How can I smooth it? Do you have any algorithm for that?

 

Regards,

Igor.

Setting format and format options in Output module settings for render queue item

$
0
0
Hello,

I am unable to set the "Format" and "Format options" for video in output module settings programatically using After effects apis.
I referred the after effects cs3 sdk guide for the apis.

I find apis for all other options in the "outputmodule settings " like :
AEGP_SetEmbedOptions
AEGP_SetOutputChannels
AEGP_SetStretchInfo
AEGP_SetSoundFormatInfo

But there is no api listed for setting the options available in the "Format" tab and "Format options" tab.

The "Format" tab and "Format options" tab is available in the dialog that opens when user clicks on the Output module settings for the render queue item.

The format tab when clicked shows a drop down list with aff different formats. By default "Video for Windows" is set.
The drop down list contains following format options
Adobe Clip Notes
Adobe Flash video
...
Quicktime movie
...
Video for Windows
...

I need to be able to set the "Quicktime movie" option in the Format tab programmatically and then set the compression type as "Animation" in the compression settings programatically using the api functions available in AE CS3 SDK
Please suggest the suitable api to do so.
I need to write my own plugin to export to Quicktime movie using the after effects apis.
I follow below steps to do so.
1. AEGP_InsertMenuCommand and add export option to AE with my own plugin name
2. In the command hook, select active item using AEGP_GetActiveItem
3. Add it to render queue
4. Set the output module settings for 0 th output module using
suites.OutputModuleSuite1()
5. Use different functions from suites.OutputModuleSuite1() to set the output module settings like EmbedOptions,StrechInfo etc.
6. Till this step, I am doing it right. But I am not able to find any api for setting Format options using suites.OutputModuleSuite1()

I also checked all other suites available for setting FormatOptions but no luck.
Please help.

Thanks,
-Namita

AEGP_UtilitySyite5::AEGP_ExecuteScript() doesn't do anything in my effect plugin. why?

$
0
0
Bonjoir All of you!,

I'm developing a Effect plugin and I wanted to execute some script using the AEGP_UtilitySyite5::AEGP_ExecuteScript() function. I have supplied all the parameters to this function. this function executing, but not doing anything. If I execute the same script via File -> Scripts -> Run Script File, then its working prefect. Why it doesn't do anyhting if I execute using the above function? what could be the reason for this?? am I missing anything??

Please any suggestions...

Thanks
Manjunath
Viewing all 73444 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>