Logo by DsyneGrafix - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. October 14, 2019, 11:38:46 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: Fractal eXtreme data's  (Read 1931 times)
Description: Palettes, mapping and other
0 Members and 1 Guest are viewing this topic.
SeryZone
Strange Attractor
***
Posts: 253


Contemplate...


« on: January 04, 2014, 09:42:08 PM »

Hello to all!!! I got some problem. You can see, that Fractal eXtreme don't use normal interpolation, even COSINE!!! It don't gives normal result! But Ultra Fractal gives more colorful images
 

And I think for palette-translator. I use simple 228-colors palette (from Ultra Fractal) and translate EVERY index to FX palette. Result - 228 points.

How to decrypt palette file?
Hex-code of this palette is



This bytes are Boudary Color. It white. Maybe, every programmer know Pascal. OK, let's begin...

Code:
var
     input,output:file of byte;
begin
     assign(input,'Palette.fxp');
     reset(input, 1);
     //How to read???
end.

Second problem.

I have 4096-colors palette and I want make it same is Fractal eXtreme. OK, Coloring formula is:

#index = ( #iteration/(4096/228) )/Speed;

HOW TO BE WITH ACCELERATION??? I know, it depends from max. iterations. But, how it works???
Logged

panzerboy
Fractal Lover
**
Posts: 242


« Reply #1 on: January 05, 2014, 01:19:32 AM »

You might want to download my command line utilities that convert FX palette to and from text.
http://www.mediafire.com/download/wqshdpxb5v4cz62/FXutilsSource.zip
compiled version (by lcc) http://www.mediafire.com/download/b8oi6686ec0e0xo/fxutils.zip
If you inspect the source code it should tell you the formats of the FX palette files.

I always liked that FX didint add cosine curves and instead strictly linearly interpolated the colours.
If you think about the top of the curve when things are bright that means lots of iterations will be bright and "washed out".
Similarly at the bottom many iterations will be dark
On the 'shoulders' where the interesting colour changes happen, few iterations.
Look at your palettes, there seems to be more black in the UF version, that means lots of iterations that will look the same.
A similarly broad white peak in UF but a nice sharp White peak in FX that will pick out detail.

Indeed I've created palettes that have even sharper peak at the maximum luminance.


* greynonlinear.jpg (24.21 KB, 376x391 - viewed 692 times.)
« Last Edit: January 05, 2014, 01:37:54 AM by panzerboy » Logged
SeryZone
Strange Attractor
***
Posts: 253


Contemplate...


« Reply #2 on: January 05, 2014, 02:30:42 PM »

Thanks. I don't learn C++, please, tell me for about this code:

Code:
int main(int argc,char *argv[])
{ int fnarg;
    FILE *palettefile;
FILE *textfile;
char FxPal[PALMAX];
int pivlen; /* Palette index and values length */
int numindex, index, value;
char textline[TXTMAX], origline[TXTMAX];
int txtlncnt;
enum indextype lastindex, currindex;
char *word,*nlpos;
int fxpalpos, fxpallastixpos, pallength;

if (argc < 3) {
/* If less than 2 arguments we call the Usage routine and exit */
Usage(argv[0]);
return 1;
}
/* handle the program options */
fnarg=HandleOptions(argc,argv);
if((textfile=fopen(argv[fnarg],"r"))==NULL) {
fprintf(stderr,"Cant open %s\n",argv[fnarg]);
return 2;
}
if((palettefile=fopen(argv[fnarg+1],"wb"))==NULL) {
fprintf(stderr,"Cent open %s\n",argv[fnarg+1]);
return 3;
}
memset(FxPal,0,PALMAX);
    memcpy(FxPal,FXPL_hdr,FXPL_HdrSize);
memcpy(&(FxPal[FXPL_FlenHi+1]),FXPL_FlenFill,FXPL_FlenFillSize);
FxPal[FXPL_ShowStripes]=1;
    memcpy(&(FxPal[FXPL_ShowStripes+1]),FXPL_SSFill,3);
FxPal[FXPL_CyclePos]=114;
memcpy(&(FxPal[FXPL_CyclePos+1]),FXPL_CPFill,3);
FxPal[FXPL_CycleBackwards]=0;
FxPal[FXPL_CycleSpeed]=30;
memcpy(&(FxPal[FXPL_CycleSpeed+1]),FXPL_CSFill,7);
FxPal[FXPL_InteriorRed]=0xFF;
FxPal[FXPL_InteriorGreen]=0xFF;
FxPal[FXPL_InteriorBlue]=0xFF;
FxPal[FXPL_InteriorBlue+1]=FXPL_ICFill;
FxPal[FXPL_EdgeFillRed]=0;
FxPal[FXPL_EdgeFillGreen]=0;
FxPal[FXPL_EdgeFillBlue]=0;
FxPal[FXPL_EdgeFillBlue+1]=FXPL_EFFill;

fxpallastixpos=FXPL_NumRedEvenIndexes;
fxpalpos=fxpallastixpos+1;
FxPal[fxpalpos++]=0;
numindex=0;
lastindex=unset; /* 1st index should be red colour so this will trigger break */
txtlncnt=0;
while(fgets(textline,TXTMAX,textfile)!=NULL) {
if((nlpos=strchr(textline,'\n'))!=NULL)
*nlpos=0;
txtlncnt++;
strncpy(origline,textline,TXTMAX);
word=strtok(textline," ");
if(strnicmp(word,"index",TXTMAX)==0) {
if(lastindex==unset) {
fprintf(stderr,"line %d error index found before colour type\n%s\n",txtlncnt,origline);
    exit(4);
}
word=strtok(NULL," ");
sscanf(word,"%d",&index);
word=strtok(NULL," ");
if(strnicmp(word,"value",TXTMAX)!=0) {
fprintf(stderr,"value doesnt follow index line %d\n%s\n",txtlncnt,origline);
exit(5);
}
word=strtok(NULL," ");
sscanf(word,"%d",&value);
numindex+=1;
FxPal[fxpalpos++]=(char)index;
FxPal[fxpalpos++]=0;
FxPal[fxpalpos++]=(char)value;
FxPal[fxpalpos++]=0;
} else {
/*          must be a colour type line RED main, Green main, red stripe etc */
if(strnicmp(word,"red",TXTMAX)==0)
              indexbreak(word,&lastindex,&numindex,&fxpalpos,&fxpallastixpos,FxPal,txtlncnt);
    else if(strnicmp(word,"green",TXTMAX)==0)
indexbreak(word,&lastindex,&numindex,&fxpalpos,&fxpallastixpos,FxPal,txtlncnt);
    else if(strnicmp(word,"blue",TXTMAX)==0)
indexbreak(word,&lastindex,&numindex,&fxpalpos,&fxpallastixpos,FxPal,txtlncnt);
else {
fprintf(stderr,"Unexpected %s at line %d\n",word,txtlncnt);
exit(6);
}
}
}
if(lastindex!=unset) {
FxPal[fxpallastixpos]=(char)numindex;
}
pallength=fxpalpos-FXPL_ByteB4Palette;
FxPal[FXPL_FlenLo]=(char)(pallength & 0x00FF);
  FxPal[FXPL_FlenHi]=(char)((pallength&0xFF00)>>8);
fwrite(FxPal,fxpalpos,1,palettefile);
fclose(palettefile);
fclose(textfile);
}

