string $name;
string $name2;
float $red2;
float $green2;
float $blue2;
int $x = 0;
for ($x=0;$x<15.0;$x++)
{
$red2 = 1.0;
$green2 = 0.0;
$blue2 = 0.0;
//sets color variables, default is red
$red2 -= ($x*0.06);
$green2 += ($x*0.06);
$blue2 += ($x*0.06);
//set color transition
$name = `shadingNode -asShader blinn`;
$name2 = $name + ".color";
//assigns shaders
setAttr $name2 -type double3 ($red2) ($green2) ($blue2);
//sets shaders
sphere -ch on -o on -po 0 -ax 0 1 0 -r 0.0538244 -nsp 4;
//create nurb spheres
xform -translation (0.25*$x) 0 1;
//spawns the balls in a line
hyperShade -assign $name;
//assigns shaders to balls
}
;
string $name2;
float $red2;
float $green2;
float $blue2;
int $x = 0;
for ($x=0;$x<15.0;$x++)
{
$red2 = 1.0;
$green2 = 0.0;
$blue2 = 0.0;
//sets color variables, default is red
$red2 -= ($x*0.06);
$green2 += ($x*0.06);
$blue2 += ($x*0.06);
//set color transition
$name = `shadingNode -asShader blinn`;
$name2 = $name + ".color";
//assigns shaders
setAttr $name2 -type double3 ($red2) ($green2) ($blue2);
//sets shaders
sphere -ch on -o on -po 0 -ax 0 1 0 -r 0.0538244 -nsp 4;
//create nurb spheres
xform -translation (0.25*$x) 0 1;
//spawns the balls in a line
hyperShade -assign $name;
//assigns shaders to balls
}
;
For different color transitions, I adjust the $red2, $green2. $blue2 by changing the positive and negative
string $name;string $name2;
float $red2;
float $green2;
float $blue2;
int $x = 0;
for ($x=0;$x<15.0;$x++)
{
$red2 = 1.0;
$green2 = 0.0;
$blue2 = 0.0;
//sets color variables, default is red
$red2 -= ($x*0.06);
$green2 += ($x*0.06);
$blue2 -= ($x*0.06);
//set color transition
$name = `shadingNode -asShader blinn`;
$name2 = $name + ".color";
//assigns shaders
setAttr $name2 -type double3 ($red2) ($green2) ($blue2);
//sets shaders
sphere -ch on -o on -po 0 -ax 0 1 0 -r 0.0538244 -nsp 4;
//create nurb spheres
xform -translation (0.25*$x) 0 1;
//spawns the balls in a line
hyperShade -assign $name;
//assigns shaders to balls
}
;
No comments:
Post a Comment