UE5.1_Niagara基础_官方内容示例_4.3
4.3 Mesh Orientation vs. Rotational Force【网格体朝向和旋转力的对比】
总结:
1:直接设置类型:Initial Mesh Orientation【初始网格体朝向】模组、Update Mesh Orientation【更新网格体朝向】模组,直接设置朝向,不受其他力或速度的影响,低性能消耗。
2:施加力类型:Mesh Rotation Force【网格体旋转力】模组、Drag【阻力】模组里的旋转阻力,用接近现实的物理方法来计算旋转,受网格体尺寸和质量影响,高性能消耗
3:施加速度类型:Add Rotational Velocity【添加旋转速度】模组,添加的旋转速度叠加到原本的旋转速度中,叠加时不受网格体尺寸和质量影响,之后则会受到力和其他叠加旋转速度的影响,中性能消耗
Calculate Size and Rotational Inertia by Mass【计算大小和使用质量计算转动惯量】模组:通过尺寸计算大小,并使用密度计算质量,最后计算转动惯量
Calculate Mesh Scale【计算网格体比例】:为True时,模组计算结果写入Particles.Scale,为False时,模组计算结果写入Particles.SpriteSize。
(仅Calculate Mesh Scale为True)Initial Model Dimension【初始模型尺寸】:即网格体尺寸(Approx Size)
Manually Entered Density(kg/m^3)【手动输入密度】
Density by Material Type【通过材料类型获得密度】
Rock【石头】
Steel【钢铁】
Wood【木头】
Water【水】
Paper【纸】
Styrofoam【泡沫塑料】
Mass Modulation【质量调整】:质量乘数
(仅Calculate Mesh Scale为True)Model Proportions【模型比例】:影响质量在网格体各轴的分布
(仅Calculate Mesh Scale为False)Width【宽】:影响质量在图片 X轴的分布
(仅Calculate Mesh Scale为False)Height【高】:影响质量在图片 Y轴的分布
(仅Calculate Mesh Scale为False)Depth【深】:影响质量在图片 Z轴的分布
Mesh Rotation Force【网格体旋转力】模组
Rotation【旋转】:设置施加到各轴的旋转牛顿力
Coordinate Space【坐标空间】
Apply Initial Forces【应用初始化力】模组:把初始力转换为初始速度
Apply Force to Velocity【应用力到速度】
Apply Rotational Force to Rotational Velocity【应用旋转力到旋转速度】
Apply Fore to Position【应用力到位置】
(仅Apply Fore to Position)Position Force Warmup Time【位置力热身时间】:物理力对位置影响的作用时间
Add Rotational Velocity【添加旋转速度】模组:添加旋转速度并叠加到原本的旋转速度中
Rotation Rate【旋转速度】
Coordinate Space【坐标空间】
Direct Orientation Modules (Initial Mesh Orientation, Update Mesh Orientation) Use a "direct set" approach to the orientation of mesh emitters. They directly assign an orientation value which creates a constant rotation rate irrespective of the size or mass of the mesh particles.
Notice in this example the particles always rotate at the same constant speed regardless of size/mass. Think of it as a constant "rotation rate".
This is an inexpensive approach and gives users direct control over rotation based on particle age or other metrics.
In this model, rotational drag (an option on the drag module) has no effect.
【直接设置朝向的模组(初始网格体朝向模组,更新网格体朝向模组)使用一种“直接设置”的方法来设置网格体的朝向。它们直接分配一个朝向值,从而创建一个恒定的旋转速率而不管网格体粒子的大小或质量是多少】
【留意这个示例中粒子总是以相同的恒定速度旋转而不管它的大小或质量。可以认为它是一个恒定的“旋转速率”。】
【这是一种低性能消耗的方法并给用户直接根据粒子寿命或其他指标控制旋转。】
【在这个模型中,旋转阻力(在拖拽力模组里的选项)是无效的】
Mesh Rotational Force modules are a force based rotational system which deals with a more physical approach to rotations. "Mesh Rotation Force" and "Drag", combine to create a force based model where Mass and Rotational Inertia are factored into the final rotation values.
This model relies on Mass being set per particle, then we derive a mesh scale from that mass value by using the "Calculate Size by Mass" module suite. Notice this model requires "Initial Model Dimensions" to be set, this is the size of the mesh, as imported in cm, and can be found by hovering over a mesh thumbnail in the content browser.
We still directly set an initial orientation in spawn, but in update we apply a force, and rotational drag, and then we allow those to integrate using a special solver.
Notice in this model, large meshes rotate more slowly as they have higher rotational inertia, drag has an effect on the speed of rotation, and so on.
This model is a bit more expensive but can create desirable results in the case where you want larger particles to respond more realistically to stimulus.
【网格体旋转力模组是一个基于旋转系统的力,这系统更多是以物理方式处理旋转。“网格体旋转力”模组和“拖拽力”模组,结合起来形成合力并基于受质量和转动惯量影响的模型来形成最终旋转值】
【这个模型依赖于每个粒子的质量,然后我们通过使用“计算大小和使用质量计算转动惯量”模组从质量数值获得一个适合的网格体比例。注意此模组需要设置“初始的模型尺寸”,这是网格体的尺寸,单位为厘米,这尺寸可通过鼠标悬停在内容浏览器的网格体缩略图上获得。】
【我们仍然在生成时直接设置一个初始的朝向,但在粒子更新阶段应用一个力,以及旋转阻力,然后我们允许它们使用特殊计算合并在一起】
【留意此模型,大网格体因为有更高的转动惯量而旋转变慢,阻力也能影响旋转速度,等等】
【这模型消耗更多性能但可以创造出需要的结果,比如当你需要让更大的粒子反应得更接近现实的情况】
Rotational Forces accumulate into a Particles.RotationalVelocity variable and persist from frame to frame. Here we give the particles an initial "kick", by applying a Rotational Force and then applying those forces to the Rotational Velocity. We use this method as it factors mass into the initial rotational velocity.
This then gets solved by the solver in update, and rotational drag eventually slows the particles down.
If you want the initial "kick" to not factor in mass, you can use an "Add Rotational Velocity Module" to directy set a rotation speed in particle spawn.
【旋转力积累进Particles.RotationalVelocity变量并能保持到下一帧。这里我们给粒子一个初始的“一脚”,通过施加旋转力然后应用这个力到旋转速度。我们使用这种方法使质量影响初始旋转速度】
【这在更新时被结算器结算,旋转阻力最终使粒子变慢】
【如果你想这初始的“一脚”不受质量影响,你可以使用“添加旋转速度”模组来直接在粒子生成阶段设置旋转速度】
As a fun little trick, we assign RotationalVelocity to the "Find Kinetic and Potential Energy" module (under advanced options) which returns us an output we can use to drive the emissive value of the Mesh Particle material. The faster the mesh spins, the brighter it gets.
【作为一个有趣的小技巧,我们安排旋转速度到“获得动能和势能”模组(在高级选择中),并用输出来驱动网格体材质的自发光值。网格体转得越快,网格体越亮】