WEBVTT

00:00.210 --> 00:06.690
In this lesson, I want us to cover and create creating some Firefly's or lightning bugs swarming around

00:06.720 --> 00:10.430
the scene and then they react to the ground explosion.

00:10.770 --> 00:12.990
So there's two different ways we could go about doing this.

00:12.990 --> 00:19.230
One is using in particles, go to effects and we go to the in particles setting.

00:19.590 --> 00:26.970
We could create Omidyar's and then we could create different fields to control them over here.

00:28.050 --> 00:32.490
But instead, what I'd like to do is use a newer kind of feature.

00:32.490 --> 00:40.470
And Maya, which is the mesh network, specifically the dynamics version of MASH, which is essentially

00:40.620 --> 00:48.210
an unknown particle system, and Maya has repackaged it and is using it with MASH.

00:48.780 --> 00:55.800
So we've kind of used in particles a little bit already and we've also used a little bit of mash and

00:55.800 --> 00:56.940
prior lessons.

00:56.940 --> 00:59.340
And so we're going to dig a little deeper into MASH now.

00:59.700 --> 01:05.370
So let's create a new MASH network from a piece of geometry and for our fireflies, I'm just going to

01:05.370 --> 01:06.540
use a little sphere.

01:07.050 --> 01:11.760
And so I'll call that the base firefly.

01:13.440 --> 01:16.290
And I'm just doing that on the outliner off the screen here.

01:16.770 --> 01:18.120
You could also change it here.

01:18.750 --> 01:24.930
And then we are going to go to MASH, Create MASH Network and let's open up the option box and we're

01:24.930 --> 01:31.220
going to choose an instant here and scrunches a grid formation here and I'll hit applying close.

01:31.740 --> 01:39.730
So I'm going to focus in on the extensor and isolates like that.

01:40.860 --> 01:42.780
So now we can kind of see that a little bit better.

01:43.740 --> 01:48.150
And the next thing I'm going to do is open up the MASH Waita.

01:48.150 --> 01:52.050
So I'm going to go to the Ashbery Ed with the MASH kind of node selected here.

01:52.380 --> 01:56.490
I'm just going to go and dock the outliner over here because I think we're going to keep coming back

01:56.490 --> 02:00.990
to that and then also open up the mash ed here.

02:01.230 --> 02:05.880
So that'll kind of be the outliner for the MASH network so we can kind of keep track of what we're doing.

02:06.480 --> 02:09.690
So now we can see by default what we have created here.

02:09.990 --> 02:11.040
And it's pretty basic.

02:11.040 --> 02:14.370
It's a grid and we have a long way to go, but not that long.

02:16.030 --> 02:22.330
So we have a little bit more work to do to make some Firefly's here, so let's look at the next thing

02:22.330 --> 02:24.640
we're going to do is create a bigger grid.

02:24.650 --> 02:25.980
So let's go to distribute.

02:26.440 --> 02:32.380
And this is basically going to be the base for how many fireflies are going to be in our scene.

02:32.390 --> 02:39.640
So we need to make this quite large, because if you remember to the same scale that we've set this

02:39.640 --> 02:42.850
to is real world units.

02:43.270 --> 02:47.150
So the scale is going to be quite large here.

02:47.740 --> 02:57.430
So, yeah, let's just start with something like this, and that's quite a bit you might not need that

02:57.430 --> 03:00.170
many hours to maybe like 500.

03:01.840 --> 03:04.120
Let's see if that's something appropriate.

03:04.120 --> 03:08.740
And I'm kind of checking with this view on the left side, too, because that's our render cam view.

03:09.230 --> 03:11.690
So that's really going to dictate what we really need.

03:11.690 --> 03:16.900
I'm going to turn off, isolate, select here for one second so I can you see this in perspective mode.

03:18.210 --> 03:28.300
So it looks like we have too many, maybe vertically, so we can crank this down and then we can maybe

03:28.300 --> 03:37.710
expand out a little bit more on Z and X, and we're going to reduce this even more with some more nodes.

