每一个人。欢迎回来。 Everyone. And welcome back.
到目前为止，我还没有在介绍中加入， This far I didn't add into the intro,
但我认为这对我们来说肯定是有用的，只是为了给现场带来更多的生命。 but I think it will definitely be useful for us to do and just to help bring some more life to the scene as well.
我们可以加入一些落叶 And that's we can add in some falling leaves
我认为这将有助于增加一些方向性，让它们与这些方向相同 and I think that will be useful to add in some directionality and have them going in the same direction as these
我们在背景中看到的这些云。 these clouds that we've got going on in the background.
我想它们很适合。 I think they'll be good for.
是的。只是给场景增加了一些活力。 Yeah. Just adding some, some extra life to the scene.
我们首先要做的是找到其中一棵树， So what we're going to do first is we're just going to find one of these trees,
不管你想要哪个，我们都不能点击 whichever one you want, really, we can't click on them
因为它们在横向工具中。 because they are in the landscape tool.
我们要做的就是打开内容浏览器，输入树。 So what we need to do is just go over to our content browser and just type in tree.
希望它们很酷。也许它们不叫树。 Hopefully they're cool tree. Maybe they're not called tree.
它们不叫树。 They're not called tree.
应该叫云杉之类的吧。是的。 I think they're called like spruce or something. Yes.
好的。 Okay.
所以我们要做的就是抓取材料 So all we're trying to do here is just grab the material
你可以双击其中任何一个。 from one of these so you can double click on any of them.
我们有了这个，然后找到叶子的材料。 So we've got this one here and then find the material for the leaf.
如果你双击材料或者点击望远镜。 So if you click either double click on the material or click that spyglass.
好吧，这里面有一些我们可以利用的信息。 Okay, this has got some information on it we can use.
所以我们可以偷一个小的 So we could probably steal one of these little ones
在这里，映射到其中一个，然后让它下落，也许再画一个。 over here, map to one of those and then have that falling and maybe do another one as well.
我们会在那里找到另一个地方。 We'll find another spot in there somewhere.
所以如果你浏览那些材料。 So if you just browse to that material.
对不起。不，不要压那个料子。 Sorry. No, don't press that material.
找到纹理。 Find the texture.
好的。纹理不在这里。 Okay. So the textures aren't in here.
我想，这是家长教材里的内容。 It's in the parent material, I presume.
你也可以双击那个，向下滚动 So you can also double click on that one, scroll down
找到它的父母。 and find the parent for that one.
也许我们很快就会到达那里。 Maybe we'll get there some day soon.
如果我们选择基础色， And if we go up to the base color,
树叶在哪里? where are the leaves?
你在哪里，利夫?嗯, Where are you, leaf? Um,
我想如果我们花太长时间找它，那我们就导航到其中一个。 I think if it takes us too long to find it, let's just navigate to one of these.
点击它。 So just click on it.
然后在左边，点击浏览按钮。 And then over here on the left, hit that browse button.
好的，然后转到纹理。 Okay, then go to textures.
然后如果我们添加一个小过滤器 Then if we just add a little filter
对于纹理，如果我们能找到的话。 for textures, if we can find it somewhere.
纹理。 Texture.
里面已经有一个了。 Oh, there was already one in there.
现在我让它消失了。 And now I've made it go away.
甜的。 Sweet.
好的，让我们滚动一下。 Okay, let's have a scroll through here.
看看叶a中是否有我们可以利用的东西。 See if there's anything in leaf a we can use.
是的。这里有一个小的。 Yep. There's one small one there.
然后。 And then.
是啊，我们再买一个松果吧。 Yeah, let's get one of these pine cones as well.
那可能很酷。 That might be cool.
只是因为这两种颜色的不同， Just for some difference in color between the two,
也许，或者这些大点的和那片叶子。 maybe, or maybe one of these larger ones and that leaf.
这很好。 That's fine.
我们需要做的是把这个纹理从引擎中取出来， Okay, so what we need to do to get this texture out of the engine,
我们只需要右键点击它，转到资产操作，然后导出，然后确定它的位置。 we just need to right click it, go to asset actions, and then export and then decide where it is.
你想把它导出到。 You want to export it to.
我打开我的桌面，然后把它扔到六个资源中 And I go onto my desktop and then throw it into six resources
然后叫它Leaf A01，保存在那里 and then just call it Leaf A01, save it there
然后以最高分辨率输出，也就是4K。 and then it should export out at the highest resolution, which is 4K.
现在我们应该得到什么 So what we should have now
是4K纹理，我们要做什么 is a 4K texture and what we're going to do
转移到Maya或者其他你正在使用的建模程序。 is move over to Maya or whatever modeling program it is that you're using.
我们要映射纹理 And we're going to map the texture
变成一个几何图形，就像一个小平面然后我们会让它漂浮在周围 to a piece of geometry, just like a little plane that then we're going to have kind of float around
我们可以给这个平面画一个曲线这样当你看到它下落的时候，它就有了一个形状。 and we can give the plane a bit of a curve so that we can when you see it falling, it has a bit of shape to it.
所以我们会这样做，如果每个人都能转移到你的建模程序， So we'll do that if everyone can move over to your modeling program,
我们从那里开始。 we'll carry on from there.
好了,好了。 Okay, great.
现在我们在Maya或者其他你正在使用的建模程序中，创建一个平面 So now we're in Maya or whichever modeling program you're using, just create a plane
让我们改变细分 and let's change the subdivisions
到中间的一个，再来两个 to just one in the middle and let's go for two
可能就足够了。 to probably be enough.
也许三个。三，足够了。好的,完美的。 Maybe three. Three, be enough. Okay, perfect.
这就是我们的叶结点。你可以这样缩放。 So this is going to be our leaf. You can scale it in that way.
我们要做的就是 And all we're going to do is
把中间的取出来，像这样。 to take out our middle one and let's just have it like this.
我们要做的是选择端点，画出一条曲线 So what are we going to do is select the ends, give it a bit of a curve
也让整件事有了一个角度。 and give the whole thing a bit of an angle as well.
这就足够了。 And that should be enough.
我们把材质映射到纹理上 So let's map our material to it, our texture
对它，创造新的素材，寻找 to it, create a new material, find
我们的材料应该在做 our material should be in to do
我桌面上的文件夹太多了 too many folders on my desktop, part
六个资源，然后是Leaf six resources and then Leaf
如果我们能看一下材料会有帮助。 and then it would help if we could view the material.
很神奇的。 Amazing.
我们做两个，复制这个，然后控制B，如果你在Maya中 So let's make two of these, duplicate that one and control B, if you're in Maya
然后 and then
让我们打开图像，这样你就可以看到它了。 let's turn on the image so that you can see it.
这就是图像，然后显示，或者六个。 So that's just image and then display or six.
这是曲棍球吗? Is that hockey for that?
我们来映射一下 And let's just map
这种材料。 this material.
这个纹理是你对这个纹理感到抱歉 This texture is you've sorry to this texture
然后我们就有了一个漂亮的叶网可以用在 and then we should have a nice leaf mesh that we can use in a
粒子系统。 particle system.
这看起来怎么样? So how does that look?
这个看起来不错。 That looks pretty good for that one.
我们再拿一个。 Let's grab another one.
所以做同样的事情。 So do exactly the same thing.
我觉得很好。 I think it would be nice to.
我们把这个映射到这里 Let's map this one over here
这样我们就有了一个稍微不同的形状 just so we have one with a bit of a different shape
它, to it,
然后我们可以增大它的大小。 and then we can just increase the size of that.
在那里。 There.
好了。 So there we go.
我们有两个叶结点，其中一个比另一个稍大一点它们都适合0。 We've got two leaves and that one slightly bigger than the other one put them both fit zero.
完美的。 Perfect.
然后我们要做的就是冻结 And then all we're going to do is freeze
那上面的变压器，然后出口。 the transformers on those and export them.
我们调用第一个 So we call the first one
全叶 leaf all in
大 the large
下一个叫坠落 next one call it falling
Leaf，你猜的很小。 leaf, you guessed it small.
然后导出这些把它们放到资源中 And then let's export those and put those just put them into our resources
文件夹 folder
然后把另一个放在同样的位置。 and then put the other one in exactly the same place.
太好了。 Great.
现在我们把它导入C中，我们可以这样做 Now let's import it into our C and we can do that
只要种植它。 just by growing it.
我们要知道这家伙住在哪里? We find out where does this one live?
我们把它放到折好的材料中然后创建一个效果文件夹。 We just put that into our materials folded and let's make a effects folder.
所以内容 So content
新的文件夹效果。 new folder effects.
我想我们应该把云移到那里。 I think we should move the clouds there.
所以如果我们找到了云的物质 So if we find the cloud material
我们这里的这些家伙 that we've got here, these guys
你只需点击它们 and you just click on them
搬到这里来， and go move here,
然后引擎会整理出所有重定向之类的东西。 and then the engine will sort out all of the redirections and stuff.
你不用担心这个。 You don't need to worry about that.
接下来我们要做的是导入 So so the next thing we're going to want to do is import
在网格上。 on the meshes.
这些小的落叶和大的落叶， So falling these small and falling leaf large,
我们可以把它们导入到我们的网格文件夹中 we can import them into here into our mesh folder
让我们确保一切都是正确的 and let's just make sure everything's set right
让我们创造材料， and let's create material,
但要确保它没有找到纹理，它做到了。 but make sure that it's not finding the textures, which it did.
很神奇的。 Amazing.
我们不需要它，因为它们已经存在了，所以我们可以删除它。 We don't need it to because they already exist somewhere so we can delete that one out.
如果我们只打开其中一个，它不会加载这些纹理两次。 So it's not going to load those textures twice than if we just open one of them.
所以我在这里 So I'm here
然后找出这个纹理的名称。 and then find what that texture was called.
这是叶子。我认为 That was leaf. I think
如果你去 if you go
拖一个进来 drag one of these in
然后浏览回我们的文件夹 and then browse back to our folder
这样我们就回到了材料上来。 just so that we're back with the with the materials for this.
现在我们把叶子放进去了。 So now we've got our leaf in.
我们肯定要用基本色。 We're going to want that in the base color for sure.
然后我们看看如何处理 And then let's see how this is handling Alpha
看看我们是否再去找它。 and just find if we search for it again.
我想这就是阿尔法的位置 I think this one is where the alpha
的生活。 lives.
是的。 Yeah.
所以它在我们的通道或者G通道如果你想要一个模糊的版本。 So it's in the our channel or the G channel if you want a blurry version.
所以我们还需要引入这个 So we're going to also need to bring in that one
法线映射也是一样的。 and the normal map and the same.
我们把这些都拖到材质中。 So let's drag all of those into the material.
我关上了吗?我有个约会。 Have I closed it? I have a date.
让我们通过点击打开所有这些让它们出现在这个弹出窗口中 So let's just open all of these by clicking on them so that we have them in this little pop out window
然后回到网格 and go back over to mesh
open in one之后会重命名。 and open in one will rename this afterwards.
所以我们要往回浏览 So we want to browse back
这些纹理。 to those textures.
这个，这个，这个和这个就是我们需要的。 This one, this one, this one and this one is what we need.
把它们都拉进我们的素材里。 Pull them all into our material.
太好了。 Great.
让我们开始把这些基本色换成基本色 So let's start wearing these up base color into base color
将法线映射成法线映射。 the normal map into the normal map.
这是AOC。我 And this is AOC. I'm
看a so see in the a
在no mess中，然后是M中的掩模， in the no mess and then a mask in M,
换做是我就不会这么打包了，不过没关系。 I mean, I would have packed these differently, but that's fine.
不知道遮挡是什么意思。 Not sure what it stands for if occlusion is in.
好吧，也许那是个派对。 Oh well, maybe that's a party.
好吧，至少我们知道我们找到了。 Okay, so at least we know we have.
我刚刚结束了我的 And I've just closed out my amazing
失去了一切。 and lost all.
所以不要像我一样 So don't be like me guys
试了一下。 tried those back in.
太好了。 Great.
让我们重新把这些连接起来。 So let's start wiring these back up again.
不好意思，是反照率或底色 So a sorry the albedo or base color
这变成了常态，这是我们的蒙版 that went into normal and then this is going to be our mask
然后是环境闭塞 and then ambient occlusion and
我们有一个粗糙度，看看效果如何 where we have a roughness and see how that looks
太闪亮了。 way too shiny.
是的，我认为如果我们打破了它，那么我们就把一个值放进去。 Yeah, I think if we break that then let's just put a value in.
所以按住1。 So hold down one.
然后是我们的粗糙度 And then in our roughness
我们设它是0.3。 let's give it a 0.3.
第五点。 So point five.
然后我们要做的是如果我们点击这里的任何地方 And then what we're going to do is if we click anywhere in here
然后切换到混合模式，不透明，然后按蒙版 and then go down to blend mode and opaque and then just press masked
现在我们就可以把物质遮掉了。 and now we'll be able to mask the material out.
什么频道 And what channel was
面具。 mask on.
那我们就试试我们的和G。G。 Oh, so we'll try both our and G. G.
有时候如果我们使用低分辨率会更好，这样会模糊一些 You sometimes might be better if we're using low resolution so that it blurs out a little bit
你不会得到非常粗糙，锯齿状的边缘，但我们会看到的。 and you don't get like really harsh, jagged edges, but we'll see.
这样看起来就足够了。 So that looks like it will be good enough.
我们来看看G。 So we'll look at G.
现在她是面具上的垃圾，因为它不接受灰色值。 Now she's rubbish on a mask because it doesn't accept gray value.
对不起，我忘了。 Sorry I forgot that.
所以我们需要用a So we'll need to use a
然后保存。 and then save that.
完美的。 Perfect.
哦,好吧。 Oh okay.
我们现在可以关闭它，回到Mesh，重命名它 We can close that now and just go back to Mesh and that's rename this
保龄球救援。 bowling relief.
这是 That's
我们可以删除另一个。 and we can delete the other one.
然后里面飘落的叶子和飘落的叶子大的和小的。 And then inside falling leaf and falling the falling leaf large and falling leaf small.
我们把材料放进去 Let's just put our material
放大叶子，你可以看到它非常小。 zoom into the leaf so you can see it is it's very small.
我们以后可能需要扩大规模，但就这样吧。 We might need to scale this up later, but there we go.
让我们看看。 Let's just have a look.
实际上，它会小到疯狂吗? Actually, is it going to be insanely small?
的确如此。 It is indeed.
我们回到我的 So let's go back to my
然后把它们放大十倍。 and then scale these up by, let's say ten times.
嗯,在哪里 Um, where's
我的面板不见了? my panel gone?
我们在这里做。 Let's just do it here.
这很好。 That's fine.
对另一个孩子来说太早了 And it's too soon for the other one
以便您再次转换和导出它们。 for you to transforms and export them again.
对不起。 Sorry.
一次一个。 One at a time.
然后是另一个 And then the other one
落叶，大的 falling leaves, large
板条箱。 crates.
现在，真空引擎重新导入这两个。 Now, vacuum engine re-import those two.
你只需要选中它们，右键单击，重新导入。 So you just select them, right click them, re-import.
这样好多了。 That's a bit better.
还是会有点小。 Still going to be a little bit small.
它们掉下来的时候看起来还好。不，我们再喝十杯。 Might look fine when they're falling. No, let's go for another ten.
我的意思是，我们可以做到100。 So, I mean, we could have done it by 100.
这就是删除这些 That's delete those
上去送信 and go up and send
甜的。 sweet.
这就是重新导入 So that's re-import those again
我们现在在看 are we looking now
超级巨大的 super huge
但更接近我们所看到的 but closer to what we see
在树上 on the tree
这样就可以了你把它改小一点 which is fine you tweak that down
一旦我们让它们进入。一旦我们让它们进入发射器。 a little bit once we get them into the once we get them into the emitter.
这很酷。至少它们现在和树有点匹配了。 So that's cool. At least they kind of match the tree now.
但我觉得有这么大的树枝看起来有点疯狂 But I think it's going to look a bit mental, having huge branches
从天空中坠落。 falling through the sky.
现在我们做完了。 So now we've done that.
我们需要做的是开始建立一个粒子系统 What we need to do is start to set up a particle system
要做到这一点，基本上我们需要做的是 and to do that, basically what we need to do is
创造一个新的尼亚加拉系统。 just create a new Niagara system.
基本上你要做的就是进入我们的效果文件夹 And basically all you do to do that is if we go into our effects folder
点击右键，选择效果，选择Niagara系统 and right click and then go to Effects and then go to Niagara system here
我们可以用一个新的系统 we can just use a new system
从选定的管理员中选择图像和模板的组合， from selected admins so you can choose a mix of images and templates,
或者，您可以从模板复制中创建一个新系统 or you can do a new system from a template copy
你真正建立的现有系统或创建一个完全空的系统。 existing systems that you really set up or create a completely empty one.
对于这个，我们要做的就是从模板中创建new system So for this, what we're going to do is just do new system from a template
转到下一个。 and go to next.
然后我想可能 And then I think probably
对我们来说最简单的方法就是定向爆发。 the easiest one for us to do to use this from is just directional burst.
我们要让他们从天上飘下来。 We're just going to have them floating down from the sky.
我们就做这个，我们称它为下落。 So let's just do that one and then let's call it falling.
叶子。 Leaves.
效果。 Effects.
当它打开时，你看到的是这个和资产视图完全一样的窗口， So when it opens up, what you have is this window which looks exactly the same as the asset view really,
除了它有一些额外的部分。 except it's got some additional parts.
你在这里有一个工作区 You've got this workspace over here
它有一个它被称为系统概述。 which has like a it's called the system overview.
基本上它看起来和材料或者蓝图的节点视图一样。 And then basically it looks the same as kind of the node view of the materials or the blueprint.
布局也是这样的。 Layouts look like this as well.
但我们要做的是我们的大部分工作，然后你的观众在左边， But what we'll do is most of our work in here and then you have your viewer over here to the left,
你可以用同样的方式在那里移动就像你在资产上做的那样。 you can move around there in the same way that you would do the one in for the assets.
你可以移动光源也可以通过左键点击来移动然后用L移动光源 So you can move the light around and you can also move around it by holding left click and then you move the light around with L
在底部有一个时间轴，它很有用 you have this timeline down the bottom, which is useful, that plays
你的粒子系统一遍又一遍， your particle system over and over and over,
这就是我们现在需要用到的。 and that's pretty much what we'll need to use just now.
你可以编译并保存在这里，然后你还可以查看它的性能。 You can compile and save it here and then you can also look at the performance of it.
如果你按性能键，它会告诉你正在发生什么。 If you press performance, it tells you here what's going on.
所以我们要做的就是从这个开始 So what we're going to do really is just start working with this
把它变成落叶，给它们指明方向。 and turning it from this into falling leaves with some direction to them.
我来给大家讲解一下。 So I'll walk you through that.
是的，我们应该，我们最终应该有一些看起来很酷的东西。 And yeah, we should, we should have something looking quite cool in the end.
我们要做的第一件事就是删除这个基于位置的功能区。 So the first things that we going to want to do is just delete off this location based ribbon.
你可以看到这就是产生这些的原因， You can see that's what's creating these,
这些就像粒子的尾巴。 these like tails on the particles.
我们不需要这些。你可以删掉这些， We don't need those. So you can just delete those,
把它们删掉。 just delete those out.
这很好。 That's fine.
我们想从这里开始 And where we want to start
发射器更新。 is an emitter update.
我想我们可以从这里开始。 We can start here I suppose.
是的。让我们开始，让我们从顶部开始，然后向下。 Yeah. Let's start, let's start at the top and then work our way downwards.
这里有很多不同的 So in here there are all a bunch of different
设置或者你可以对粒子做的事情。 settings or things that you can do to particles.
如果你按加号键， You can then also if you press the plus button,
添加一些额外的东西，这样你就可以像风一样打字了 add things extra so you can type like wind
你可以加上风力。 and you can add in a wind force.
我们可以在这里添加很多不同的东西。 There are a whole bunch of different things that we can add in here.
我会把它们都讲一遍，但都差不多 I'll go through all of them, but in similar
你可以在蓝图或材料系统中添加一些东西。 in ways to the things that you can add in blueprints or in the materials system.
你可以在这里放很多不同的东西。 There's just loads of different things that you can put in here.
如果你按下按钮，它会告诉你你可以添加什么。 If you press the button, it will give you what things you can add.
你可以浏览一下看看这些不同的东西是怎么做的。 So you can just have a flick through these and see what all of the different things do.
它们会在上下文中，所以你不能添加不起作用的东西。 They'll be in context so you won't be able to add things that don't work.
你可以添加到Spawn的东西，你可以看到列表变小了 So the stuff that you can add to Spawn, you can see that list has gotten smaller
我可以添加到这个列表中。 to the list that I can add here.
所以这些都会起作用。 So these will all do something.
一些 Some of
它们可以播放音频之类的东西，所以你可以浏览一下。 them play audio, things like that, so you can have a flick through those.
我要做的只是防止它变得太复杂而无法快速完成 What I'll do is just to stop it from becoming too complex to quickly work through
我们需要做什么才能得到结果。 what it is that we need to do to get the result.
希望你们能从中学到一些东西。 And then hopefully you'll pick up kind of what you can do from there.
如果你想创建不同的系统，那就从这里开始。 And then if you'd like to create different systems, then go on from there.
但是你应该对这里发生的事情有一个基本的了解。 But you should gain a base understanding of kind of what's going on here.
这一切都是以你的名字命名的，这是最好的事情。 It is all named for you, which is the best thing.
这在某种程度上说得通。 So this all make sense to some degree.
这里有些东西让我很困惑。 There are some things in here that baffle me.
除非你是驱魔人，我想他们会的。 Unless you're an exorcist, I imagine they will do.
但这很容易算出来 But it's fairly simple to try and work out
让事情继续下去，这就是我在这里所做的，让系统正常工作。 and get something going, which is what I did here to make the system work.
好的，让我们从Mr。 So yeah, let's start off at Mr.
更新，我们希望循环行为是无限的 Update and we want the loop behavior to be infinite
这样它就会一直持续下去，而不是只发生一次， so that it just keeps going forever and it doesn't just happen once,
这就是我们想要的。 which is what we want.
然后设置循环持续时间。 And then set the loop duration.
这是生命周期的持续时间。 So this is the duration of the lifecycle.
这是多长时间。这是1， So how long so this is going like one,
一，一，一。 one, one one.
如果我们把这个设为(2,1 So if we set this to two, one
两下，两下，然后发射 and two on and two, so it fires off
每一秒钟。 every that amount of seconds.
所以我认为我们应该把它留给两个人。 So I think we're right at leaving it for two.
然后是产卵数。 And then the spawn count.
抱歉，不是产卵数。 Sorry, not the spawn count.
让我们去 Let's go for
我们来看， let's go for,
让我们选一个数字。 let's go for a number like.
你可以看到，如果你放入100个，它就会衍生出100个。 Yeah, well you can see if you put in 100 then it's going to spawn 100 of them.
你放进去一个，它就会射一个。 You put in one, it's going to shoot one.
代入 So let's put in
现在是24个，看看情况如何。 24 now and see how that goes.
我们可以稍后再加入更多。这很好。 We can add in more later. That's fine.
在那之后， So after that,
剩下的并不是非常必要的。 the rest of this is not super necessary.
让我们看下第四个粒子。 Let's move down to particles four.
在这里，这是生命周期中的生命周期 So in here, this is the lifetime in the lifetime
粒子的最大值。 max of the of the particles.
这个集合是随机的。我们可以设两个数。 And that set randomly. So we can set two numbers.
你可以放10和15个粒子，这些粒子就会持续下去 You can put like ten and 15 and those particles will last
10秒最少10秒最多10秒15秒。 for 10 seconds and a minimum of 10 seconds and a maximum of ten of 15 seconds.
这很有用，因为叶结点是 And that's useful because our leaves are going
在空中飘来飘去，然后降落到地面上。 to kind of float around through the air and down towards the ground.
所以我们需要他们的生命中有一段比现在更长的时间。 So we'll need them to have an amount of time on their life that's bigger than what was there.
否则它们就会在空气中漂浮的时候消失， Otherwise they'll just disappear as they're kind of floating through the air,
这不是你想要的。 which is not what you want.
在那之后，我们向下滚动一下 And then after that, let's just have a scroll down through here
看看我们接下来需要设置什么。 and see what we need to set next.
接下来我们需要设置什么? What do we need to set next?
好的。 Okay.
所以我们需要在这里添加一些东西。 So we need to add a few things here.
我们要做的是删除代码中的增加速度。 What we want to do is delete the add velocity in code.
我们保留初始化粒子，因为我们需要它 Let's keep initialize particle because we need that one
然后我们加上速度。 and then let's add in add velocity.
我们不需要电流中的速度。 We don't need the velocity in current.
所以我们加上速度，这是加上速度。 So we add velocity and and this is going to add our velocity.
然后在这里的这个小链条上， And then over here in this little chain bit,
点击它，然后你只需输入 click that and then you want to just type
随机范围向量，然后得到最小值和最大值 random range vector and then this will give us a minimum and maximum
所以我们可以在这些值之间找到一个随机范围 so that we can find a random range in between these values
然后把它加进去。 and then add that to it.
我们想在这里加入的是。 And what we want to throw in here are the.
五个 Five.
第73行。 Lines 73.
好吧?这里有一些变化，这是我们想要的。 Okay? So there's a bit of variation going on there, which is what we want.
接下来我们要做的是应用 And then next what we want to do is apply
最初的力量 initial forces
然后让它保持原样 and then just leave that as is
初始网格方向。 initial mesh orientation.
所以我们在上面做了一些旋转。 So we get some rotation on that.
我们试一下。 So let's try that.
抱歉，不是旋转，是位置。 Sorry, not rotation but position.
然后我们就不去管它了然后再去做下一步的事情。 And then we're going to leave that one as it is and then go to what do we want to do next.
是的，加上一些转动 Yeah, add some rotational
转动速度 rotational velocity
和。2比2比。 and. 2 to 2 to.
我们在这里也加些东西。 Let's add something in here as well.
对于一个随机范围向量 So for a random range vector
在这一点上，跳过 on that as well, skip
这1.5 this 1.5
然后做相反的事情。 and then do the opposite.
然后在。不好意思，在上面的网格方向中，我们添加一些旋转 And then in oh sorry, in the mesh orientation one above, let's add some rotation
还有网格，然后给它， there as well to the mesh and then give that,
我们把它赋给，我想加上a let's give that to oh and I figure let's add a
随机范围 random range there
抵消 to the offset
然后我们要做的是粒子生成的最后一件事。 and then what we want to do is a final thing in particle spawn.
这是在对粒子做一些改变，增加一些位置 So this is doing things to the particles, adding some position
还有方向上的位置和旋转速度。 and some position on the orientation and some rotational velocity as well.
你看不太清楚，因为这些只是粒子。 You can't really see it too much because these are just particles.
但当你有一个网格，你开始看到事情发生。 But when you have a mesh on it, you begin to see things happen.
最后我们要做的就是加一个盒子 What we want to do lastly is just add on a a box
这个位置会设置它们。 location which is going to set them.
所以现在它们都脱离了一个点。 So at the moment they're all kind of dropping out of a point.
当我们设置这个方框或者你也可以看到这个球体， And when we set the box or you can see that sphere as well,
它会把它们从盒子里的各个点上拉出来这取决于你给盒子的大小。 it's going to drop them out from points all over that box depending on the size that you give the box.
如果我们去盒子位置，你也可以做一个板条箱。 So if we go to box location, you can also do a crate as well.
你可以看到它们都是从这个剧本里出来的。 And you can see now they're all kind of coming out of this script.
我们现在要做的就是给出这个 So what we want to do now is just go to give this
还有一个尺寸 a size as well and
我在想我们要怎么做。 just thinking of how we want to make this.
现在让我们试试一千个。 Let's try a thousand a now.
好了，现在你可以看到它从天上掉下来了，很不错。 Okay, so you can see that kind of falling from the sky now, which is nice.
这是我们想要的结果。 This is near what we want to happen.
这有点像小雨，所以这不是我们想要发生的。 It's kind of like a light rain, so it's not exactly what we want to happen.
现在，在我们开始看上面的粒子之前，我想我们应该做的是加入我们的 And now before we start to look at particle up there, I think what we should do is add in our
加入我们的网格 add in our mesh
这样我们就能看到上面的粒子发生了什么，因为这是我们开始相加的地方 so that we can see what's happening in particle up there, because this is where we'll start adding
像旋转之类的东西，所以你会看到它们漂浮在空气中。 things like rotation and stuff to it so that you'll see them kind of floating around in the air.
为了看到它正常工作，你需要在它上面有几何图形，所以你可以看到底部，在它说渲染的地方。 And to see that working properly, you need to have the geometry on it so you can see down at the bottom under where it says Render.
我们现在有一个精灵渲染，我们不需要精灵渲染，因为它只会渲染精灵， We've got a Sprite render at the moment and we don't want Sprite render because that's just going to render sprites,
就是你们能看到的那些小白点。 which is those little white dots that you can see.
但我们想渲染的是如果我们删除精灵渲染，你看， But what we want to render are if we delete that sprite render, you see,
如果取+，所有的都没了。 everything will be gone here if we go to plus.
然后你可以看到这里的环境改变了 And then you can see that the context is changed here
所以你只能在网格渲染中得到这些东西。 so that you can only get these things you can put in mesh render.
所以这 So this
可以让我们在这些粒子被生成的地方渲染网格。 will allow us to render meshes where those particles were being spawned.
接下来你要做的是网格渲染，然后点击加号按钮 So next you just go over here to mesh rendering and then hit the plus button
我们可以给它添加一个网格。 and we'll be able to add in a mesh to it.
所以我们要做的就是找到我们的方法。 So to do this we want to do is just go and find our way.
我们是否有网格，找到落叶，点击它，然后点击使用按钮。 Did we have them in mesh, find our falling leaf, click that and then just hit the use button.
不好意思，是使用按钮。 The use button, sorry.
现在你看到了 And now you see we have
许多落叶。 many falling leaves.
在这一点上你能做什么。 What you can do at this point as well.
现在你可以看到树叶了。 Now you can see the leaves.
如果你浏览到粒子发射器， If you browse to your particle emitter,
我们可以把它放进去。 we can throw that in now.
你可以看到这些叶子 You can see all of these leaves
像这样可怕地落下， dropping terribly like this,
把它举高一点，这样你们就能看清楚了。 maybe put out a bit higher so you can see it.
好吧, Okay,
我们把这个也拉到这里。 let's pull this over here as well.
你首先看到的是也许我们不应该在网格中把它们放大这么大，但你可以把它放在这里。 So the first thing that you see is maybe we shouldn't have scaled them up so big in the mesh, but you can drop that down here.
让我们把它们改成0.3。 Let's change them to like 0.3.
这只是在渲染中缩放网格的大小，然后是网格渲染 So that's just scaling the size of the mesh in render and then mesh render
只是缩放一下。 just scaling that there.
现在它们小多了 Now they are much smaller
像树叶一样从天上掉下来，太棒了。 falling from the sky like leaves, which is awesome.
好，现在我们要开始往粒子更新中添加东西。 Okay, so now we want to start adding stuff to particle updates.
你可以在这里输入发生了什么 So this will be where you put in kind of what happens to you can
你已经可以看到它们以不同的旋转和方向下落这是因为我们在上面加的东西。 you can already see that they're falling in different rotations and orientations and that's because of what we added in up here.
但我们现在要做的是添加一些物质，让粒子 But what we're going to do now is adding things that allow the particles
或者当它们下落时旋转的小网格之类的东西。 or the little meshes to rotate as they're falling and stuff like that.
所以我认为我们要做的第一件事就是改变重力因为现在它移动得太快了。 So I think the first thing that we're going to want to do really is change the gravity because right now it's moving too quickly.
我们把它降为100 So let's just drop that to something like 100
然后他们会更像 and then they'll fall a bit more like
你会期待树叶飘落 you would expect leaves to fall
通过空气，这是甜蜜的。 through the air, which is sweet.
现在我们有了一些凉爽的落叶。 So now we have some cool falling leaves.
现在它们没有旋转和方向。 Now they just have no rotation or direction to them.
我们真正想要的是他们搬走 What we really going to want is for them to move
随着风。 with the wind.
你可以从云层中看到，这对我来说意味着风正在向左移动。 And you can see from the clouds that the means to me the wind is moving over to the left.
我们不希望它们移到左边。 We don't want them to move over to the left.
我们把这些都加进去。 So let's add in those things.
我认为首先，让我们先让风工作。 I think firstly, let's, let's get the wind working first.
如果我们点击粒子更新，就像风一样， So if we just click on Particle Update and just like with wind,
你可以加入风力 you can add in a wind force
现在把它设为2 and let's, let's set it to two now
我们该怎么办? what should we do?
我们该怎么办?从这里100。是啊，我们出去吧 What should we do? 100 from here. Yeah, let's go out there
然后向上推。 and then push that up.
现在，中国，让我们看看你是否能看到发生了什么。 So right now, China, let's see if you can see anything happening.
你不应该有这个能力。 You shouldn't be able to.
那是因为风力不在上面。 And that's because wind force is not above.
所以力和速度，这是你需要的。 So forces and velocity, which you need it to be for it to do that.
现在它们开始向左移动， So you see now they start moving over to the left,
这正是我们想要的，尽管也许， which is exactly what we want, although maybe,
也许他们移动了一点 maybe they're moving a little bit to
把这个拿下来。 bring this down.
它不是发生在树上面。 It's not happening above the trees.
给你。 Here you go.
现在我们有了这些可爱的叶子 So now we have these lovely leaves
朝着一个方向下落，这很好。 falling in one direction, which is great.
这就是我们想要的。 That's what we want.
所以我们需要确保上面有风力力和速度这样就能解出力和速度 So we need to make sure that we have wind force above so forces and velocity so that it solves the forces and velocity
它们确实有效。 and they actually work.
接下来我们要做的是加入一些旋转。 The next thing that we're going to want to do is to just add in some rotation.
我们要做的是 So what we want to do
这就是加上太阳旋转力和速度，就像这样。 for that is just add in a solar rotational forces and velocity, which is kind of like that.
但,是的, But yeah,
所以,所以 so, so
旋转 rotation
现在你会看到所有旋转的东西 and now you'll see all of the rotation stuff
我们加进去的旋转速度现在已经被解出来了 that we added in to add rotation velocity up here is now being solved
我们有一些叶子 and we've got some leaves
在风中旋转，很棒。 spinning around in the wind, which is great.
就是这样。基本上我们已经确定了。对吧? That's it. Pretty much we've we've kind of nailed it already. Right?
这些看起来很甜美的叶子漂浮着 We've got these sweet looking leaves floating
通过空气。 through the air.
现在，我们要做的下一件事是加入另一个叶结点，对吧? Now, the next thing we want to do is add in the other leaf, right?
要做到这一点，我们只需要删除我刚才创建的那个评论框。 So to do that, we're just going to delete that comment box that I've managed to make.
我们只需要复制这个。 We're just going to copy this one.
找到米兰达的地方，就能找到另一片叶子 And where we've got Miranda, we just find the other leaf
在这里 that in there
然后因为它们更大，它们会更重一些。 and then because they're bigger, they'll be a little bit heavier.
所以让我们给它们更多的重力。 So let's give them some more gravity.
让我们设为300，它们应该下降得更快 So let's give that like 300 and they should fall quicker
比其他的要多。 than the other ones.
这些应该有两个地段 And those should have two lots
树叶从天空飘落， of leaves falling through the sky,
这很好。 which is great.
现在你会注意到我们没有碰撞。 Now what you'll notice we don't have is some collisions.
所以现在这些粒子只是从地板上掉下来 So these particles at the moment are just kind of falling through the floor and
考虑到它们的叶结点和它们的旋转等等。 considering considering their leaves and the rotation that they have and so on.
所有这些不同的因素，我的意思是，我们不能在这里做这么多 And all of these different factors is really I mean, we're not going to be able to do so much here
不要太深入。 without getting too in-depth into this.
我要做的是加入一些碰撞，然后有它们 So what I'm going to do is let's add in some collision and then have them
所以它们会逐渐停下来，然后在消失和死亡前离开几秒钟。 so that they come to a gradual stop and then they'll leave for a few seconds before they disappear and die.
以及我们的方式 And the way that we
点击粒子更新，然后输入碰撞 do that is by just hitting particle update and then just typing collision
我们把它拉到风力下 and let's just pull that under wind force
让我们 and let's
在这里做一些事情。 do some things here.
所以我们所做的我们所做的最初应该只是给我们一些碰撞。 So what we've what we've done should initially just give us some collision anyway.
你们会看到这个。 So you'll see that one.
他们只是在地板上打滚，试图找到另一个。 They're just rolling along the floor and trying to find another one.
好了。还有一个在地板上打滚。 There you go. There's another one rolling on the floor there.
大的还在坠落，因为我们还没有和它们相撞。 The large ones are still falling through because we've not had a collision to them.
这里还有一个。 And there's another one there.
所以你可以看到它们。 So you can see them.
他们只是沿着地板继续走。 They just continue on along the floor.
我们可以在这里添加一些设置，比如一些反弹。 So there are a few settings here that we can add in there, some bounce.
这就像归还， So this like restitution,
如果你加0，它们一开始就会停止。 if you add in zero, they'll stop initially.
嗯，它们根本不会有任何反弹。 Well, they won't have any bounce at all.
如果他们有一个，那么他们反弹的力量和他们撞击地面的力量是一样的。 And if they have one, then they'll bounce with exactly the same amount as force as they hit the ground with.
让我们给他们 So let's give them
0.3. 它们不应该很有弹性。 0.3. They shouldn't be very bouncy.
剩下0.2。实际上，我们来做一下。 That leaves 0.2. Actually, let's do that.
然后是摩擦力。 And then friction.
摩擦系数定义了粒子在表面上减速时减速的速度。 The friction coefficient defines how quickly a particle will slow down as it slows across the surface.
我们给它一个。 So let's just give that one.
让它慢一点，也许0.8。 Let's make it slow down very quickly, maybe 0.8.
让我们这样快速地减速。 Let's make it slow down very quickly that way.
之后我们要做的就是 And then all we do after that is
碰撞时控制滚转，应停止 control roll on collision, which should stop
所有的旋转的东西，当它撞击地面的时候。 all of the rotational stuff that we've got going on when it hits the ground.
我们把它打开，然后做这个 So let's turn that on and then let's do that
复制粘贴到这里。 for I mean, copy and paste over here.
我们确实可以拉出风来逼落风下的力 We can indeed pull out to force the wind falls under wind force
然后我们来看看是什么样子。 and then let's have a look and see how that looks.
看看我们能不能看到你落地。 See if we can see you hit the ground.
所以它们会稍微着地，然后旋转，然后停下来。 So they hit the ground a bit, spin around to then stop.
所以我们有一些树叶落在地上，非常漂亮。 So we're getting some leaves falling on the ground here, which is quite nice.
所以我想我们可能要做的就是阻止这种情况 So I think probably what we're going to want to do just to stop this
持续一阵风只是减少了正在发生的事情。 being a constant gust of wind is just reduce the amount that is happening.
所以如果我们能让它重新说话， So if we just make this speak again,
去到发射器，更新它们，然后改变这个形式， go over to emitter, update they and then change this form,
每个数到十 count down to ten for each
你应该有一半的叶子 you should have half the amount of leaves
应该感觉更自然一点吗 should feel a little bit more natural
美味极了。 perfecto.
保存一下。 So let's save that.
接下来是落叶。 And here we have our falling leaves next.
我们接下来要做的是类似的事情。 What we'll move on to is just doing a similar thing.
其余的系统以类似的方式工作。 The rest of the systems work in a similar way.
我们只是劫持了一个系统然后让它为我们想要的工作。 We're just going to kind of hijack a system and then make it work for what we want.
但是尘埃微粒和小精灵的工作方式非常相似。 But the dust motes and the little sprites work in very similar ways.
只有一个，我们将有更小的和包含的，而另一个将是一个非常大的区域。 Just one, we're going to have much more small and contained, and the other one is going to be a very much larger area.
然后其中一个会有一点质量而另一个不会。 And then one of them will be a little bit massive and the other one won't.
但这两个相当简单。 But those two will be fairly simple.
但是，希望你已经掌握了更多的知识 But yeah, hopefully you've gotten a bit more to grips
用微系统 with the micro system
我也会尝试一些其他的力量。 and I would try some of the other forces as well.
它们真的很酷，会把大量的粒子扔进去 They're really cool and throw loads of particles in
然后再尝试其他的力，看看能得到什么很酷的效果。 and then play around with the other forces and see what kind of cool effects you can get.
你可以用这个系统做出一些非常甜的东西，但你可以看到它只做落叶有多快，这很好。 You can make some really sweet stuff using the system, but you can see how quickly it was just to make falling leaves, which is nice.