|
|
gregjohn wrote:
> The neatly ordered, predictable pattern of red dots in the top half of the image
> are generated with povray's rand() function. They demonstrate what you get if
> you cause a monotonic increase in the seed value. Once I had a project
> "ruined" by this predictable pattern because I was exploring some parameter
> space via use of the #declare RSEED=seed(frame_number).
>
The key to using a RNG is that it should be seeded once and ONLY once,
before the RNG is used the first time. That starts up a sequence of
random numbers. Then each time the RNG is called it gives you the next
(pseudo) random number in the sequence. If you try to seed it each
time, you're not using a random sequence, it depends on however your
seqence of seeds is defined.
Now, this can be a problem in POV-Ray animations because each frame is
essentially created from scratch. There's no built-in way to continue
the RNG sequence between frames. One possible approach is to save a
final random number to a file and use that as the seed for the next
frame. But in a single, non-amimated image, don't use more than one
initial seed.
Of course, since POV-Ray allows multiple random streams, this means that
each one should be only seeded once -- and generally a different seed
for each.
-=- Larry -=-
Post a reply to this message
|
|