|
![](/i/fill.gif) |
Try this out:
// Slime's Star Pigment Macro
#macro StarSubPigment(StarSize, StarFrequency)
crackle
form <1,0,0>
#local Cutoff = StarSize * StarFrequency;
color_map {
[Cutoff rgb 1]
[Cutoff rgb 0]
}
scale 1/StarFrequency
#end
// minsize, maxsize = size range of stars (some stars will always be smaller
due to nature of crackle pattern)
// starfrequency = how many stars
// variationfrequency = how quickly their size changes
#macro StarPigment(MinSize, MaxSize, StarFrequency, VariationFrequency)
#local NumSizeSteps = 8;
pigment
{
pigment_pattern
{
bozo
color_map {[0 rgb 0][1 rgb 1]}
scale 1/VariationFrequency
}
pigment_map
{
#local StepNum = 0;
#while (StepNum < NumSizeSteps)
#local SizeAmnt = (StepNum + .5) / NumSizeSteps;
#local PreSize = MinSize + (StepNum / NumSizeSteps) * (MaxSize -
MinSize);
#local PostSize = MinSize + ((StepNum + 1) / NumSizeSteps) * (MaxSize -
MinSize);
[SizeAmnt
StarSubPigment(PreSize, StarFrequency)
]
[SizeAmnt
StarSubPigment(PostSize, StarFrequency)
]
#local StepNum = StepNum + 1;
#end
}
}
#end
sky_sphere {
StarPigment(
.0004, // min star size
.003, // max star size
50, // star density (higher = more)
10 // variation frequency (higher = star size changes more over nearby
parts of the sky)
)
}
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
![](/i/fill.gif) |