Automatic Dynamic Counters - An Introduction to Expressions in Davinci Resolve 16

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
what effects it's Alex here I hope you all well in this slightly longer than usual video I'm going to give you a quick introduction to expressions and how you can use them to create sort of dynamic counters within projects in the Edit Page and by doing that I'm going to show you how to correct all of these different counters going on here so zero to whatever counter the same but backwards as well as some percentage progress counters as well now if you just want to learn how to do them but you don't really care about how they work per se then just watch the first couple of minutes and then there's a cheat sheet down in the description below you can just copy the expressions dump into your project and then off you go but if you do want to see how they work which I recommend that you do then stick around because there's loads of really useful stuff in this video hopefully hey I hope do you enjoy it let's boom and reach resolve and have a look shall we so here we are in DaVinci Resolve or on the edit tab first I'm gonna do open up the effects library toolbox titles and then you want the text plus not the regular text text plus with a little lightning bolt next to it um drag that add it on to our timeline give it a click head up into the top right hand corner and open up the inspector now here you've got this styled text this is usually where you've type whatever you want it to appear in this text box but we're gonna do something a little bit different if you right click anywhere within the box and select expression and this box will appear underneath now as you can see it the minute just says text and then it's got the quotation marks with the text that we've entered so you can enter text in here and it'll just appear like anything else and you just do that you don't even need the word text you just need the quotation marks so if I just put quotation hello and know the quotation mark there enter it will say hello now that's not that useful top so you could just type in the star box what makes this unique is that you can do loads of cool expressions or formulas in here so to give you an example if I put 10 plus 10 it's not going to give me 10 plus 10 it's gonna give me 20 because you can do basic maths within this box so we'll do the maths for me rather than giving me 10 plus 10 or actually give me the answer of 20 which can be handy if you can't bother to get a calculator you can come and just do some quick mats in there and it'll appear on the screen that's cool we've got 20 but let's say we want to combine that quick mats with some text we can do that as well so if you just do a space dot and then a space like so that's basically an ant or an ampersand that has allows you to combine more than one thing so we can combine that calculation of 10 plus 10 with let's say it was bananas so I've just done a quotation mark bananas Croatian marks again hit enter it now says 20 burn us so we can just combine the two to get it to display whenever we want now that's sort of useful but not that usual really because you could have just typed that in text box this does get really cool when you use of some of the built-in expressions or the built-in tools though in resolve so let's just delete all of that so the first one just type the word ty all in lowercase and then hit enter so I've got 85 at the minute but if I scroll across my timeline you can see that's changing and one project is 24 frames per second so if I go to the 1 second mark you can see it's 24 because what this is doing is counting the current frame so just count every single frame all the way up and that's dynamic so we can move it wherever we want shirring it and it will always go from nought to whatever frame is at the end so it useful but not that useful really cuz you're probably not gonna be counting frames all that often you probably want that as seconds now I know obviously this is a 24 frames per second timeline so if we simply do time divided by the number of frames that the project is which in my case is 24 or 30 or 60 or whatever with an outcome not it's hard to see let me make this a bit smaller 4 5 6 7 8 so on it's counting up in seconds but obviously we've got far too many decimal point here it's a little bit messy so we need to tidy that up now this again nice needs you to remember you've got to round up if just think look up you see the ceiling it's a round down look down you'll see the floor so round up is CEO L for ceiling round down is floor so I'm gonna round this up so I'm just go type in C E I L now the ceiling and the floor works with brackets so we put CEI out open bracket go right at the end close the bracket hit enter and there we go so this goes from zero all the way to ten now you can see what it does is goes from zero and then the very first frame it goes to 1 that's because we're rounding up if you wanted it to stay longer on zero for a full second with use of floor instead so now it's 0 1 2 3 etc if you wanted that to start at a particular point so if you wanted let's say a timer to begin at 13 go upwards we can just do 30 plus enter and now it starts at 30 obviously if you wanted to go the other way we could do 30 minus and now we've got a 30 second timer that's coming down from 30 but while that works it's a bit of a pain because you need to know the starting point and if I went too long if I made this over 30 seconds we start to go into negative numbers which is not what we want so we can actually make a countdown that is completely dynamic now to do that what we need to do is find out the last frame so we need to already know the last frame or the highest frame within this counter and then we can count that from there fortunately that's easy to do so I'm just going to clear everything and we're gonna start again so go inside comp all in lowercase dot render for the capital our end for the capital e and that's going to show us 239 so there's two hundred and thirty nine frames in this text box the comp refers to the composition which is our text box here we make that longer we'll adjust to save five five five or whatever sometimes you may notice this it's still displaying the old figure what you need to do is break this so put a full-stop in there for example hit enter get rid of the full stop enter again and it'll just fix it it's cuz it's already pre-rendered it and he's getting a little bit confused so now we already know how many frames are in this textbox so now we've got our starting point so if we were to do comp dot render end- time we've got five five five and it'll count all the way down to zero perfect but again not ideal because it's in frames we want it in seconds so let's put brackets around this so that's things just first it will do comp render end - time and then if we divide that by 24 words their number of frames we get a seconds countdown nearly there it's working it counts down in seconds to zero but only disappoint point again so then we can use a floor and ceiling again whichever one you work so I'm gonna use floor this time so goodbye floor open a bracket we'll go right to the end close that bracket hit enter and now we've got a countdown from 23 all the way down to 0 and again completely dynamic move it around put it wherever you want it will always change to be to countdown the length of the current text box it's really really useful now of course you can put this into a power bin so then you've already got this counter this countdown is dynamic you can drag it out of your power bear and put it on any project it'll know where to start from and do an automatic countdown for you let's get rid of that let's just expand on this one further point so we know the total number of frames in the composition and we have a simple frame counter we can use that to give us a percentage so if I simply do time which is the current frame divided by comp dot render counts about render end with the capital R capital II and we get this so we get zero all the way up to one because obviously let's say that this is a hundred frames 100 divided by 100 is 1 whereas 100 divided by 0 is of course 0 so we get everything in between now again it's almost there but not quite rikes it's not point we want this opposed to be a percentage so if we pop all this in brackets multiply it all by 100 so instead of a zero point something call it 1 we get obviously zero to 100 and now we've got 0 1 2 3 4 5 all the way up to 100 but again we've got too many decimal points if it looks a bit messy so we can do the same with you for ceiling or floor depending whether we want that round up for Ground Zero whether you want that zero to hang on for a little bit to start up one let's do the ceiling I'll open a bracket go right to the end close that bracket hit enter I know there we go so you've got 0 all the way up to 100 and again doesn't matter where you put it doesn't matter how long it is they'll always just go from 0 to 100 we've got this really nice progress or percentage counter for us obviously it's missing the percentage size limit so we're just gonna go right to the end we're gonna do a space dot dot space quotation marks the percentage side good quit H my skin they enter and now we've got the number with the percentage sign at the end cool now let's say we wanted the word progress at the beginning same thing did the quotation will do progress and a colon and a space will close that off with another quotation mark sort of say the word progress space dot space enter there we go progress from 0 to 100 but let's say we want this the other way round so we want rather than a zero to 100 percentage we want a 100 to zero so let's start at the beginning because we're always going this one thing we're gonna want our time divided by comp don't render end so we've got this zero to one but we want there to go backwards so the easiest way to do that one - so we start off at one and we work backwards so we start off at one we subtract that which gives us a zero at the end so it's exactly the same but backwards so again we want that to be a percentage so we times that by a hundred so let's wrap that in brackets times 100 we start off at 100 we end on zero cool to me there some points so let's do seal bracket right to the end bracket enter cool I've got rid of our decimal points it's 100 all the way down to zero now we want the word progress again so we're gonna do quotation progress colon space quotation again space dot space enter cool the word progress with that countdown the last thing we're missing is that little sensory sign at the end so we're gonna come to the end same again space dot space rotation % see size rotation enter job done it's got a progress counting down from 100 to zero we can move it around make it as long as we like and all it will do do the exact same thing just slow down that progress meter so we'll always start with 100 and always end on zero obviously this is a text box so you can do the size you can mess with the color you can move it around do whatever you like to it and that's it folks I hope you enjoyed this video if you did leave me a like let me a thumbs up if you've got any comments or feedback pop them down below do let me know if you enjoyed this slightly longer former midweek video maybe I can do some more of these in the future as well if you new here don't forget to subscribe thank you very much for watching stay safe and then until next time cheerio
Info
Channel: MrAlexTech
Views: 29,174
Rating: undefined out of 5
Keywords: davinci resolve, divinci resolve, davinci resolve expressions, davinci resolve timer, davinci resolve counter, davinci resolve percentage, percentage davinci resolve, timer in davinci resolve, countdown, how to make countdown in davinci resolve, countdown in davinci resolve, expressions, expressions in davinci resolve
Id: jivfCnTjoMc
Channel Id: undefined
Length: 13min 27sec (807 seconds)
Published: Tue Apr 21 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.