Predivide and premultiply in DaVinci?

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline

Richard.S

  • Posts: 6
  • Joined: Thu Mar 11, 2021 10:00 am
  • Real Name: Richard Sällqvist

Predivide and premultiply in DaVinci?

PostThu Mar 11, 2021 10:07 am

I'm new to DaVinci Resolve, so sorry for my beginner question, but I can't seem to find an answer to it online or in the manual.
I'm curious how Davinci works under the hood. If you do a green screen key in Fusion and then do the grade in the Color tab. Does Davinci predivide and then premult with the alpha automatically when applying the grade to avoid black edges? Thanks!
Online

Hendrik Proosa

  • Posts: 3401
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Predivide and premultiply in DaVinci?

PostThu Mar 11, 2021 11:19 am

VERY unlikely.
I do stuff
Offline

Richard.S

  • Posts: 6
  • Joined: Thu Mar 11, 2021 10:00 am
  • Real Name: Richard Sällqvist

Re: Predivide and premultiply in DaVinci?

PostFri Mar 12, 2021 8:53 am

Why is that? Then it's impossible to do a good key in Fusion and grade the footage in the Color tab
Online

Hendrik Proosa

  • Posts: 3401
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Predivide and premultiply in DaVinci?

PostFri Mar 12, 2021 9:19 am

There are reasons for not doing it automatically: it can mess with your image data (you lose emissive aspects) and you should have control over when and where the unpremult-premult happens. It should be a setting to enable it, so maybe make a feature request?
I do stuff
Offline

Kenzo

  • Posts: 426
  • Joined: Sat May 04, 2013 6:04 pm
  • Location: Poland
  • Real Name: Eryk Rogozinski

Re: Predivide and premultiply in DaVinci?

PostFri Mar 12, 2021 11:58 am

Richard.S wrote:Why is that? Then it's impossible to do a good key in Fusion and grade the footage in the Color tab
I usually add an extra MediaOut in Fusion with the key element and use it as a mask in Color for grading.
Eryk Rogozinski
www.art-fx.eu
Offline

Richard.S

  • Posts: 6
  • Joined: Thu Mar 11, 2021 10:00 am
  • Real Name: Richard Sällqvist

Re: Predivide and premultiply in DaVinci?

PostFri Mar 12, 2021 2:31 pm

Kenzo wrote:
Richard.S wrote:Why is that? Then it's impossible to do a good key in Fusion and grade the footage in the Color tab
I usually add an extra MediaOut in Fusion with the key element and use it as a mask in Color for grading.


Thanks for the reply! But will that actually solve it? Then you are still grading on a premult image. Do you get rid of black edges when doing that?
Offline

Richard.S

  • Posts: 6
  • Joined: Thu Mar 11, 2021 10:00 am
  • Real Name: Richard Sällqvist

Re: Predivide and premultiply in DaVinci?

PostFri Mar 12, 2021 2:34 pm

Hendrik Proosa wrote:There are reasons for not doing it automatically: it can mess with your image data (you lose emissive aspects) and you should have control over when and where the unpremult-premult happens. It should be a setting to enable it, so maybe make a feature request?


I totally agree, it could be just a node in the Color tab. I'm just now delivering a project where I noticed the black edges, so I was hoping there was a workaround. Or that it was just me doing a bad key ☺️
Offline

Kenzo

  • Posts: 426
  • Joined: Sat May 04, 2013 6:04 pm
  • Location: Poland
  • Real Name: Eryk Rogozinski

Re: Predivide and premultiply in DaVinci?

PostFri Mar 12, 2021 2:56 pm

Richard.S wrote:Thanks for the reply! But will that actually solve it? Then you are still grading on a premult image. Do you get rid of black edges when doing that?


No because I grade composition.
Quick example.

Image

Image
Eryk Rogozinski
www.art-fx.eu
Offline

wfolta

  • Posts: 636
  • Joined: Fri May 15, 2020 1:12 pm
  • Real Name: Wayne Folta

Re: Predivide and premultiply in DaVinci?

PostFri Mar 12, 2021 3:18 pm

Richard.S wrote:
Kenzo wrote:
Richard.S wrote:Why is that? Then it's impossible to do a good key in Fusion and grade the footage in the Color tab
I usually add an extra MediaOut in Fusion with the key element and use it as a mask in Color for grading.


Thanks for the reply! But will that actually solve it? Then you are still grading on a premult image. Do you get rid of black edges when doing that?

Just to make sure, you're talking about grading the FG element separately from the BG, right? (As opposed to grading the final composite.) Which makes sense: to make the FG fit better with the BG. Am I on the right track?

There are a bunch of potential ways to organize things, but I'm thinking that you have the FG clip sitting above the BG clip in your Edit timeline, so your Fusion comp is keying the FG and Edit is compositing it over the BG. In that case, I think you can:

1. In Fusion create an extra MediaOut and wire your MediaIn directly to it, passing on the original image.

