Particle Animation with Anim8or v0.7
Designing a starry background
Let’s make a
starry background in a scene! It doesn’t even require animation, just
positioning a number of stars. Obviously, the particles will be the stars. We
could use small spheres, for simplicity. If the camera is going to view a
limited sector of the space, the starry background can be reduced to a
rectangular area filled with spheres. For wide camera movements, a hemispheric,
or spherical distribution of stars would be more suitable. How to position the
stars? On a surface, or in a volume of space? Positioning on a surface means
(approximately) equal distance from the camera for each sphere and equal size of
the stars (if the stars are obtained adding the same unique sphere repeatedly in
the scene). That won’t look good. Distributing the spheres randomly in a
volume makes the stars look different in size, according to the distance to the
camera, but neither that won’t look realistic: a linear distributing in size
(the same number of big, medium and small stars) is a fake rejected by the eyes.
We are familiar with an exponential distribution of stars in the sky (very few
shiny stars and a lot of faint stars). After this analysis, we take a decision.
The stars will be distributed randomly on a spherical surface centered in the
camera and will consist of 3,000 spheres of different sizes. Our particle will
be a sphere created in the origin of the workspace, leaving its name the default
object01. In scene mode, object01 will be added 3,000 times, scaled each time
with a random factor (from a suitable distribution) and moved to a random
location on a spherical surface of 500 units radius, centered in the camera.
Applying a suitable star material to object01, some lights in the scene,
unchecking ground grid, setting a black background for rendering and that’s
all!
The starry_background.an8
file will look like this:
header
{
version { "0.7-beta-3" }
build { "2001.10.24" }
}
environment
{
grid { 1 10 50 50 }
framerate { 24 }
}
object
{ "object01"
sphere {
name { "sphere01" }
material { " -- default --" }
diameter { 1 }
longlat { 12 8 }
}
}
scene
{ "scene01"
frames { 72 }
groundgrid { 0 }
background { 0 0 0 }
camera { "camera01"
loc { (150 100 200) }
orientation { (-0.04877 0.93733 -0.14632 -0.31244) }
fov { 90 }
}
objectelement
{ "eobject1" "object01"
loc { (-276.408060 227.473592 349.076423) }
scale { 2.453318 }
}
objectelement { "eobject2" "object01"
loc { (-183.613230 -354.922263 300.526819) }
scale { 1.650104 }
}
……….
objectelement { "eobject3000" "object01"
loc { (-178.576295 -27.996821 466.183102) }
scale { 1.356981 }
}
}
It’s obvious that
such a task can’t be accomplished manually, but it’s a piece of cake for the
computer. If you know programming, you will do it in your preferred language. I
used an awk utility (download it here) to execute
the following awk script, generating the code featured in green for starry_background.an8: