好吧 Okay,
这是我们的下一个停止工作 so here's our next stop work.
如果我们看一下这里 If we take a look in here,
我们又有了很多克隆人 we've got lots of clones again.
但如果我们仔细观察 But if we look closely,
这些分子没有相互接触 none of these guys are touching each other.
这并不是完全通过推来实现的 And this wasn't done entirely with the push.
除了这次有效 Apart effective this time,
我们用刚体动力学模拟来把它们分开 we're using a rigid body dynamics simulation to keep them apart.
让我们快速看一看他们将推开的过程中我们得到了什么 So let's have a quick look at what we've got up here as they'll make the push apart.
效应 Effector.
我们也有新的 We've also got a new,
有效和打击着色效应器和一些其他新手 effective and hit the shader effector and a few other newbies.
在这里 Here.
我们有一些公牛 克隆和随机效应器 we've got some bulls and also a clone up and a random effector.
我们来看看这是怎么做的 So let's see how this is done.
好吧 OK,
所以我们要做的第一件事就是为我们所有的克隆体创造一个适合的形状 so the first thing we're going to do is create a shape for all of our clones to fit into,
我们要用一个大的旧球体 we're going to use a big old sphere.
让我们把其中一个带进来 so let's bring one of those in.
然后我们到这里 把它的半径往上取 Then we'll come over here and bring the radius of it up,
大概是160 something like one sixty.
然后我们去显示器那里 把电线打开 Then we'll head over to display and turn the lines on.
我们在这里放了个不可靠的标准球民意测验在顶部和底部 We've put out dodgy standard sphere here with the polls at the top and bottom,
所以它的类型会变成二十面体 so will change the type to icosahedron,
给我们一些 to give us some nice,
即使是几何 even geometry,
再细分一下 and will subdivide this a bit.
就30个吧 我们准备好了 Let's just say thirty and we're ready to go.
让我们用很多小球填满这个大球体 So let's fill this big sphere with loads of little spheres.
让我们上到更粗糙的菜单上 把角落拿过来 Let's go up to the more rough menu and bring in a corner.
然后我们抓一个大球体 Then we'll grab a big sphere,
并且按住控制将它拖上到单簧管有复制它 and holding control will drag it up into the clarinets had duplicate it.
现在我有了一些大球体的复制品 And now I've got some clones of our big sphere.
我们不希望这个球体太大 使半径减小到15厘米 We don't want this sphere to be so big that spring the radius down to fifteen centimeters,
我们现在看不到它 因为它在大球体后面 and we can't see it now because it's behind the big sphere,
我们先把那家伙藏起来 so let's just hide that guy for now,
但我们会保持激活状态 but we'll keep it active and ticked.
好吧 Okay.
所以我们的客户端在Y方向上因为它们是原始球面的副本 So we've got our clients going up in the Y direction here because they were a duplicate of our original sphere.
他们可能有太多的分支了 They've probably got way too many subdivisions.
把它拿下来 So let's bring that down.
12点左右比较好 Something like twelve should be good.
当你在做动态模拟的时候你总是想要保持一个低的几何值 You always want to keep you a geometry low when you're doing dynamic simulations.
现在我们要把这些家伙复制到我们的大球体里 So now we want to clone these guys into the shape within our big sphere.
也许我们可以把它重命名为球面壳 So maybe we'll rename this to something like Sphere Shell.
然后我们再去看看我们的克隆 Then we'll go and take a look at our clone up.
你可以看到此刻模式被设置为线性 you can see the mode is set to linear at the moment,
这就是为什么它们都是直线克隆 which is why they were all cloning in a straight line.
这里我们想在我们的范围内攀登它们 Here we want to climb them within our sphere,
所以我们选择物体模式 so we'll choose the object mode.
它要求一个物体是一个球体 And it's asking for an object is a sphere.
把它代进去 let's plug that in,
如果我们再努力一点 and if we pull out a bit,
你可以看到这些人在克隆的大致形状 我们最大的恐惧 you can see these guys at cloning in the rough shape of our biggest fear.
现在 Right now,
分布设置为表面 the distribution is set to surface,
所以它们粘在球壳上 so they're sticking to the surface of our sphere shell,
但我们想让它们填充我们的形状 but we want them to fill our shape,
所以会把分布变成体积 so will change the distribution to volume.
好吧 OK,
这些在里面的家伙已经成型了 so these guys are inside are shaped now,
但是我们需要更多的碳来填满这个空位 but we're going to need a lot more of these to fill up that empty space.
所以让我们把数目增加到七百左右 So let's crank the count right up to something like seven hundred,
现在那些人开始变成我们最大的恐惧 and now those guys are starting to take on the shape of our biggest fear.
如果你的机器突然运行得很慢 If your machine is suddenly running really slow right now.
有了这些克隆体 with all these clones,
确保你的实例模式设置为instance just make sure you've got your instance mode set to instance,
它会运行得更流畅 and it's going to run a lot smoother.
好吧 OK,
让我们看看这里都有什么 let's have a look what we've got here.
我们可以把这些线路关掉 We can probably turn those lines off.
现在我们将上升到显示到我们的常规阴影 Now we'll go up to display to our normal shading.
这看起来很不错 This is looking pretty good,
但我们可以在这里做点改变 but we could probably use a bit of variation in here,
所有的球体大小都一样 这有点无聊 all of our spheres of the same size and it's kind of boring.
我们去拿个清洁剂看看能不能在麦克风里放个效应器 Let's go and grab a cleaner and see if we can bring an effector into the mics.
我们来试试随机效应 Let's try the random effector.
这当然会让事情变得随机 And that certainly randomize things,
但我们不希望位置是随机的 but we don't want the position to be randomized,
我们到参数选项卡 把它关掉 so we'll go over to the parameter tab more switch that off.
我们只是希望比例是随机的 你可以看到 如果我把它打开 We just want the scale to be random and you can see if I bring that up.
它会在X方向上随机缩放 It's going to randomly scale in the X direction,
但我们想让它们保持一致 but we want them to scale uniformly,
我们把它打开 so we'll switch that on.
它会把这个值变成0 5 And it would just change this value to something like point Five,
所以它们可以有一半大 一半大 so they can be up to half as big as they are for half the size bigger.
好吧 OK,
这看起来很酷 so that's looking pretty cool,
但这又引出了下一个问题 but it leads us to our next issue,
就像我们有一个小时复制他的课一样 like we had an hour clone his lesson.
很多克隆体都是相互交叉的 A lot of these clones are intersecting with each other.
现在 我们可以抓住克隆技术 并引入另一种推动力 Now we could grab cloning and bring in another push apart.
有效地降低半径 effective and bring that radius way down.
但你可能会发现 不管你发多少条推特 but you'll probably find no matter how much you tweet this,
你永远不会完全明白 you'll never quite get it,
所以它们都在互相依偎地抚摸我们可以玩这些设置 so they're all just touching each other nice and snuggly We can play with all these settings,
但总会有某种程度的交叉 but will always get some degree of intersecting.
空气永远无法填满所有的空间 Air will never quite be able to fill all of the empty space,
所以最好的办法就是让电影院40做一个动态模拟 So the best way to pack these guys in nice and tight is to get cinema forty to do a dynamic simulation,
这也可以称为刚体模拟 which can also be called a rigid body simulation.
让我们删除 So let's delete,
我要把效应器分开 然后我们要克隆 I'll push apart effector and we'll grab cloning.
我们想让这个动态来做这个 We want to make this dynamic to do that.
我们只需要到标签和仿真标签将带来一个刚体标签和直接 we just need to come up to the tags and down to simulation tags will bring in a rigid body tag and straightaway.
如果我们点击播放 If we hit play,
所有东西都会动态地落到地上 everything dynamically drops to the ground.
但我们想告诉我们的模拟留在我们的大球体内 并与它的表面碰撞 But we want to tell our simulation to stay within our big sphere and to collide with its surface.
所以我们所有的克隆体都包含在其中 So all of our clones are contained within that.
所以在理论上 我们可以将我们的球体外壳作为一个碰撞器对象来与我们的动态克隆体进行交互 So in theory we could make our sphere shell a collider object to interact with our dynamic clones.
但如果我们把它打开 But if we turn that go on,
你可以看到我们的克隆体实际上与它相交 you can see our clones are actually intersecting with it.
在模拟中相交的几何图形通常不会飞起来 An intersecting geometry in a simulation doesn't fly usually,
我们来试试 看看会发生什么 but let's try it and see what happens.
我们可以再次隐藏球面 确保它被选中我们来到标签 We can hide out sphere again and make sure it's selected and we'll come to tags,
模拟标记 simulation tags,
我们将它设为碰撞体 and we'll make it a collider body.
现在我们点击播放 Now we'll go and hit play.
它会四处摆动然后消失 And it wiggles around and disappears,
这不是我们想要的 which is not what we want,
所以我们不想这样做 so we don't want to do it that way.
我们实际上想复制这个 We actually want to duplicate this guy.
让我们打开它 Let's turn it on.
按住control键 把它拖到这里 Hold control and drag it here,
我们会把这个重命名为球面动态壳层 and we'll rename this guy to sphere dynamic Shell.
我们不希望原来的球面是动态的 And we don't want our old sphere to be dynamic anymore,
我们删除这个标签 so let's delete that tag,
然后我们抓住这个家伙 按比例放大 then we'll grab this guy and scale it.
所以它包含了我们所有的克隆体 so it encompasses all of our clones.
他们应该把那个家伙藏起来吗 About their should do they will hide that guy?
我们把这个也藏起来 And we'll hide this one as well.
现在如果我们点击播放 and now if we hit play.
我们还是会有点奇怪 We still get a little bit of weirdness,
但我们可以解决这个问题 but we can fix that.
回到我们的标签 Back to our tag.
在collision选项卡下 Under the collision tab,
我们需要改变这些自动的形状 we need to change these shape from automatic,
这有点像是在猜测我们的开力达的形状 which is kind of guessing the shape of our kalidah.
我们需要让它成为一个静态网格 We need to tell it to be a static mesh,
这会给我们一个更准确的结果 and this would give us a much more accurate result.
让我们打 So let's hit,
玩一玩 看看会发生什么好事 play and see what happens nice.
你可以看到现在有多大的球体在捕捉它 You can see how big sphere is catching that now.
如果我们把它打开 If we turn it back on,
你可以看到它们都在里面 you can see they're all inside there.
让我们暂停一下 我们不希望所有这些人都被视为一个大肿块 let's pause that we don't want all these guys to be treated as one big lump.
我们希望所有的小丑都能被单独对待 这样他们就能相互交流 We want all of the clowns to be treated individually so they can interact with each other.
如果我们在碰撞标签下的克隆中使用动态标签 So if we grabbed the dynamics tag on our cloning down under the collision tab.
我们需要通过将其更改为toplevel来激活这些单独的元素 We need to activate this individual elements by changing this to top level.
现在 Now,
如果我们点击播放 if we hit play,
所有的克隆体都会相互作用它填满了我们的大球体我们没有得到任何交集所有的空空间都填满了 除了这里 all of our clones will interact with each other and it's filling up our big sphere and we're not getting any intersections and all of the empty space is filling up nicely except up here.
解决这个问题的一种方法是阻止重力将所有这些云向下拉 One way we could fix this is to stop gravity from pulling all of these clouds downward.
如果我们按下键盘上的controld So if we hit control d on the keyboard,
它会打开我们的项目设置打开动态选项卡 it will bring up our project settings and if we go to the dynamics tab,
这里已经开放了 which is already open here,
我们可以把重力降到零 we can bring the gravity down to zero.
现在 And now,
如果我们点击播放 if we hit play.
我们的客户在填满这个空间方面做得更好 Our clients are doing a much better job of filling up that space,
如果你发现你还有一点空间 比如这里或者我们需要做的是在对象选项卡中添加更多克隆 and if you find you've still got a little bit of room like over here or we need to do is add more clones down in the object tab.
再给我们的账户加一百个克隆吧 Let's just add in another hundred clones to our account.
然后就会倒回去放了他 And it will rewind and release him.
就是这样 And there you go,
我们的大球里全是克隆人 we've got our big sphere packed full of clones.
现在我们想从这个球体上切出一片 So now we want to take a slice out of this sphere,
我们可以看到里面所有的克隆体 so we can see all the clones on the inside here.
如果我们从顶视图看一下这个 If we go and have a look at this from the top view,
我们只需要像这样切一大块 we just want to cut a big chunk out like this.
我认为最简单的方法 So I think the easiest way to do that.
如果我们把它放回原位并重置它就是从动态壳层中切出一大块 If we just get this back into position and reset it is to just carve a big chunk out of our dynamic shell.
我们想要引入一个可以用来切割这个球体的物体和一个漂亮的平面物体 we want to bring in an object we can use to cut into this sphere and a nice flat object,
我觉得用普通的立方体会比较好 I think would do nicely is a plain old cube,
然后我们只需要按比例放大 把它放在我们想要切割的位置 and then we just need to scale it up and position it where we want them cut to be,
如果我们换个角度 可能会很简单 and it might be easy if we switch views.
你可以点击鼠标中键 you can do that by hitting the Middle Mouse button,
到顶部视图 按鼠标中键 and we'll go to the top view over here and Middle mouse button.
点击进入 Click to get into that.
然后我们想让立方体的角指向这个方向 Then we want the corner of a cube to be pointing in this way.
让我们使用旋转工具 我们可以用肉眼来旋转它 So let's grab the rotate tool and we can just spin this around just by eye.
我们再回到我们的观点 And we'll go back to our perspective.
你 You.
我们得到这样的结果 And we get something like that,
然后我们会快速环顾四周以确保它覆盖了我们想要切除的区域 then we'll do a quick look around to make sure that's covering the area we want to cut out.
然后我们将获取我们的球面动态壳层 Then we'll go and grab our sphere dynamic shell,
我们要带来一头公牛你可以在菜单上找到它 and we're going to bring in a bull you can find him in this menu.
就是这个 That's the one right there.
当你把插入自动应用到我们的球体时 要确保你是坚持的 Just make sure you hold out when you bring that inserts automatically applied to our sphere.
公牛要想成功 就得提出异议 Now a bull needs to objects for it to work,
所以第二个物体是我们的立方体 so our second object is going to be our cube,
我们把它拖到我们的等级结构中 so let's grab him and drag him down here in our hierarchy.
就像这样 and just like that.
我们得到了结果 我们现在从我们的球体中取出了一片 如果我们到公牛那里 看看发生了什么 we've got the result we are after we've now taken a slice out of our sphere and if we come over to the bull to see what's happening.
基本上 Basically,
布尔运算是a-B 其中a是一个球体 同时也是一个立方体 the boolean operation is a minus B with a being a sphere and be being the cube.
基本上就是把立方体从球体中切出来 so it's basically cutting the cube out of the sphere.
我们希望我们的新飞船是单一的物体 We want our new ship to be a single objects,
我们也点击这个 so let's click that as well.
我们还想让我们的新形状代替球体作为动力学的外壳 And we also want our new shape to replace our sphere as the shell for our dynamics.
我们来看看动力学 so we'll take the dynamics,
把球标记下来 放在球上 tag off the sphere and put it on the ball.
现在 So now,
如果我们点击播放 if we hit play.
它复制出了那个形状 It clones outside of that shape,
发射到太空 shoot off into space,
但如果我们雇了这个人 but if we hired this,
你可以看到形状里面的小丑非常合适 you can see the clowns inside the shape are fitting very nicely,
先生 sir,
阻止任何克隆人在那里开火 to stop any of the clones shooting off out there.
我们需要告诉清洁器只在我们的新形状内生成克隆体 而不是它目前使用的这个完整的球体 We need to tell our cleaner to only generate clones within our new shape instead of this full sphere that it's using at the moment,
所以让我们抓取一头公牛并复制它 so let's grab a bull and duplicate it.
然后我们重新命名我们的动态球 Then we'll rename our dynamic ball,
两颗动力球和我们的新两颗公牛球 two ball dynamic Shell and our new one two bull shell.
然后我们会抓住你的克隆 我们需要切换这个对象到我们的新公牛 Then we'll grab your clone up and we need to switch this object out to our new bull.
那么这个男人不需要动态化是我们亲密的驱动力 Then this guy doesn't need to be dynamic is driving our closeness.
所以我们会删除那个标签 so we'll delete that tag.
然后我们倒带并点击播放 Then we'll rewind and hit play.
我们终于几乎完全成功了 And we're finally almost there Earth avail.
公牛的形状完全一样 bulls are the exact same shape,
这意味着如果我们没有听到这个 which means if we unheard this'.
这两个是相交的 Those two are intersecting,
所以我们要做的就是抓住这个家伙 把它缩小一点 so all we need to do is grab this guy and scale it down a tad.
因此 所有的客户机都将在外部的动态客户机中生成 So all the clients will be generated within our dynamic one on the outside.
所以如果我们把外面的那个藏起来 so if we hide out outer one,
你现在可以看到 you can see that in there now,
再一次 so again,
我们把这个藏起来 然后放了他 let's hide that and will release him.
现在我们只需要把一个小球射出去 And now we just get the one little ball was shooting off there,
但我们不太担心他 but we're not too worried about him.
这就是这个网络的基本设置 So that's the basic set up for this network done.
还有最后一件事要做 There's just one last little thing to do.
如果你还记得这个例子 if you remember from the example,
我们在内部有不同的材料 逐渐向外淡出 we had a different material on the inside that gradually fades out to the outside.
那么我们如何建立它呢 So how do we set that up?
让我们去拿克隆 在专题菜单将带来一个新的有效的这一次 Let's go and grab the clone up and up at the monograph menu will bring in a new effective this time.
我们将使用着色器效果 We're going to use the shader effective,
点击clear确保它已经被应用了 and let's just click out cleaner and make sure that's been applied.
你可以选择效果选项卡 You can check if you go to the effect is tab,
你可以看到我们的克隆受到随机的 and you can see our clone is being affected by the Random,
有效和我们的新着色效应器 effective and our new shader effector.
现在我们可以去看看天空中的一些设置 So now we can go and check out some settings in the sky.
你会注意到我们的缩放设置在这里是活跃的 You'll notice that our scale settings are active here,
但是在我们的视口中没有任何更新 but nothing has been updated in our viewport.
如果我们试图改变任何一位医生 And if we try to change any of these other sittings physician,
例如 for example,
它仍然没有更新 it's still not updating,
那是因为我们的动态标签 and that's because of our dynamics tags.
在我们重置模拟之前 我们无法看到这些变化 we won't be able to see those changes until we reset our simulation,
但是我们实际上不需要这样做 but we don't actually need to do that anyway.
我们只对颜色模式感兴趣 我们需要将其改为自定义颜色 We are only interested in the color mode we need to change this to custom color.
再一次 and again,
没有任何变化 因为我们的自定义颜色是白色 we're not getting any change because our custom color is white,
但如果我们改变这个 but if we change this,
让我们用黑色 let's make it black.
现在我们开始看到一些东西 Now we're starting to see something,
所以我们希望我们的客户中间是由黑人过渡到白人 so we want the middle of our clients to be black transitioning to white out here,
我们可以通过掉落来实现 and we can do that with fall off.
我们会去看全套的tab We'll go to the full of tab,
这在电影界还很新鲜 and this is new in cinema,
四千零二十年 forty twenty,
但你仍然可以用旧版本做一些类似的事情 but you can still do something pretty similar with the older versions,
但是我们要用场来做 我们引入一个球场 but we're going to do it with fields let's bring in a spherical field in all diversions.
用球形衰减法 Just use the spherical falloff,
我们几乎马上就得到了结果 and we've pretty much got the results straight away,
但是我们可以调整这个 but we can adjust this.
我们先把钳子关了 Let's first turn off the clamping,
所以我们得到了一个平滑的过渡 so we get a nice smooth transition,
然后调整这里的大小 then will adjust the size here.
类似的 Something like that,
现在我们可以用它作为任何材质的遮罩 and now we can use this as a mask for any material we want.
让我们双击下面这里来创建一个新材质 Let's double click down here to create a new material.
然后我们将双击材质以弹出选项 then we'll double click the material to bring up the options.
我们用黄色表示 We'll just make this a yellow colour.
尽管在我最后的作品中 Although in my final artwork,
我用的是金色的材料 I went with a gold material,
我把它拖到角落 so I'll drag it onto our corner.
现在它被覆盖了 And right now it's overwritten out,
共享或效应 shared or effector,
完全变黄了 and turned completely yellow.
我们想用黑白值的R打散有效两个清真寺 We want to use the black and white values of R shatter effective two mosque,
哪些区域保持黄色 which areas stay yellow.
所以我们将把are着色器效应器导入alpha通道 So we're going to pipe are shader effector into our alpha channel.
让我们打开这个频道 在我们的纹理中听一下 So let's switch that channel on and hear in our texture.
我们想把着色器效应器 We want to put our shader effector,
我点击这个小错误 so I'll click on this little error,
我们向上看我的图表 and we'll go up to my graph.
然后添加一个颜色阴影 现在着色器中所有黑色的东西都变成了完全透明的 And bring in a color shading so now anything that was black in our shader effector has become fully transparent,
所有白色的东西都变成了完全不透明的东西也逐渐从黑色变成白色 and anything that's white has become fully opaque and as a gradual fall off from black to white in there as well.
所以我们有一个很好的过渡 So we have a nice transition,
但实际上我们想要的是相反的结果 but we actually want it the other way around.
所以我们需要求倒数 So we need to invert this,
我们可以通过勾选这个方框来实现 and we can do that by just checking this box.
现在黑色完全可见 Now Black is fully visible,
褪成白色 fading off to white.
现在我们只需要在下面再放一层材料 Now we just need to put another material under this,
所以目标的颜色也有一些东西要褪掉 so the goal color has something to fade off too.
让我们双击这里 然后创建另一个材质 So let's double click down here and make another material.
我想换一个好看的颜色 I think what will be a nice color to fade too.
我们把这个材料拖到清洁器上 So let's drag that material onto our cleaner as well.
黄色材质覆盖了它 And again it's overridden are yellow material.
但我们要做的就是把它们调换一下 现在变成黄色了 But all we need to do is switch these around and now are yellow.
掩模材质位于白色材质之上 mask material is sitting on top of our white material,
一个刚体艺术品就快完成了 and a rigid body artwork is just about done.
你可以很容易地返回并调整它如果你喜欢抓取球面场或你的下降和移动工具和重新定位 And you can easily go back and tweak this if you like just grabbed the spherical field or your fall off and the move tool and reposition this.
然而 However,
你喜欢的 you like.
你甚至可以抓住这里的把手把它放大 You can even grabbed the handles here and scale it up.
所以 在我们进入下一课之前 好好想想 看看你能想出什么最后的技巧 So have a play and see what you can come up with one final tip before we move on to the next lesson.
如果你把这个房子渲染得很好 if you go to render this houses rendering fine.
但有些人遇到的一个问题是 他们不小心把自己的公牛留下了 But an issue some people have had is that they've accidentally left their bulls visible.
如果你只有一个红点票你去渲染你会得到这样的结果 So if you've only got one red dot ticket and you go to render you'll end up with something like this,
所以一定要把它们都关了 so just make sure you switch those both off,
如果是这样的 and if you've got them just like this,
你不会错的 you can't go wrong,
这一课就到这里 that's it for this lesson.
我下一站再找你 I'll catch you in the next one.