Star Field

Script:

//Purpose: Build a Fractal based roughly on the Kock Snowflake
// The end result should look like a string light with Arnold Mesh illumination
//Author: Kim Czerniewski
//Date: October 15, 2017
//Version: 23
//Coding Language: Maya Embedded Language

//Note: Given that the Kock Snowflake is based on lines and triangles and I
// cant seem to get triangles to work well with maya, that “based roughly”
// comes to be much more roughly than I would typically like.
// I will have the size dividing by 3 like the Kock snowflake does,
// but otherwise I’ll be sticking closer to the class examples.
// It’s unfortunate that the general aesthetics of the Kock Snowflake
// will be mostly lost, but I will still have the outcome looking like
// a string light with some whimsical additions to add some
// complexity to the code.
// Additionally, it appears as though since Arnold has it’s own coding
// language for the native scene description fild format (.ass),
// the tools that are entirely new that came with arnold don’t
// translate to mel. The arnold commands through the GUI directly influence
// the render but don’t seem to be creatable using code.
// That said, as an alternative, I will me making the shaders for my
// geometry lightly refractive and generate default point lights inside
// to get the string light appearance.

//________________________________________________________________________//

////_____Variable Hand Off_____////

//__~~On/Off Switches~~__//

int $del = 1; //Deletes everything

int $field = 1; //Creates a field of stars around the main shape using
// an additional function

int $field_scatter = 1; //Breaks the field of stars out of the fractal order

//__~~Function Variables~~__//

int $main_repitition = 5; //How many times the base function runs

int $field_repitition = 5; //How many times the field of stars function runs

float $main_size= 5; //How large the initial geometry of the main function is

float $field_size = 5; //How large the initial geometry of the
// field of stars function is

float $main_scale= .6; //How defined the points on the main geometry is

float $field_scale= .6; //How defined the points on the field geometry is

//________________________________________________________________________//

//Delete//
if ($del == 1){
select -all;
select -d aiSkyDomeLight1;
delete;
}

//Create Material//
shadingNode -asShader aiStandard -name “main_shader”;
sets -renderable true -noSurfaceShader true -empty -name “main_shaderSG”;
connectAttr -f main_shader.outColor main_shaderSG.surfaceShader;
setAttr “main_shader.color” -type double3 0 0 0;
setAttr “main_shader.Kd” 0;
setAttr “main_shader.Ks” 0.1;
setAttr “main_shader.specularRoughness” 0.2;
setAttr “main_shader.KtColor” 1 1 .7;
setAttr “main_shader.Kt” 0.8;
setAttr “main_shader.IOR” 1.750;
setAttr “main_shader.FresnelUseIOR” 1;

//*****__________Main Fractal__________*****//

proc fnc_A2_kczern (int $iterations, float $r, float $offset, float $scale, int $count){

$iterations -= 1;
if ($iterations <0){
return;
}

//______X Set_____//
if ($r >0.6){
defaultPointLight (5, 1,1,1, 0, 0, 0,0,0, 1);
rename “pointLight1” (“pt_lgt_for_sphere”+$count);
setAttr (“pt_lgt_for_sphereShape”+$count+”.aiExposure”) 1;
setAttr (“pt_lgt_for_sphereShape”+$count+”.aiCastVolumetricShadows”) 0;
setAttr (“pt_lgt_for_sphereShape”+$count+”.aiAffectVolumetrics”) 0;
move -r $offset 0 0;
}

$current_shape= `polySphere -ax 1 0 0 -r $r -sx 12 -sh 12`;
sets -e -forceElement main_shaderSG;

move -r ($offset) 0 0 ;

//_Define Shape_//
select -r ($current_shape[0]+ “.e[144]”);
select -tgl ($current_shape[0]+ “.e[146]”);
select -tgl ($current_shape[0]+ “.e[148]”);
select -tgl ($current_shape[0]+ “.e[150]”);
select -tgl ($current_shape[0]+ “.e[152]”);
select -tgl ($current_shape[0]+ “.e[154]”);
select -tgl ($current_shape[0]+ “.e[158]”);
select -tgl ($current_shape[0]+ “.e[160]”);
select -tgl ($current_shape[0]+ “.e[162]”);
select -tgl ($current_shape[0]+ “.e[164]”);
select -tgl ($current_shape[0]+ “.e[166]”);
select -tgl ($current_shape[0]+ “.e[168]”);
select -tgl ($current_shape[0]+ “.e[170]”);
select -tgl ($current_shape[0]+ “.e[172]”);
select -tgl ($current_shape[0]+ “.e[174]”);
select -tgl ($current_shape[0]+ “.e[176]”);
select -tgl ($current_shape[0]+ “.e[178]”);
select -tgl ($current_shape[0]+ “.e[180]”);
select -tgl ($current_shape[0]+ “.e[182]”);
select -tgl ($current_shape[0]+ “.e[184]”);
select -tgl ($current_shape[0]+ “.e[186]”);
select -tgl ($current_shape[0]+ “.e[188]”);
select -tgl ($current_shape[0]+ “.e[190]”);
select -tgl ($current_shape[0]+ “.e[192]”);
select -tgl ($current_shape[0]+ “.e[194]”);
select -tgl ($current_shape[0]+ “.e[196]”);
select -tgl ($current_shape[0]+ “.e[198]”);
select -tgl ($current_shape[0]+ “.e[200]”);
select -tgl ($current_shape[0]+ “.e[202]”);
select -tgl ($current_shape[0]+ “.e[204]”);
select -tgl ($current_shape[0]+ “.e[206]”);
select -tgl ($current_shape[0]+ “.e[208]”);
select -tgl ($current_shape[0]+ “.e[210]”);
select -tgl ($current_shape[0]+ “.e[212]”);
select -tgl ($current_shape[0]+ “.e[214]”);
select -tgl ($current_shape[0]+ “.e[216]”);
select -tgl ($current_shape[0]+ “.e[218]”);
select -tgl ($current_shape[0]+ “.e[220]”);
select -tgl ($current_shape[0]+ “.e[222]”);
select -tgl ($current_shape[0]+ “.e[224]”);
select -tgl ($current_shape[0]+ “.e[226]”);
select -tgl ($current_shape[0]+ “.e[228]”);
select -tgl ($current_shape[0]+ “.e[230]”);
select -tgl ($current_shape[0]+ “.e[232]”);
select -tgl ($current_shape[0]+ “.e[234]”);
select -tgl ($current_shape[0]+ “.e[236]”);
select -tgl ($current_shape[0]+ “.e[238]”);
select -tgl ($current_shape[0]+ “.e[240]”);
select -tgl ($current_shape[0]+ “.e[242]”);
select -tgl ($current_shape[0]+ “.e[244]”);
select -tgl ($current_shape[0]+ “.e[246]”);
select -tgl ($current_shape[0]+ “.e[248]”);
select -tgl ($current_shape[0]+ “.e[250]”);
select -tgl ($current_shape[0]+ “.e[252]”);
select -tgl ($current_shape[0]+ “.e[254]”);
select -tgl ($current_shape[0]+ “.e[256]”);
select -tgl ($current_shape[0]+ “.e[258]”);
select -tgl ($current_shape[0]+ “.e[260]”);
select -tgl ($current_shape[0]+ “.e[262]”);
select -tgl ($current_shape[0]+ “.e[264]”);
select -tgl ($current_shape[0]+ “.e[266]”);
select -tgl ($current_shape[0]+ “.e[268]”);
select -tgl ($current_shape[0]+ “.e[270]”);
select -tgl ($current_shape[0]+ “.e[272]”);
select -tgl ($current_shape[0]+ “.e[274]”);
scale -r 1 $scale $scale;

setAttr (“pSphereShape”+$count+”.aiOpaque”) 0;
$count += 1;

//_____Z Set_____//
if ($r >0.6){
defaultPointLight (5, 1,1,1, 0, 0, 0,0,0, 1);
rename “pointLight1” (“pt_lgt_for_sphere”+$count);
setAttr (“pt_lgt_for_sphereShape”+$count+”.aiExposure”) 1;
setAttr (“pt_lgt_for_sphereShape”+$count+”.aiCastVolumetricShadows”) 0;
setAttr (“pt_lgt_for_sphereShape”+$count+”.aiAffectVolumetrics”) 0;
move -r 0 0 $offset;
}
$current_shape= `polySphere -ax 0 0 1 -r $r -sx 12 -sh 12`;
sets -e -forceElement main_shaderSG;
move -r 0 0 $offset;

//_Define Shape_//
select -r ($current_shape[0]+ “.e[144]”);
select -tgl ($current_shape[0]+ “.e[146]”);
select -tgl ($current_shape[0]+ “.e[148]”);
select -tgl ($current_shape[0]+ “.e[150]”);
select -tgl ($current_shape[0]+ “.e[152]”);
select -tgl ($current_shape[0]+ “.e[154]”);
select -tgl ($current_shape[0]+ “.e[158]”);
select -tgl ($current_shape[0]+ “.e[160]”);
select -tgl ($current_shape[0]+ “.e[162]”);
select -tgl ($current_shape[0]+ “.e[164]”);
select -tgl ($current_shape[0]+ “.e[166]”);
select -tgl ($current_shape[0]+ “.e[168]”);
select -tgl ($current_shape[0]+ “.e[170]”);
select -tgl ($current_shape[0]+ “.e[172]”);
select -tgl ($current_shape[0]+ “.e[174]”);
select -tgl ($current_shape[0]+ “.e[176]”);
select -tgl ($current_shape[0]+ “.e[178]”);
select -tgl ($current_shape[0]+ “.e[180]”);
select -tgl ($current_shape[0]+ “.e[182]”);
select -tgl ($current_shape[0]+ “.e[184]”);
select -tgl ($current_shape[0]+ “.e[186]”);
select -tgl ($current_shape[0]+ “.e[188]”);
select -tgl ($current_shape[0]+ “.e[190]”);
select -tgl ($current_shape[0]+ “.e[192]”);
select -tgl ($current_shape[0]+ “.e[194]”);
select -tgl ($current_shape[0]+ “.e[196]”);
select -tgl ($current_shape[0]+ “.e[198]”);
select -tgl ($current_shape[0]+ “.e[200]”);
select -tgl ($current_shape[0]+ “.e[202]”);
select -tgl ($current_shape[0]+ “.e[204]”);
select -tgl ($current_shape[0]+ “.e[206]”);
select -tgl ($current_shape[0]+ “.e[208]”);
select -tgl ($current_shape[0]+ “.e[210]”);
select -tgl ($current_shape[0]+ “.e[212]”);
select -tgl ($current_shape[0]+ “.e[214]”);
select -tgl ($current_shape[0]+ “.e[216]”);
select -tgl ($current_shape[0]+ “.e[218]”);
select -tgl ($current_shape[0]+ “.e[220]”);
select -tgl ($current_shape[0]+ “.e[222]”);
select -tgl ($current_shape[0]+ “.e[224]”);
select -tgl ($current_shape[0]+ “.e[226]”);
select -tgl ($current_shape[0]+ “.e[228]”);
select -tgl ($current_shape[0]+ “.e[230]”);
select -tgl ($current_shape[0]+ “.e[232]”);
select -tgl ($current_shape[0]+ “.e[234]”);
select -tgl ($current_shape[0]+ “.e[236]”);
select -tgl ($current_shape[0]+ “.e[238]”);
select -tgl ($current_shape[0]+ “.e[240]”);
select -tgl ($current_shape[0]+ “.e[242]”);
select -tgl ($current_shape[0]+ “.e[244]”);
select -tgl ($current_shape[0]+ “.e[246]”);
select -tgl ($current_shape[0]+ “.e[248]”);
select -tgl ($current_shape[0]+ “.e[250]”);
select -tgl ($current_shape[0]+ “.e[252]”);
select -tgl ($current_shape[0]+ “.e[254]”);
select -tgl ($current_shape[0]+ “.e[256]”);
select -tgl ($current_shape[0]+ “.e[258]”);
select -tgl ($current_shape[0]+ “.e[260]”);
select -tgl ($current_shape[0]+ “.e[262]”);
select -tgl ($current_shape[0]+ “.e[264]”);
select -tgl ($current_shape[0]+ “.e[266]”);
select -tgl ($current_shape[0]+ “.e[268]”);
select -tgl ($current_shape[0]+ “.e[270]”);
select -tgl ($current_shape[0]+ “.e[272]”);
select -tgl ($current_shape[0]+ “.e[274]”);
scale -r $scale $scale 1;

setAttr (“pSphereShape”+$count+”.aiOpaque”) 0;
$count += 1;

//_____Y Set_____//
if ($r >0.6){
defaultPointLight (5, 1,1,1, 0, 0, 0,0,0, 1);
rename “pointLight1” (“pt_lgt_for_sphere”+$count);
setAttr (“pt_lgt_for_sphereShape”+$count+”.aiExposure”) 1;
setAttr (“pt_lgt_for_sphereShape”+$count+”.aiCastVolumetricShadows”) 0;
setAttr (“pt_lgt_for_sphereShape”+$count+”.aiAffectVolumetrics”) 0;
move -r 0 $offset 0;
}

$current_shape= `polySphere -ax 0 1 0 -r $r -sx 12 -sh 12`;
sets -e -forceElement main_shaderSG;
move -r 0 $offset 0 ;

//_Define Shape_//
select -r ($current_shape[0]+ “.e[144]”);
select -tgl ($current_shape[0]+ “.e[146]”);
select -tgl ($current_shape[0]+ “.e[148]”);
select -tgl ($current_shape[0]+ “.e[150]”);
select -tgl ($current_shape[0]+ “.e[152]”);
select -tgl ($current_shape[0]+ “.e[154]”);
select -tgl ($current_shape[0]+ “.e[158]”);
select -tgl ($current_shape[0]+ “.e[160]”);
select -tgl ($current_shape[0]+ “.e[162]”);
select -tgl ($current_shape[0]+ “.e[164]”);
select -tgl ($current_shape[0]+ “.e[166]”);
select -tgl ($current_shape[0]+ “.e[168]”);
select -tgl ($current_shape[0]+ “.e[170]”);
select -tgl ($current_shape[0]+ “.e[172]”);
select -tgl ($current_shape[0]+ “.e[174]”);
select -tgl ($current_shape[0]+ “.e[176]”);
select -tgl ($current_shape[0]+ “.e[178]”);
select -tgl ($current_shape[0]+ “.e[180]”);
select -tgl ($current_shape[0]+ “.e[182]”);
select -tgl ($current_shape[0]+ “.e[184]”);
select -tgl ($current_shape[0]+ “.e[186]”);
select -tgl ($current_shape[0]+ “.e[188]”);
select -tgl ($current_shape[0]+ “.e[190]”);
select -tgl ($current_shape[0]+ “.e[192]”);
select -tgl ($current_shape[0]+ “.e[194]”);
select -tgl ($current_shape[0]+ “.e[196]”);
select -tgl ($current_shape[0]+ “.e[198]”);
select -tgl ($current_shape[0]+ “.e[200]”);
select -tgl ($current_shape[0]+ “.e[202]”);
select -tgl ($current_shape[0]+ “.e[204]”);
select -tgl ($current_shape[0]+ “.e[206]”);
select -tgl ($current_shape[0]+ “.e[208]”);
select -tgl ($current_shape[0]+ “.e[210]”);
select -tgl ($current_shape[0]+ “.e[212]”);
select -tgl ($current_shape[0]+ “.e[214]”);
select -tgl ($current_shape[0]+ “.e[216]”);
select -tgl ($current_shape[0]+ “.e[218]”);
select -tgl ($current_shape[0]+ “.e[220]”);
select -tgl ($current_shape[0]+ “.e[222]”);
select -tgl ($current_shape[0]+ “.e[224]”);
select -tgl ($current_shape[0]+ “.e[226]”);
select -tgl ($current_shape[0]+ “.e[228]”);
select -tgl ($current_shape[0]+ “.e[230]”);
select -tgl ($current_shape[0]+ “.e[232]”);
select -tgl ($current_shape[0]+ “.e[234]”);
select -tgl ($current_shape[0]+ “.e[236]”);
select -tgl ($current_shape[0]+ “.e[238]”);
select -tgl ($current_shape[0]+ “.e[240]”);
select -tgl ($current_shape[0]+ “.e[242]”);
select -tgl ($current_shape[0]+ “.e[244]”);
select -tgl ($current_shape[0]+ “.e[246]”);
select -tgl ($current_shape[0]+ “.e[248]”);
select -tgl ($current_shape[0]+ “.e[250]”);
select -tgl ($current_shape[0]+ “.e[252]”);
select -tgl ($current_shape[0]+ “.e[254]”);
select -tgl ($current_shape[0]+ “.e[256]”);
select -tgl ($current_shape[0]+ “.e[258]”);
select -tgl ($current_shape[0]+ “.e[260]”);
select -tgl ($current_shape[0]+ “.e[262]”);
select -tgl ($current_shape[0]+ “.e[264]”);
select -tgl ($current_shape[0]+ “.e[266]”);
select -tgl ($current_shape[0]+ “.e[268]”);
select -tgl ($current_shape[0]+ “.e[270]”);
select -tgl ($current_shape[0]+ “.e[272]”);
select -tgl ($current_shape[0]+ “.e[274]”);
scale -r $scale 1 $scale;

setAttr (“pSphereShape”+$count+”.aiOpaque”) 0;
$count += 1;

$offset= $offset + $r;
$r=($r/3);

fnc_A2_kczern ($iterations, $r, $offset, $scale, $count);
fnc_A2_kczern ($iterations, $r, ((-1)*$offset), $scale, $count);

}

