I am trying to render out a music video in Davinci Resolve. I have a green screen in the shot and my band playing in front of the green screen. I duplicated the clip and put one clip on top of the other one. The top clip I keyed out the green screen, the bottom clip I made into a fusion clip where the green screen is corner pinned with animation to follow the green screen. The only thing appearing in the final fusion clip is the replaced green screen. The bottom layer is just a screen and the top layer is the rest of the clip with an empty spot for the green screen. It works perfectly in the view port, but when I render the video the screen is completely black. I can fix this by deleting the clip, dragging in the same clip from the media collection, and moving it into the fusion area as a new node and reattaching it exactly where the old version of the clip was. The only problem is as I keep editing Davinci "forgets" about it in the final render. What am I doing wrong?
The best way to control the order-of-operations is to do all of your compositing in a single Fusion clip; all of your keying and corner-pinning happens in a single Fusion clip, ideally. To set this up, lasso both of the clips on V1 and V2, right-click, and choose "create Fusion clip" from the contextual menu (do this to new, ordinary video clips, not ones you’ve already made into Fusion clips).
But in case you are trying to preserve some amount of edit flexibility, or have another reason to keep the Fusion clips distinct on the Edit timeline, I suspect that the issue is an order-of-operations problem related to the Color page.
I think that when Resolve sees two Fusion clips stacked on top of each other, it processes the bottommost clip’s Fusion effects first, passes the V1 Fusion to the Color page, then calculates V2 Fusion and V2 Color. I could be wrong about bottom-first processing, but it definitely does send to the Color page before returning to Fusion to handle the second clip, whichever one that actually is.
So, it’s likely the Color page that’s messing up the alpha channel. You could try opening the topmost clip on the Color page, right-clicking anywhere in the node tree background, and choosing "add alpha output” from the dropdown menu. In previous versions of Resolve, it was necessary to inform the Color page that it should output an alpha. Since your alpha is coming from Fusion, you'll also probably need to right-click in the background select "add source," and wire the new green triangle on the left to the blue alpha output on the right. This is the manual way to tell the Color page to "pass through" an alpha channel.
Resolve’s image pipeline undergoes frequent modification, especially with respect to alpha channels, and the way different Edit page containers prioritize and calculate (including premultiplication). For the most part, it has improved greatly over the years, but you'll still run into situations where it doesn't do what you'd expect. The developers are great about incorporating user feedback, but on the other hand, that's why the image pipeline is in a constant state of flux. And since the codebase changes more frequently than the documentation, sometimes the order of operations isn't clearly defined…
Which is why it's still best to contain all of your Fusion compositing in a single clip.
One last thing that might help, and I always forget to recommend, because it's a new feature; Render In Place. You can render either (or both) clips to disk, which will both speed up playback and help you troubleshoot, and depending on your requirements may be a sufficient solution itself. Right-click on either clip in the timeline and select the option from the dropdown, but be sure to select a codec which supports alpha channels, such as ProRes 4444.