Blender Sound Reactive Geometry Nodes | Tutorial How-To Audio Music Simulation Mograph

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this tutorial you will learn how to create sound reactive Motion Graphics like these with 100 pure blender no add-ons or scripting required we have three distinct things going on here the bubbles in the center for the low frequencies like the kick drums and bass particles for sounds in the mid-range frequencies flying faster for louder sounds and the random red laser lines for bursts in the high frequency ranges welcome blenderheads and the 70 of viewers who are not subscribed yet well please do me a favor and don't forget to like subscribe and drop a comment while you're watching and learning new skills for free thank you if you have never seen geometry or simulation notes in blender before I recommend the playlist Linked In the card and video description now let's fire up blender and make some cool audio based animations this is Sylvie and this tutorial has the Sylvie seal of approval I am using blender 3.6.1 for this and the first thing of course we want to do is get the audio in but before that it's important to set the frame rate now we're going to do the same thing as in the demo we're gonna have the base the mid frequencies and then the high frequencies so we're going to use the cube for the base um let's add in an icosphere and a Taurus for the high frequencies so essentially what we're going to do is assign the the volume of our audio file the base part to the cube okay how do we do that so we go to let's go to animation and on frame one so this is important you have to go shift across the left greencast Keys showing here so shift cursor left takes you to frame one and on that frame one we're gonna insert a location iframe okay and then we're going to take the C location we can turn this into the graph editor for example and we're gonna take we don't need this we just want the C location on frame one and then we go to channel and here you can go bake a sound to F curves which is exactly what we want and then I take my desired music and in here is where basically the magic happens so for the base for the cube we only want the base and the base we're gonna take from frequency zero to 300 let's just do that and then big sound to F curve and you can see we have some stuff in here now of course this audio file is a longer so let's click normalize and let's see how long it is and then we're just going to drag our end frame out to cover the entire song now we can see here that there's basically almost no base in the beginning of this song and then there's some Kick Drum hits and then there's a quiet again now if I hit a space bar to play we can see our cube is moving and it's moving with the base part of our song and then when the bass kicks in we can see it's moving a lot more however we can't hear anything yet but we can fix that we can go to the video editing part of blender and bring in the same audio file plop that in where is it oh of course I wasn't on frame one now but that doesn't matter I can just go frame one move that to frame one and then go back to my animation and if I hit spacebar now um I hope you can hear it a little bit in the background I have the music playing and I can hear and see what's happening so as I said this is just the base you can see this is reacting really quite nicely to the base now let's do the same thing with the mid range so let's go back to frame one this is important because of the baking because it I think it starts on the frame that you're currently on and do you always want to be on frame one so they are they all line up okay so icosphere we need an location iframe we go to the C location a channel big sound take the same one and let's do 300 to I don't know let's do four thousand okay uh that will be the the mid-range uh part of the sound Spectrum pick that in okay so there is a lot more happening in the beginning here whereas there's almost no base okay looking good now let's do the high frequencies again frame one insert location go to the C location Channel big sound pick the sound and let's go from four thousand to 20K and that's it for the high frequencies all right so the it works oh let me say first and then let's go back to frame one hit spacebar okay so there's a lot happening in the mid range here a little bit in the high frequencies a little bit in the low frequencies but then when the bass comes in this is the base the high frequencies the high frequencies are always a bit tricky because there's not that much in the super high frequencies happening and they're always overlapping a lot with the mid but that's just how it is my name is Chris and I make free blender tutorials if you enjoy the content please give the video a thumbs up and subscribe thank you back to the tutorial let's go to Geometry notes because that's what we're going to do most of the work uh over here I would like to create a new collection let's call it audio and take the ancosphere cube and the Taurus and just drag it into the audio collection first thing we want to do is let's maybe take care of the base okay so for the base animation I had those bubbles in the center of the screen maybe let's just align our camera also again we don't have screencast keys are showing up an rx90 and gy bring it out look through the camera this is what we're looking at now we're going to need an object for our base uh Motion Graphics so let's bring an object in it doesn't matter what or actually does it matter probably not we just let's just take an ecosphere okay Bring It Forward maybe a little bit and on this object here let's call that a base on the base object we create a new geometry nodes node tree and in here we're gonna now take in the information of our Cube pin this view so now we can drag in the cube because that's our base audio information and it's stored in the location here but it's only in the C component of the location so we have to separate x y z and this is now the volume of the base part of our audio file cool so what do we want to do we want to probably go into let's look through the camera once more let's maybe scale this up also I should have subdivided this a lot more probably so let's make it a little bit rounder okay now we're going to distribute some points onto this so we wanted this tribute points on faces and the density is actually what we're going to plug in from our audio information so so when there's a lot of bass happening then we have more points distributed onto our ecosphere let's see if it works so let's go here we have the music playing okay we can see more Bass and we get more points distributed all right seems to be pretty cool but we want to maybe take away the really quiet parts now I didn't find a smooth solution for sort of a high pass filter but we can always just do maybe a compare compare and say okay if our volume information is less than I don't know 0.3 then we want to switch a float value float um okay so if it's less than we want zero if it's greater than we want this okay and then also we should add probably a math node so we can multiply our value a little bit bring this over and this is our density in a team okay so when there's when there's almost no bass happening we have zero point and only if our value is above 0.3 we get some points we can increase this to a 0.5 all right all right that's the base information now this is just a point Cloud there's nothing to render and we can't actually see anything if we would hit render now so right away we can do in in instance on points and what do we want to instance maybe an icosphere with a few subdivisions all right cool have this now okay now for the actual animation we want these icospheres yeah the ecospheres to um like appear when the bass hits and then just shrink down to nothing okay let's do that and we have to do that in a simulation Zone just a quick reminder if you have no idea how this works I have an entire tutorial series looking at the simulation and zones and the simulation nodes in blender geometry nodes so you should watch those videos first probably all right now let's plug this in we want to simulate our geometry the geometry in this case is like I said just a point cloud okay now we want um the Spheres to shrink down for that we need to simulate something in this Zone over time let's give each sphere the information of its size we can do that but just or we could capture an attribute or we could use a named attribute but each point in a point cloud has more than just a position it also knows it also has a rotation and it also has a scale which in case of a point is the radius so we can go search radius and we can say set point radius and let's just start off with a radius of one so we have sort of a factor between one and zero okay we have a radius of one and then over time which is in here the simulation so whatever you plug in here is just for the first frame after the first frame you're just simulating stuff here and none of this input is uh used anymore okay so in our inside of the simulation we want to get the point radius and then set the point radius to a new a value let's do reduce okay we should we read the radius and we need a math node and we can multiply the previous radius by I don't know 0.7 and then we set the point radius now of course this is already working but it's not showing up because we're not using it yet because when we actually instant some icospheres onto our points out here we can give it a scale and again use the radius okay now this is actually not correct yet because on each frame we create some point onto our big icosphere and then we want to animate those but of course on the next frame they're they're disappeared again because we create new points onto our geometry so we don't actually want to plug this into our simulation like this we want two add the points the new points to the existing simulation so remember on all of these frames this is just running in a circle here this is just keeps simulating on each frame and we want to have the points from the previous frame and add these points to it so we need to join geometry the one from the previous frame and we add the new points to that and then of course actually we want to set our we want to set the point radius only on the old geometry so the new geometry has a radius of one the old geometry coming in from the previous frame has a radius and we change it and set the new radius and then we have join and now let's see if that works okay yes seems to be working okay so we're Distributing points now of course this is all a bit big so we can either play with the radius or we could let's bring this down a little so we have cleaner noodles or we could just say okay let's start with the radius of 0.5 Maybe yep that's exactly what we want however there's one thing now that we can't even see but it is happening and that is let me just go back a few frames okay so the bass drum hits we get new points they're big then with our simulation we decrease the size by multiplying the previous radius with 0.7 and then they just basically disappear because they get so small however they're still there so this geometry here is keeps growing and keeps growing we just add points and add points on each frame we don't need to do this we could just delete some of the points once they are not visible anymore anyway right you don't want to just load up your geometry node simulation with millions of points so how do we do that well we can just go uh geometry delete geometry and what geometry what points are we going to delete uh the ones where we need a math node can I just look for less than oh math less than cool where the radius of the point is less than let's just say point I don't know zero one see how that works okay okay and then down here we can see we have 595 instances currently we let it run some more now we have 727 okay let's go forward a few frames you can see now we have 400 300 okay now we have more again and then because when the the base drum hits then we get a lot of points um so maybe this value is a bit much let's just multiply it by two and see yep okay pretty cool and we're not just adding new points um we're also getting rid of the points that we can't see anymore anyway and this is all we need to make sound reactive Motion Graphics okay now let me open the demo file and show you all the other parts okay this is my demo file and you can see here I am on the low frequency object here and this is exactly the same node tree we take the information from the cube I called it low but it's the cube okay so we take the low information the C axis we do our high pass filter here distribute the points set the radius um make them smaller over time or decrease the radius over time we delete the geometry we can't see anymore we instance icospheres and then back here I also set smooth which you have to do inside of geometry nodes so that these spheres are smooth and then I also have a material the material is this one where I just assign a random Factor here to get a little bit of variation so we have some yellow and some red with this color amp and then I use the layer weight and I'm sure you've seen this before this is the layer of weight and usually it looks like this so that gives you the angle of the surface to your camera and you can turn down the blend so you can just get the outer the circle basically of the sphere and you plug that through a color ramp you can do something like this the cool looking and then I just use the emission Shader and I don't even know if I need this hold on do I need this oh yeah okay I use this Factor here that gives me just a circle to mix between the emission Shader and an empty Shader which gives me the black inside and this also gives a cool effect because it looks sort of like a cartoonish Cloud because we don't get the full circles where we have overlapping spheres so I think this is actually a pretty cool Shader to create these sort of cartoony clouds okay now go back to Geometry nodes let's look at the mid what have we done for the mid so we're taking the the C location from our mid object which was uh the sphere and then again we separate high pass filter multiply and what I've done here is my mid object this guy here is actually an ecosphere a very tiny icosphere in the middle of the scene and I can emit particles like all of these thoughts here by shooting them out along the normal so if you have the ecosphere you want the normal it would be here and this normal will be here right so we can emit particles like this from our original geometry which is an icosphere by taking the normal of our ecosphere and storing this in a named attribute and I called it V for velocity so each of our points that we're emitting on each frame now has the velocity I also store another attribute called age inside of the simulation I take the H I add one so on each frame each particle gets older by one right so read add store again we have delete geometry here because we want to delete the particles once they leave um our frame so this is the camera frame here I don't know if you can see this on the recording but we don't need to make them fly out infinitely once they hit outside here or once they reach the outside of our frame we can delete them so that's where what we're doing here if our age is greater than 60 we delete the point and then of course we want to move the point on each frame we move each point on the V remember V is our velocity which is the normal so we have a lot of particles flying outwards and also V let me see here I'm scaling the normal based on you can probably see this here based on the C of our music right so particles the V Vector velocity Vector is greater longer where the music is louder and remember we're just talking about the mid-range frequencies here so the louder mid-range hits that we have the longer our velocity is which means the faster these particles are flying and then back here it's same thing we're creating ecospheres which are all of these little dots we have set smooth have a different material let's look at the material real quick the material uses the age to have a color ramp between h0 and H1 so in order to get a factor between 0 and 1 we have to divide the H by 60. remember we're deleting the particles after 60 frames so no particle is ever older than 60. so we had a factor between zero and one so when they're born they're bright white and then over time we have this color ramp emission Shader and that's it so if we hit play this is what we get you can see we have some particles flying faster and some are slower and that's just the volume of our mid-range audio all right so that's that and then we have the high frequencies let's look at those geometry nodes high frequency high and in here you can see I don't even have a simulation area on each frame I simply create two random vectors that are just somewhere inside of my frame so x minus 50 c minus 20 and they're all on the on the Y 0 plane so we just get some random vectors if we look at it from the front and then we have two random vectors and they also have different values because I plug the frame from our animation value into the ID here so we had two different random vectors create a curve out of that curve to mesh based on a circle and then set the material to the high material the high material is just an emission Shader with a very high strength which gives us this sort of laser beam look and down here I'm using the audio information again the C value from The High Frequency info and if and I say if that is greater than this is again sort of a high pass then either we have 0 or that value which is the high pass and I use that as the curve Circle for this line so essentially we get a random line on our screen on every single frame but on the frames where the high frequency audio is not very loud the radius is zero so we just can't see it all right so this doesn't even have an animation this is just like laser light flickering and if we put it all together and hit spacebar then this is what we get now remember we got the audio information into these three objects here by baking the audio and selecting a certain frequency range and if you wanted to create a spectrum analyzer you could do the same thing um just I don't know get 10 divisions of your frequency range and then have bars scaled on the C and have a Shader going from green to Yellow to Red it's really very easy that's it as always the finished blend file for this tutorial and many many more is available to download at patreon.com thanks for watching see you soon bye foreign [Music]
Info
Channel: Chris P
Views: 14,845
Rating: undefined out of 5
Keywords: cg, 3d, blender, blender3d, b3d, tutorial, how-to, training, learn, eevee, cycles, geometry nodes, simulation, sound, music, audio, spectrum, frequency, bass, treble, motion, motiongraphics, motiondesign, vfx, graphics, gfx, nvidia, geforce, mograph
Id: XOsXZ1qDfSk
Channel Id: undefined
Length: 25min 51sec (1551 seconds)
Published: Tue Jul 25 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.