Planetside Software Forums

General => Terragen Discussion => Topic started by: rcallicotte on October 01, 2008, 03:16:27 PM

Title: Random Seeds
Post by: rcallicotte on October 01, 2008, 03:16:27 PM
Is there a formula we could be given to better manipulate the Seeds to do something less random?  Clouds, for instance, has a Seed value and for reasons unknown to me 3227 seems to be more useful in making bulky clouds than any other.

Any science someone can muster might help, but keep the cookies on the lower shelf. 
Title: Re: Random Seeds
Post by: bigben on October 01, 2008, 05:25:57 PM
If there was, would it be a random seed?   ;)
Title: Re: Random Seeds
Post by: inkydigit on October 01, 2008, 06:23:31 PM
numerology?!!
;)
Title: Re: Random Seeds
Post by: PG on October 01, 2008, 06:27:45 PM
Well I think random seed is only used to give us different effects each time. If set up a scene in the same way and use the same seed it will look pretty much the same. Go ahead and try it, start TG2, tilt the camera up to see the atmosphere, add a cumulus cloud layer, get the seed from the density fractal, delete the cloud layer and create a new one, copy the seed into the new layer and see that the results in the preview window are identical (pretty much).
Title: Re: Random Seeds
Post by: Oshyan on October 01, 2008, 11:57:02 PM
The random seed is just that - random. However for the same values of the seed, it will produce the same results in a given noise shader type. There is no correlation between one value and the next, so they can't be smoothly interpolated. This type of random seed is common in fractal noise functions.

- Oshyan
Title: Re: Random Seeds
Post by: jo on October 02, 2008, 05:47:48 AM
Hi,

Just to be expand on Oshyan's example, the seed is essentially what controls the fractal pattern. The seed is a number used to set up the random number generator used for generating the fractal. Any given seed value always gives the same fractal pattern. The reason we let you set the seed value is two fold:

- If we didn't allow differing seeds the fractals for a given node/fractal generator would always look the same, which would be kind of boring.
- If we didn't track the seed value and just picked a new one every time you opened the project or something, then the fractal pattern would always be changing and you'd never get the same results twice.

A seed value of 3228 isn't going to give a slightly different pattern as a seed value of 3227, it is likely to be completely different.

The Random Seed buttons just conveniently pick a new seed value for you at random. You could just as well make up new numbers for it yourself and enter them in the Seed field.

If you happen to really like the results of a seed of 3227 you could always set up a cloud layer with it, save a clip of it and just insert that.

I haven't really looked into it, but I would guess other seed values give just as nice clouds but possibly in different places than the pattern from the seed value you like.

Regards,

Jo
Title: Re: Random Seeds
Post by: Alfamike on October 02, 2008, 06:17:04 AM
You could regard the random number generator as a simple black box. It has an output that is looped back to the input. So whatever comes out of it automatically becomes the start/initiation for the next random number. This way you can always reproduce a series of numbers, so called pseudo random numbers, 'cause they are never really random.

If we would not have a seed, like Jo said, we'd always get the same sequence of numbers out of the generator cause it would always start with the same first initial number (seed.)

Hm. Don't know if this helped. Anyway....

AM.
Title: Re: Random Seeds
Post by: rcallicotte on October 02, 2008, 06:56:45 AM
Thanks all!  This is all very helpful. 

What I really wanted to know is if there is a charted way to know what given numbers do what.  For example, 3227 looks good for clouds and 3228 might not.  Understanding what's going on enough to chart out some helpful algorithm for simple users like me could be cool.  But, maybe it isn't possible.

Thanks again.
Title: Re: Random Seeds
Post by: Alfamike on October 02, 2008, 07:08:03 AM
Quote from: calico on October 02, 2008, 06:56:45 AM
Thanks all!  This is all very helpful. 

What I really wanted to know is if there is a charted way to know what given numbers do what.  For example, 3227 looks good for clouds and 3228 might not.  Understanding what's going on enough to chart out some helpful algorithm for simple users like me could be cool.  But, mayb it isn't possible.

Thanks again.

Hi Calico,

You'd need to get TG's random number generator, or one of the ones, more likely. That would be the only way. Unless you'd get their algorithm, you can't predict the outcome of the generator. Maybe with decryption software, but then you'd probably stuggle to get the data into it.

Cheerio.
AM.
Title: Re: Random Seeds
Post by: Oshyan on October 02, 2008, 11:24:51 PM
There is absolutely no way to predict ahead of time, or even from knowledge of the inner workings of TG, how a particular seed will actually look when rendered through a given noise function and/or other shader (e.g. cloud shader vs. surface layer). So the only possible way to know what a particular seed value does would be to test it. If you really want to know what every single seed value does, do an animation on that parameter, ensuring that you have 1 frame for each noise seed value in your range, i.e. if you wanted to test from 1000 to 2000, you would need a total of 1001 frames. But importantly, this would *only* tell you what each seed value did *for that particular combination of shader settings*.

