Graphics

 View Only
Expand all | Collapse all

Using a mask in Xpresssion

  • 1.  Using a mask in Xpresssion

    Posted 11-08-2013 22:08
    How do you create and use a mask in xpression? I want to apply a cradient mask to a picture so that the picture fades out from opaque to transparent. Please help.


  • 2.  RE: Using a mask in Xpresssion

    Posted 11-09-2013 08:11
    Create a new material as a mask, put a layer (don't remember its name, but you'll find it in object list) in the scene, with 2 quad in it.

    In the one on top, you affect your image, and in the one on bottom, your mask. Change z-order if needed.

    You did it !

    #XPression


  • 3.  RE: Using a mask in Xpresssion

    Posted 11-09-2013 23:25
    Hi Carlos,

    In addition to the explanation offered by Vincent, I would also like to point out the functionality of the LayerObject.

    When you use a normal mask, you will affect the entire scene. Just to give a quick example, if you have a scene with a background for a crawl for example. And you want the crawl to disappear behind a logo on the left of the screen you can use a mask for that. However, when you use a normal mask which you would put on the position of the logo then the logo as well as the background would disappear. So your mask is affect all of the object which are lower in Z-Position.

    However, when you use a layer mask you sort of create a scene within a scene. A layermask is a group of layers which you can put inside a normal scene and which is sort of rendered separately. So using the above example, you could have a background for the crawl and a logo where the text should crawl under and disappear.

    Then you could create a layer object. Inside that layerobject you can place your textfield and your mask. Position the mask so that it is located above the logo. You will see that when you move your text behind the mask, the text will disappear but the logo is still visible. So you are only masking the textobject and not the rest of the scene, which makes this a very powerful feature. However, there are two very important things to keep in mind.

    1. The Layer Object is always positioned at Z-Pos 0 and you cannot change it. So it means that if you use multiple quads on top of the other, you have to use the layerobject as your base and position the other layers according to the position of the Layer Object.

    2. When you want to mask objects using the Layer Object, you need to make sure that the Mask-object is the last object of the Layerobject-group in the Object Manager. So physically, the layer that contains the mask needs to be at the bottom of the LayerOObject or it will not work. Every layer above will be masked.

    If you want to use a gradient mask, you'll have to create a mask in Photoshop and import that gradient as your mask inside the materials.

    Good luck!

    Kenneth

    #XPression


  • 4.  RE: Using a mask in Xpresssion

    Posted 11-14-2013 21:53
    Thanks Vincent & Kenneth. I think I got it to work... didnt even know you could create a mask in the material manager. Do you guys know of any free tutorial out there that can explain how to do these kind of things... without having to pay for an instructor or expensive DVD training? is there a manual that covers this, cuz I havent seen any. Anyways, thanks fellas!

    Carlos

    #XPression


  • 5.  RE: Using a mask in Xpresssion

    Posted 11-14-2013 22:27
    If you go to the help button at the top, there is a file that is the manual. It has code examples and you can search it with key words to find what you're looking for.

    #XPression


  • 6.  RE: Using a mask in Xpresssion

    Posted 11-15-2013 14:19
    Carlos, there are also free tutorials on my site wireframegroup.com... you don't need to buy the expensive DVD ;)

    ill be putting more up there when i have the time.

    Neil

    #XPression


  • 7.  RE: Using a mask in Xpresssion

    Posted 02-13-2015 16:13
    Along these lines, can multiple masks be used in a single scene? Example: I have lower thirds comprised of two horizontal bars, each with small colored quads that are rotated 22 degrees. This puts the quads off the edge of the main bar. So I did the mask. I then copied that group but can not put it behind the first group. Is it because I copied instead of building the second group? the small colored quads will travel along the bar and land near the ends, that is why they are separate also they need to be rotated because our graphics designer wanted that 22 degrees. (rant finished)

    #XPression


  • 8.  RE: Using a mask in Xpresssion

    Posted 02-14-2015 03:08
    Sorry Malcolm, I don't quite understand your description.. I'm sure if you can post a link to your scene someone on the forum can help you with it. It is definitely possible to have multiple masks in a scene.

    #XPression


  • 9.  RE: Using a mask in Xpresssion

    Posted 02-14-2015 18:20
    Malcolm,

    I think you want to have some parts on top of other parts but not all being affected by the masks above. For that you need to use Layer Objects so that you can create groups that masks only affect objects that are in it.

    Les

    #XPression


  • 10.  RE: Using a mask in Xpresssion

    Posted 02-19-2015 04:48
    Sorry for the delay guys. I haven't been working on this project for about a week. I will look into this next week when we are between games. Thanks for the advice as always.

    #XPression


  • 11.  RE: Using a mask in Xpresssion

    Posted 02-19-2015 05:12
    After reading Kenneth, now I understand about using a Layer Object to "nest" multiple layers so that the mask is applied to everything in that Object. Now if I have a second Layer Object with other nested layers, will I be able to move that Layer Object (including all layers within) in Z space so that one Layer Object can be placed in front of another. I have two bars comprising the upper and lower parts of a name super. I want separation between foreground and background using a drop shadow on the foreground bar. Am I heading the right direction? Thanks

    #XPression


  • 12.  RE: Using a mask in Xpresssion

    Posted 02-19-2015 05:41
    Hi Malcolm,

    The Layer Objects themselves have no Z-Position properties (with the exception of the Visibility, they have no properties at all).

    If you want to place one layer in front of another, you have to drag the Layer Object above or under other objects to determine it's position. Pretty much the same as using layers in Photoshop.

    Cheers,

    Kenneth

    #XPression


  • 13.  RE: Using a mask in Xpresssion

    Posted 02-19-2015 14:16
    And the light comes on. Thank you Kenneth for your help.

    #XPression


  • 14.  RE: Using a mask in Xpresssion

    Posted 02-19-2015 18:51
    Always happy to shed some light in the darkness ;-)

    Cheers,

    Kenneth

    #XPression