03:38.170 --> 03:41.650
So, yeah, it looks like we're covering that entire area now.

03:41.980 --> 03:46.980
So now what I want to do is add a visibility node.

03:47.350 --> 03:48.700
So let's go click on MASH.

03:48.700 --> 03:53.830
You can click on it from the MASH Ed or Outliner and we get back to this in the appropriate editor here.

03:54.520 --> 03:57.240
And you can get to that story editor with this button as well.

03:57.940 --> 04:03.790
So let's create a visibility node here and we can just left click and say add a visibility node.

04:04.090 --> 04:05.170
So it'll take a sliver of that.

04:05.170 --> 04:10.540
And then we just reduce the random strength to go ahead and add a new shader to this so we can see it

04:10.540 --> 04:11.070
a little bit better.

04:11.080 --> 04:15.120
So click on the base Firefly, the original that we use that is hidden.

04:15.120 --> 04:24.130
And by default, when you use MASH and just get that selected, isolate it and I'll just right.

04:24.130 --> 04:26.050
Click in here and say assign new material.

04:26.660 --> 04:30.880
And for now I'm just going to say a surface shader and crank that to white.

04:31.870 --> 04:33.070
So we can see that.

04:33.550 --> 04:40.000
And sometimes Maya doesn't want to update the shader stuff.

04:40.000 --> 04:43.440
So sometimes opening the hypercharged, you can see it fixes that.

04:43.450 --> 04:46.450
So that's a bug that they probably already fixed by now.

04:46.450 --> 04:51.240
But and yeah, that's you always have to kind of look for workarounds in Maya.

04:51.790 --> 04:59.920
So we have the visibility node and that's kind of helping us create a more random pattern of Firefly's

04:59.920 --> 05:00.190
here.

05:00.190 --> 05:01.750
And it's something that we can animate.

05:02.030 --> 05:07.900
This is what's so powerful about MASH is we don't have to go, you know, sphere by sphere and turn

05:07.900 --> 05:08.500
them on and off.

05:08.500 --> 05:10.960
We just have this one slier that controls all of them.

05:11.260 --> 05:17.140
And if for some reason we don't like this orientation, we can just change the random speed and that

05:17.140 --> 05:24.310
will affect this random strength and apply it differently, but keep the same amount of strength.

05:24.820 --> 05:28.240
So really, we can just kind of dial in exactly how much we want to have here.

05:28.600 --> 05:34.900
And then the next thing we can do is add a random node so it'll change this even more.

05:35.410 --> 05:41.380
Because, you know, even though this is randomly changing the visibility of what we can see, it's

05:41.380 --> 05:44.650
still you know, these two are in a line here.

05:44.650 --> 05:47.770
You can kind of see they're still you know, there's two here that are in a line.

05:48.100 --> 05:57.370
So we want to change that by going into random position and maybe doing something even more drastic

05:58.450 --> 05:59.410
and.

06:01.500 --> 06:08.580
Yeah, something like that, so they're a little more random and might bring back some of these because

06:08.580 --> 06:10.110
it looks like the left side's a little empty.

06:10.110 --> 06:12.470
So I'm going to maybe change the seed here as well.

06:12.570 --> 06:14.490
That looks a little better filled out.

06:15.000 --> 06:22.020
And I might increase the distance to the camera because I don't feel like we're getting any like right

06:22.020 --> 06:23.480
into the foreground of the camera.

06:23.490 --> 06:24.840
We can see the cameras here.

06:25.200 --> 06:28.200
So be nice to get some all the way to the camera.

06:28.560 --> 06:32.100
We could add a transformer and just move all of these forward.

06:32.490 --> 06:39.090
But instead, I think I'm going to go back to distribute node and increase the Z distance here, as

06:39.300 --> 06:40.980
you can see that expand.

06:40.980 --> 06:44.760
Hopefully you can see that on your screen and said expand as I do that.

