Magic Masks won't output at render

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

Mike Conway

  • Posts: 21
  • Joined: Sat Apr 25, 2020 6:57 am
  • Location: Las Vegas, NV
  • Real Name: Mike Conway

Magic Masks won't output at render

PostMon Sep 09, 2024 6:56 am

On previous versions of Resolve, when I went to the Deliver page and rendered a media file, I could see the viewer that showed my magic masks being rendered for output. Now that I'm on version 19, when I go to the Deliver Page and render a file, all magic masks become undone.


I'm trying to render an 86 minute movie, at Ultra HD MP4. That works fine. When I play the finished MP4, each shot with magic mask will display one rendered frame (the one I drew lines on), while the rest of the frames on each shot is just the dark layer. I have two layers, one light and one dark.


I have about 200 of these kind of color corrected shots, where the mask brightens up the subject, or darkens the background:

TomDark.jpg
TomDark.jpg (87.03 KiB) Viewed 3105 times


TomLight.jpg
TomLight.jpg (85.22 KiB) Viewed 3105 times



After a render attempt, all my magic masks on my timeline become undone (except the one marked frame in each shot) and have to be regenerated. I did find the one step regenerate command for all clips, but even that takes hours to restore.

If I attempt to output render my timeline again, they disappear, again. I tried rendering smaller files (just a couple of scenes), but the masks still would not render.

Maybe I'm missing something in settings, so any words of wisdom would be appreciated. I'm using Windows 10. As I said, version 18 was working. Here are my output settings:

RenderSettings.jpg
RenderSettings.jpg (74.14 KiB) Viewed 3105 times
Offline
User avatar

KrunoSmithy

  • Posts: 4527
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Warnings: 1
  • Real Name: Kruno Stifter

Re: Magic Masks won't output at render

PostMon Sep 09, 2024 9:17 am

You can't output Magic Mask at render unless you create alpha output connection, connect to it and render at appropriate codec the mask itself.

So probably what you mean is rendering the adjustment, like exposure changes, limited by magic mask you have created.

What you describe in your post seems to be related to caching. You have essentially lost cache in one way or the other and that is why Magic Mask selection and tracking needs to be re-rendered to re-created the cache.

I don't know at which point cache was deleted or why, but there are several things you can do. Assuming the cache is lost, you can re-render the magic mask strokes which takes time and is no fun, but as long as the reference strokes of the magic mask are not deleted, they should be recreated and cache build up again. People have been having issues with magic masks and caching for a while now, either because they used wrong workflow and didn't know how to manage it or sometimes related to bugs etc.

In the future the safest way to save cache is to output masks or mats themselves as rendered masks. That way you have them rendered and as long as you don't delete them manually they can be reused on the same project, preventing any accidental deletion of cache or problems with bugs.

I use this format typically to render the masks from deliver page. Or if I use fusion for magic mask I do it via saver node.

sshot-474.jpg
sshot-474.jpg (29.24 KiB) Viewed 2769 times
Offline

Steve Alexander

  • Posts: 5604
  • Joined: Mon Mar 23, 2015 2:15 am

Re: Magic Masks won't output at render

PostMon Sep 09, 2024 12:27 pm

I wonder what is invalidating the masks, though, in the OP's case? To the OP - can you provide a DRP of the project where this is happening? Upload it to a file sharing site and provide a link here. Someone may be able to see a flaw in the way you are using the magic mask (either a helpful forum member of someone from BMD).
aka Barkinmadd
Resolve Studio 20 | Fusion Studio 20 | 16" MacBook Pro M1 MAX, 32 GPU cores, 64 GB RAM, 2 TB SSD, Sequoia 15.4.1
Offline
User avatar

Mike Conway

  • Posts: 21
  • Joined: Sat Apr 25, 2020 6:57 am
  • Location: Las Vegas, NV
  • Real Name: Mike Conway

Re: Magic Masks won't output at render

PostMon Sep 09, 2024 12:47 pm

Thanks for your response. I have alpha outputs inserted. I'm using the color page, btw. I'm also using many other masks, with traditional tracking. No problem with those.

KrunoSmithy wrote:What you describe in your post seems to be related to caching. You have essentially lost cache in one way or the other and that is why Magic Mask selection and tracking needs to be re-rendered to re-created the cache.

