## power fractal "lead-in scale" question (again)

Started by epsilon, January 19, 2014, 02:26:00 pm

#### epsilon

##### January 19, 2014, 02:26:00 pm
Hi all,

after having read the wiki/documentation pages and many forum contributions on this topic I'm afraid I still do not quite understand the meaning of "lead-in scale" vs. "feature scale".
I understand the concept at a "high level" as in  "lead-in-scale=mountain-range vs. feature-scale=individual mountain".

But I'd rather prefer a more mathematical description.

I understand that we have

n_feat = log2(feature_scale/smallest_scale) octaves for our "mountain-feature".

And that there are 'somhow' an additional

But how are those lead_in octaves different from the regular feature octaves (why not just using a total of n_feat+n_lead regular octaves ?)

I presume that the "power fractal" is some kind of "multi fractal" where one fractal function's output is used to drive certain attributes of another fractal function.
So is it correct that the lead-in-scale corresponds to the scale of the first ('driver') fractal whereas the feature-scale corresponds to the octaves of the second ('main') fractal ?

Thanks a lot for any explanations/information

eps.

#### epsilon

##### January 27, 2014, 07:27:30 pm #1
Not a a single reply to the original post ?
Maybe the question was not phrased understandably enough ? (English is not my first language)

##### January 27, 2014, 10:11:08 pm #2
Hi,

Im sure the OP just got overlooked. It happens from time to time.
You probably just posted when people were focusing on other questions, and you got bumped down. Also your question will appeal to fewer people do to its nature. Explaining things mathematically is not everyones strong suit.

In the meantime you might want to PM a user you think can help. user "mogn" comes to mind.

It has been eaten.

#### Matt

##### January 28, 2014, 06:04:00 am #3
Hi eps,

The lead-in octaves have the same amplitude as the feature scale octave. While the "roughness" parameter controls the damping of octaves below the feature scale all the way down to the smallest scale, it does not affect the octaves above the feature scale.

[attach=1]

Lead-in octaves affect smaller octaves in the multifractal, but they do this in the same way as any 'normal' octave would. Due to the way the basic amplitudes are calculated, though, having lead-in octaves gives the multifractal a chance to produce some amplitude variation at higher scales before calculating the feature scale.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

#### Matt

##### January 28, 2014, 06:14:23 am #4
BTW, the scale ratio between octaves (known as 'lacunarity') in the Power Fractal is 1.92, so to calculate the number of octaves I use log to the base 1.92, so it would be something like:

log( leadinScale / smallestScale ) / log(1.92)

Matt
Just because milk is white doesn't mean that clouds are made of milk.

#### russe166

##### January 28, 2014, 06:26:56 am #5
Thanks for the explanation, Matt.

Especially the text in the attached document that explains the graph is really helpful.
Do more of these documents exist?
Is a kind of handbook in preparation?

Michael

#### Matt

##### January 28, 2014, 06:41:32 am #6
I prepared this one just now. Most of the documentation we have is in the Wiki: http://planetside.co.uk/wiki/index.php?title=Main_Page

I'll transfer this information over to the Wiki.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

#### russe166

##### January 28, 2014, 06:55:04 am #7
Thanks for the quick answer. I will take a look in the Wiki.

Michael

#### bobbystahr

##### January 28, 2014, 11:14:15 am #8
Quote from: Matt on January 28, 2014, 06:41:32 am
I prepared this one just now. Most of the documentation we have is in the Wiki: http://planetside.co.uk/wiki/index.php?title=Main_Page

I'll transfer this information over to the Wiki.

Matt

Brilliant...I think I finally get it...thanks Matt...

something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

#### Tangled-Universe

##### January 28, 2014, 11:20:59 am #9 Last Edit: January 28, 2014, 11:24:02 am by Tangled-Universe
Quote from: Matt on January 28, 2014, 06:14:23 am
BTW, the scale ratio between octaves (known as 'lacunarity') in the Power Fractal is 1.92, so to calculate the number of octaves I use log to the base 1.92, so it would be something like:

log( leadinScale / smallestScale ) / log(1.92)

Matt

Thanks for sharing this nice picture Matt, I immediately have some ideas and perhaps possible improvements or even solutions for cloud things I'm working on for many years.

Curious, if I calculate it manually I always end up with 1 octave less. How come, where's the extra octave coming from?

Lacunarity is perhaps interesting to manipulate, are you considering unlocking it in the interface? Will the shader/code allow for it anyway?

#### epsilon

##### January 28, 2014, 01:05:07 pm #10 Last Edit: January 28, 2014, 01:09:12 pm by epsilon
Quote from: Matt on January 28, 2014, 06:04:00 am
Hi eps,

The lead-in octaves have the same amplitude as the feature scale octave. While the "roughness" parameter controls the damping of octaves below the feature scale all the way down to the smallest scale, it does not affect the octaves above the feature scale.
Matt

Thank you very much for this helpful information !
With that explanation and especially the attached picture the 'lead-in-octaves' vs. 'normal octaves'  now makes perfectly sense

#### Matt

##### January 28, 2014, 09:13:47 pm #11 Last Edit: January 28, 2014, 09:15:43 pm by Matt
Quote from: Tangled-Universe on January 28, 2014, 11:20:59 am
Thanks for sharing this nice picture Matt, I immediately have some ideas and perhaps possible improvements or even solutions for cloud things I'm working on for many years.

Be sure to try out the "Show HUD in Preview" option in the alpha build, to give you a live feedback as you change the fractal parameters. The HUD only works for displacement, not colour.

Quote
Curious, if I calculate it manually I always end up with 1 octave less. How come, where's the extra octave coming from?

I should have added one to that formula. That's because if you have a lead-in scale of 2 and a smallest scale of 1, you want to represent that with 2 octaves, not 1. But the code does other things, for example, it enforces the lead-in scale to be at least twice the feature scale regardless of what lead-in parameter you enter.

Quote
Lacunarity is perhaps interesting to manipulate, are you considering unlocking it in the interface? Will the shader/code allow for it anyway?

It's currently hardcoded, but it might be possible to make it dynamic in future. I'm not sure I will, though, because it will further complicate some other aspects of the fractal if I can't make assumptions about what the lacunarity will be.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

#### Tangled-Universe

##### January 29, 2014, 06:07:20 am #12
Thanks Matt, I understand what you mean about the lacunarity.
I kind of suspected it wouldn't be so straight forward to expose the setting.

In music the lacunarity of noise (or musical notes I should say) is 2, but in CG the lacunarity is usually at 1.92, like TG does as well, or anything but 2.
Why is this? Is a lacunarity of 2 generating too repetitive patterns?
Something I was just wondering and perhaps you may know the answer to it, Matt?

The HUD is indeed working fine for this purpose
A cloud fractal seems to work as well if you use high values for noise variation? Curious.