Creating Macros in Fusion ← DaVinci Resolve ← Socratica

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today I'd like to show you how to make a macro inside DaVinci Resolve in the fusion page so we're going to learn how to make this macro this macro has the ability to adjust the outer width and the outer height and you can also change the inner width and the inner height and then also you can select whatever color you'd like so this is the custom tool that we're going to make so first let's start from scratch and the first thing I want to do is bring in a rectangle node and I'm going to call this outer rectangle and let's display this on the left screen so we have just a simple mask where opaque is white and transparent is black next is I'm going to make an inner rectangle that's a little bit smaller and what we'll do is we'll kind of cut the two together we'll take the overlap so let me bring in another rectangle let me rename this inner rectangle and this one I'm going to make it instead of a width of a half and height of a half I'm going to make width of 0.45 and height of 0.45 there we go let's display this on the right now here what we want to do it's hard to tell but this rectangle is slightly smaller than that in fact what I might do to make it a little more apparent so it's obvious I'll make it significantly smaller I'll make it 40 percent height than width of the screen so you can see the left rectangle is larger than the one on the right I'm first going to invert the one on the right so we now have two different masks if we were to find where they overlap we would get a nice white rectangle that's transparent outside and transparent inside and one way you can combine two different masks is just link one and to the other so chaining them together but when we combine them we want to pick how we want to combine them and to find the intersection we can multiply them and that's because when you multiply two masks it multiplies them pixel by pixel and here with these masks transparent is 0 and opaque is one so the only time we're going to get white is when it's white on both the left mask and the right mask which results in having the intersection and let's not worry too much about that because you you could go down a big rabbit hole of masking and combining different things lastly now that we have a mask that we like a mask that has a frame let's give it some color so I'm going to bring in a background node and I'm just going to call this frame color let's pipe this in and we'll display this on the right in fact we'll go ahead and hide the left so we can keep our Focus here and the default of background is always black and I'm going to change it to a dark green and then lastly we'd want to have a media out to finish the composition and let's rename media out to Tool output there we go so here we have a simple device a simple thing that we might want to reuse and the way you can reuse this there's several ways a basic way is to select the nodes you'd like to reuse right click and say go to settings and save all as and we could call this a custom frame when you do this it creates a file called custom frame dot setting and when you open it it looks quite a bit like a Json file if you're familiar with that data file from working with computers or programming but even if you don't know Json you can kind of see you have name equal value and so this contains all the information necessary to recreate what we just did so to demonstrate that if we came over here selected these three and deleted them then what we can do is come up to the custom frame dot setting file drag it into fusion and there are the three nodes let me just bring the output tool a little bit closer and then connect them together and we're back to where we started so that's one way you can save the work that you've been doing in Fusion is just select the nodes save it as a DOT setting file and whenever you want to reuse it just drag and drop it in but what we'd like ideally to have is something that acts as a really nice tool so if you what I mean by that is if you come to the edit page look at the effects and let's just pick something like let's pick noise gradient and we drag that in and if we select this and look at the inspector there are a lot of controls over here that allow you to customize how this is going to look you can adjust the level of detail and and this the contrast as well every single effect that we have over here will have to some degree or another different ways to change this appearance for example with a solid color you can just come over here and change what color it should be but there's a whole host of things for example if you make a left lower third title this is a macro and there's quite a few controls over here there is a two lines of text and each one can be controlled independently so it has all the typical text controls that's really what you want to be able to do so if we come back here we'd like to be able to use these three in combination just like that and that's what macros do so you select the nodes that you want to create a macro from right click come up to the macro option and click create macro the first thing you want to do is give your macro a name I'm going to call this a colored frame and let's come over here and collapse this so you see here there are three nodes and that's because we have three nodes in our composition outer rectangle inner and frame color and when you expand them by the way notice how this is red and these aren't if it's red that means there's some part of that node that will be included in the macro controls if you expand frame control it's the output which makes sense you want to have an output in in your macro but if you expand outer rectangle nothing's checked that's why it's gray the moment you select something it changes to Red if nothing's selected it changes to gray now what we would like to be able to do is change the width the thickness and the color of this Frame so that means in the outer rectangle we want to be able to control the width and height and then for the inner rectangle we'd also like to be to control the width and height and then for the frame color we definitely want an output to this tool but we also want to be able to change the color and if we collapse these sub menus see here we have image color common that corresponds to if you come to this node there's color image and settings so there's color that matches color image matches image but every node has the settings and that's what's called common here so that unfortunately the names don't match there we want to be able to change the color okay if we look over here the color that we have right now is a dark green which is has a red zero green of 0.3 repeating and a blue of zero this is the color used so there's four different types of colors that this control can use and that's because you can also make a four gradient background but we only want a solid color and it's not clear which to use but when you're working with a solid color you're actually using the top left color fields and that's why it has top right bottom left bottom right and this is just color so we want color and the green and the blue so we want to be able to control the the color of this as well now that we've selected what we would like to be included in our Custom Tool to our custom node we can hit close and it asks if you'd like to save it we would click yes and then you go where you would like to save it I'm going to save it in my demo Fusion folder and let's right now it's called colored frame let's keep that name and click save now if we open this file we have the colored frame dot setting file if we open this I want to point out one thing which is a very subtle difference but it is a very useful difference to know especially when you want to make changes to macros the very first thing we looked at was the custom frame and it had just the list of tools that we had we had three tools and this just contains the information about the three nodes that we had in our composition when you look at the colored frame of macro there's something else here there's the macro operator and underneath that it has the list of the controls that our macro will have if you scroll down you'll then see the list of the three nodes that we use this file contains a little more information there's the macro operator section and that contains the list of controls that we select to be included in our node in our case we have the width and height of the outer rectangle the width and the height of the inner rectangle and then the color but in addition to this let me go ahead and collapse this section there is an output so we we did want to have an output to our macro and every macro has that and then it has a list of the tools the outer rectangle and a rectangle and frame color by looking at this file in Visual Studio code it just gives us a few little nice features we can focus on the main structure of this file and that is we have a macro operator and it has inputs which are the controls that you can use to change this Behavior it has an output and then it has a list of the three nodes so there we go now that we've created this let's see how to use it one way is you can also drag and drop again so let's go ahead and delete this bring up our file which was called colored frame and drag it in notice it doesn't display all three nodes that we have it just displays the colored frame node and if you look over here on the controls on the upper right you'll see that it has the width and height and color tools let's see if it works if we come up to the top width yes we can adjust the width of the outer rectangle and the height of the outer rectangle and then also there's the width and the height of the inner rectangle and then also you can change the color of this as well so let's pick something a little more interesting there we go I I guess that's interesting so this does work this x is just our own custom frame there's a few things though that you would like to do to take this to the next level one is the name of these parameters the name of these inputs aren't ideal we have width height width height well which is which if you just gave this to a video editor and they came and they wanted to use this this would be very confusing ideally we'd like to specify this is the width and height of the outer rectangle and this is the width and height of the inner so how can we do that let's go ahead and delete this if we return to the file colored frame I didn't find this documented but I kind of was able to figure it out for the color notice there's this one field called name is color but for the other inputs like the width height width height there's no name so I realize this is something you can add to make it a little more customizable so I'm going to come up here to the outer rectangle width and I'm going to give this an name of powder width and notice how I end with a comma all these rows end with a comma in here and we'll come over here to the outer rectangle height and give this a name of outer height and now let's look at the inner rectangle node and the width let's call this name is inner width and this one will be similarly called name is inner height save this return to Fusion and we're going to drag and drop this file over now if you look at the controls first let's display it in a screen two it shows outer width outer height inner width inner height and here is frame color but color is a good thing so we now have the controls that we chose and we renamed them to be more user friendly but there's one other thing we'd like to be able to do and that is it would be nice if we could access our tool from this menu rather than having to do drag and drops from somewhere on the file system into Fusion it would be nice if we just had shortcuts here so how do we do that well let's come back to Fusion here to come up to help go do documentation and click on developer there's a folder here called Fusion templates if you open that there's a readme file open that in this readme file there's a lot of instructions on how to build a macro and it's totally worth reading this once you've gained experience creating a few macros this will answer a lot of questions that you might have along the way here they give instructions on how to build it they talk about how to create your custom icons and things like that how to bundle them what we're interested in is template paths so it says these dot setting files the file that we made the colored frame dot setting file where do you put that so that there's a shortcut available to you in The DaVinci Resolve interface this tells you where to put it I'm on Windows but they also have the paths for mac and Linux for me it's going to be this path here in my case the username is socratica but I will go ahead and copy this I will open Windows Explorer and I'll just paste that path in and I'm going to replace my username with the username on my computer is socratica there we go this brings us to where we want to put it and notice there's four possible folders to put it in effects generators titles and transitions if you return to DaVinci Resolve and go to either the edit or cut page either is fine on the edit page if you open toolbox you'll see there's two types of transitions video and audio we're interested in video because we're working with Fusion we have video transitions titles generators and effects those corresponds to Transitions titles generators and effects we could put them in anywhere let's just go ahead and put it in generators because it generates something although I could easily see making this a title as well either is fine in fact let's go ahead and make it a title so if we go in here this folder is empty so we just need to make a copy of the r dot setting file and put it in there I'm going to come over here and select colored frame dot setting copy it and paste it in here and now what you want to do is you want to restart resolve for it to appear in the menu it won't appear right away so let me go ahead and close this and restart resolve and we're back so here we are on the edit page once more and we're going to go underneath toolbox select titles and we're going to scroll down and look for a colored frame title in fact we could actually search for it here I forgot I actually have quite a few uh things installed here but if I were to scroll to the bottom let's see where would it be it might be under there it is colored frame and notice when I Mouse over it and do a hover scrub it displays the default involved by default we used a particular shade of green and a certain size and that is going to be the default that will display when you Mouse over the uh the tool here or the title and now we can drag it in it is showing up nicely now I'd like to point out one thing one is we drag and dropped it into the edit page and the controls are just here just like we wanted here's the other thing I want to point out that if we come over to Fusion notice that it has our effect leading into a media out that's important when we created this setting file we did not include a media out node when we saved it in fact if we reopen it we will see that let me scroll down the three nodes that are included were the outer rectangle the inner rectangle and the frame color we did include the output but in DaVinci Resolve when you take one of these presets in our case our colored frame preset and you dragged it onto the timeline it goes ahead and creates a media out and wires it in for you that's one reason why you don't want to include a media out in your macro because DaVinci Resolve is going to go ahead and create one and connect them for you so there we go and we have all the custom tools that we need right there so to recap to create a macro you're going to build your composition select the nodes that you want to include in your macro and you right click come up to macro and save when you do that you will get that pop-up where you go through and pick those parameters that you want to appear in the inspector so that people can customize the composition to their liking and once you do that and save it you get a setting file and what we learned is when you open the file not all the parameters not all the inputs that appear will have a name it'll by default it'll use the name for that particular node and in our case we had multiple nodes called width and height that's why you can add your own name to each one and just give it a more user-friendly name and once we did that we got a nice appearing parameter panel customization panel over here and then finally to know where to put it so that it's available on the effects menu you just come up to help documentation developer go into Fusion templates because we made this inside Fusion look at the readme and that will give you the location of where to put it on what type of computer that you're running that's all for now and I will see you in the future
Info
Channel: Socratica FX
Views: 7,125
Rating: undefined out of 5
Keywords: Fusion, Davinci Resolve, Resolve, Blackmagic, Blackmagic Design, Macro, Macros
Id: _9yluv2NQao
Channel Id: undefined
Length: 18min 30sec (1110 seconds)
Published: Wed Jul 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.