As many people pointed out in the comments, you should always premult the patch before merging over the B plate. One way of doing this quickly is setting the "Output mask" dropdown of the RotoPaint node to "alpha". This will take the paint stroke alpha from the cloning and replace the existing alpha channel. You can then premult directly under the RotoPaint before merging.
UVs are always 1:1 in aspect ratio, so add a reformat with a square resolution. If not, you are adding a scale filter on your newly created UVs. Add a reformat to your first scanline render, 2K or even 4K depending on the size of your comp. That way you wont have a double filtering effect like the one you are experiencing(16:9 to 1:1 in you first scanline and then 1:1 to 16:9 to your final scanline). It will still have a hit on your image quality but only if your UV resolution is smaller than the resolution needed to produce the patch. You also need to add the alpha output to your paint node and only render the part of your image you painted instead of the full image again. Add an erode (and a blur maybe) after the rotopaint, to enlarge the alpha of you rotopaint and then a premult, and pipe that as UV to your final scanline render.
I come from AfterFX background and I admit that if a client asked if cleaning snow from this footage is possible, I would answer that this is not possible. This really opened my eyes.
In a case similar to this example (a flat surface like a pavement) this is actually easy in AE with planar tracking (mocha) and reverse corner pin stabilisation with a corner pin plugin (like Kingpin) that allows to set "from" points. The only difference between AE and Nuke is that Nuke can get the data not only from planar tracking, but also from camera projection. 3D in AE is very basic compared to Nuke.
@@elconravi When you track a surface (for example in Mocha) you get coordinates for a rectangle, say it's a TV screen, ad billboard or a part of the pavement. The regular use is it to put something on top of that, like a new TV program, another billboard etc. But what you can ALSO do is stretch those coordinates to the 4 corners of your composition, so effectively what you get is a stabilised blow-up of the tracked part of your footage. You can work on that using the regular tools like paint/ clone tool or whatever, and then transform it back to the original place in the comp by applying back the regular corner pin on top of your cleaned up blow-up. I think in Nuke you just need to check "reverse" or "inverse" in the corner pin settings, but in AE you need an external corner pin plugin like Kingpin which has the additional "from" pins apart from the regular "to" pins.
Another thing I think people need to remember is to choose the sharpest frame, the camera will work out the motion blur for you in most cases. You picked a blurry frame to paint on.
Thanks for sharing this technique! And also for making the breakdown make sense along with some potential troubleshoot options. Looking forward to your next one!
Nice tutorial! Another thing you can do, to avoid unnecessary filter kicks, is to make a difference key on the uv space, before your paint node and after, and clamp the alpha so that you have no transparent alpha values, just 0 or 1. Then you copy it in and premult it, before you put it back on your card, so you just project the pixels you have changed. :)
Good tip! A simpler way to this would be to set the filter on the rotopaint node to "impulse". Impulse forces the new pixels to have the original alpha value of the plate. Since the original plate has solid white alpha, all the paint strokes will have a value of 1 (white) or 0 (black) if the plate has been stenciled or transformed beforehand.
Thanks for the video!, changing your brush/clone stroke filter type from cubic to impulse can also help with this, but would need to copy in a roto with it and premult as impluse results in aliased edges!
Great tutorial, only advice is maybe to only premult and merge the patch you've painted. This way you won't filter (and project) the untouched tiles (:
Can you adjust the position/size of the card without affecting the projection/resolution of the clean plate or would you have to start from scratch if the card edge is cutting off the projection?
Changing the position or scale of the card changes the UVs of the object so yes, you would have to start fresh. Alternatively, you could keep the work you already did a keymix in a second setup for the area that's getting cut off.
You can framehold areas without the object and patch those in over the object you're trying to remove. If the object you're looking to remove is stationary but is still sliding when viewing the UV projection, it's likely that your card is not in the correct position.
As many people pointed out in the comments, you should always premult the patch before merging over the B plate. One way of doing this quickly is setting the "Output mask" dropdown of the RotoPaint node to "alpha". This will take the paint stroke alpha from the cloning and replace the existing alpha channel. You can then premult directly under the RotoPaint before merging.
wow this helped me out finding a solution to a small problem ! thanks !
UVs are always 1:1 in aspect ratio, so add a reformat with a square resolution. If not, you are adding a scale filter on your newly created UVs. Add a reformat to your first scanline render, 2K or even 4K depending on the size of your comp. That way you wont have a double filtering effect like the one you are experiencing(16:9 to 1:1 in you first scanline and then 1:1 to 16:9 to your final scanline). It will still have a hit on your image quality but only if your UV resolution is smaller than the resolution needed to produce the patch. You also need to add the alpha output to your paint node and only render the part of your image you painted instead of the full image again. Add an erode (and a blur maybe) after the rotopaint, to enlarge the alpha of you rotopaint and then a premult, and pipe that as UV to your final scanline render.
I come from AfterFX background and I admit that if a client asked if cleaning snow from this footage is possible, I would answer that this is not possible. This really opened my eyes.
In a case similar to this example (a flat surface like a pavement) this is actually easy in AE with planar tracking (mocha) and reverse corner pin stabilisation with a corner pin plugin (like Kingpin) that allows to set "from" points. The only difference between AE and Nuke is that Nuke can get the data not only from planar tracking, but also from camera projection. 3D in AE is very basic compared to Nuke.
What's reverse corner pin?
@@elconravi When you track a surface (for example in Mocha) you get coordinates for a rectangle, say it's a TV screen, ad billboard or a part of the pavement. The regular use is it to put something on top of that, like a new TV program, another billboard etc. But what you can ALSO do is stretch those coordinates to the 4 corners of your composition, so effectively what you get is a stabilised blow-up of the tracked part of your footage. You can work on that using the regular tools like paint/ clone tool or whatever, and then transform it back to the original place in the comp by applying back the regular corner pin on top of your cleaned up blow-up. I think in Nuke you just need to check "reverse" or "inverse" in the corner pin settings, but in AE you need an external corner pin plugin like Kingpin which has the additional "from" pins apart from the regular "to" pins.
wow so detailed explanation. i luv the way you eloborated. thank you so much. definetly you should be a pro. i need to learn more!!@@TGCG3DS
aren't any other way to do this without using third parthy plugins like kingpin?@@TGCG3DS
Another thing I think people need to remember is to choose the sharpest frame, the camera will work out the motion blur for you in most cases. You picked a blurry frame to paint on.
It was a super useful tutorial. Thank you for shared with us.
Thanks so much for sharing!! We truly need more 3Dprojection videos like this...great method!!
Thanks for sharing this technique! And also for making the breakdown make sense along with some potential troubleshoot options. Looking forward to your next one!
Awesome! Thank you for sharing this tutorial. Going to try it on a project now. Wish me luck!
I did like this technique before in fusion but i ve never done it in nuke. Thank u
Great tutorial sir these is really a much helpful hi myself Rony an VFX student from India
Great tutorial sir🎉🎉 please upload more nuke tutorial
Nice tutorial! Another thing you can do, to avoid unnecessary filter kicks, is to make a difference key on the uv space, before your paint node and after, and clamp the alpha so that you have no transparent alpha values, just 0 or 1. Then you copy it in and premult it, before you put it back on your card, so you just project the pixels you have changed. :)
Good tip! A simpler way to this would be to set the filter on the rotopaint node to "impulse". Impulse forces the new pixels to have the original alpha value of the plate. Since the original plate has solid white alpha, all the paint strokes will have a value of 1 (white) or 0 (black) if the plate has been stenciled or transformed beforehand.
Thanks for the awesome video, we need more clean up tutorial like this 👌
Subed
Amazing Job Isaac, would love to see more :)
Great tutorial Isaac!!
Wow.. coming from after effects background seeing this is so cool man
Thanks for the video!, changing your brush/clone stroke filter type from cubic to impulse can also help with this, but would need to copy in a roto with it and premult as impluse results in aliased edges!
Awesome tutorial sir :)
Man this is exactly what I have been looking for! Thanks a lot!🙏
Do you have more tutorials like this one on nuke 3d projection for cleanup?
Great tutorial, only advice is maybe to only premult and merge the patch you've painted. This way you won't filter (and project) the untouched tiles (:
Very informative stuff!
This method works nicely if the camera is looking more down. If the camera is more straight forward you will probably need to use node Aply material.
Awesome 👍🎉🙏👍
Very cool!
Didn't work for me....texture keeps moving around, and the brush doesnt even align with the card, the brush pointer is a mile off
I know this video is old, but could you send me this background so I can train?
Thank you
Can you adjust the position/size of the card without affecting the projection/resolution of the clean plate or would you have to start from scratch if the card edge is cutting off the projection?
Changing the position or scale of the card changes the UVs of the object so yes, you would have to start fresh. Alternatively, you could keep the work you already did a keymix in a second setup for the area that's getting cut off.
Nuke - when projecting the camera, the projected image on the 3d object is incorrectly displayed.
Advise me how - thanks
If our removable object has movement from first frame to end frame,how we can do?
You can framehold areas without the object and patch those in over the object you're trying to remove. If the object you're looking to remove is stationary but is still sliding when viewing the UV projection, it's likely that your card is not in the correct position.
It was a super useful tutorial. Thank you for sharing with us.