深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html

group添加modifier的方式:

modifier

An abstract class that allows to modify the behaviour of a group of particles over time.

调节器是为了给粒子生命周期过程提供外力的功能,给粒子加上物理功能

它有以下几种:

碰撞弹力设置 Collider

附加喷射器 EmitterAttacher

阻力系数 Friction

引力 Gravity

磁石 PointMass

随机力 RandomForce

旋转 Rotator

旋涡 Vortex

销毁区域  Destroyer

方向力区域 LinearForce

障碍物区域  Obstacle

Collider

Creates and registers a new collider.

Collider::create(float elasticity = 1.0f)

设置粒子的碰撞弹性系数

EmitterAttacher

附加喷射器,其实是附加了一个新的粒子group

需要将另加的这个group和group下面的emitter都传入,有一点要注意。这个group需要手动加入system

Friction

摩擦力,阻力系数

SPK::Friction::create(float value = 0.0f)

阻力范围0~1

Gravity

万向引力,重力

Gravity::create(const Vector3D & value = Vector3D())

重力大小由value的长度决定

PointMass

磁石

A Modifier defining a point with a mass that attracts or repels particles.

在某个位置顶一个吸引或者排斥粒子的磁石

引力的大小是粒子到点质量的距离的平方的函数。

offset 的存在是防止距离为0时,出现无穷大的力

mass 为正数是引力  为负数是排斥力

RandomForce

随机力

minVector    最小的方向与力

maxVector   最大的方向与力

minPeriod    最小的受力时长

maxPeriod   最大的受力时长

Rotator

A Modifier allowing to rotate particle with their rotation speed.

该修改器不是直接控制粒子角度,而是允许控制粒子旋转速度。

For this modifier to work, the PARAM_ANGLE must be enabled (and can be random in addition but not mutable or interpolated) and the PARAM_ROTATION_SPEED must be at least enabled in the model of the group of particles that are modified

注意这个不是单独使用的modifier需要加插值器interpolator,必须启用PARAM_ANGLE(并且可以是随机的,但不是可变的或插值的),并且必须至少在修改的粒子组的模型中启用PARAM_ROTATION_SPEED

Vortex

A modifier defining a vortex in the universe.

涡旋是围绕中心的旋转流动。 它的中心(涡旋眼)被定义为空间中的一条线

除了它的中心线,涡流由2个速度定义:
•旋转速度,定义涡旋眼周围的旋转速度。      rotationSpeed
•吸引速度,定义了粒子被涡旋眼吸引的速度。    attractionSpeed

ZonedModifier

与区域有关的调节器

An abstract modifier with a zone attached to it.

Destroyer

A Modifier that destroy particles.

进出此区域会销毁

LinearForce

A modifier applying a generic linear force on particles.

进出此区域会给一个方向力

Obstacle

一个障碍区域

bouncingRatio 反弹力

friction 摩檫力

[原][粒子特效][spark]调节器modifier的更多相关文章

  1. [原][粒子特效][spark]粒子系统system、主节点group、渲染器render

    深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html system: A class defining a complete sy ...

  2. [原][粒子特效][spark]事件action

    深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html group调用action的地方: 可以看到使用action的可以是出生一次 ...

  3. [原][粒子特效][spark]插值器interpolator

    深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html 插值器是体现粒子生命周期变化的功能 group使用到插值器的方式: 可以看到 ...

  4. [原][粒子特效][spark]发射器emitter

    深入浅出spark粒子特效连接:https://www.cnblogs.com/lyggqm/p/9956344.html group添加emitter的方式: eimtter: 上图是spark源码 ...

  5. [原][粒子特效][spark]深入浅出osgSpark

    背景: 目前我使用的spark粒子特效库是2.0 这个库好像是原来鬼火引擎的一部分,需要从github上找 现在我要将其使用到我自己开发的基于osgearth开的三维地图引擎中 步骤: 1.编译spa ...

  6. [原][osg][粒子特效]spark粒子特效生成流程

  7. Qt移动应用开发(四):应用粒子特效

    Qt移动应用开发(四):应用粒子特效 上一篇文章介绍了Qt Quick是如何对帧动画进行支持的.帧动画的实现离不开状态机.而状态机.动画和状态切换(transitions)则是Qt框架的核心内容.也就 ...

  8. 【原】Learning Spark (Python版) 学习笔记(三)----工作原理、调优与Spark SQL

    周末的任务是更新Learning Spark系列第三篇,以为自己写不完了,但为了改正拖延症,还是得完成给自己定的任务啊 = =.这三章主要讲Spark的运行过程(本地+集群),性能调优以及Spark ...

  9. Mask裁切UI粒子特效或者3D模型

    刚好前几天有人问我这个问题,再加上新项目也可能用,所以这两天就研究了一下.其实如果粒子特效 和3D模型 都用RenderTexture来做的话就不会有裁切的问题,但是粒子特效用RenderTextur ...

随机推荐

  1. Python+selenium点击网页上指定坐标

    from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains dr = ...

  2. MySQL PXC集群部署

    安装 Percona-XtraDB-Cluster 架构: 三个节点: pxc_node_0 30.0.0.196 pxc_node_1 30.0.0.198 pxc_node_2 30.0.0.19 ...

  3. shell脚本一键安装jdk

    直接上shell #!/bin/bash #offline jdk install ipath="/usr/local" installpath=$(cd `dirname $0` ...

  4. Office 2016 永久激活

    启示:office突然过期,QWQ,卖电脑的真坑爹,找了好多办法,总结2个不花钱的办法啦. 1>只有30天试用期 Office 2016预览版序列号:NKGG6-WBPCC-HXWMY-6DQG ...

  5. C语言动态链表数据结构

    链表的操作增删改查 typedef int DATA; struct SNode { DATA data; SNode* pNext; }; SNode* g_head=NULL;//全局变量 //从 ...

  6. 利用sqlmap对网站进行sql注入检测

    1.下载sqlmap github地址:https://github.com/sqlmapproject/sqlmap/zipball/master 2.sqlmap的运行环境需要python,这个网 ...

  7. [SDOI2016]游戏 树剖+李超树

    目录 链接 思路 update 代码 链接 https://www.luogu.org/problemnew/show/P4069 思路 树剖+超哥线段树 我已经自毙了,自闭了!!!! update ...

  8. (转)Introduction to Gradient Descent Algorithm (along with variants) in Machine Learning

    Introduction Optimization is always the ultimate goal whether you are dealing with a real life probl ...

  9. Collection与Collections的区别

    Collection是集合类的上级接口,继承与他有关的接口主要有List和Set Collections是针对集合类的一个帮助类,他提供一系列静态方法实现对各种集合的搜索.排序.线程安全等操作 稍微举 ...

  10. springmvc异步上传图片并回调页面函数插入图片url代码示例

    <tr> <td class="search_td">属性值图片值:</td> <td> <input type=" ...