2. In Color add a second source and work with that to do your color correction. You can then pull the alpha out of the first source's blue port.

(This is different from Kenzo's solution which passes the composite into Color and the alpha. It passes in the original and the alpha.)

This means that you're only getting your matte from Fusion, so you'd need to do everything else -- like despilling -- in Color. When you apply the matte in Color, it's nice enough to include the BG clip from the timeline in the viewer so you can see the composite.

There are color grading nodes in Fusion. A not-pleasant experience for me, but that's the most straightforward way to color correct in Fusion and to potentially composite in Fusion as well. (And of course, folks who use Fusion Studio -- or Nuke or some other compositor -- have done it that way forever.)
Resolve Studio 20, Fusion Studio 20, MacOS Sequoia latest, MacBook Pro M4 Max
Offline

smunaut

  • Posts: 529
  • Joined: Sat Jan 30, 2021 6:15 pm
  • Real Name: Sylvain Munaut

Re: Predivide and premultiply in DaVinci?

PostFri Mar 12, 2021 4:11 pm

This might also be interesting to you : viewtopic.php?f=21&t=133928&p=723854
Resolve Studio - Ryzen 5800X3D - AMD RX6600 / NVidia RTX 4070 (switching between the 2) - Linux
Offline

Richard.S

  • Posts: 6
  • Joined: Thu Mar 11, 2021 10:00 am
  • Real Name: Richard Sällqvist

Re: Predivide and premultiply in DaVinci?

PostFri Mar 12, 2021 5:20 pm

wfolta wrote:Just to make sure, you're talking about grading the FG element separately from the BG, right? (As opposed to grading the final composite.) Which makes sense: to make the FG fit better with the BG. Am I on the right track?

There are a bunch of potential ways to organize things, but I'm thinking that you have the FG clip sitting above the BG clip in your Edit timeline, so your Fusion comp is keying the FG and Edit is compositing it over the BG. In that case, I think you can:

1. In Fusion create an extra MediaOut and wire your MediaIn directly to it, passing on the original image.

2. In Color add a second source and work with that to do your color correction. You can then pull the alpha out of the first source's blue port.

(This is different from Kenzo's solution which passes the composite into Color and the alpha. It passes in the original and the alpha.)

This means that you're only getting your matte from Fusion, so you'd need to do everything else -- like despilling -- in Color. When you apply the matte in Color, it's nice enough to include the BG clip from the timeline in the viewer so you can see the composite.

There are color grading nodes in Fusion. A not-pleasant experience for me, but that's the most straightforward way to color correct in Fusion and to potentially composite in Fusion as well. (And of course, folks who use Fusion Studio -- or Nuke or some other compositor -- have done it that way forever.)


Thanks for your long answer Wayne, that is correct, I have the FG over the BG in the edit tab. I found that is the best workflow for my current project.

I'm pretty new in DaVinci so I can't really see how I get the Alpha from Fusion tab to the Color tab. I got the extra media out in Fusion, but I can't see how I can access that alpha in the Color tab?
Offline

Kenzo

  • Posts: 426
  • Joined: Sat May 04, 2013 6:04 pm
  • Location: Poland
  • Real Name: Eryk Rogozinski

Re: Predivide and premultiply in DaVinci?

PostFri Mar 12, 2021 5:24 pm

Richard.S wrote:I'm pretty new in DaVinci so I can't really see how I get the Alpha from Fusion tab to the Color tab. I got the extra media out in Fusion, but I can't see how I can access that alpha in the Color tab?


Right click in node view and choose Add Source.
Eryk Rogozinski
www.art-fx.eu
Offline

Richard.S

  • Posts: 6
  • Joined: Thu Mar 11, 2021 10:00 am
  • Real Name: Richard Sällqvist

Re: Predivide and premultiply in DaVinci?

PostMon Mar 15, 2021 9:19 am

Kenzo wrote:
Richard.S wrote:I'm pretty new in DaVinci so I can't really see how I get the Alpha from Fusion tab to the Color tab. I got the extra media out in Fusion, but I can't see how I can access that alpha in the Color tab?


Right click in node view and choose Add Source.


I can see that working in the "Clip" section but not in "Group Post-Clip"

I'm really thankful for all the help, but it dosen't seem to be a straight forward way of doing this. Would a feature request with having nodes similar to Fusion with "AlphaDivide" and "AlphaMultiply" be an option? Or maybe I just need to think differently next time I start a project how I set it up
Online

Hendrik Proosa

  • Posts: 3401
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: Predivide and premultiply in DaVinci?

PostMon Mar 15, 2021 1:11 pm

If only DCTLs got access to alpha channel, it would be straightforward to add. For reasons unknown DCTLs only get RGB channels in and out.

Currently it seems you could do it by sending alpha out separately and doing it through blend modes (with all the drawbacks this has including bugs) or through an OFX plugin (which I'm not aware of being available at the moment).
I do stuff

Return to DaVinci Resolve

Who is online

Users browsing this forum: Google [Bot], Lucius Snow and 377 guests