How to get the background color of a layer with AE SDK

Hello

I try to get the background color for my current layer, but I can't seem to find how do.

I don't want background color, background color of the application, but the color that shows through, if I set the alpha of my pixels to 0.

For example, assume that the background of the composition is black, I put a solid top, green then put a picture on top of the solid and apply my pug-in the image.

If I set the alpha to zero in my plug-in, green solid will be displayed.

So I want to be able to know that my background is green.

I tried to use PF_AppGetBgColor(), but which returns the background color of the application, which isn't green in this example.

If you want more details on what I want to do, I plug P1 which affects some 0-alpha pixels. Above it, I apply an another plugin P2 which reveals alpha-0 pixels by mixing with little color.

What is happening now is that the output is color of the original image, mixed with the color of P2 (because only modified P1 alpha pixels).

What I want is to have the color through the transparent pixels of P1 display mixed with the color of P2.

To do this, I would like to be able to set the color of pixels 0-alpha in the color of the background in P1.

Sorry for the question long.

Thanks for your suggestions.

Hello nicolas.

If I understand it, that you try to get the buffer of image layers composited under the layer with your effect.

If that is correct, then I fear that it is almost impossible to do.

When AE makes a composition he doesn't it down. He's trying to do the opposite in fact.

Why? because if at some point, the buffer is completely opaque, then he has no need to make what's below.

further more, checked the diaper changing the rendering order, and many other things affect the rendering of the layers order.

In addition, there is no API to access buffers intermediaries comp. just the end result.

the closest you can get than without turning of the world, is to use AEGP_GetCompBGColor().

that would be useless to you that the image is not composite on that color, unless it is the model being saved to the file.

so why I said 'almost impossible '?

You can transform the world.

You can write a type ECAP 'craftsman '. (look at the example of 'arti')

These plug-ins make comps (instead of the "advanced3D" converter)

a craftsman has results intermediaries comp, because he is the one doing the rendering.

so now you can have your craftsman save the buffer, you need and deliver it to your effect.

I must warn you that this is very very very difficult.

Another possible solution is to create a copy of the model resides in your effect,

erase all the layers that has the image you need and make that reproduces model using AEGP_GetReceiptWorld().

If you use this method, you must supervise the original model and apply changes to the copy.

Yes, it's too difficult to do.

you could make a change in the strategy and apply your effect to an adjustment layer instead.

the entry for the adjustment layer is the buffer underlying layers.

Then, you could get the original sources you want to treat using checked layer params.

the last solution I can think uses the expression of sampleImage() on a hidden parameter.

This will give you any layer's pixel data in the model, but not the composite of the underlying layers.

Maybe if you tried sampling adjustment layers post effects... I don't know. you need to try.

This method is very slow and is also limited to expire, so you can't get a large number of pixels.

the expression simply fails.

I hope that this was not all bad news for you.

Maybe you said more about the plug-in you develop I could come up with a better plan.

:-)

Tags: After Effects

