(以下英文部分及图片皆来源于RealFlow官方文档:http://support.nextlimit.com/display/rf2014docs/Your+First+Project)

One of the most famous RealFlow scenes is a shattering glass after being hit by a bullet. The idea behind this setup is very interesting, because it is a combination of fluids, rigid bodies, and slow motion effects. In this tutorial you will learn how to recreate this simulation with RealFlow's built-in tools. Please note that this simulation is split into two parts: in the first simulation a resting and calm fluid is created. Then, the interaction between the fluid and the smashing glass is done in a separate action.

RF的一个著名场景是玻璃杯被子弹击中破碎。相关设置背后的想法非常有趣,因为该场景是流体、刚体与慢运动效果的组合。在本教程中,你将学到如何使用RF的内置工具来创建该仿真。请注意该仿真被分成两个部分:首先创建一个静止的fliud,然后单独创建该fliud与打碎的玻璃杯的相互作用。

The result of the workshop rendered with Maxwell Render.

使用Maxwell渲染的结果

Here is the nodes list for the first part – the relaxed fluid:(第一部分的节点列表 — 静止液体:)

  • 1 glass object(玻璃杯对象)

  • 1 “Gravity” daemon(重力场)

  • 1 “k Volume” daemon(体积控制场)

  • 1 “k Speed” daemon(速度控制场)

  • 1 “Drag Force” daemon(阻力场)

All scene elements can be added from RealFlow's “Edit” menu:

  • Add > Objects | Emitters | Daemons

  • RealFlow nodes can be moved, scaled, and rotated with the W, R, and E keys.

  • Imported objects from SD files have to be unlocked before they can be transformed with Selected object > Node Params > Node > SD ↔ Curve

  • Viewport perspective is changed with the 1, 2, 3, and 4 keys.

  • Shading modes are toggled with the 7, 8, 9, and 0 keys.

The Setup – Glass Filling(设置—填充玻璃杯)

For this scene, the milk glass from the “Wetmap Creation” quick start tutorial is used. Please bear in mind that this tutorial is based on RealFlow's standard scale, and therefore the objects might appear rather big. The very first task is to fill the glass with milk:

本场景使用“Wetmap Creation”快速使用指南中的牛奶杯。请注意该指南基于RF的基准尺寸,所以对象看起来可能很大。首要任务是先将杯子填满。

  • Import the glass with the Ctrl/Cmd + I command.

  • 使用Ctrl/Cmd + I导入杯子
  • If you want to reposition it unlock it under Node Params > Node > SD ↔ Curve.

  • 如果想移动它,在Node Params > Node > SD ↔ Curve 下解除锁定
  • With the M key the object can be moved.

  • 使用M键移动对象
  • Add “Circle” emitter from Edit > Add > Particle Emitter and place it inside the glass. It can be moved with the M key as well. If you have to rescale the emitter use the R key.

  • 添加Circle发射器,并将其置于杯子内。同样可以使用M键移动,使用R键缩放。
  • To get more particles, the emitter's “Resolution” value has to be increased under Node Params > Particles. The value depends on the size of the glass object and the scene's scale. For the fluid in the rendered image, a value of 30 has been used.

  • 为增加粒子数量,在Node Params > Particles下调整增加发射器的 Resolution 值。该值取决于杯子尺寸与场景尺寸。在上面的渲染图中该值为30。
  • Other settings are: Int Pressure = 0.5, Viscosity = 4.0, Surface Tension = 10

  • 其他设置为:Int Pressure = 0.5, Viscosity = 4.0, Surface Tension = 10
  • Under “Circle”, set “V/H random” to 1.0 each.

  • 将Circle子菜单中的V/H random值设为1.0

A very important thing to check is the glass object's “Liquid - Particle Interaction” panel:

一件非常重要的事是查看杯子对象的Liquid - Particle Interaction面板:

  • Change “Collision distance” to 0.01. This will bring the fluid particles closer to the object's surface.

  • 将Collision distance(碰撞距离)值设为0.01。这将使液体粒子更接近杯子对象表面。

Finally, some daemons are necessary:

  • Edit > Add > Daemons > Gravity | k Volume

  • k_Volume01 > Node Params > k Volume > Fit to object > select glass node

Now, the scene can be simulated:

现在可以对场景进行仿真了:

  • Click on the small lock icon to left of the timeline. With this action, RealFlow neither counts frames (no matter how long you simulate, the timeline slider will remain at 0), nor writes out any files. This mode is perfectly suited to fill the glass.

  • 点击时间轴左侧的小锁图标。该操作使RF不计算帧数(无论仿真运行多长时间,时间轴都停留在第0帧处),也不写入任何文件。该模式特别适合用来填充杯子。
  • Simulate.

If you think that the glass is properly filled (between one half and two thirds) stop the emission of particles:

如果觉得杯子填充得差不多了(在1/2至2/3之间)停止粒子发射:

  • Stop the simulation with another click on “Simulate”.

  • 再次单击Simulate停止仿真。
  • Highlight the “Circle01” and go to Node Params > Particles > Max Particles.

  • 高亮Circle01,转到Node Params > Particles > Max Particles
  • Also open the “Statistics” panel and look for “Existent Particles”.

  • 打开Statistics(统计)面板,寻找Existent Particles(现存粒子)
  • Let's say the value there is around 110,000. Under “Max particles” you enter 125,000 (or any other value greater than 110,000), and resume the simulation.

  • 这里现存粒子数(Existent Particles)大约是110000,少于最大粒子数(Max particles)125000,仿真继续。
  • The emission will stop automatically when the “Max Particles” limit has been reached.

  • 当Max Particles(最大粒子数)限制达到时粒子发射将自动停止
  • Let the simulation run for a few more minutes.

  • 让仿真再运行几分钟。

Relaxing the Fluid(使液体静止)

In the next step you create a calm fluid surface:

下一步创建静止液体表面:

  • Unlock the simulation with another click on the lock icon.
  • 再次点击lock图标解锁,继续仿真
  • If the emitter is not selected, click on it again.
  • 如果没有选择发射器,再次点击它
  • Node Params > Initial State > Use Initial State > Yes(使用初始状态)
  • Make Initial State
  • 创建初始状态




  • Click on the small triangle next to the “Reset” button and enable “Reset To Initial State”.(重置到初始状态)
  • Reset(重置)

For the relaxation process, two more nodes are required:

静止过程需要另外两个(关键控制帧)节点:

  • Add a “k Speed” daemon.(添加速度控制场)

  • Node Params > k Speed > Limit & Keep > Yes(限制速度)

  • Max speed > 1.0

  • Max speed > right-click > Add key(添加关键帧)

  • Shift the timeline slider to frame 200 (the fluid disappears).(将时间轴调至200帧)

  • Max speed > 0.01

  • Max speed > right-click > Add key(添加关键帧)

  • Reset (the fluid reappears).(重置,液体重现)

  • Add a “Drag Force” daemon.(添加阻力场)

  • Under Drag Force > Drag Strength create two keys with values of 0 (f = 0) and 75 (f = 200).(在第0帧与第200帧处分别设置阻力强度为0与75,作为关键控制帧)

  • Simulate. At frame 200 the fluid should be calm and relaxed.(开始仿真,200帧处液体应静止)

  • Create a new initial state for your final simulation as described above.(按上述操作,为最终仿真创建一个新的初始状态)

  • Reset.(重置)

The fluid's relaxed state.

液体静止状态

The Setup – Glass Shattering(杯子参数设置)

  • Remove the “k Speed” and “Drag Force” daemons.(移除速度控制场与阻力场)

  • Click on the small triangle next to the “Simulate” button and open “Options...”.(点击Simulate旁的小三角打开设置)

  • Under General > FPS Output enter 72, 75, or 90 (according to your film/TV system).(根据系统实际情况,设置每秒输出帧数)

  • Add a “Sphere” node – this object will serve as a bullet. In the viewport's “Front” mode (2) shift the bullet to the right.(插入一个球形节点作为子弹)

  • Add a “Cube” node, position it beneath the glass, and rescale it. Make it big, because it is the ground object.(插入一个立方体节点于杯子之下并放大作为地面)

  • Add a “Cone” node and rescale/reposition/rotate it until you get a setup similar to the image below. The “Cone01”object should be aligned with the bullet, because it is the zone of impact.(插入一个圆锥节点并调整至如下图位置与形状,作为撞击区域,该圆锥对象应该与子弹连成一线。)

Fragmenting the Glass(给杯子划分网格)

The bullet should hit the glass exactly where the cone is intersecting the glass. This is also the zone with the highest density of fragments:

子弹应该击中圆锥与杯子相交的部位,那里也是杯子网格划分最密的地方。

  • Select the glass node.(选择杯子节点)

  • Tools > Fracture Tool > Voronoi By Steering Geometry...(采用Voronoi算法划分)

  • Rough number of pieces > 130 (or any other number)(确定大概划分块数)

  • Click on the “...” button and choose “Cone01”.(选择圆锥)

  • Lowest/highest concentration rate > 0.007

  • Transition length > 0.2

  • OK

  • A new MultiBody with a “_fractured01” suffix appears.(出现一个带有_fractured01后缀的新组合体)

  • If you are happy with the results “Cone01” and the original glass node can be deleted.(如果对Cone01结果满意,可以将初始杯子节点删除)

The last two parameters are used to control the transition from the impact zone to the outer areas of the glass. Both settings avoid that the glass will be broken into lots of very small, almost uniform, pieces. If you are not satisfied just delete the newly created object, and repeat the fracturing process with other values.

最后的两个参数用于控制从撞击区域到杯子外部区域的过渡。所有的设置应避免杯子破碎成许多非常小的,几乎一致的碎片。如果不满意,删除新创建的对象,重复以上设置过程,重新设置参数即可。

The Rigid Body Parameters(刚体参数)

In this step, the dynamics properties will be activated and adjusted. Let's start with the fractured glass node:

本步骤将激活并调整动力学属性,现在开始处理碎杯子节点:

  • Node > Dynamics > Active rigid body(节点>动力学>激活刚体)

  • Rigid body > @ object friction > 0.5(摩擦力)

  • Rigid body > @ elasticity > 0.5(弹性力)

Then the ground object (“Cube01”):(地面对象)

  • Node > Dynamics > Passive rigid body(从动刚体)

Finally, the bullet (“Sphere01”). This node will be animated, but has rigid body features as well:(子弹也有刚体特征)

  • Node > Position > X (the first value from the trio)

  • Create a key-framed animation from right to left (or left to right) using the method from “Relaxing the Fluid”. The bullet should be fast to get a vivid splash: 20 m in 70-80 frames is a good value.

  • 使用“Relaxing the Fluid”中的方法创建一个关键帧动画(从左至右或相反)。为实现生动逼真的晃动,子弹的速度要快,70-80帧移动20m是较好的速度值。
  • Node > Dynamics > Passive rigid body(从动刚体)

The combination of animation and rigid body properties is interesting, because the bullet's motion path and speed can be controlled, but it is able to interact with other rigid bodies. In this state, the bullet has infinite force.

将动画与刚体属性结合起来非常有趣,因为子弹运动路径和速度可以控制,但是还可以与其他刚体相互作用。这里,子弹有无限动力。

Joining the Pieces(连接碎片)

Currently, the fractured glass will fall apart and the fluid will pour out, because the pieces are not connected. There has to be a way to reconnect them, but these joints have to break when the bullet hits the glass. The solution is MultiJoints – all panels are located under the “MultiJoint01” element's “Node Params”:

目前,杯子碎片将四处散落液体也将洒出,因为碎片不是相连的。需要重新连接碎片,但是当子弹击中杯子时原来的连接已经破坏。解决方法是“MultiJoints”(多连接)。

  • Edit > Add > Objects > MultiJoint

  • Creation > Objects A > fractured glass node

  • Creation > Objects B > fractured glass node

  • Forces > Force max mode > Constant limit

  • Collisions > Enable if break > Yes

  • Break > Break if distance exceeded > Yes(如果距离超出则破坏断开)

  • Creation > Create/Recreate

The “Forces” panel contains a “@ Max force” parameter and adjusting this value is the most difficult part. The joints have to be strong enough to resist the glass body's own weight and the weight of the fluid. Start with a rather high value, e.g. 250,000 and trigger the simulation. Let it run for around 5-10 frames:

Forces面板含有一个“@ Max force”参数,将该值调整合适最为困难。连接需要足够强以支持杯子与液体的自重。先试以较大值,如250000,进行仿真,运行约5-10帧。

  • If you can see orange or red joints then the forces are not strong enough and the links break. In this case you have to increase “@ Max force”.

  • 如果可以看到橘色或红色结点且由于结点力不够大以至连接破坏。这种情况应该增加 “@ Max force”值
  • Go to Statistics > @ Max force used since creation. This read-only field gives you a hint of the occurring forces, and can be used as a starting value.

  • 进入 统计>@创建以来使用的最大力。该只读域给出当前力的提示,可以用于初始值。
  • Do not use the displayed value 1:1, but add a 10-20% buffer and transfer the value to “@ Max force”.

  • 不要直接使用显示值,增加 10-20% 的裕度。
  • Reset and simulate again. If all joints are green and intact you can go on simulating. Otherwise you have to further increase “@ Max force”.

  • 重置并仿真。如果所有结点都为绿色且完好则可以继续仿真,否则需继续增加@ Max force值。
  • For the rendered image at the beginning of this tutorial, “@ Max force” has been set to 150,000 with a “@ Max force random” value of 100.

  • 本教程开头处的渲染图,@ Max force为150000,@ Max force random值为100。

The Simulation and Previews(仿真和预览)

It is very likely that you will have to create different versions until you get the desired result – and these versions have to be compared. The easiest way to do this is to use RealFlow's preview engine:

很可能需要尝试多次才能得到想要的结果,并且多个版本之间需要相互比较,最简单的方式是使用RF的预览引擎:

  • Adjust the point of view by rotating, zooming and panning the viewport.(调整视角)

  • You can add a camera, but this step is not mandatory.(可以添加相机但不是必须的)

  • Go to frame 0, and click on Playback > OpenGL.

  • RealFlow goes through the simulation and records the viewport frame by frame.(RF进行仿真并逐帧记录视角)

  • If the timeline slider stays at frame 0 please check if the maximum preview frame is not 0.(如果时间轴始终停在第0帧,检查最大预览帧数是否为0)

  • Once the frames have been recorded, a “Movie Player” window is opened automatically. After a few seconds you can watch the simulation in real-time.

  • 一旦帧被记录,会自动打开一个电影播放器,几秒之后可以看到实时仿真结果。
  • Click on the player's “Save” icon, and write the movie to disk.(点击播放器保存图标,将movie写到磁盘)

RealFlow在线教程翻译(5)——Shattered Glass (破碎的玻璃杯)相关推荐

  1. RealFlow在线教程翻译(2)——Foam with SPH Fluids(基于平滑粒子流体动力学算法(SPH)的流体泡沫)

    (以下英文部分及图片皆来源于RealFlow官方文档:http://support.nextlimit.com/display/rf2014docs/Foam+with+SPH+Fluids) 注:S ...

  2. RealFlow在线教程翻译(4)——Calm Fluid Surfaces (静态流体表面)

    (以下英文部分及图片皆来源于RealFlow官方文档:http://support.nextlimit.com/display/rf2014docs/Calm+Fluid+Surfaces) When ...

  3. RealFlow在线教程翻译(1)——Your First Project(你的第一个项目)

    (以下英文部分及图片皆来源于RealFlow官方文档:http://support.nextlimit.com/display/rf2014docs/Your+First+Project) Now i ...

  4. RealFlow在线教程翻译(11)——SPH - Particles (Liquid) (液体粒子)

    (以下英文部分及图片皆来源于RealFlow官方文档:http://support.nextlimit.com/pages/viewpage.action?pageId=22217380) This ...

  5. ae破碎效果在哪_AE教程 | 五分钟制作文字破碎效果

    原标题:AE教程 | 五分钟制作文字破碎效果 UBOOK知识在线 一个很认真的知识分享平台 愚人节快乐呀,亲爱的同学们- 今天又到了CC老师的AE小课堂啦,今天给大家带来的是一个很棒的特效效果--破碎 ...

  6. 【研究生学术英语读写教程翻译 中国科学院大学Unit7】

    研究生学术英语读写教程翻译 中国科学院大学Unit7 Unit 7 Why Is the Story of Materials Really the Story of Civilisation? 为什 ...

  7. Away3D 4.0官网教程(翻译)

    使用Away3D 4.Stage3D 创建3D游戏和应用程序 (此帖每天都会更新,一定让大家完全的搞明白) 补充区:        'vase.awd' 可以使用 Prefab3D打开(在帖子后面回复 ...

  8. Unity3D Shader官方教程翻译(三)

    Unity3D Shader官方教程翻译(三) 1.Shader语法:Pass 1个Pass块可以使一个几何物体被一次渲染. Pass { [Name and Tags] [RenderSetup] ...

  9. 分享一个python cookbook的在线教程地址

    分享一个python cookbook的在线教程地址: http://python3-cookbook.readthedocs.org/zh_CN/latest/ 翻译者:熊能 转载于:https:/ ...

  10. Dapper官方教程翻译8:Dapper方法之QueryMultiple(转)

    Dapper官方教程翻译8:Dapper方法之QueryMultiple 2019年02月28日 10:42:22 Day_and_Night_2017 阅读数:120 QueryMultiple方法 ...

最新文章

  1. android.view.InflateException: Binary XML file line #16: Binary XML file line #16: Error inflating
  2. php 分页类使用,php 分页类
  3. 分布式消息队列 — RabbitMQ(3)
  4. python解析AMF协议
  5. 人工智能们再也不用担心撞上玻璃橱窗了
  6. spring mvc 与 jasper Report集成
  7. NOIP201202寻宝
  8. Shiro框架--将Shrio的session改成HTTPSession数据
  9. 2009年1月5日 洛基网络教室听课笔记
  10. python跟excel_Python与Excel 不得不说的事情
  11. VSCode: 快捷键大全
  12. fraction类的创建java_设计一个表示分数的类Fraction。这个类用两个int类型的变量分别表示分子和分母。(Java语言)...
  13. 2022五一杯数学建模
  14. 无线ap ntp服务器,我有一优科 ZoneFlex 7982 的无线AP,怎样可以进AP系统进行设置...
  15. (三)feild ii 相控阵聚焦成像:RF信号到成像全过程
  16. OKCC外呼中心为什么要把语音引入WEB中?
  17. 76.0.3809.100版本的谷歌浏览器对应能用的chromedriver版本
  18. (转)视觉工程师必须知道的工业相机50问,绝对干货!
  19. c语言程序执行不了,为什么C语言程序中if和else后的语句执行不了?
  20. 结巴(jieba)分词的使用-Java实现

热门文章

  1. PCIE实现PIO模式寄存器读写调试记录
  2. java对接支付宝三方登录
  3. 怎么删除网络文件服务器的帐号,linux连个文件都删除不了,什么鬼!
  4. Qt交叉编译移植arm开发板
  5. hdu5294Tricks Device 最大流之最小割
  6. java linux路径带括号,java执行linux命令 括号
  7. 网易互娱2022校园招聘在线笔试题 — 游戏测试开发工程师2021.8.28(回忆版)
  8. chromecast 协议_如何驯服Chromecast的后台数据使用情况
  9. 微商公社新兵连第一天
  10. 拳王虚拟项目公社:你最重要的事情是什么?