|
![](/i/fill.gif) |
"Rarius" <rar### [at] rarius co uk> wrote:
> MrLoft,
>
> You seem to be misunderstanding the SDL random keywords and how to use
> them...
>
> #declare NxRd = seed (23574);
> #declare NyRd = seed (22846);
> #declare NzRd = seed (24784);
>
> ...
>
> scale <0.2*NxRd, 0.2*NyRd, 0.2*NzRd>
>
> You are multiplying by the identifier of a random stream, not a random
> number... You need to change the "scale" line to read as follows:
>
> scale <0.2*rand(NxRd), 0.2*rand(NyRd), 0.2*rand(NzRd)>
>
> Personally I would only use a single random stream, rather than three.
>
> Rarius
Sometimes multiple streams are convenient if you want your randomness consistent
(even if that sounds contradictory). In this case, it may be of use to have the
x/y/z translations on the same stream (however, I can also see reason not to).
But I would certainly put the scaling seed on a separate stream so it doesn't
interfere with the translations.
From what I can tell in your scene, you should also make sure you scale the
object before translating it (unless that is your intention), as scaling after
causes the translation to essentially get scaled as well (all scaling is
relative to the origin).
-tgq
Post a reply to this message
|
![](/i/fill.gif) |