06:44.760 --> 06:49.830
And we can kind of get the Firefly's to go all the way to the camera.

06:50.550 --> 06:52.440
And I might.

06:54.230 --> 06:58.110
Dial that back and do a transform just so you can kind of see all of it.

06:58.130 --> 07:05.500
So out of transform note, I'm going to command click Middle Mouse Dragon here and we can just drag

07:05.500 --> 07:07.450
that value up.

07:07.660 --> 07:13.860
So it kind of favor everything towards the camera a little bit when you go back to the remote cam.

07:13.910 --> 07:19.300
Now you can see there's a firefly here really close to the camera and we can always go back into this

07:19.300 --> 07:24.280
base geometry that we used and it'll scale down all of these.

07:25.030 --> 07:30.220
The other thing we could do is actually use random for scale.

07:30.220 --> 07:36.460
So it's a uniform scale and we can have a random scale value set to these.

07:37.010 --> 07:38.380
So that's another option.

07:38.380 --> 07:40.870
We might just do that just a little bit, that variability.

07:41.560 --> 07:44.740
But in general, I think fireflies are pretty similar size.

07:45.340 --> 07:49.570
And so now we have you know, nothing's moving yet, nothing's animated.

07:49.780 --> 07:54.430
But what's really nice about this, again, is the fact that we can go back in and adjust this stuff

07:54.430 --> 08:01.570
on the fly as we're changing, you know, on the fly, no pun intended, as we're changing stuff, we

08:01.570 --> 08:07.660
can, you know, change the attributes downstream and everything, just kind of updates really fast.

08:08.080 --> 08:12.910
This is what's really nice about MASH and the fact that, you know, we're not having to really simulate

08:12.910 --> 08:13.900
anything here yet.

08:14.180 --> 08:19.270
And within particles, we would have to be simulating already to get to this stage.

08:19.270 --> 08:19.960
So it's kind of nice.

08:19.960 --> 08:25.360
We can set up basically the particles, the instances that we're going to be using and then add dynamics

08:25.360 --> 08:26.140
after the fact.

08:26.360 --> 08:28.060
So let's go ahead and add some dynamics.

08:28.480 --> 08:34.570
So I'm going to go over here and say add dynamics, and that's going to give us a whole slew of things.

08:35.020 --> 08:37.920
And you can see it's setting it up and there's a lot of particles.

08:37.930 --> 08:38.800
I think it takes a minute.

08:39.610 --> 08:41.370
And let's look at our outliner.

08:41.710 --> 08:46.170
So by this stage of the course, we're very familiar with a bullet solver now.

08:46.510 --> 08:50.290
And so it's the same kind of setup here.

08:50.290 --> 08:51.700
You can see the start frame.

08:51.880 --> 08:59.200
Everything that we've learned up to this point, we probably can just turn off the gravity here because

08:59.200 --> 09:03.130
we want these guys kind of floating around in space so we can hit zero on that.

09:03.400 --> 09:09.880
And then what we want to do and how we want to control this stuff then is by using fields.

09:10.330 --> 09:14.500
So if we click on dynamics here, that gives us another kind of option.

09:14.830 --> 09:23.320
And if this stuff, you know, let me just turn back on the gravity just so you can kind of see what's

09:23.320 --> 09:23.770
happening.

09:24.100 --> 09:29.470
And I am going to increase that because of the the scale factor of the scene.

09:29.890 --> 09:34.590
You can see everything just kind of falls down to the ground and the ground by default is actually a

09:34.600 --> 09:35.380
negative 20.

09:35.590 --> 09:36.790
And you can see that here.

09:36.790 --> 09:42.610
So we could actually just bring that up if we wanted to see everything hit the ground that we have established

09:42.610 --> 09:43.030
here.

09:43.720 --> 09:46.600
So we should be able to start to see things at the ground.

09:47.260 --> 09:50.820
And but, of course, we want our Firefly's to fly.

09:51.130 --> 09:53.290
So that's why I was saying we can just turn off the gravity.

