Port Example

On this page, I'll manually port a ParticleData and ParticleEmitterData datablock. I'll use the DefaultParticle and DefaultParticleEmitter as examples.

As SphereEmitter and BillboardRenderer has feature parity with stock, theses are the datablocks we will port to.

# Porting a ParticleData

The DefaultParticle datablock looks like this:

We'll begin at the top:

• textureName is clearly a rendering property, so it goes into the BillboardRenderer.
• dragCoefficient is a physics property, so this goes into the ParticleSystem which simulates the particles.

We actually don't have any emission properties, so I'm just gonna list the physics and rendering properties here:

Rendering Physics
textureName dragCoefficient
useInvAlpha gravityCoefficient
colors inheritedVelFactor
sizes constantAcceleration
spinRandomMin
spinRandomMax
spinSpeed

There are a few things to handle here though..

• animTexName is deprecated, and doesn't do anything.. Throw it out!
• useInvAlpha is also deprecated and is only applied when a blendStyle hasn't been set. So set the blendStyle instead, and throw this out.
• spinRandomMin and spinRandomMax has been changed to spinSpeedMin and spinSpeedMax because spinRandomMin is defined as:

Minimum allowed spin speed of this particle, between -1000 and spinRandomMax.

spinSpeedMin might be reverted back to spinRandomMin later though. This is still a WIP after all.

The resulting datablocks looks like this:

# Porting a ParticleEmitterData

The DefaultParticleEmitter datablock looks like this:

Again we can seperate it into Rendering, Physics and Emission properties.

Rendering Physics Emission
blendStyle ejectionPeriodMS
softParticles ejectionVelocity
softnessDistance velocityVariance
ejectionOffset
thetaMax

This time we should handle the following things:

• ejectionPeriodMS is now ParticlePerSecond you can translate between the two, with the following formula: $\text{PPS}=\frac{1000}{\text{ejectionPeriodMS}}$
• softParticles this is not an actual field, it's just set on the stock DefaultParticleEmitter.. Throw it out!
• As you may have noticed the particles field doesn't applied anymore and what left out entirely.

The resulting datablocks:

# The result

If we merge the resulting datablocks we get the following DefaultParticle datablocks:

page revision: 3, last edited: 02 Jul 2015 11:57