### FLAM3 and palette usage

• 3 Replies
• 175 Views

0 Members and 1 Guest are viewing this topic.

#### rbag183

• Fractal Freshman
• Posts: 2

#### FLAM3 and palette usage

« on: June 13, 2018, 08:36:45 AM »
Hello,

I develop a simple FLAM3 javascript program based on the flam3 paper. In the original paper each flame has a color and the color is blended for each point with the preceding color, ie:

pointColor = (pointColor + flameColor) / 2

It works well and you can easily see which flame impacted a point (see attached images), but I struggle to understand the palette concept.

Programs like Apophysis or others use a palette to display the flame, but I don't see how can I use a palette with the average calculation. Can someone explain me the concept of palette coloring ?

• 3e
• Posts: 1065

#### Re: FLAM3 and palette usage

« Reply #1 on: June 13, 2018, 02:51:59 PM »
As far as I understand it, the flam3 palette algorithm works like this, adding an extra layer of indirection:

Code: [Select]
int indexvec2 pointfloat colourvec4 rgbauntil image looks good enough{  index = random choice up to flame count  point = flametransform[index](point)  colour = (colour + flamecolour[index]) / 2  rgba = imagepalette(colour)  accumulateimage(point, rgba)}
The imagepalette lookup table takes flamecolour indices in [0..1] and gives you RGB(A) colours, the RGB(A) colours in the palette don't need to be a simple smooth gradient, which means you can highlight different structures in the flames more easily.

#### rbag183

• Fractal Freshman
• Posts: 2

#### Re: FLAM3 and palette usage

« Reply #2 on: June 13, 2018, 06:41:01 PM »
Thanks for your answer, I managed to implement something like that, the result seems satisfying.

Any hint to increase image quality ?

• 3e
• Posts: 1065

#### Re: FLAM3 and palette usage

« Reply #3 on: June 13, 2018, 08:44:28 PM »

### Similar Topics

###### Palette Selection

Started by mdudley on Kalles Fraktaler

4 Replies
396 Views
May 07, 2018, 04:54:35 AM
by panzerboy
###### MOVED: Palette Selection

Started by Fraktalist on Forum Help And Support

0 Replies
155 Views
April 26, 2018, 08:38:43 PM
by Fraktalist
###### Reducing CPU Usage?

Started by zxs on Mandelbulb3d

6 Replies
256 Views
July 14, 2018, 09:37:28 PM
by Kalter Rauch
###### Question about usage in general

Started by Xerilon on Mandelbulb3d

11 Replies
657 Views
August 01, 2018, 04:44:11 AM
by Kalter Rauch
###### Depth of field usage

Started by Micha1982 on Mandelbulber

8 Replies
336 Views
April 07, 2018, 07:44:31 AM
by Micha1982