Ye, I researched for sequence. Cool.
Logged

panzerboy
Fractal Lover
**
Posts: 242


« Reply #3 on: January 06, 2014, 07:09:07 AM »

That looks like the code for fxpalload which loads a text file to create (or overwrite) a fractal extreme palette file.
The simple way to see the format of the supplied text is to use the fxpallist program. eg.

Code:
C:\Users\panzerboy\Documents\Fractal eXtreme>fxpallist -i rainbowstripe.fxp
Red
index 27 value 255
index 59 value 255
index 93 value 0
index 218 value 0
Green
index 27 value 0
index 59 value 255
index 115 value 255
index 168 value 0
index 218 value 0
Blue
index 90 value 0
index 131 value 255
index 168 value 255
index 218 value 0
Red Stripe
index 3 value 127
index 15 value 127
index 27 value 0
index 67 value 0
index 78 value 130
index 97 value 128
index 107 value 0
index 147 value 0
index 154 value 124
index 172 value 124
index 183 value 0
index 218 value 0
Green Stripe
index 3 value 0
index 15 value 126
index 33 value 127
index 49 value 0
index 87 value 0
index 103 value 132
index 118 value 133
index 139 value 0
index 158 value 0
index 174 value 141
index 189 value 142
index 210 value 0
index 218 value 0
Blue Stripe
index 3 value 0
index 33 value 0
index 46 value 131
index 68 value 119
index 80 value 0
index 117 value 0
index 128 value 121
index 150 value 125
index 168 value 0
index 197 value 0
index 202 value 132
index 223 value 138

The stripe colours are optional.
I'm not sure if the program tolerates extra spaces so best to seperate the words with a single space character.
To build a palette file use
Code:
fxpalload textfile.txt fxpalletefile.fxp
If you'd like an explanation of the .fxp file format I'll need to read the code too.
It's plain vanilla C BTW not c++.
« Last Edit: January 06, 2014, 07:43:20 AM by panzerboy, Reason: typo » Logged
SeryZone
Strange Attractor
***
Posts: 253


Contemplate...


« Reply #4 on: January 07, 2014, 10:03:20 AM »

OK, I understand.
Do you know, how to work acceleration in coloring???
Logged

panzerboy
Fractal Lover
**
Posts: 242


« Reply #5 on: January 07, 2014, 11:47:11 AM »

Just to be clear... I assume you realise the acceleration isn't stored in the palette files?
I usually use an acceleration of 2 - 3.5, it seems to space out the later stages of a zoom nicely without the colours getting too sparse
eg mostly the same colour on screen.
Often I'll use a speed of 0.417 or .631 to blend the palette of the first few zooms until the accelerations kicks and shows all the palette colours.
Thats a because I'll have set all 228 colour indexes and stripes so intially the stripes are subdued to be revealed later.
I don't know what the maths is the FX uses to work the acceleration the max iterations is involved somehow.
Its startling the first time you adjust the maximum iterations with acceleration and all of the colours shift.
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Article about Fractal Data Compression Compression Jules Ruis 2 3693 Last post March 04, 2010, 11:16:26 PM
by Nahee_Enterprises
Fractal eXtreme Fractal eXtreme « 1 2 3 4 5 » poorfuckedupnature 66 30329 Last post March 12, 2012, 09:41:04 AM
by cKleinhuis
Fractal extreme iteration data Help & Support kjknohw 12 1366 Last post October 12, 2013, 12:31:24 PM
by panzerboy
fractal dimension project - country borders as digital data ?! General Discussion cKleinhuis 3 838 Last post December 02, 2012, 03:41:45 PM
by cbuchner1
Fractal Extreme updated, 4K video Fractal eXtreme panzerboy 5 1583 Last post January 30, 2016, 07:18:50 PM
by Kalles Fraktaler

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.134 seconds with 27 queries. (Pretty URLs adds 0.012s, 2q)