fnc_A2_kczern($main_repitition, $main_size, 0,$main_scale, 1);

int $num=1;
while ($num<94){
setAttr (“pSphereShape”+$num+”.aiOpaque”) 0;
$num += 1;
}

select -all;
select -d aiSkyDomeLight1;
group -n “fractal_shape”;

//*****__________Field Fractal__________*****//

if ($field == 1){

//Create Material//

shadingNode -asShader aiStandard -name “field_shader”;
sets -renderable true -noSurfaceShader true -empty -name “field_shaderSG”;
connectAttr -f field_shader.outColor field_shaderSG.surfaceShader;

shadingNode -asTexture stucco -name “field_shader_color”;
shadingNode -asUtility place3dTexture -name “field_shader_color_placement”;
connectAttr field_shader_color_placement.wim[0] field_shader_color.pm;
setAttr “field_shader_color.shaker” 12.58;
setAttr “field_shader_color.channel1” -type double3 0.855 0.857 0.461;
setAttr “field_shader_color.channel2” -type double3 1 0.674 .025;

connectAttr field_shader_color.outColor field_shader.color;
setAttr “field_shader.Kd” 0.5;
setAttr “field_shader.Ks” 0.115;
setAttr “field_shader.specularRoughness” 0.425;
setAttr “field_shader.KtColor” 1 1 .7;
setAttr “field_shader.Kt” 0.8;
setAttr “field_shader.IOR” 1.750;
setAttr “field_shader.FresnelUseIOR” 1;

proc fnc_starfield (int $iterations, float $r, float $offset, vector $origin,float $scale, int $count, int $scatter){
$iterations -= 1;
if ($iterations <0){
return;
}

float $randX= `rand -90 90`;
float $randY= `rand -90 90`;
float $randZ= `rand -90 90`;
float $randScale= `rand 0.8 1`;
float $randR= `rand 0 1`;
float $randG= `rand 0 1`;
float $randB= `rand 0 1`;

//______Star field_____//
$this_star= `polySphere -ax 1 0 0 -r $r -sx 12 -sh 12 -n(“Star”+$count)`;
sets -e -forceElement field_shaderSG;

//_Move in Fractal Shape_//
move -r ($origin.x) ($origin.y) ($origin.z);

//_Scatter_part_1_//
if ($scatter=1){
rotate -r $randX $randY $randZ;
scale -r $randScale $randScale $randScale;
move -os 9 9 9;

}
//_Define Shape_//
select -r ($this_star[0]+ “.e[144]”);
select -tgl ($this_star[0]+ “.e[146]”);
select -tgl ($this_star[0]+ “.e[148]”);
select -tgl ($this_star[0]+ “.e[150]”);
select -tgl ($this_star[0]+ “.e[152]”);
select -tgl ($this_star[0]+ “.e[154]”);
select -tgl ($this_star[0]+ “.e[158]”);
select -tgl ($this_star[0]+ “.e[160]”);
select -tgl ($this_star[0]+ “.e[162]”);
select -tgl ($this_star[0]+ “.e[164]”);
select -tgl ($this_star[0]+ “.e[166]”);
select -tgl ($this_star[0]+ “.e[168]”);
select -tgl ($this_star[0]+ “.e[170]”);
select -tgl ($this_star[0]+ “.e[172]”);
select -tgl ($this_star[0]+ “.e[174]”);
select -tgl ($this_star[0]+ “.e[176]”);
select -tgl ($this_star[0]+ “.e[178]”);
select -tgl ($this_star[0]+ “.e[180]”);
select -tgl ($this_star[0]+ “.e[182]”);
select -tgl ($this_star[0]+ “.e[184]”);
select -tgl ($this_star[0]+ “.e[186]”);
select -tgl ($this_star[0]+ “.e[188]”);
select -tgl ($this_star[0]+ “.e[190]”);
select -tgl ($this_star[0]+ “.e[192]”);
select -tgl ($this_star[0]+ “.e[194]”);
select -tgl ($this_star[0]+ “.e[196]”);
select -tgl ($this_star[0]+ “.e[198]”);
select -tgl ($this_star[0]+ “.e[200]”);
select -tgl ($this_star[0]+ “.e[202]”);
select -tgl ($this_star[0]+ “.e[204]”);
select -tgl ($this_star[0]+ “.e[206]”);
select -tgl ($this_star[0]+ “.e[208]”);
select -tgl ($this_star[0]+ “.e[210]”);
select -tgl ($this_star[0]+ “.e[212]”);
select -tgl ($this_star[0]+ “.e[214]”);
select -tgl ($this_star[0]+ “.e[216]”);
select -tgl ($this_star[0]+ “.e[218]”);
select -tgl ($this_star[0]+ “.e[220]”);
select -tgl ($this_star[0]+ “.e[222]”);
select -tgl ($this_star[0]+ “.e[224]”);
select -tgl ($this_star[0]+ “.e[226]”);
select -tgl ($this_star[0]+ “.e[228]”);
select -tgl ($this_star[0]+ “.e[230]”);
select -tgl ($this_star[0]+ “.e[232]”);
select -tgl ($this_star[0]+ “.e[234]”);
select -tgl ($this_star[0]+ “.e[236]”);
select -tgl ($this_star[0]+ “.e[238]”);
select -tgl ($this_star[0]+ “.e[240]”);
select -tgl ($this_star[0]+ “.e[242]”);
select -tgl ($this_star[0]+ “.e[244]”);
select -tgl ($this_star[0]+ “.e[246]”);
select -tgl ($this_star[0]+ “.e[248]”);
select -tgl ($this_star[0]+ “.e[250]”);
select -tgl ($this_star[0]+ “.e[252]”);
select -tgl ($this_star[0]+ “.e[254]”);
select -tgl ($this_star[0]+ “.e[256]”);
select -tgl ($this_star[0]+ “.e[258]”);
select -tgl ($this_star[0]+ “.e[260]”);
select -tgl ($this_star[0]+ “.e[262]”);
select -tgl ($this_star[0]+ “.e[264]”);
select -tgl ($this_star[0]+ “.e[266]”);
select -tgl ($this_star[0]+ “.e[268]”);
select -tgl ($this_star[0]+ “.e[270]”);
select -tgl ($this_star[0]+ “.e[272]”);
select -tgl ($this_star[0]+ “.e[274]”);
scale -r 1 $scale $scale;

//_____Randomize star field outside of fractal form_____//

float $randX= `rand -90 90`;
float $randY= `rand -90 90`;
float $randZ= `rand -90 90`;

//_Scatter_part_2_//
if ($scatter=1){
select $this_star[0];
move 0 0 0 ($this_star[0]+ “.rotatePivot”);
rotate $randX $randY $randZ;
// move -os 12 12 12;
}
setAttr (“Star”+$count+”Shape.aiOpaque”) 0;
$count += 1;

$offset= $offset + $r;
$r=($r/3);

vector $X_plu = << ($origin.x+$offset), $origin.y, $origin.z>>;
vector $X_min = << ($origin.x-$offset), $origin.y, $origin.z>>;

vector $Z_plu = << $origin.x, $origin.y, ($origin.z+$offset)>>;
vector $Z_min = << $origin.x, $origin.y, ($origin.z-$offset)>>;

vector $Y_plu = << $origin.x, ($origin.y+$offset), $origin.z>>;
vector $Y_min = << $origin.x, ($origin.y-$offset), $origin.z>>;

fnc_starfield ($iterations, $r, $offset, $X_plu, $scale, $count, $scatter);
fnc_starfield ($iterations, $r, $offset, $X_min, $scale, $count, $scatter);
fnc_starfield ($iterations, $r, $offset, $Y_plu, $scale, $count, $scatter);
fnc_starfield ($iterations, $r, $offset, $Y_min, $scale, $count, $scatter);
fnc_starfield ($iterations, $r, $offset, $Z_plu, $scale, $count, $scatter);
fnc_starfield ($iterations, $r, $offset, $Z_min, $scale, $count, $scatter);
}

vector $zero = <<0,0,0>>;

fnc_starfield($field_repitition, $field_size, 0, $zero, $field_scale, 1, $field_scatter);
$num=1;
while ($num<94){
setAttr (“Star”+$num+”Shape.aiOpaque”) 0;
$num += 1;
}
select -all;
select -d aiSkyDomeLight1;
group -n “fractal_w_field”;
}