I don't know at which point cache was deleted or why, but there are several things you can do. Assuming the cache is lost, you can re-render the magic mask strokes which takes time and is no fun, but as long as the reference strokes of the magic mask are not deleted, they should be recreated and cache build up again. People have been having issues with magic masks and caching for a while now, either because they used wrong workflow and didn't know how to manage it or sometimes related to bugs etc.


I've been editing this project off and on for a couple of years. It has screened in different theaters, in early and late 2022, and has had multiple screener versions. So, it has been rendered out successfully, multiple times. Each time, I update it and render it out as a 4K MP4, then I render a 2K DCP from that. The masks used to render out. Something happened with OS 19. I'm agreeing with you that it is cache related.

When I get home, tonight, I'll check it out some more. Thanks!
Offline

Steve Alexander

  • Posts: 5604
  • Joined: Mon Mar 23, 2015 2:15 am

Re: Magic Masks won't output at render

PostMon Sep 09, 2024 1:13 pm

I could swear I've seen something similar when testing 19.0.1 but I didn't look too closely - I was doing something a bit non-standard with the way I was linking the magic mask node to other nodes - I can't recall the details but I will definitely keep an eye on this as I continue using Resolve. Cheers.
aka Barkinmadd
Resolve Studio 20 | Fusion Studio 20 | 16" MacBook Pro M1 MAX, 32 GPU cores, 64 GB RAM, 2 TB SSD, Sequoia 15.4.1
Offline

Johannes Hoffmann

  • Posts: 296
  • Joined: Mon Aug 26, 2013 5:22 am
  • Location: Germany

Re: Magic Masks won't output at render

PostMon Sep 09, 2024 2:06 pm

I too had many issues with MM (and other tools) and caching (since DR 18 or so). After many tests, workarounds and reading forum posts I gave up finding the cause of the issue. My conclusion was: At some point Resolve looses the cached data and does not notice it.
My solutions:
1) stop using MM and go back to traditional ways of doing it (has other benefits too).
2) render in place
BMPC 4k, BMPCC, BMCC
Apple M1 Max, 32GB, 32 GB GPU – macOS Sonoma – Resolve 19
retired: MacPro 5.1, 48GB, RX 580 – macOS Mojave
Offline
User avatar

Mike Conway

  • Posts: 21
  • Joined: Sat Apr 25, 2020 6:57 am
  • Location: Las Vegas, NV
  • Real Name: Mike Conway

Re: Magic Masks won't output at render

PostFri Sep 13, 2024 11:51 am

Update: I've made several renders with success,.....after a lot of failures. The short of it is when I changed my render settings to KrunoSmithy's codec suggestion, I think it was EXR. I did a short render, and I think it jogged Resolve.

I did not like that codec, so I changed it back to MP4 (like I was using), and it worked, even without Render Cache and Alpha settings. I did a few short renders with success. Of course, for the 4K, 86 minute version, I went to MP4 Advanced settings and selected Render Cache.


KrunoSmithy wrote:You can't output Magic Mask at render unless you create alpha output connection, connect to it and render at appropriate codec the mask itself.


Yes, and no. I've output Magic Mask at render both ways. But you really did help me...

I use this format typically to render the masks from deliver page. Or if I use fusion for magic mask I do it via saver node.

The attachment sshot-474.jpg is no longer available


I give you full credit for steering me in the right direction. Thanks, again!

So, I honestly believe something is afoot with Resolve. I change timeline resolution and the masks disappear. I render and the masks disappear. It takes me about 3 hours to regenerate them. I wouldn't know where I would be without this wonderful feature:

RegenerateMask.jpg
RegenerateMask.jpg (94.13 KiB) Viewed 1803 times




Johannes Hoffmann wrote: render in place


Also, a very good suggestion! I will be doing so, moving forward. Thanks!
Offline
User avatar

KrunoSmithy

  • Posts: 4527
  • Joined: Fri Oct 20, 2023 11:01 pm
  • Warnings: 1
  • Real Name: Kruno Stifter

Re: Magic Masks won't output at render

PostFri Sep 13, 2024 12:04 pm

Mike Conway wrote:Also, a very good suggestion! I will be doing so, moving forward. Thanks!


Cool.