09:53.290 --> 09:57.300
But I want to see I wanted you to see kind of what happens just out of the box here.

09:57.820 --> 10:06.490
So when I go back to frame zero here and yeah, everything's looking good and now I'm going to go to

10:06.490 --> 10:17.080
the dynamics tab and I want to show you that we have this kind of section down here for Fields sorry,

10:17.080 --> 10:22.810
that's in the the bullet solar panels here, back in the bullet solver.

10:23.590 --> 10:28.200
We have fields here so we can connect them, but we can't create them from in here.

10:28.210 --> 10:31.060
So what we need to do is go ahead and create them.

10:31.060 --> 10:34.540
And we don't want anything selected when we create the fields.

10:34.540 --> 10:39.310
Otherwise we might get an error because it's trying to attach a field to something that we have selected.

10:39.550 --> 10:43.720
So we just want to make sure we don't have anything selected outside of turbulence field.

10:44.020 --> 10:51.550
And this is basically going to be a kind of noise through noise, through our simulation here.

10:51.880 --> 10:56.980
And with that selected, we're going to really need to crank up the magnitude.

10:57.550 --> 10:59.740
And let's start with like 500, right.

10:59.820 --> 11:02.260
To do like 5000 at some point.

11:02.260 --> 11:09.190
But let's say play and let's go back and make sure we have the gravity turned off here.

11:10.210 --> 11:12.730
And we have no gravity.

11:12.730 --> 11:16.270
We have OK, all of that set fine.

11:16.270 --> 11:20.830
But the one thing we didn't do is actually add that turbulence field to the board solver.

11:21.340 --> 11:28.390
And also, you know, while we're looking at the BOLSOVER, we do need changes subframe to one thousand

11:28.480 --> 11:28.990
one here.

11:29.590 --> 11:35.470
And we don't really need to do any Prioleau with this because it'll just kind of all be working from

11:35.470 --> 11:36.100
the first frame.

11:36.100 --> 11:38.200
So there's no pre roll that we need to worry about.

11:38.710 --> 11:44.590
And so now we can go the bolts, hover and mouse, drag the turbulence field into the fields.

11:44.960 --> 11:45.820
Little window here.

11:45.820 --> 11:49.390
So now it's actually connected this field to that bolt solver.

11:49.570 --> 11:49.900
All right.

11:49.900 --> 11:51.220
So now we press play.

11:52.060 --> 11:53.590
We should get some a little bit of.

11:53.960 --> 12:01.370
Jiggling motion here, and it looks like it's doing a little calculation there and now it's starting

12:01.370 --> 12:05.450
to go and I think we're going to need to really crank up the turbulence field.

12:05.810 --> 12:09.970
So let's go back and crank up the magnitude quite a bit.

12:13.400 --> 12:21.470
And just for right now, I think I'm going to reduce the grid size so we don't have as many particles,

12:21.470 --> 12:27.230
so I'm going to just remember these settings and I'm going to reduce them down a little bit because

12:28.100 --> 12:31.660
it's making our simulation quite, quite a bit slower.

12:32.210 --> 12:34.700
So crank up the scale.

12:34.760 --> 12:36.440
This guy, just so we can see it.

12:37.170 --> 12:43.880
And then let's go to the turbulence field and let's just add a zero here and see what that does.

12:44.250 --> 12:48.230
Because remember, the same scale that we're working at is quite large.

12:50.200 --> 12:57.220
And yeah, we got some movement here, but not a ton, so on that another zero to add two zeros until

12:57.220 --> 12:59.380
I get closer to what I want.

12:59.410 --> 13:01.030
So now you can see check this out.

13:01.330 --> 13:08.440
We're getting all this free animation and everything is moving kind of on its own, kind of course,

13:08.440 --> 13:08.800
here.

13:09.400 --> 13:11.380
And it's pretty awesome.

13:12.080 --> 13:15.430
And so we're getting all this free animation.