As for your feeling that one particular seed may make "good looking clouds" and another may not, as Jo said this is not really an absolute nor a particularly useful statement because you are only observing the output of that seed in that particular noise function and only at one particular place. If you saw the clouds from a different location you might think they don't look very good when the same noise seed produces output that you like elsewhere (e.g. nearer the 0,0 coordinate origin and default camera position). Not to mention that that same seed value could look totally different if the shader it's attached to (e.g. cloud shader) has different settings (density, edge sharpness, etc.).

- Oshyan

Title: Re: Random Seeds
Post by: rcallicotte on October 03, 2008, 09:13:56 AM
Thanks Oshyan.  Trying my best to get a systemic understanding of TG2.  This helps my lack of knowledge in this area.
Title: Re: Random Seeds
Post by: D.A. Bentley (SuddenPlanet) on March 02, 2018, 12:57:14 PM
I have been rendering out previews of one scene with the seed animated on a linear curve, so on frame 1 I get seed 1, frame 100 seed 100, and on frame 20,000 seed 20,000 etc..  So far I have about 8,000 seed previews rendered, but I can visually see a pattern, and I verified it with math.

Every 256 seed repeats the same image.  Interesting eh?  I'll have to try other scenes to see if this sed pattern of only 256 unique variations holds true.

Derek
Title: Re: Random Seeds
Post by: Oshyan on March 02, 2018, 05:15:55 PM
Matt told me that this is actually true, but I wasn't aware of it when I wrote my original reply above. ;)

- Oshyan
Title: Re: Random Seeds
Post by: Matt on March 03, 2018, 01:08:09 AM
Quote from: D.A. Bentley on March 02, 2018, 12:57:14 PM
I have been rendering out previews of one scene with the seed animated on a linear curve, so on frame 1 I get seed 1, frame 100 seed 100, and on frame 20,000 seed 20,000 etc..  So far I have about 8,000 seed previews rendered, but I can visually see a pattern, and I verified it with math.

Every 256 seed repeats the same image.  Interesting eh?  I'll have to try other scenes to see if this sed pattern of only 256 unique variations holds true.

Derek

Yes, sadly there's a bug but I can't "fix" it because everyone's renders would change. What might be possible is adding a checkbox to enable the full 16-bit seed. My sense is that it's not really a great limitation so I don't plan to do this, but I might if enough people ask for it.

Matt
Title: Re: Random Seeds
Post by: D.A. Bentley (SuddenPlanet) on March 03, 2018, 11:36:08 PM
Yea, I only pointed it out because I thought it was interesting.  Being only one variable in the mix of many, there are still millions of variations with what we have to adjust, so not a big deal in my mind to have only 256 possible seeds. 

I was referring to the seeds in the Density Fractal, but is this a bug affecting all nodes that have seed entries, for example the Power Fractal Shader, and Alpine Fractal Shader?

Derek

Title: Re: Random Seeds
Post by: Matt on March 04, 2018, 03:50:01 PM
The density fractal is a Cloud Fractal, which is a Power Fractal under the hood. They are affected by this bug. I think Alpine Fractal and some others are too.

Matt
Title: Re: Random Seeds
Post by: WAS on March 04, 2018, 09:30:17 PM
Obviously and hopefully not the case, but I had  a similar issue happen in a program I wrote, where a variable was being forced into a byte, being, 256 bits. Lol Everything was broken for so long and it took me forever to find a simple mistake of a var being cast to a byte.

Did find it interesting it being 256, or a bytes maximum, if you will.
Title: Re: Random Seeds
Post by: Marander on March 05, 2018, 02:20:37 AM
Quote from: Matt on March 03, 2018, 01:08:09 AM

Yes, sadly there's a bug but I can't "fix" it because everyone's renders would change. What might be possible is adding a checkbox to enable the full 16-bit seed. My sense is that it's not really a great limitation so I don't plan to do this, but I might if enough people ask for it.

Matt

Hello Matt

Oh that would be a great option to have. Please if there's any chance, add a button and functionality for 16bit seeds!

Actually the best would be to have checkbox (enabled by default) for Legacy / compatible / 8bit seeds. The user could disable this to have more seed variations. Via user preferences the user could choose if he wants this setting to be enabled by default or not. I would prefer to have more seed variations by default-

Best regards,

Michael
Title: Re: Random Seeds
Post by: Matt on March 05, 2018, 04:10:21 AM
Thanks for the input, Michael, and welcome to the forum!

Matt