Crash Course - Fusion Expressions in DaVinci Resolve

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
however you don't always need to type there is a much easier way to achieve all this hi i am alex jordan from longcolorgradingandfilmsimplified.com for many filmmakers expressions in fusion seems like a mystery today i promise you you will learn what expressions are what are they used for and you will learn to write very basic expressions let's start in order to understand expressions we first need to answer a very simple question what problem do they solve so why do we have expressions in the first place well they solve many problems but the simplest two problems they solve is first the problem of parameters in fusion not being connected for example let's take a look at the width and height parameters in a rectangular mask node the problem is if for example i move the width controller the height controller's value does not change when i change the width usually if you're in the edit page for example in resolve you can link the width and height parameters in many effects but in fusion it seems like there is no way to connect them there is no button here that allows us to connect these two parameters so expressions here will help us to achieve that for example linking these two parameters and there's even more what if i wanted to link the width parameter to the corner radius parameter so that when i change the width the corner radius will change with it expressions in fusion allows us to achieve this next there is the problem of effects not being easily automated for example let's take a look at this background node this is the red controller what if i wanted the value of red to change randomly so that when i hit play the value will just keep on changing again expressions will help us to tell the slider to move randomly whenever we hit play so just like color management you can think of expressions as helpers so a helper will change a particular controller whenever he sees you moving a different controller and another helper will move a particular slider randomly whenever you hit play it's as simple as that so let's start working with expressions let's first start with adding an expression it's very simple simply right click on the parameter that you want to automate and select expression this box that appears below the controller is the expressions controller notice that there is a plus sign to the left of the box we'll learn what it's for in a bit but for now just notice that it's there now before we move any further we need to learn about properties this is the node we're currently working on you can see its name here each controller is a parameter so the border width is a parameter level is a parameter and the angle is a parameter every single parameter has an address you can simply find the address of any parameter by simply hovering the mouse on top of the parameter and looking at the bottom left in fusion so for example let's hover the mouse over the width property and if you look at the bottom left you can see the address of this parameter first we have the name of the node so you can see rectangle 2 then there is a dot followed by the name of the property width this will come in handy later but just keep that in mind now speaking of resolve if you're a beginner and you're interested in learning how to use resolve you love our free crash course that will teach you the basics of every tab and resolve simply go to filmsimplified.com and sign up for free so let's now take a look at the first kind of expressions the expressions to link different properties let's first start by linking properties in the same node for example in order to tell the height property to follow the value of the width property i'll right click on the height property add an expression and here in the expression all i need to do is to simply type width and now notice that when i change the value of width height changes with it it's as simple as that we simply told the height property to use the value and the width property so now the height property will not use the slider anymore to determine the value so if i try to move the slider notice that i can't instead the height property will determine the value to be added here by looking at the expression and what did the expression tell it simply look at width so whatever the value of width is will become the value of height so notice that both numbers are always the same value so what if i needed to tell the width property to always be exactly half the value of width all i need to do here is to tell the height property not to use the width value but to divide it by two in order to do that is pretty simple i'll simply start typing and i will tell it to divide the value by two and now notice that if the value of width is one height is point five and if width value is point five height is 0.25 so now the height property determines its value by looking at the expression which simply tells it to get the value of width and divide it by 2. again it's really that simple you can multiply it by 2 you can divide it by 20 whatever you want however notice a very important thing capitalization is very important note that the letter w is capital when it's written in the name of the value so if for example i write width with a lowercase w in the beginning the expression will not work notice that the height just became zero because fusion does not know where to look for i'm sorry i even mistyped with but if i type it correctly with a w still it wouldn't work so capitalization is very important for this to work so if you look at the address of a particular node and the name of the node is capitalized and certain properties are capitalized make sure to type the names of the properties the way they are however you don't always need to type there is a much easier way to achieve all this remember the plus sign i can simply click on it to draw a line between this property and any other property so for example i'll link height to the corner radius property this time so i'm just hovering the mouse on top of the corner radius property name and whenever i let the mouse go notice that the correct value was loaded into the box and now whenever i change the corner radius the height changes with it notice how we're getting larger corner radius and now whenever the height is lower we're getting lower values for the corner radius this is much easier than typing properties names but what if i needed to link two properties that are in two different nodes it's very simple just add the full address of the property including the name of the node so let's start by getting the address from a different node so currently height is linked to corner radius in the same node i know it's the same node because there is no node name before the name of the property so let's link it to corner radius however this time in rectangle 1 so another note so first let's get the full address of the property that you want to link to so i'll click on this node rectangle 1 to load it so this is the property that will become the master then let's check the full address on the bottom left of the monitor so i'll hover over the corner radius here and notice that it simply has rectangle 1 before the name of the property so i'll switch back to my original node and here in corner radius i'll type rectangle 1 then dot make sure to add the dot enter and now i'll switch to the other node change the corner radius and notice that the height of the rectangle to the right rectangle 2 is dependent on the corner radius of another node so rectangle 1. so we simply told a particular property in a particular node to get its value from a different property in another node we can also achieve the same result without typing by simply again using the plus sign in order to do that we have to learn how to open the properties of two different nodes at the same time it's very easy note that if i select multiple nodes in the inspector i can see the properties of both nodes one at a time so if i click here i just open the properties for this node and if i click on this node now these are the properties for this one so one of them is always collapsed this allows us to use the plus sign to connect properties across different nodes so let's get back to this node rectangle one now i can simply drag a line from the height controller in this node and hover the mouse over the name of the other node this will open its properties and now i can simply drag the mouse on top of the property that i want to use as a master and notice that now we just connected the height property to the width property in another node so let's check the results notice again that the width property here controls the height property let's take a look at another use of expressions randomizing values for example as discussed earlier i have this background node and this is the red color controller and i want the value of red to change randomly when i press play again in order to do that we need to add an expression so i'll right click next to red and click on expression now we need to add a formula in the expression box that will randomize the value where would we get this formula from well you don't need to be a genius to write this formula it's actually readily available there are many resources available including the official fusion manual that shows you how to work with impressions and shows you all the formulas you need to work with fusion expressions i will show you some of these resources at the end of the video but now let's simply start with the easiest formula the random formula from the documentation i know that the formula is the word random open bracket minimum value comma then max value i did not try this formula i just got this from the documentation so random here is simply the name of the formula this simply tells fusion that will be randomizing some values now next we have minimum this is the lowest number fusion should use when generating random values and as you guessed max this represents the highest number fusion should use when generating random values so the question here is where to get the minimum and maximum values from i'll right click to remove the expression so that i can control this slider freely and now let's move the slider manually observe the color of the node here when i move the slider let's say that we do not want red to go lower than the current color so now if you look at the value of red is 0.386 and now let's move the slider again and let's say that we do not want red to get brighter than this color again if you look at the value of red now it's 0.701 so now we simply have the minimum and maximum values let's plug the values in i'll right click as an expression add the formula so random pin brackets minimum comma maximum and now i'll simply replace min and max with the actual values so the value for minimum was 0.386 and the value for maximum was 0.701 and now let's check the results however before i do that just keep in mind that this red color will start flashing on the screen so if you have any trouble with colors that flash on the screen just make sure not to look at this moment so i'll press play and notice the results we're getting random values for red well expressions can get a bit more tricky but for beginners at least now you know what expressions are what are they used for and how to write some basic expressions this is a website that i use all the time by william justice and he has a cheat sheet for expressions in fusion you can find a lot of expressions here to start working with and just as we learned you simply need to understand what the expression does copy the expression and replace the values with your own numbers for example this is the random formula we just used you can see here random minimum and maximum again keep in mind it's very important to follow capitalization so one of the biggest problems that i see a lot of beginners do is to type random with a capital r just keep in mind to follow what's written exactly and this is another website by noah hanno i'm sorry if i cannot pronounce the name correctly but this is another great guide where you can find a lot of information about expressions with a lot of examples i will leave the link to both resources in the description so this was a simple and fast crash course about expressions i hope this was helpful if it was helpful please visit us at filmsimplified.com where you can join our free davinci resolve crash course that is designed for the absolute beginner and will take you through every tab in resolve thank you filmsimplified.com
Info
Channel: Learn Color Grading
Views: 17,797
Rating: undefined out of 5
Keywords: davinci resolve, color grading
Id: -ISL6-kWJp4
Channel Id: undefined
Length: 13min 30sec (810 seconds)
Published: Tue Jan 18 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.