13:15.430 --> 13:16.030
Essentially.

13:16.360 --> 13:21.790
The one thing I want to be aware of, though, is the fact that I don't want any Firefly's.

13:21.790 --> 13:22.990
I mean, they could hit the ground.

13:22.990 --> 13:26.740
They're going to end up being much smaller than the size that we're seeing here.

13:28.810 --> 13:34.660
So if you don't want them to hit the ground, you could just add another field so you could go to the

13:34.660 --> 13:43.780
field sollers and add a you can add a uniform field and then just say in the Y direction, you know,

13:43.780 --> 13:48.910
shoot it up magnitude by like 10000 or something and just, you know, keep all the particles off of

13:48.910 --> 13:49.510
the ground.

13:50.740 --> 13:51.890
So let's just go and do that real quick.

13:52.180 --> 13:56.680
Well, let's say uniform, and because I have something selected, it's giving me an error.

13:56.680 --> 13:58.360
So make sure you don't have anything selected.

13:58.600 --> 13:59.800
Go to uniform.

14:00.040 --> 14:06.100
And then we want to have a huge magnitude here because we're keeping in mind the scene scales is quite

14:06.100 --> 14:13.960
large and then we can create a volume shape so we can kind of control where it's happening.

14:14.260 --> 14:19.900
So let's create a cube and then scale it way up and then let's scale it in the.

14:22.220 --> 14:27.500
In these directions, because we want to keep it low to the ground, basically, it's just going to

14:27.560 --> 14:31.000
kick any kind of particle that gets close to the ground.

14:31.010 --> 14:35.090
It's going to kick it off the ground because I don't want these things like landing and sliding around

14:35.090 --> 14:36.400
on the ground and looking weird.

14:36.800 --> 14:40.420
So now we just need to connect it to the board solver.

14:40.790 --> 14:41.020
So.

14:41.030 --> 14:44.570
All right, Millimoles, drag this rather from outliner into here.

14:44.900 --> 14:46.240
So now those things are connected.

14:46.250 --> 14:50.090
So if any, we can actually play this back.

14:50.180 --> 14:53.270
Let's take a look at this particle right here.

14:53.270 --> 14:54.820
Should get shot upward.

14:55.280 --> 14:56.060
So I play.

14:57.310 --> 14:58.630
So watch this.

15:00.490 --> 15:05.380
Oh, you know, what's happening is we didn't set the direction yet, so, yeah, all these parties

15:05.380 --> 15:05.920
are going.

15:07.120 --> 15:08.440
Let's see what direction they're going in.

15:08.440 --> 15:12.930
If we hit the uniform field, the default is X, so again, X, Y, Z.

15:12.940 --> 15:14.260
So let's hit zero.

15:14.530 --> 15:15.220
Let's go.

15:15.220 --> 15:16.150
Positive one.

15:16.160 --> 15:20.290
We want to go upward and let's try it one more time and follow this particle again.

15:22.740 --> 15:25.290
So now it should go straight up, which it is.

15:25.830 --> 15:27.450
So keep these off the ground.

15:30.090 --> 15:37.740
And we can add some drag to the board salver so that they don't just go for forever or some dampening

15:37.740 --> 15:43.610
rather, and that might help it kind of keep from just going into infinity.

15:44.730 --> 15:50.250
We could also add just like a touch of gravity, you can just really play an art director stuff as much

15:50.250 --> 15:54.370
as you want as soon as you kind of get familiar and comfortable with each of these attributes.

15:54.780 --> 16:05.730
So with that done right now, I'm going to continue in the next lesson and actually create the animated

16:05.730 --> 16:13.760
section of the fields where we will help control the reaction to the ground breaking up.

16:13.950 --> 16:19.190
So I want all these fireflies to scatter like crazy when the ground breaks.

16:19.470 --> 16:21.240
So in the next lesson, we will cover that.

16:21.240 --> 16:22.590
And I will see you there.

16:22.650 --> 16:23.310
Thanks for watching.
