Transcript for:
Web Creation in Blender

hello everyone this is Bradley today this tutorial is to renew the spider web animation setup I've done in the past some functions are being deleted and updated so I'm going to show you a more convenient setup hopefully it will be uh easier to teach and learn in this case so let's start so here we are in blender right now we are having a cube in which I deleted three face so that I Expos like kind of room structure and the entire point of this uh uh setup is that I start with a point and I'm shooting all these kind of Curves attaching all these kind of walls and at the end of these uh curves I'm going to instance a lot of uh uh other curves and I'm also going to interconnect uh instancing all these kind of Curves to make it a kind of a spider web like structure and at the end are going to animate a kind of mixing of the position to make all these kind of points uh crash back to the initial position to fake a sense of uh shooting spider web animation so this concept is basically the same as the tutorial in the past but we may Implement some details a little bit differently and maybe in a little different order to um better teach you in this case um but anyway uh let's start with geometry notes and as always I'm going to use the presets which you can download for free from the link in the description at first we start with a single point and shoot Ray or Curves uh to this wall so uh let's take a joint geometry so that uh we can work with the original Cube uh geometry in this case as well and we start with this uh Point instance geometry uh we start with a curve line line so this is basically a curve line with two points and we basically instance that right now we're instancing 10 sets of thats but they do not distinguish themselves because they have the same position rotation scale so we take a random rotation uh and now you can see these are different codes I'm going to decrease the rotation a little bit another important thing is that I'm going to use a parenting node so that I can just uh parent that or Orient it to an empty object this is an empty object you can just take an empty object and I think instead of using the sphere it will be better use an arrow so that I can just rotate that I can see my z-axis and you can just position that randomly as you wish I'm going to uh decrease the con just to better visualize the entire setup and the power yeah you can shoot it whatever you want and you can also change the SE of yet but uh essentially what I'm looking for is to take these points onto the wall there are multiple methods to take this point onto the wall but uh in order to access all this geometry we are going to realize the instance and then we can take a set position uh one way is that you use the recast and the other way is just to use the geometry proximity so that is the function like a shrink R multili uh in this case I will probably just use the geometry proximity this is not really a nice way but anyway uh it functions anyway so and I'm only going to in uh effect the last Point inside of the starting point the starting point should stick with our empties for a better control so we are going to take an end point selection and make sure your end size is one and the start size is zero so that the starting point will always move with our but the end point will be attached to these walls next thing we are going to do is to generate points at the end of these curves and instance another set of Curves attaching it to the wall uh this is going to be a very similar process as we've done here but we need to firstly generate all discount points uh to start with just like we need an empty to guide our entire structure so how do we do this process um I have a no called array on splines to generate the points on these curves so now if you visualize only these curves it's not very obvious what it does because it looks like a curve and if you increase the count it only makes it longer uh the entire point is to actually just to generate an array on spr uh it might be it might be more obvious if you start with this curve points preview to visualize the points it generates uh without this array on SP just two points with array on sp there are multiple points according to the count you set uh the main purpose of this node uh is to generate an array and to offset these points AR it and you can try to Loop that if you want but that's not the purpose of this particular setup we just need a static uh result of this instan so we have going to deal with the custom parameter because I want to have my point to concentrate at the end of uh This original curve and uh the parameter basically takes from the spine parameter which goes from 0 to uh 0 to one from the start to the end of your curve and in this case if you plug that you can immediately see that there is a random distribution across this 0 to one range and we are going to take this uh minimum to a kind of high value so that uh the generated points will be uh concentrated at the last 20% of our original curve so now we have generated the points uh you can remove this uh uh curve points per viiew completely or you can just disable these short curves because at the end of day we are not requiring all these small curves we need this points instead okay and uh let's take an instant some points the process will be basically the same as what we've done before about all this kind of instancing so uh you can start with you can just duplicate or use the same curve line and I'm just going to duplicate another random rotation this one has to be replicated because I need a different seat and plug that into the rotation you can see because it starts from the kind of um initial straight line uh to the air so it's not a relevant to our initial curves Direction in this case we just plug the rotation of our AR Splats uh to the random rotation then it will look uh more aligned with our initial curves and then we realize instance so that we can access the points for set position and we basically take the same end point selection so that we only affect the end points and using the same geometry proximity to set the end position and now we can join this setup position to our join geometry and you can see right now we have the initial curves and all these kind of new points generated and attaching itself to the wall and this is completed procedure you can just change the seat you can change the amount accordingly and they're attaching to the wall nicely okay then we are going to instance another set of Curves but this time the target will be kind of interconnected and the process will be very similar so it might be easier if you just uh uh copy paste the original setup and you can visualize the original setup that we are shooting curves to the wall but this time the target will be interconnected curves so we are just going to remove this target position and the deal with that separately we're also not going to use the rotation of Curves uh this time we just randomly chose a rotation 360° and you change the SE probably for this random value for the distribution uh we do not need to focus on the end of Curves anymore you can Pi put that into the zero again and probably uh retract a little bit so that it's not overlapping with our previous and the curves and change the seat so now we have all these kind of Curves which looks kind of very chaotic it does not really matter but we need to deal with the target so what's the Target the Target should be interconnected curves so this is from this our set position and we basically just do another geometry proximity and then we can put this position into our setup position you can see the results looks kind of very weird that all these kind of curves are shooting to the same position this is uh this happens when your value goes to nonsense then it will goes to the value of 0 0 0 and the reason it's nonsense because it generates an arrow saying that input geometry has unsupported type curve this is a limitation of this geometry proximity nodee that it does not support the curve so we need to convert curves into something else so firstly the curve does not contain a phase so we need to put that into a points and then we can transform form uh the curve to points or to match so curve to match then we fixed the issue but uh you also see kind of rules that it seems like the ray is always shooting from the end of original curve this is because if you visualize the points of our original curve using the curve points preview that we do not have a lot of vertices on it that's why if you try to sample with geometry proximity either the starting point is being selected or the end point is being selected so to solve this problem it's very simple you just take a res sample cut to add more uh vertices and by increasing the count and then visualize where's our Center position then you should see the distrib soltion becomes a lot more better and then you can change the seat uh you can also remove yet and if you do not want the end to be connected then you can also change the curve so that it's not it's being kind of excluded from the interconnection and then we're going to join all this kind of Curves together if we visualize the end result this is what it looks like we have all these kind of interconnections along with the points or Curves shooting to the wall uh to better visualize that we are going to make everything into a tube kind of structure so in this case uh I'm going to separate my wall from all these of curves so that I can put a bevel curve Noe to only our cures and I'm going to decrease its radius using a value position and just a decrease with another level of 10 so now we have our geometry being done as we finish this mesh basically uh we can uh set a material for this object so you can add a material for the wall then it will be attached to the original object or geometry and then you need to add a separate material for our web and you can change our color into black or whatever stuff if you goes to the material preview you can see uh we need to have a separate set material node uh in order to set this web material then it will work and uh make sure that the wall also contains material which will work and it's working which is nice so now we have our spider web you can control it's called parameters uh what can be more important is that you need to get our animation done besides this completate geometry the animation is quite straightforward as mentioned at the beginning we basically just need to crush all this kind of spal web geometry uh to the starting point which is the location of our empty uh we are going to do this using the setup position node and we're mixing two vectors one will be its original position or its current position and then another one will be the location of our empty so I'm going to put these locations into that and always remember to turn on this relative most of time then you can see this animation is basically done that I have this spidal web being shoot out from this starting point uh you can key frame this uh Factor but in this case I'm just going to use an animate node it sets the end frame 15 EC's off but that into Factor I'm also going to turn a custom Ro curve to interpolate that so that's now I have an animation of shooting this spidal web this looks kind of very linear and ugly but whatever okay and uh the trick part uh and the reason to make this tutorial is basically I'm going to use this inertial Deo I've made the the tutorial talking about yet including its settings and with the newest update it becomes much uh shorter and actually if you put that on you can immediately see the kind of difference with and without it uh that we are starting having a wiggling kind of actions with this initial deformer inside it contains a simulation Zone that's why if you look into the timeline it always generates a kind of cat on it and to render it you probably need to bake this simulation uh with your keyframe the result yes you need to bake that but that's not important here so now we have this kind of result it's not a perfect but I hope you get a kind of idea about the beauty of it I have discussed the settings of this inertial deformer in the past although they may look kind of different but all these kind of parameters are still comparable as in the past and uh you can also try to just play around all this kind of parameter byself about how it changes whatever but right now what I need to deal with is that I need to set up a full because everything is being uh overshoot with the inertial deformer but I hope at least the end point will stick with our uh wall without all this kind of inertia so I'm just going to use the spine parameter as I mentioned before this spine par parameter is going from 0o to one from the start to the end of our curves and you can see all these kind of tips are white because they are having a value of one I'm just going to use this spine parameter uh but I'm going to reverse that and let's pick a remap 0 to one and we reverse the relationship so that the end is zero and plug that into the F so there is no inertia white part will be full of inertia and so on so forth okay so right now if you look at this setup and how it changes uh you can see that uh the end always sticks and uh yes you can have a kind of overshoot of this kind of Center Parts but at the end always to stick with the wall perfectly okay and then next you just play around value to make that doesn't shoot too much or not having all this kind of weird flaws and then you have this kind of Animation being done and uh the reason for this kind of Flo uh for this remap one is that you can also interpolate that in the um in the kind of way you want um here I'm not going to go too deep about the white matters because it's comp completely customizable the initial part of this tutorial is basically finished here uh it's as simple as this three nodes and sometimes it can be even shorter without do this kind of spine parameters uh it includes a preset of course but uh anyway uh here I want to emphasize the the concept of this workflow that you have a start and end of this stupid W EV animation but uh once you add the inertial deforma it's kind of bouncy and makes something interesting in general and it's not just applicable to this spidal web animation it can be applied to um whether this is amateur animation or geum TR animation whatever okay sometimes uh you may just randomly add this node and to see how your animation works you may have some um accidental interesting result with this concept okay uh in this tutorial since I do not want to keep writing a uh cache on my timeline I'm just going to disable that and we are going to improve uh our animations um our stupid animation without the DC iner right now our animation looks kind of very boring because everything is just straight and if you have paid attention to all this kind of spider web animation or setup you may realize the end results will have kind of concentric retraction of all this kind of Curves and uh to achieve such kind of result we need to calculate a kind of average midpoint from the existing curves we have so we go back to our uh most initial guide curves which is originating from this setup position as you can see it's a function to instance our Curves in different cases so we have all these kind of three curves to start with and we are going to calculate an average point of it as we are working with three stet lines taking the last Point as an example we add three positions together and divide by three then we get an average position of these three vectors as the last point and if we connect that to the starting point then we get an average curve from these three curves and the way we are going to implement that is to use an accumulat field Noe and we need to add a position Vector together and then we get a total and we need to divide by three and here we need to Define group ID to specify uh which three points to add exactly along this curve because there are many three points that can be added in this function and a very nice way to do is just to use the spline parameter so along the three curves the first point on each of three curves will be served as a group to calculate this total and uh the last points for example let's take it an index of two then they will be added as a group to calculate this average and then we take a set of position we plug this average position into then you can see immediately we are getting a straight line out of it uh sometimes when you're doing a vector operation it might be easier to visualize and understand what's going on if you try to uh use a mix spe with the position so that you can see how these three points are uh crashed into an average in this case as we proved our concept now we can make up the curvatures using this concept uh since we are going to distinguish uh these splines along its length so we can just use a spline parameter and fact into the factor but it's just crashed into a single line one of the reason is that we do not have enough points so we need to resample curve so that now you see the curvatures but it's kind of near um better Direction I'm going to use the remap 0 to one to reverse this relationship so the end point will never be uh touched with this factor it's having a value of zero and our starting point will have a value of one okay and uh you can interpolate that according to your needs so you can just give it different uh interpolation I think this is nice and you can also increase the count and now you can replace this with our new result so now we have our curve but something is still straight uh this is mostly because our or interconnecting curves are too long so they are just overshoot and attaching each other to have this kind of straight patters so we're just going to take some parameters to scale that down by a factor of 10 and let's increase the lens a little bit Yeah I think this is fine so that they are not overshooting to give a kind of a straight illusion so now we have these results which I think is kind of nice and you can always TW this parameters uh to give a kind of better result we can also use this concept to improve our animation right now we are having a kind of linear animation directly going from the starting point to the end Target but we can separate this process then we go from our starting point to the average position and then expand out going to the Target so that you will have a kind of curvature interpolation as well and to uh to do that exactly we are going to separate this mix into multiple process so we start with a single point but we then move on to an average result and then finally going back to our desired position with a different animate so now we can put get thing into Factor so the question is what to Define this position B we need to project our current result to the average lines we created earlier so I'm going to have a different set of position this time we're not going to do the mix I'm just going to use this divided result so that we are having this St line we're going to do the proximity so that we have the points to project onto our Target result I'm just going to use the geometri proximity and as before we need to convert the curve into a mash so curve Mash so now we have this position which is supposed to be a ma result we're outputting these positions into the vector you can try to prove that just by tweaking all these kind of parameters see that we're definitely going from a single point to the average straight line so now if we combine all these kind of Animation together then you can see it looks like this so you go for a kind of straight line and then expand out something like that this result may look kind of ugly and weird but if you speed up the entire process and uh especially combined with the initial Deo then you may not realize kind of uh frames in between but just the final product which has kind of expansion feeling and more importantly you can always PR call this kind of interpolations so that's the feeling may be a little bit stronger about the kind of expansion exposion like kind of effect uh just try to play around on values here the tutorial is basically being finished I think I have covered basically everything I want and this setup is just an example uh and this is not just the only way to create this kind of spider webs it can be more complex and you can also add the interconnection at the end um connection too it can be more complicated whatever stuff and all these kind of parameter are free to change uh just a final reminder that you uh want to synchronize the relationship about the count and our division in this case I'm just going to use a domain s and put that into the instance the instance cont will be our division and once you connect this relationship you can just increase the cont if you want and you can decrease the amount of final splies and also just increase the parameters as you wish and just a play around with it you can also just tweak this kind of variety values so that there are different splies be involved uh there are all sorts of things that you can potentially play around but at the end of day I think this is yet yes um I hope you enjoy this video I'll probably see you next time bye-bye