Graphics

 View Only
  • 1.  XPression and Masks - I would like an answer from a ROSS Employee

    Posted 26 days ago

    Masks.... I'm really getting somewhat fed up with this, and just about to give up... As no one ever seems to be able to give anything other than a cryptic message and a response that makes next to no sense.

    So here, question by question.... And I will also add answers to it as I go on testing and confirming or not getting anywhere...

    1. Is there a way to invert add your own black & white picture as a mask? Like from a .png silhuette...
      Say I have a material with a video input. Then I have the outline of our logo.
      I want to create a hole in the video material with the logo outline.
      1. Is this even possible?

        Answer: Yes, possible. Create a .png picture with alpha channel. Put both layers inside a LayerObject, with the logo above the background material. Then set the logo material -> Layer 1 -> Blending Mode -> Alpha mask

      2. Should the outline logo be black or white?

        Answer: Does not appear to matter at all... All that matters seems to be the alpha mask of the texture. Though it seems you cant set this without changin the original .png that came with the alpha channel to begin with.

    2. Is there a way to invert said mask. Well, if the above on question 1 is possible.
      Is it possible to invert the mask, so that I no longer have a hole in the material below, but rather keep whatever is inside that mask/material???

      Answer: Appereantly so, after some testing... With the result from above, where you cut out a hole in the shape of a logo, you can choose to keep the logo with the following settings...
      1. Go to the material created with a mask.
      2. Go to the "Texture" shader of the layer containing the mask.
      3. Find the "Alpha Blending" section, set Blend Mode to Subtract and Mix Value to 100%.
      4. This will now invert the mask and keep the logo showing, but removing the frame around it.

        (Or do as Red replies here: In the texture shader, Alpha Blending and set "Current Stage" to "invert").

    3. If either one above is possible... Can the same be done with video files? In other words, create an .avi with black (or maybe white???) video that can then function as a mask?

      Answer: Yes, it can... Only tested this with AfterEffects though, so bear in mind...
      1. Create your mask video in AfterEffects. Seems that it does not matter what color the object in said video is, as Xpression will only use the alpha channel for creating a mask, so go nuts in the RGB section...
      2. Export your video from AfterEffects not through the MediaEncoder and the Xpression Encoder plugin (as that does not support alpha channel), but rather through the "Add to render queue" option in AfterEffects.
      3. In the render queue, make sure you go into the "output module" wich should be set to "lossless" and select:
        Format: AVI
        Channels: RGB + Alpha
        Plenty other options as well, but these two matter the most...
        Now render out!
      4. Create a new video material in Xpression, just like you would for the .png mask in question 1, but this time a video.
      5. Select the .avi video just created.
        1. In Layer 1, set the Blending Mode to Alpha Mask.
        2. Now play your video (set the video shader mode to loop and auto start to test easilly).
          You should now have a video as a mask...

    4. And if so, can the video one be inverted.

      Answer: Yes, same answer as above. Select the "video" shader under Layer 1. Go to the Alpha Blending section.
      Set blend mode to subtract and Mix Value to 100%.

      (Or do as Red replies here: In the texture shader, Alpha Blending and set "Current Stage" to "invert").

      NOTE: If you want to keep to the Xpression Codec as well, you would need to take your .avi exported from the Render Queue in After effects, create a new job in Xpression Video Coder, include RGB + Alpha, and export out a new .avi based on the Xpression Codec through that.
      Still works the same way as the other .avi file from earlier.

    ------------------------------
    Aleksander Stalsberg
    Inland Norway University of Applied Sciences/Lillehammer Icehockey Club
    Norway
    ------------------------------


  • 2.  RE: XPression and Masks - I would like an answer from a ROSS Employee

    Ross Staff
    Posted 26 days ago
    1. Yes, add an image or video mask and then change the alpha current stage to invert. 

    2. Yes add another layer with that image.


    Exactly the same can be done with videos.

    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 3.  RE: XPression and Masks - I would like an answer from a ROSS Employee

    Posted 26 days ago

    Ok, I got to the same conclusions and results, just a tad different way about it appereantly.
    But thank you Red.

    Second, I got to ask you now, I see you have also checked the two options for "No Depthwrites" and "Ignore Object Alpha".
    Any reason for that in this case? Or any reason for it in particular?



    ------------------------------
    Aleksander Stalsberg
    Inland Norway University of Applied Sciences/Lillehammer Icehockey Club
    Norway
    ------------------------------



  • 4.  RE: XPression and Masks - I would like an answer from a ROSS Employee

    Ross Staff
    Posted 26 days ago
    No they are just the defaults and I hadn't changed them to get this result. 

    Btw with the video mask you can just right click, add mask > video and if the video has alpha channel it will work as a mask. 

    Just be sure the original video has an alpha channel and when you use whatever encoder, either XPression Video Coder or your own choice you encode (RGB+A) as you rightly mentioned above.

    ------------------------------
    Simon Redmile
    Senior Graphic Programmer & Designer
    Ross Video
    Bristol United Kingdom
    ------------------------------



  • 5.  RE: XPression and Masks - I would like an answer from a ROSS Employee

    Posted 26 days ago
    Hi Aleksander.
    I want to offer you such a scheme.
    I use it for titles with backgrounds
    On LayerObject2, set the Blending Mode to Alpha Mask.
    BGforMask has simple material.


    ------------------------------
    Roman Yaroshenko
    chief specialist
    RBC-TV
    Moscow Russian Federation
    ------------------------------