Simulation Nodes: Shape Shifting Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] thank you hello everyone it's your host Alice back again with another blender tutorial today we're gonna go over how you can make this effect using blender new simulation notes well let's Dive Right In so we're going to divide the effect to four different Steps step one is gonna be making a 3D grid step two we're gonna convert every vertices of the grid to a point step three we're gonna tell Bender which point is inside the geometry and which point is outside and we're going to delete the points that are outside the geometry step four we're gonna give the point some velocity using simulations so let's start off by deleting everything except the cube let me just turn on my screencast key and adjust my view for a little bit [Music] it starts by making a new geometry notes group let's call this object one click the pen to pen the group now what you want to do is make a 3D grid which is just a few subdivided planes to stacked on top of each other and to do that you first need a curved line and connect the curve line to an instance on points so every point that the Curve will instance be great set the instance object to a 3D grid and you want to resample your curve to control how many points on the curve later these points will be great let me just adjust the position of these notes and now if you change the number on the resample curve it will change how many grids you have and you will control the subdivision of the grids by controlling these two parameters [Music] you can change the scale of the grid and also let me just turn on my wireframe mode so you can see how many vertices we have first you will connect the resample curve to a value set the value to 10 and connect the value to a vertices X and Y so on the X and Y and Z because we are controlling the resample curve we'll get the same amount of points next to control the scale of your grid you will connect the end to a combined XYZ you will have another combined XYZ connected to the stock and you will need a value node to control the scale of your grid like this A1 and connect it to both the Z so they start in the Z of the end get the map Now set it to multiply and multiply the end and the start by 0.5 make one of them 0.5 negative and the other 1.5 positive so when I set the value to 1 the start point will be negative 0.5 on the z-axis and the end point will be positive 0.5 so it will keep the grid centered in the middle of the world [Music] and now you want to group all this but first you need to connect your scale value to the scale of your grid so when you adjust this value you will not only control the scale on the z-axis but also the scale on the X and Y [Music] we just adjust these lines [Music] so G to grab and move this let me just grab and move this over here and move this point over here and before you go up everything you see this value control the subdivision of the points for your group everything don't forget to realize your instance but I realize instance not now we're gonna group all the nodes we've just made so select everything use Ctrl G to make a new node group [Music] wanna control the scale and you want to control the subdivision now click in to go to the side panel go to group and call the first value scale in the second value let's call it rest or resolution [Music] Now You See Me connecting my one more value so connect the X to both the x's on the combined XYZ to control the location of the 3D grid on the X and also do that for V1 and now you can control the location of your 3D grid on the X and Y after you've done naming your codes you want to click tab to exit click on your note group and name it we're going to call this one 3D print [Music] you can also give it a color if you want go to the side panel and go to the node and click on color now if you're done giving your note robot colors at the subdivision division to 20 and the scale to 1. now if you preview this will have a 3D grid see let me just turn off my Wi-Fi mode now let's connect this to the geometry output now what you want to do is convert everybody to cop grids to a points to do that we'll use a mesh to Once node and now we want to readjust the scale we make it a scale of three and the subdivisions are 50. after that go to your 3D View click tab to go to edit mode shift Z to go to x-ray mode and you want to delete your Cube geometry and add a swazan monkey just the default so that monkey don't change everything Next Step you will need to turn off your geometry node and add a subdivision surface that is a divide surface to one and move it above the edge geometry don't forget to turn on your geometry mode what this will do is subdivide the service of the monkey before it enters the to the geometry notes next step we need to tell blender which point is inside our geometry and which point is outside our challenge let me just explain this real quick now everything 3D object has faces and each face has an arrow that points outside a narrow minimum vector and it also has a position in the middle of the face so if you subtract the position of the face from the position of your point you'll have a vector that points from the point to the face to compare that Vector the green one with the normal of your face the red one if they're pointing the same direction that means the point is inside your geometry either pointing in the opposite direction that means that the point is outside your geometry and to do that is really simple it only takes a few notes first you need to connect your monkey geometry to sample nearest index node and connect the position to the position so this no tell blender to give you your the ID of the point that is near your monkey geometry next set this to face because we need it to be near the face next you want to assemble index so now you know which point is neural geometry you need the position of that point so connect the same geometry of your monkey set this to a vector and connect the position so you will get the position of the point Next Step you'll need the normal of your geometry so duplicate the sample index node and connect the normal tether vector and connect the same geometry and the same index divided so just connect the vector to a normal node [Music] their journality the same as with the other one so the next step is to get the arrow that points from the point to the base of your surface so to do that you use a math subtract node and subtract the position of database from the position of your points so after you get a vector that points from the a point to the surface you need to multiply it with the normal of your face using a DOT product so basically if they're pointing the same direction the good product will be will give you a one value if they're pointing in the opposite direction it will give you a zero value so connect this to a delayed geometry node to delete the points that are outside and just check everything [Music] get a delete geometry mode and connect the value of the touch product to the selection you will need a map range mode and you need to invert it so make it from one to zero to only delete the points that are outside not the inside and now you want to narrow it down your selection so make it from 0.01 to zero now it basically just works it will delete every point that is outside your geometry so let's turn this the resolution up make it to just make it 60 or 70 or something like that get more resolution to work with now we just the radius Romeo points don't make it too big or too small just something that would work for you now if you go to edit mode and you delete your monkey says on and you add the Taurus it will do the same steps it will go over make a point and compare the points to the geometry and delete the access points so it will work on any geometry only the geometry normals need to be set right so if you run birthday normals of your geometry it will not work now let's go over everything so select everything [Music] Ctrl G and you want to control the two values on your map range I don't see why you need them just in case you do let me just make this easier to look at this over here grab this move it over here and now after you're done you need to press tab to get off the note code and scale it for a little bit and let's call it is inside so it will give you a value if the point is inside you need to drop this put it over here grab these two put them over here so you just know what you're working with so the next step will be the simulation before the assimilation you need to store name attributes so store name attribute tell blender to remember the position of the ones in that instance or in that time so you need a store name attribute before your simulation notes and you want to store the position of the points so blender need to know these points used to be a market and to do that you add a store name attribute node before your simulation notes and you set it to vector and you connect the position and you also want to name it here I'm gonna name it rest both so it's the positional burst I don't know if this makes any sense and Next Step We're Gonna Wanna save another one which is the start pause so at the frame start it will remember where the point is and after you displace it it will get a new position so let's first add a another store name attribute and also set it to vector and also connect the position to it just call it start pose and after you've done that blender will remember the position of each point in the start of the frame let's say that we've displayed these points in the middle afterwards despite these points we need to calculate the velocity so get another store name attribute and we want to call this bill to Velocity and you want to connect the position connect a position and connect the position to a subtract node and you want to subtract the start position after you've subtracted the start position from the current position you will get a velocity vector and you will use this velocity to move the object so if I displace the object I expect these objects to keep moving for a short while or a short distance and then stop [Music] do that you will use the velocity velocity but the velocity decrees over time so they don't keep moving forward so use a scale node set it to 0.9 so each frame it will get 0.9 of its velocity of the last frame so we'll multiply the last frame by 0.9 for each frame it gets multiplied by 0.9 till the point it starts and now let's use the velocity so make a set position node connect the name attribute and select your Ville attribute so now let's see the velocity Vector works so get another set position now and now we're gonna make our third and last notebook which is the switch node so get a switch node and connect to the tool and Noise and you want a vector math node [Music] connect Vector math [Music] and set the vector mask to subtract and subtract 0.5 and you will need another Vector math Now set it to scale I'll make the scale point one and make the null scale 1 and now when you play your animation and click the Switch it will switch on the noise when you click it again it will turn off the noise so now let's just quickly test it so let's make the animation and allow them click spacebar now switch on the noise and when you switch it off they keep moving for a little bit and then stop you can control how much the point keep moving after your turn up the Noise by controlling the scale of your velocity no one you want your points to rearrange themselves in the shape of a monkey after you apply the knife and to do that you will use the rest position that we saved so now each point you know where it should go so to do that let's call this correction vector you just need to duplicate your velocity setup and call it correction and instead of the start balls let's just use the rest post instead of positive scale they we don't want them to move away from the arrest boats we want them to move to other sports to make the scale negative make it a small value like 0.1 now connect your velocity and your correction to a mixed Vector now and connect the max Vector now to the velocity and you need to reset the next lecture now to a 0.01 if you set it to more the points will move quickly back to their position so this controls the mix between their velocity and their correction velocity so next step is just test it and just adjust these for a little bit now go back to your switch noise adjust these and you want to now go the switch noise so select everything Ctrl G to go and you want to control first you want to control the switch now you want to control the vector scale of your noise and you want to control the you know it scale the noise roughness and the noise Distortion and the noise detail and now click tab to go back to your graph and you want to name this notebook we've just made let's call it switch noise so it's a noise that you can switch on and off pretty simple mode now play your animation again click on the switch on the switch when you're turn off the noise the points move back to their original place I need them to move faster so I'm gonna make this more powerful so one let's see if one works go back to your switch noise when you switch on the noise when you turn it off it will move back to its position pretty quickly so go back and adjust the value to your liking I think this is too fast and if you go back to your nose set it to 4D and connect time seconds to your noise will have an animated noise which looks better in my opinion it can also slow down your PC so now as you can see the effect is basically done and now the points move back to the original place that we don't want that we want them to move to a different place to form a different object let me just adjust the resolution again oh now the next step is we're gonna get the geometry of the second object and we're gonna do the same thing with the deleting the points that are outside the geometry and to make the points the monkey points go back and rearrange themselves to inform a different object we need to First tell the monkey points to remember another position another rest position is going to be the rest position of our second docket which is the Taurus so add a Taurus drag your Taurus and drop it into your nodecraft move it to a fancy position first and now what we're gonna do next is just do the same thing we did with the monkey so you will take your 3D grid that your turn into points and you want to connect your 3D grid the same 3D grid that means it needs to be the same know what you do is you just duplicate the is inside in the delete geometry and the mesh took once known you want to connect the is inside to your new geometry which is the Taurus and after that you need to connect your 3D grid to this point to mesh so it takes the same bread and turn it to the same points and it will delete geometry or delete points if the points are now inside the toys so if you preview this you'll see that it just works so now you just tell blender to remember these points that are forming a Taurus and store that information on the point or the points of a monkey so now you need to connect a sample index node so this node is just telling blender to get the position of each point of the guitars so now you need to control the index which means that you're telling blender to calculate how many points are inside the tourist and for each point that inside the tourist get its position and store it will we're still in storage but we're just getting ready you need to connect the domain size to the delete geometry of your Taurus right now I'm connecting it from now let's store this information so duplicate your store name attribute and set it to rest pause let's call this Rest Post 2 and you want this vector to be connected to this one so right now it doesn't store any information foreign set this to a 1000 or maybe let's just make it 10 000 so it will get the location of 10 000 points that are random so it will choose 10 000 points randomly and get their position and store their position [Music] you don't want that because some points are now getting lost so the points that are not encoded in the random value will not store anything so we'll have a zero value so they will just move to zero let me just frame this and let's call it get object to position now let's test this go back to your switch noise and just zoom in expand this a little bit drag off your switch noise and set it to go input and you want to go to the side panel and go to go and name your input switch noise or noise switch and now you want to switch between the rest both of the monkey and the response of the Taurus so the points when you switch the switch they will move to the rest hose of detours instead of going back to a monkey ship and to do that duplicate your name attribute or the correction vector and set it to rest pose 2 and connect it to a switch Vector node and you want to connect the switch to a group input and name it switch object [Music] we'll go back to side panel name it switch object [Music] and now we are going to test this so when you switch the noise on it gets noisy when you switch the object and switch the object as you can see at some points are just getting scaled down to zero zero zero that's because we're choosing random points to store their information at some points they just don't know where to go so they just go to zero instead of using the random we're gonna use a domain size and we're gonna take the domain of our grid so we're telling blender for each point of the grid you want to restore their position and this won't work because the position their position is already zero zero zero as you can see when I play the animation and if you want to make it work you will need to take the points that are forming a Taurus and connect them to The Domain size you connect them to The Domain size and you set it to point Cloud it will tell you the toys is made of how many points and you want to connect that to the random max volume so it will get the location of all the points that are forming a Taurus but just do that randomly as you can see now it works however there are three or four points that are still going to zero see inside me and to fix that add a math node after your domain size get a math node set it to add three and replay the animation and there is now Five Points so you need to subtract three points now as you can see all the points are behaving correctly so they go back to their to their location they're supposed to be now if you go back to your velocity vector and you change the velocity scale from 0.9 to 0.99 this will mean that the points will have or not have they will keep their velocity longer so it's like they have more mass because you know object with no Mass they will have more velocity there will be a harder for friction and gravity to make them lose that velocity and if you change the mix Factor it will mix between the velocity and the equation velocity so giving it a stronger value will make the points correct there location faster giving it a small value will make the points don't correct their position very quickly and after you're done with that go to the end of your assimilation and you want to use a instance on points to turn these points to any object you want I'm going to use a cube here so just get a instance on points node and connect the instance circuit to AQ Cube and you want the scale to be very small so 0.05 should do it connected to the end as you can see their points are now cute and they are stacked correctly in the right place so now you need to give these cubes a material and to do so we'll use a set material now right here I'm just increasing our subdivision to get more points that doesn't change anything [Music] and every time you use a set material node don't forget to realize your instance before that if you didn't realize your instance you can't use the named attribute that you need it's basically giving all the points the same material and you can change anything and it looks horrible so now we'll get a realized instance now just drag and go let me just adjust this line and get another node sets material node and you want to set material to the other material and now we're going to store another attribute so we take the velocity and Dot product with the position of the points and connect them to another store name attribute after the assimilation and call it this for displacement now go back to shading [Music] and go to rendered View and set your render engine to be heavy and turn on low and ambient occlusion and you want an attribute and and you will call this this so let's get the information of the displacement you've said thank you and now we can use this attribute to control a color and the emission of our material so let me just drag this over here and get a color round and what the color Ram do is let us control the Fallout and also clamp the Vine so the lowest value will be zero and the highest value will be one [Music] adjust the colors to any combination of [Music] the 3D color as we just previewed this got some light turn on the wall opacity to turn on the wall to train to 0.2 and connect the color of your attribute to a matte node and you want to set a matte node to a multiply so you're multiplying let's just say I'm using 50 here I'm multiplying the velocity of the object by 50 and connecting it to the emission strain so each time the point gets a velocity of one it will get an emission of 50. and each time it gets a velocity gear of two it will get an emission of 100 and so on and now as you can see when the points more available and much more light and you want the color ramp in here so it just clamps the volume so you don't get Negative values you only get positive ones and you want to disconnect this color it doesn't look so good I will use a different emotional color so take this color wheel and I will select Orange see now it works beautifully now I will change the color one more time to a red and now we'll go back to our 3D Bowl part and test this noise on noise off switch object [Music] that's all you get so going back to our 3D viewport if you click Tab delete everything and add a cylinder scale bound and cylinder so you don't crush your PC add two low cuts to support the subdivision servers and replay your animation it will set the points to a position of a cylinder this works with any combination of two outlets now you get two switches switch for the noise and switch for changing the object to object number one and object number two I want to change the second object you just go to the second object and hide its geometry to go to edit mode and delete all the geometry and add a new job all what you can do is go back to Geometry node and pick a picker and pick another object it's the same thing and now the tutorial is finished thank you all for watching and I hope you all have a wonderful day if you like this type of content and you want me to make more don't forget to like the video videos card so you don't miss anything and if you need any more help or if you just want to chat I'll put the link down in the description for my Discord and other social media see you all in the next one bye bye [Music]
Info
Channel: Aaws 3D
Views: 2,337
Rating: undefined out of 5
Keywords:
Id: R8M9G7gOzGM
Channel Id: undefined
Length: 35min 56sec (2156 seconds)
Published: Sat Jun 17 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.