Skip navigation


creation of EPcurve with 5 control points

creation of Emitter

set particle goal the curve

write expression GoalU : particleShape1.goalU += 0.01;
GoalOffset : particleShape1.goalOffset = sphrand (<>);

select particleshape
set GoalSmoothness : 6.000
set curveShape : 0.500

select particleShape1

source MEL script

//=======================================
// SETTINGS
//=======================================

// Particle Name
string $pName = “particleShape1”;

// Start and End Times
int $start = 1;
int $end = 250;

//=======================================

// Go to First Frame
currentTime -e $start;

for($j=($start – 1);$j 0)
{
// Go though every particle
for($i=0;$i<$pCount;$i++)
{
// Store particles world position
float $pPosition[] = `getParticleAttr -at worldPosition ($pName + ".pt[" + $i + "]")`;

// See if there is a curve for the particle
int $curveExists = (`objExists ("curve_pt_" + $i)`);

// If no curve exists
if($curveExists == 0)
{
// Make a curve
string $initialCurve = (`curve -p $pPosition[0] $pPosition[1] $pPosition[2]`);
rename $initialCurve ("curve_pt_" + $i);
}

// If there is a curve, continue
if($curveExists == 1)
{
// Add a curve point at current particle position
curve -a -p $pPosition[0] $pPosition[1] $pPosition[2] ("curve_pt_" + $i);
}
}
}
playButtonStepForward;
}

select the curves created by the script

source MELscript that renames the curves so as to put them in a new layer

the number 103 is the number of the curves created +1

for ($r=0; $r<103; $r++){
$name = "curve_pt_" + $r;
string $newName = "old";
rename $name $newName;
}

select the curves named old1…

put them in a new layer

change color

insert a radial field with magnitude set to 15.000

place it next to curve

source the script that creates the particle trails

new curves created

source the script that renames the curves

change the rename name from old to oold

insert oold curves to new layer, change color

display the both layer

we see the trails before and after the radial field generation

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s