Similar Questions

  • How to get the background color setting after accidentally change?

    Original title: background and other color changes
    I changed the background color by accident and cannot get the original settings that I had back

    Hello

    1. who is the operating system installed on the computer?
    2. what was the background color and what color you have changed from?
    3. What are other color changes you're talking about?
    4. What are the steps you did to change the background color?
     
     
    If you work on a windows 7 OS then try the steps in the following article and check the status of the issue.
     
     
    I hope this helps!
  • FrameMaker10 - Windows 7 - How to get the background color of a paragraph tag?

    2-27-2013 1-38-39 PM.png

    I'm trying to create my heading1 with a background like the picture above.

    I put the blue background on a master page, but the chassis will in the background blue and later blue background does not show through.

    Any ideas?

    Thank you

    Cindy

    Cindy,

    You must create a specific master page for the opening/first chapter page that contains two connected text frames. The most senior executive would have the blue background and be served for the title. The following text block would get the text and have two columns.

  • How can set the background color of the status bar?

    Quote from the old forum:

    Comments: comments
    How can set the background color of the status bar?
    Posted the: July 17, 2008 02:56
     
    How can set the background color of the status bar?
    Using this code for the status bar:
    LabelField statusField = new LabelField ("Good Morning", LabelField.USE_ALL_WIDTH |) LabelField.NON_FOCUSABLE | LabelField.HCENTER)
    {
    int _backgroundColour = Color.LIGHTGREEN;
    public void paint (Graphics g)
    {
    g.setBackgroundColor (Color.RED);
    g.Clear ();
    Super.Paint (g);
    }
    };

    Font defaultfont = Font.getDefault ();
    Police smallfont = defaultfont.derive (Font.PLAIN, 12);

    statusField.setFont (smallfont);
    setStatus (statusField);

    When I ran the code you have above, my status background color was red.  Is not what you see?  If so, please provide the BlackBerry model and software version that you are testing.  You can find this under Options.

    Or if you try to do something else, please provide details.

    I tested this in the BlackBerry Simulator included with version 4.5.0 BlackBerry JDE (4.5.0.44).

    To do this in version 4.1, first call getColor and save the current color.  Then call setColor, setting the color to the color you want to use for the background.  After this call call fillRect, starting with 0, 0 and go to the size of the field (use this.getWidth () and this.getHeight () to get this).  This must fill in the field with your specified color.

    To allow the drawing of the default content of the field call setColor once again, passing in the original color, then call super.paint.

  • How to set the background color of a page_item?

    I was pasting "background-color: #5CD65C" in a number of places, like the 'attributes of the HTML table cells' under the label and the tabs of the item, but get no results. Can someone tell me how to set the background color of a cell, please?

    Hi Doug,.
    One method is to add a style to your header html in page attributes, if you add the below css styling and the change of the name of the item page (#P2_FIRST_NAME) to your he should style correctly:

    Thank you

    Paul

  • How to change the background color of string programmatically?

    How to change the background color of string programmatically?

    Are you talking about string indicator and control chain? If so, right-click on a control/indicator of string and select Create-> property Node-> text-> text-> BG Color colors. Change to write and a number of the color you want to use phone.

  • How to change the background color

    How to change the background color of the label field, how to do it thanks

    I can change the color of labelfield, but I want to change the background,

    How can I do this

    Thank you.

    I do not know mantaker do not want to forget the call to super...

    public void paint (Graphics gs) {}

    gs.setBackgroundColor (0x00FF0000); red background

    GS. Clear();

    Super.Paint (GS);

    }

  • How to change the background color dynamically on the page of the ofa

    How to change the background color dynamically on the page of the ofa

    Hello

    Can you please let me know the dynamic conditions to change the background color?

    Thank you

    Vincent

  • How to change the background color of the code written DW page but not the Web page...

    How to change the background color of the code written DW page but not the Web page...

    If you have DWCC2015, you can change to edit > Preferences > coloring Code and either choose a new theme (RecoGnEyes is the background dark code by default) or you can change it to what you want in the background field by default.

    2014 CC had no theme options, but you can change the background color in the same place.

    I think that some of the previous versions also had the option, but I don't have them on my machine to check.

  • How to change the background color of work in Photoshop CC 2015 plan

    How to change the background color of work in Photoshop CC 2015 plan

    Just tried to change these settings:

    Preferences-> Performance-> settings of the graphics processor-> advanced settings... The change of drawing in 'Normal' mode (mine was 'Basic'). Suddenly I can not change the background.

    Hope this works for you all also.

  • I NEED TO KNOW HOW TO CHANGE THE BACKGROUND COLOR OF MY INDEX FINGER. HTML PAGE

    I need to know how to change the background color of my page index.html on Dream weaver cs6.

    With CSS:

    {body

    background-color: #FF0000;

    }

    Nancy O.

  • How to change the background color of selection of the selected item in the drop-down box of choice?

    How to change the background color of selection of the selected item in the drop-down box of choice?

    By default, the selection background color like 'blue', but if I want it to be "yellow" for example, how should I do?

    Thank you

    The id is applied by (I think) the skin of the ChoiceBox class. You don't need to define.

    You must apply the css in an external style sheet. You can apply the external style sheet to any parent of the box of your choice, or on-site (the most usual way to do it).

    Example:

    import java.util.ArrayList;
    import java.util.List;
    
    import javafx.application.Application;
    import javafx.scene.Scene;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    
    public class ChoiceBoxTest extends Application {
    
      @Override
      public void start(Stage primaryStage) throws Exception {
        primaryStage.setTitle("Example 2");
    
        final ChoiceBox choiceBox = new ChoiceBox<>();
    
        List tempResult = new ArrayList();
        for (int i = 0; i < 10; i++) {
          tempResult.add("Item " + i);
        }
        choiceBox.getItems().setAll(tempResult);
    
        VBox root = new VBox();
        root.getChildren().add(choiceBox);
        final Scene scene = new Scene(root, 300, 250);
        scene.getStylesheets().add("choiceBox.css");
        primaryStage.setScene(scene);
        primaryStage.show();
      }
    
      public static void main(String[] args) {
        launch(args);
      }
    
    }
    

    choiceBox.css:

    @CHARSET "UTF-8";
    #choice-box-menu-item:focused  {
     -fx-background-color: yellow ;
    }
    #choice-box-menu-item .label {
     -fx-text-fill: black ;
    }
    

    Post edited by: James_D

  • How to get the RGB color values on the color picker component?

    How to get the RGB color values on the color picker component?

    trace (cp.selectedColor);

    Returns something like:

    16750950

    trace (key2cp.hexValue);

    Returns:

    ff9966

    I'm looking for RGB, for example, 0.5 0.5 0.5, corresponding to a gray color.

    Is there a chance that the RGB settings are hidden somewhere or is there a conversion function at least?

    Thank you.

    If key2cp.hexValue returns a string like 'abcdef', use:

    var s:String = key2cp.hexValue;

    var n: Number = Number("0x"+s);

    var r: Number = n > 16 & 0xff;
    var g:Number = n > 8 & 0xff;
    var b:Number = n & 0xff;

  • How to change the background color of some rows in a Datagrid?

    How to change the background color of some rows in a Datagrid?

    Hee is an excellent example:
    http://www.CFLEX.NET/showfiledetails.cfm?channelId=1&object=file&ObjectID=487

    Tracy

  • How to change the background color of a single line

    Hi, OTN,.

    I use JDeveloper with ADF faces 11.1.1.2 in the view layer. My question is how to change the background color of a single line in af:table?.

    Hi idir Mitra
    You can use EL to bind column for example inlineStyle (#{row.id == null?' background-color: rgb (255,214,165);':'background-color:red'})})

    Cordially Abhilash.S

Maybe you are looking for