Why does Set Matte need a Composite Layer to work?

I was playing with Set Matte, as @Triem23 said it was very powerful. And it is. It's just a bit confusing to me.

I thought that embedding Composite shots was primarily for convenience. When you get a lot of things going on: you roll them up into a composite shot - maybe proxy it for editing speed - and then use that as a layer in another one and keep on building the Ultimate Super Shot.

I tried having Set Matte use another layer's Luminance as a mask after it had been converted into Black and White with Threshold, but it doesn't work. I don't show it in the video, but whatever value the Threshold % is set to makes no difference at all. But, simply making that layer into a Composite Shot (that's a single image with a single effect on it  - the mask is optional and makes no difference with or without it) and tada! it works.

My question is: Why? Nothing has changed. The embedded layer is identical to the original.

I think I've fundamentally misunderstood how Composite shots interact with each other; so if someone could explain them more clearly: I'd appreciate it.

https://www.youtube.com/watch?v=O4pRQYdOYvE

Comments

  • Triem23Triem23 Moderator
    edited January 2016

    Any effect that references another layer as a map--Set Matte, Caustics, Atomic Particles, etc--looks at the raw layer before effects, transformations and masks are applied. This means if you create a plane, and put effects on it then use that plane as a control map all that's being seen is the raw plane. 

    Placing the map layer in a composite shot bakes in the effects. 

    This is all about Hitfilm's Render order--i.e. When/where a layer and it's effects are drawn on screen. 

    Incidentally, this means Set Matte doesn't "need" the source map to be in an embedded composite shot, although if the msp layer is Hitfilm generated media, or has effects on it, it will need to be in an embedded shot. 

    Try importing a video, placing it in the same comp shot as another video and using a video layer as a Set Matte source. You'll get sone sort of Matte because the source video has different color and luma levels even before adding effects. It's only when starting with a plane layer and effects that you have toto embed the map in another comp shot 

  • A source layer for another effect is used before any effects applied to the source layer are rendered so you have to bake in any effects on that layer by embedding it in a composite shot. 

    The render pipeline

  • edited January 2016

    @Triem23 OK, thanks. I've now done the thing I could have done before, which was RTFM, but TBH, I didn't know what it was I was looking for before.

    I found the bit that explains that Grade Layers flatten everything below them...but only when they're used as a Source Layer for an Effect, which is...whatever. It does work as 'expected' (by me) if I put a Grade Layer above the Matte and then use the Grade Layer as the source for the Set Matte effect.

    Yikes, I know I'm going to get caught out by this again at some point.

    I already found that making the Matte layer into an embedded Composite layer still doesn't work unless you also select "Mask, Effects and Transforms" to 'Move with Layer', which is not the default  when you select 'Make Composite'.

  • @Alladin4D ; Yes, just found that bit, thanks. Might be useful to others who are having a 'hard of thinking' moment like me.

  • edited January 2016

    @Triem23 and @Alladin4D. Thanks for explaining it. it worked a treat to replace some dull sky in a video, following one of @Majahr 's great tutorials (I used some Blur on the Matte, rather than the Light Wrap), but couldn't understand why the extra steps were required.

  • Yes, the concept relies on the effects, masks and transform being inside the embedded composite shot, otherwise you're just back to the exact scenario where you started. The logic is consistent in all the examples given.

    Something which would be nice to see in a future version would be the ability to flatten/pre-bake a layer without needing to make it into a nested comp. 

  • @SimonKJones I actually find I prefer the Grade Layer 'flattening' method now I know about it.

    I can make changes to the layer in the same Composite (such as adjusting the amount of blur on the Matte I'm using for the mask) and see it change in realtime, rather than having to flip back and forth between Composites to see it in the viewer.

    What you suggest would be useful though, kind of it automagically pretending there is a Grade Layer above the Source Layer.

    But, if you go that way: in case you might not always want a Source Layer 'pre-flattened' (could happen...maybe?), rather than having an Option in the Source Layer to say "Pretend to be a flattened composite", it might be more versatile to have on in the Layer/Effect using it and for that to have a "treat Source as Composite" option.

  • Interesting idea. The critical thing is to avoid getting into awkward render loops where layers/effects are referring to other layers and getting in a mess. The current system keeps it all nice and tidy, and the extra feature I mentioned I think would be similar to embedded comps behind-the-scenes. I'm trying to get my brain around whether you suggestion would introduce problems but it's quite late in the day, so I'll have to think about it tomorrow. ;)

    I also use the grade layer 'trick' a lot, especially in simpler comps where I commonly want to use ALL the lower layers as the combined source for, say, a light wrap. 

Sign in to comment