Few more notes: Keep in mind that magic mask renders what it gets from edit page. So its ok to do things downstream from magic mask node, but not upstream. If you change something about its source, like transform functions in the edit page, or timeline resolution etc, you are changing input data for magic mask, so it has to re-render. If you want change something in the color page or edit page, it has to happen downstream from magic mask node.

For example if you want to change size of the mask, you can add transform node after the magic mask and change it, no problem. You can even drop a transform effect on edit page, go to effects tab and change size there. But just keep in mind that downstream is ok, upstream is not. As you work with a bit of foresight and planing it should not be a problem.
Offline
User avatar

roger.magnusson

  • Posts: 3864
  • Joined: Wed Sep 23, 2015 4:58 pm

Re: Magic Masks won't output at render

PostFri Sep 13, 2024 12:09 pm

I encountered an issue where magic masks don't work if you save an existing project as a new project. The project thinks the masks are cached but can't find them, it also won't let you Regenerate them. In this case the solution was "Delete Object Mask > All Clips" and then "Regenerate Object Mask > All Clips".
Offline

ArcanePath

  • Posts: 68
  • Joined: Thu Jan 19, 2023 2:45 pm
  • Real Name: Danny Akuma

Re: Magic Masks won't output at render

PostTue May 20, 2025 3:50 pm

It's a real pain in TA. Rendering a whole video multiple times because MM messes up. This tool is BROKEN. Both magic mask in Fusion and MM2 in the colour page do this and I'm sick of having to repeat all my masking, because sometimes it won't even re-render, you have to rest everything and do it all again.
Danny Akuma
Offline
User avatar

Mike Conway

  • Posts: 21
  • Joined: Sat Apr 25, 2020 6:57 am
  • Location: Las Vegas, NV
  • Real Name: Mike Conway

Re: Magic Masks won't output at render

PostTue May 20, 2025 6:20 pm

ArcanePath wrote:sometimes it won't even re-render, you have to rest everything and do it all again.


So far, Regenerate Object Mask --- All Clips has worked for me, multiple times. I have an 86 minute movie. It goes through all the shots and restores them. I had to do this, again, last week. I know this has been a huge pain, but this has been my fallback plan.

Also, if a clip is not regenerating the mask, try going to the frame you first drew the lines on, then regenerate it.

I haven't tried Resolve 20, yet. Have you? Supposedly, there are a lot of Magic Mask improvements. It's still Beta, so I'm holding off for now.
Offline

ArcanePath

  • Posts: 68
  • Joined: Thu Jan 19, 2023 2:45 pm
  • Real Name: Danny Akuma

Re: Magic Masks won't output at render

PostTue May 20, 2025 9:24 pm

Mike Conway wrote:
ArcanePath wrote:sometimes it won't even re-render, you have to rest everything and do it all again.


So far, Regenerate Object Mask --- All Clips has worked for me, multiple times. I have an 86 minute movie. It goes through all the shots and restores them. I had to do this, again, last week. I know this has been a huge pain, but this has been my fallback plan.

Also, if a clip is not regenerating the mask, try going to the frame you first drew the lines on, then regenerate it.

I haven't tried Resolve 20, yet. Have you? Supposedly, there are a lot of Magic Mask improvements. It's still Beta, so I'm holding off for now.


Yeah I tried that, it didn't work. But then I found MM2 in the effects menu and not MM1 so I just deleted the node and used the new one. It seems to be working now. I still have the odd issue where it randomly drops a frame when I'm editing the rest of the timeline and come back to it, it's just super skittish and unreliable. I think I will just render out all my MM footage separately and re-import it from no on so it can't spoil my final renders.
Danny Akuma
Offline
User avatar

Marc Wielage

  • Posts: 13197
  • Joined: Fri Oct 18, 2013 2:46 am
  • Location: Palm Springs, California

Re: Magic Masks won't output at render

PostWed May 21, 2025 1:43 am

Chadwick Shoults has some good advice on this very subject:

Certified DaVinci Resolve Color Trainer • AdvancedColorTraining.com
Offline

ArcanePath

  • Posts: 68
  • Joined: Thu Jan 19, 2023 2:45 pm
  • Real Name: Danny Akuma

Re: Magic Masks won't output at render

PostWed May 21, 2025 7:07 am

Thanks!
Danny Akuma

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bruce Phung, Google [Bot], PhantomCipher, RCModelReviews, Roger Singh, Shunichi Daido and 234 guests