//因为还没有全部属性实验过去所以有一些翻译意思可能会不对,所以发现有错误的地方还请告诉我orz
Houdini . > Particles in Dynamics >
Attributes
A particle system is first and foremost driven by attributes. Here are some of the attributes understood by the solvers.
(属性对于粒子系统的作用是非常重要的。我们这里列出了有哪些属性可以被粒子系统识别)
The attributes are listed with the @ style prefix to give the full type. No prefix means float.
(这些属性将会被标识出数据类型,像这样:@数据类型 ,如果没有标出数据类型则指他们是浮点数。)
There are two suggested methods for creating attributes: POP VOP and POP Wrangle.
(这里有两种方式可以创建属性:POP VOP 和 POP Wrangle)
In a POP VOP, you can use a Bind Export VOP to write out your desired attribute.
(在POP VOP中,你可以用Bind Export VOP节点去写一个你想要的属性并输出)
In a POP Wrangle you can use a prototype to specify the attribute and default.
(在POP Wrangle里你可以用原型表达式去具体定义属性及其默认值)
int @id = -1;
point @orient = {0, 0, 0, 1};
!Note
The expression after the equals must be a simple constant expression.
(注意:在等号之后的表达式其结果必须是个常数)
ATTRIBUTES
Houdini will use the Cd (diffuse color) point attribute to color particles.
(Houdini 会使用 Cd(diffuse color)点属性去给粒子上色)
State(状态)
| age
(年龄,活了多久) |
Float
(浮点数) |
Time in seconds since the particle was born. To get the relative time, useful for fading effects, use @nage.
(粒子出生到当前的时间(秒)。如果要得到相对时间,比如做一些衰退效果的时候,请用@nage) |
| nage
(年龄/寿命,一个比例数属性,得出的结果在0-1之间) |
Float
(浮点数) |
@age divided by @life. Implicit attribute, you cannot write to this.
(@life 除以 @age 得到的attribute,是一个不可修改额attribute) |
| life
(寿命,被允许活多久) |
Float
(浮点数) |
Time in seconds the particle is allowed to live. When @age>@life, the particle will be marked dead.
(粒子的寿命(秒),当@age大于@life时,粒子会被当做已死亡。) |
| id
(id,类似每个粒子的身份) |
Int
(整数) |
A unique id for the particle that remains the same throughout a single simulation. Always use @id rather than @ptnum to avoid things changing when particles are deleted. Use findattribval() to look up the point number that corresponds with an id.(在一次sim中,每一个粒子都有一个独一无二的id,我们总是使用@id 而不是@ptnum是为了避免当粒子死亡时,ptnum会发生变化而id不会。使用 findattribval() 可以检查粒子的ptnum和id是否一致)
Default -1. (默认是负一) |
Linear Physics(线性物理)
The particle solver uses the standard v (velocity) attribute as the direction of the particle. Use length(@v) to get the speed of the particle.(粒子使用标准的v(velocity)属性作为粒子的方向,使用length(@v)来获得粒子的速度。)
| force
(力) |
Forces on the particle for this frame.
(当前帧作用于粒子的力) |
|
| mass
(质量) |
float
(浮点数) |
Inertia of the particle.
Default 1.0 (粒子的惯性 默认是1.0) |
| spinshape
(旋转图) |
vec3
(三维向量) |
This is multiplied by @pscale to determine the rough shape of the particle for the purpose of rotational inertia.
Default (1, 1, 1) (这个属性由@pscale相乘从而得到粒子大致的形状来得到转动惯量 默认是(1,1,1)) |
| drag
(拘束) |
float
(浮点数) |
How much the particle is dragged by any wind effects.
Default 1.0 (控制粒子被其他风力影响的数值 默认是1.0) |
| dragexp
(拘束指数) |
float
(浮点数) |
A value from 1 to 2. An exponent of 1 means that a particle is dragged to the wind velocity by an amount proportional to the difference in speeds. A value of 2 makes it the square of the speeds. The latter causes fast moving particles to be crushed faster, and has less influence on particles already near the wind speed.
The default is set by a parameter on the solver. This is used for both angular and linear drag. (一个值域在1到2之间的属性,即drag属性的指数,当它是1的时候,粒子受风速的阻力取决于两者,粒子速度和风速的差。当它的值是2时,会将阻力平方。后者(2)会导致快速运动中的粒子变得更加快速,越接近风速的粒子受阻力的影响也会更小 默认值可以在solver中设置 这个属性用来处理一些生硬的线性阻力) |
| dragshape
(阻力图) |
vec3
(三维向量) |
How much the particle is dragged in each of its local axes. Should be proportional to the cross section of the particle as seen down each axis.
Default (1, 1, 1) (在粒子的各个local轴上分别有多少阻力,) |
| dragcenter
(阻力中心) |
vec3
(三维向量) |
If specified, drag forces will also generate torques on the particle based on the difference between the center of drag and the center of mass. The center of mass is always taking to be the particle position. This provides a local offset to the particle.
Default (0, 0, 0) (如果被指定了数值,阻力会根据阻力的中心和质量的中心在粒子上生成转矩。质量的中心总是取决于粒子的位置.这个属性提供一个local位置的偏移给粒子) |
| targetv
(目标速率) |
float
(浮点数) |
The local wind speed. Thought of as the goal, or target, velocity for the particle.
(local风速,被当做是粒子的终点,目标速率) |
| airresist
(空气阻力) |
float
(浮点数) |
How important it is to match the wind speed. This differs from the drag in that it is measuring a property of your wind force, which likely varies by space, rather than a property of the particle which remains the same as the particle moves.(空气阻力这个概念直接去参考百度的解释会比较好懂一些,总而言之是空气中存在阻力会影响物体的速度,但这个与风力这种常数不同,物体的大小和速度会使空气阻力不同,物体越大,速度越快则空气阻力会越大) |
| speedmin, speedmax
(最小速度,最大速度) |
float
(浮点数) |
Limit of the speed, in units per second, that a particle can move. Particles can temporarily exceed this due collision effects, this acts as a hard clamp every timestep after force computation.
(限制了粒子每秒的最大/最小速度,粒子在发生碰撞时可以突破这个界限,这个属性起到了在每次timestep模拟时的强行修正的作用) |
Angular Physics(角度物理)
| p@orient | vec4
(四维向量) |
The orientation of the particle. This is used for stamping onto particles and for figuring out “local” forces. A particle with an orient attribute no longer is considered to befacing in the direction it is traveling. This is a quaternion.
Default (0, 0, 0, 1) (粒子的方向。最后一个数字决定了粒子是否面向运动方向) |
| w | vec3
(三维向量) |
Angular speed of the particle. This can be thought of as a vector giving the rotation axis with its magnitude being the spin rate. Spin rate is in radians per second.
(粒子的角速度。) |
| torque
(转矩) |
vec3
(三维向量) |
The equivalent of force for spins. No inertial tensor (the equivalent of mass) is currently supported.
(旋转的力的等价物。目前还不支持惯性张量) |
| targetw
(目标w) |
vec3
(三维向量) |
The goal spin direction and speed for this particle.
(粒子的目标旋转方向和速度) |
| spinresist
(旋转阻力) |
float
(浮点数) |
How important it is to match the targetw.
(旋转阻力) |
| spinmin, spinmax
(最小旋转,最大旋转) |
float
(浮点数) |
Limits on the speed in radians per second that a particle can spin.
(粒子每秒最多/最少能旋转多少度) |
State(状态)
| dead
(死亡) |
int
(整数) |
Whether a particle is living (0) or dead (1). A dead particle is deleted in the Reaping stage. This is done as the final stage of the solver and after the post-solve nodes, so you normally do not see any dead particles unless you turn off Reaping. @dead>0 is a way to group all dead particles. @dead==0 will group the live ones.
(一个粒子不是活着的(0)就是死的(1)。死亡的粒子会在收割阶段被删除。所以你一般看不到死亡的粒子除非你取消勾选solver里的Reaping。 @dead > 0 可以用来给死亡的粒子打组,@dead == 0 可以给活着的粒子打组) |
| stopped
(停止) |
int
(整数) |
Whether a particle is moving (0) or stopped (1). It preserves its velocity, but no longer integrates its position, velocity, orientation, or angular velocity. Note that direct changes to these can still be performed – such as a Look At POP altering the orientation.
(一个粒子不是在运动着(0)就是停着的(1)。它会维持物体的速率,但位置,速度,旋转这些都不会再动了。通过修改位置,速度,旋转这些属性会生效,粒子不会再自发运动了,比如用lookat来改变粒子的方向) |
| stuck
(卡住) |
int
(整数) |
Whether a particle is free (0) or stuck (1). A stuck particle will be teleported to the position path every frame. It will inherit the velocity of the surface it is stuck to.
(一个粒子不是自由的就是被卡住的。) |
| sliding
(滑动) |
int
(整数) |
Whether a particle is free (0) or sliding along a surface (1). A sliding particle is allowed some motion, but it then tries to re-project itself to its position path object. It can’t transfer between objects, but it can change which primitive/uv coordinates it is on in this process.
(一个粒子不是自由的(0)就是在滑动的(1)。) |
| cling
(附着) |
float
(浮点数) |
Sliding particles apply a force inwards (according to surface normal) to the object they are attached to. This helps them stay on around bends.(在滑动的粒子上拥有对他们贴着的物体向内的力(根据表面法线)这将帮助粒子可以待在物体弯曲的地方) |
| pospath | string
(字符串) |
This string stores a path to the object that the particle is interested in. It is the path to a file on disk or an absolute op: path. (op: paths can support references to DOP objects.)
(就是指定一个路径到一个obj上,然后进行各种操作) |
| posprim | int
(整数) |
Default: -1.
Which primitive in the path geometry whose position we wish to refer to. |
| posuv | vec3
(三维向量) |
Where on the primitive. This is NOT texture uvs, but parametric uvs. The primuv VEX command can be used to look up attributes using this. This is a vector because some primitives (such as polysoups, tetrahedrons, volumes) may store three coordinates. |
Collisions(碰撞)
| hittotal
(撞击总数) |
int
(整数) |
The cumulative total of all hits for the particle. Corresponds to the $NUMHIT of old POPs.
A particle may collide multiple times within a substep, giving a i@numhit greater than one. However, i@hittotal will only be incremented once on that substep, making it easier to build triggers. Additional POP Collision Behavior nodes may double count collisions if their Compute Hit Total is on. (粒子碰撞的总数。在旧的pop系统中写作$NUMHIT 一个粒子可能会在一帧(模拟每一下设置的时间)内就碰撞了好几次,从而导致i@numhit将会大于1,但i@hittotal每一帧碰撞只会增加一次,使构建触发器变得更容易 如果Compute Hit Total处于打开状态,其他POP碰撞行为节点可能会重复计算碰撞次数) |
| has_pprevious | int
(整数) |
This attribute is 1 if @ppreviouscontains valid values.
(如果@pprevious的值有效,则这个属性的值为1) |
| pprevious
(以前的粒子) |
vec3
(三维向量) |
Stores the position of the particle on the previous frame. This is used in collision detection to ensure collisions can be registered regardless of how the particle moves.
(这是用来存储粒子在前一帧的位置的属性。 用于碰撞检测,以确保碰撞可以被登记,而不管粒子如何移动。) |
| hitnum
(撞击数) |
int
(整数) |
The number of times the particle collided in the last POP Collision Detect. @hitnum>0 can group all the particles that hit once. Only the first hit is stored in the attributes. Corresponds to $JUSTHIT of the old POPs.
(粒子在最后一次碰撞检测中碰撞的次数。 使用@hitnum> 0可以将所有碰撞过的粒子打组。 这个属性只储存了第一次的撞击数据。在旧版的POP系统中对应$JUSTHIT) |
| hitpath | string
(字符串) |
The path to the object that was hit. A path to a file on disk or an op: path.
(被击中的对象的路径。 磁盘上的文件或op:路径的路径。) |
| hitprim
(撞击面) |
int
(整数) |
The primitive hit. This could be -1 if it the collision detector couldn’t figure out which primitive owns the collision. The POP Solver tries to recover from this with @xyzdist.
Default -1 (被撞击的面。如果碰撞检测器不能确定哪个面被撞了,则这个属性可以是-1,POP解算器会试图利用@xyzdist去修复这个问题 默认是-1) |
| hituv
(碰撞面的UV) |
vec3
(三维向量) |
The position on the primitive. This is in parametric UV space, not texture UV.
(面的位置。这是面的位置UV,不是材质的那个UV) |
| hitpos
(碰撞位置) |
vec3
(三维向量) |
Where the hit actually occurred. Usually a primuv on P will give you this, but if the colliding object was moving it won’t.
(碰撞实际发生的位置。一般来说P结合primuv也可以求出这个,但如果碰撞的物体在移动中的话就不行了) |
| hitnml
(碰撞面的法线) |
vec3
(三维向量) |
The normal of the surface at the time of the collision.
(碰撞的面的法线) |
| hitv
(碰撞面的速度) |
vec3
(三维向量) |
The velocity of the surface at the time of the collision.
(碰撞的面的速度) |
| hittime
(碰撞时的时间) |
float
(浮点数) |
When the collision occurred, that could be within a frame.
(碰撞发生时的时间,可以在一帧之内,所以是浮点数) |
| hitimpulse | float
(浮点数) |
Created by the Gas Impact to Attributes node, this records how much of an impulse was needed for the collision resolution. The Add Impact Data has to be enabled on the POP Solver as well.
This varies with timestep. |
| bounce
(弹力) |
float
(浮点数) |
When particles bounce off another object, this controls how much energy they keep in the normal direction. A value of 1 will keep all the energy, a value of 0 will come to a stop. It is multiplied with the bounce value of the other object.
The default is controlled by a parameter on the POP Object. (当粒子从另一个物体上反弹时,这个属性控制着粒子在法线方向上能保持多少能量。1就是保持所有能量,0的话反弹就会停止。这个值会和撞到的物体的bounce值相叠加) |
| bounceforward
(反弹方向) |
float
(浮点数) |
When particles bounce off another object, this controls how much energy they keep in the tangential direction. A value of 1 will cause the particle to keep moving tangentially, ie, a perfect bounce. A value of 0 will bring the particles to a stop relative to the collision object in the tangential direction. A value of -1 will cause the particles to retro-reflect. A value of 2 will cause them to gain energy with every collision. It is multiplied by the bounce forward value of the other object.
The default is controlled by a parameter on the POP Object. (当粒子从另一个物体上反弹时,这个属性控制着粒子在切线方向上能保持多少能量。当值为1时,粒子会保持切线运动,即完美反弹(你平时把弹力小球丢地上是什么感觉这个就是什么感觉)。值为0时会时粒子相对于碰撞物体在切线方向上的停止(弹力小球只会上下原地蹦跶,丝毫不会往左或者往右)。值为-1的时候会导致粒子溯源反射(会沿着原先的蹦跶方向的反方向蹦跶)。值为2的时候会导致粒子在每次碰撞的时候都获得能量(会在原先的蹦跶方向上更快地往外蹦跶)。它由其他物体的反弹方向的数值叠加。 默认值由POP object节点控制) |
| friction
(摩擦力) |
float
(浮点数) |
When particles bounce off other objects, they are slowed down in the tangential direction proportional to how hard they hit the object. A value of 0 will bounce off with no momentum transfer. Higher values will increase how much the particles will stick to the collision object’s speed. This is multiplied by the friction of the other object.
The default is controlled by a parameter on the POP Object. (当粒子从另一个物体上反弹时,他们会在切线方向减速,与他们撞击物体的强度成比例。当值为0时,反弹将不发生动量传递。更高的值将会增加粒子黏在物体上所需要的速度。这个属性会与其他物体的摩擦力相叠加。 默认值由POP Object 节点控制) |
| collisionignore | string
(字符串) |
Objects that match this pattern will not be collided during the POP Solver collision stage. This does not affect the POP Collision Detect, just the implicit collisions during solve. Both object names and object ids can be matched by the expression. Therefore, 0 torus* will avoid colliding with the first DOP object and all DOP objects whose names start with torus.
Default “” (排除碰撞物体用的属性,计入的物体将不发生碰撞) |
Misc(杂项)
| s@instancepath | string | Geometry to copy onto each particle. This is either a path to a file on disk or an op: path. If a file path, you can use the Mantra Point Instancing to render it. If it has op: paths, use the Instance SOP to first harden all the op: paths. File paths will remain references. |
| nearest
(最近的粒子) |
int
(整数) |
@id of the closest particle. Could also be @ptnum if the id attribute was missing. Created by the Proximity POP. Value of -1 if nothing within the search range.
Default -1 (最接近的粒子的@id。也可以是@ptnum如果id属性找不到的话。由Proximity POP节点创建。值是-1的时候则代表在指定范围内找不到其他粒子 默认是-1) |
| nearestdist
(最近的粒子的距离) |
float
(浮点数) |
Distance to the nearest particle. -1 if nothing in range. Created by the Proximity POP.
Default –1 (与最近的粒子的距离,如果值是-1则代表在指定范围内没东西,由Proximity POP节点创建 默认是-1) |
| numproximity | int
(整数) |
Number of particles within the specified range. Created by the Proximity POP.
Default 0 (在指定范围内的粒子数,由Proximity POP节点创建,默认是0) |