Logo by S Nelson - 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: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. April 20, 2024, 03:58:18 AM


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: Converting between FractInt and Fractal eXtreme palettes  (Read 9190 times)
0 Members and 1 Guest are viewing this topic.
simon.snake
Fractal Bachius
*
Posts: 640


Experienced Fractal eXtreme plugin crasher!


simon.fez SimonSideBurns
« on: May 23, 2013, 11:56:31 AM »

Hi

I recall hearing that someone had worked out the file format for Fractal eXtreme colour palettes and had converted a few FractInt palettes into FX.

Is this something that could be released as a tool for others to use?

I've got some palettes in FractInt which I would like to use in FX, but I started to convert one and it just seemed to be a right pain in the neck, and I thought that there must be a better way.

I've also created some palettes in FX which would be nice to have in FractInt, so would it be possible to go the other way also?

Many thanks,

Simon
Logged

To anyone viewing my posts and finding missing/broken links to a website called www.needanother.co.uk, I still own the domain but recently cancelled my server (saving £30/month) so even though the domain address exists, it points nowhere.  I hope to one day sort something out but for now - sorry!
panzerboy
Fractal Lover
**
Posts: 242


« Reply #1 on: May 24, 2013, 12:38:15 AM »

I think that's probably my text-to-pallette (& vice versa) utilities.
http://www.mediafire.com/download/b8oi6686ec0e0xo/fxutils.zip

These are simple command line c programs.
I've now uploaded the source, the details on the Fractal Extreme palette file are in the xfpal.h file.
http://www.mediafire.com/download/wqshdpxb5v4cz62/FXutilsSource.zip

Typing in the commands, pxpalload and fxpallist gives a terse help.


Code:
C:\Users\panzerboy\Documents\Fractal eXtreme>fxpalload
fxpalload usage:xfpal1 filename.txt palettefile{.fxp}}
filename.txt is the text file to convert into a fracta extreme palette
palettefile{.fxp} is the palette file to create, and must not exist

C:\Users\panzerboy\Documents\Fractal eXtreme>fxpallist
fxpallist usage:fxpallist {/i|-i} {/v|-v} filename.fxp
 use i option for indexes only, to feed to xfpalload
 use v option to print interpolated virtual indexes

Code:
C:\Users\panzerboy\Documents\Fractal eXtreme>fxpallist f24awygcbmrkof4.fxp | more
Fractal Extreme Palette file f24awygcbmrkof4.fxp Decoded
file size 5258
Stripes shown
Colour cycle position 114
Cycle backwards
Interior colour Red 255, Green 255, Blue 255
Edge fill colour Red 0, Green 0, Blue 0
228 Red indexes
index 0 value 146
index 1 value 138
index 2 value 154
...
index 226 value 99
index 227 value 72
228 Green indexes
index 0 value 155
index 1 value 182
index 2 value 128
...
index 226 value 62
index 227 value 45
228 Blue indexes
index 0 value 161
index 1 value 178
index 2 value 144
...
index 226 value 6
index 227 value 28
228 Red Stripe indexes
index 0 value 226
index 1 value 253
index 2 value 234
...
index 227 value 173
228 Green Stripe indexes
index 0 value 173
...
index 227 value 172
228 Blue Stripe indexes
index 0 value 172

Looking at the fractint maps from the link at the bottom of this page http://www.fracton.org/links.html
It appears that FractInt has 256 palette entries and FractalExtreme has 228.
So you'd need to do some clever averaging of values to cut them down to 228.
Another .map file I looked at had only two entries.
In the case of just two entries you need only specify the colour indexes used.
So yellow_green.map Fractaint palette consists of only the following text.
Code:
255 255   0
  0 255   0

Could be converted to a Fractal Extreme palette using this text file
Code:
Red
index 0 value 255
index 114 value 0
Green
index 0 value 255
Blue
index 0 value 0

Logged
simon.snake
Fractal Bachius
*
Posts: 640


Experienced Fractal eXtreme plugin crasher!


simon.fez SimonSideBurns
« Reply #2 on: May 24, 2013, 03:28:53 PM »

Will have a play with the tool.  Thanks for sharing it.
Logged

To anyone viewing my posts and finding missing/broken links to a website called www.needanother.co.uk, I still own the domain but recently cancelled my server (saving £30/month) so even though the domain address exists, it points nowhere.  I hope to one day sort something out but for now - sorry!
simon.snake
Fractal Bachius
*
Posts: 640


Experienced Fractal eXtreme plugin crasher!


simon.fez SimonSideBurns
« Reply #3 on: May 25, 2013, 12:15:54 PM »

Well, I had a small play with the tools, but all I got was a mess when loading into FX.  Wonder if I was doing something wrong. No error messages were given when I ran the tools.
Logged

To anyone viewing my posts and finding missing/broken links to a website called www.needanother.co.uk, I still own the domain but recently cancelled my server (saving £30/month) so even though the domain address exists, it points nowhere.  I hope to one day sort something out but for now - sorry!
panzerboy
Fractal Lover
**
Posts: 242


« Reply #4 on: May 25, 2013, 01:21:23 PM »

Care to share the text file you tried to create a FX palette with?
The fxpalload util is pretty dumb, from memory theres nothing to stop you from specifiying colour indexes out of order.
It should require the colour indexes in red, green, blue and optionally red stripe, blue stripe and green strips order.
Probably lets through  a partial definition ie Red, Green but no blue indexes.
Logged
simon.snake
Fractal Bachius
*
Posts: 640


Experienced Fractal eXtreme plugin crasher!


simon.fez SimonSideBurns
« Reply #5 on: May 25, 2013, 04:32:07 PM »

Attached I have included one of my palette files, with the associated txt file as created by the fxpallist utility...

Palette file simon014.map:
Code:
  0   0   0
  0   0   8
  0   0  20
  0   0  28
  0   0  40
  0   0  52
  0   0  60
  0   0  72
  0   0  84
  0   0  92
  0   0 104
  0   0 112
  0   0 124
  0   0 136
  0   0 144
  0   0 156
  0   0 168
  0   8 160
  0  20 148
  0  28 140
  0  40 128
  0  52 116
  0  60 108
  0  72  96
  0  84  84
  0  92  76
  0 104  64
  0 112  56
  0 124  44
  0 136  32
  0 144  24
  0 156  12
  0 168   0
  0 168   8
  0 168  20
  0 168  28
  0 168  40
  0 168  52
  0 168  60
  0 168  72
  0 168  84
  0 168  92
  0 168 104
  0 168 112
  0 168 124
  0 168 136
  0 168 144
  0 168 156
  0 168 168
  8 160 160
 20 148 148
 28 140 140
 40 128 128
 52 116 116
 60 108 108
 72  96  96
 84  84  84
 92  76  76
104  64  64
112  56  56
124  44  44
136  32  32
144  24  24
156  12  12
168   0   0
168   0   8
168   0  20
168   0  28
168   0  40
168   0  52
168   0  60
168   0  72
168   0  84
168   0  92
168   0 104
168   0 112
168   0 124
168   0 136
168   0 144
168   0 156
168   0 168
168   4 160
168   8 148
168  12 140
168  20 128
168  24 116
168  28 108
168  36  96
168  40  84
168  44  76
168  52  64
168  56  56
168  60  44
168  68  32
168  72  24
168  76  12
168  84   0
168  88   8
168  92  20
168  96  28
168 104  40
168 108  52
168 112  60
168 120  72
168 124  84
168 128  92
168 136 104
168 140 112
168 144 124
168 152 136
168 156 144
168 160 156
168 168 168
164 164 164
160 160 160
156 156 156
148 148 148
144 144 144
140 140 140
132 132 132
128 128 128
124 124 124
116 116 116
112 112 112
108 108 108
100 100 100
 96  96  96
 92  92  92
 84  84  84
 84  84  92
 84  84 104
 84  84 112
 84  84 124
 84  84 136
 84  84 144
 84  84 156
 84  84 168
 84  84 176
 84  84 188
 84  84 196
 84  84 208
 84  84 220
 84  84 228
 84  84 240
 84  84 252
 84  92 244
 84 104 232
 84 112 224
 84 124 212
 84 136 200
 84 144 192
 84 156 180
 84 168 168
 84 176 160
 84 188 148
 84 196 140
 84 208 128
 84 220 116
 84 228 108
 84 240  96
 84 252  84
 84 252  92
 84 252 104
 84 252 112
 84 252 124
 84 252 136
 84 252 144
 84 252 156
 84 252 168
 84 252 176
 84 252 188
 84 252 196
 84 252 208
 84 252 220
 84 252 228
 84 252 240
 84 252 252
 92 244 244
104 232 232
112 224 224
124 212 212
136 200 200
144 192 192
156 180 180
168 168 168
176 160 160
188 148 148
196 140 140
208 128 128
220 116 116
228 108 108
240  96  96
252  84  84
252  84  92
252  84 104
252  84 112
252  84 124
252  84 136
252  84 144
252  84 156
252  84 168
252  84 176
252  84 188
252  84 196
252  84 208
252  84 220
252  84 228
252  84 240
252  84 252
252  92 244
252 104 232
252 112 224
252 124 212
252 136 200
252 144 192
252 156 180
252 168 168
252 176 160
252 188 148
252 196 140
252 208 128
252 220 116
252 228 108
252 240  96
252 252  84
252 252  92
252 252 104
252 252 112
252 252 124
252 252 136
252 252 144
252 252 156
252 252 168
252 252 176
252 252 188
252 252 196
252 252 208
252 252 220
252 252 228
252 252 240
252 252 252
240 240 240
224 224 224
208 208 208
192 192 192
176 176 176
160 160 164
144 144 148
128 128 132
112 112 116
 96  96 100
 80  80  88
 64  64  72
 48  48  56
 32  32  40
 16  16  24

text file created:
Code:
Red
index 50 value 13
index 32 value 48
index 32 value 48
index 32 value 48
index 10 value 32
index 32 value 32
index 32 value 53
index 13 value 32
index 48 value 32
index 48 value 32
index 48 value 10
index 32 value 32
index 32 value 32
index 55 value 13
index 32 value 48
index 32 value 48
index 32 value 52
index 10 value 32
index 32 value 32
index 32 value 57
index 13 value 32
index 48 value 32
index 48 value 49
index 52 value 10
index 32 value 32
index 32 value 32
index 49 value 13
index 32 value 48
index 32 value 48
index 49 value 52
index 10 value 32
index 32 value 32
Green
index 51 value 13
index 32 value 48
index 32 value 48
index 49 value 52
index 10 value 32
index 32 value 32
index 32 value 53
index 13 value 32
index 48 value 32
index 48 value 49
index 56 value 10
index 32 value 32
index 32 value 32
index 54 value 13
index 32 value 48
index 32 value 48
index 49 value 56
index 10 value 32
index 32 value 50
index 32 value 52
index 13 value 32
index 48 value 32
index 48 value 49
index 56 value 10
index 32 value 32
index 53 value 32
index 49 value 13
index 32 value 48
index 32 value 48
index 49 value 56
index 10 value 32
index 32 value 55
Blue
index 57 value 13
index 32 value 48
index 32 value 52
index 32 value 52
index 10 value 32
index 32 value 57
index 32 value 55
index 13 value 32
index 48 value 49
index 52 value 32
index 52 value 10
index 32 value 32
index 49 value 32
index 53 value 13
index 32 value 48
index 49 value 52
index 32 value 52
index 10 value 32
index 32 value 51
index 32 value 51
index 13 value 32
index 48 value 49
index 52 value 32
index 52 value 10
index 32 value 32
index 53 value 32
index 49 value 13
index 32 value 48
index 49 value 56
index 32 value 48
index 10 value 32
index 32 value 54
Red Stripe
index 32 value 13
index 32 value 48
index 49 value 56
index 32 value 48
index 10 value 32
index 32 value 54
index 32 value 50
index 13 value 32
index 48 value 49
index 56 value 32
index 48 value 10
index 32 value 32
index 54 value 32
index 53 value 13
index 32 value 48
index 49 value 56
index 32 value 48
index 10 value 32
index 32 value 54
index 32 value 55
index 13 value 32
index 48 value 49
index 56 value 32
index 52 value 10
index 32 value 32
index 54 value 32
index 57 value 13
index 32 value 48
index 49 value 56
index 49 value 52
index 10 value 32
index 32 value 54
Green Stripe
index 49 value 13
index 32 value 48
index 49 value 56
index 49 value 52
index 10 value 32
index 32 value 54
index 32 value 51
index 13 value 32
index 48 value 49
index 56 value 49
index 52 value 10
index 32 value 32
index 54 value 32
index 53 value 13
index 32 value 48
index 49 value 56
index 49 value 56
index 10 value 32
index 32 value 54
index 32 value 54
index 13 value 32
index 48 value 49
index 56 value 49
index 56 value 10
index 50 value 32
index 52 value 32
index 52 value 13
index 32 value 48
index 49 value 56
index 49 value 56
index 10 value 53
index 32 value 49
Blue Stripe
index 49 value 13
index 32 value 48
index 49 value 56
index 49 value 56
index 10 value 55
index 32 value 57
index 32 value 57
index 13 value 32
index 52 value 32
index 52 value 32
index 52 value 10
index 57 value 32
index 55 value 32
index 55 value 13
index 49 value 52
index 32 value 52
index 32 value 52
index 10 value 49
index 32 value 53
index 32 value 53
index 13 value 49
index 52 value 32
index 52 value 32
index 52 value 10
index 51 value 32
index 51 value 32
index 51 value 13
index 49 value 52
index 32 value 52
index 32 value 52
index 10 value 53
index 32 value 49

Definitely something not right with those values being created. Not sure what's up with it.
Logged

To anyone viewing my posts and finding missing/broken links to a website called www.needanother.co.uk, I still own the domain but recently cancelled my server (saving £30/month) so even though the domain address exists, it points nowhere.  I hope to one day sort something out but for now - sorry!
simon.snake
Fractal Bachius
*
Posts: 640


Experienced Fractal eXtreme plugin crasher!


simon.fez SimonSideBurns
« Reply #6 on: May 26, 2013, 12:18:09 AM »

Is it me or are the values and indexes being displayed just ASCII values of characters in the map file?
Logged

To anyone viewing my posts and finding missing/broken links to a website called www.needanother.co.uk, I still own the domain but recently cancelled my server (saving £30/month) so even though the domain address exists, it points nowhere.  I hope to one day sort something out but for now - sorry!
simon.snake
Fractal Bachius
*
Posts: 640


Experienced Fractal eXtreme plugin crasher!


simon.fez SimonSideBurns
« Reply #7 on: May 26, 2013, 12:29:28 AM »

I think I understand what's going on now.

I thought I could simply feed in one of the fractint palette files directly to the command line tool and produce an intermediary text file, then feed that into the second tool to get a fractal extreme fxp file, but I can now see that the tools will only work directly on fractal extreme files (writing one from a provided text file, or reading one and producing the text file).

I need to write another tool to produce the same format text file out of a fractInt map file first, before reading it into your utility.
Logged

To anyone viewing my posts and finding missing/broken links to a website called www.needanother.co.uk, I still own the domain but recently cancelled my server (saving £30/month) so even though the domain address exists, it points nowhere.  I hope to one day sort something out but for now - sorry!
panzerboy
Fractal Lover
**
Posts: 242


« Reply #8 on: May 26, 2013, 03:31:34 AM »

Oh Man am I having trouble trying to reply.
My third attempt now, Chrome won't restart so I'm using IE.

I've created a spreadsheet that will convert the 256 colour indexes of FractInt to the 228 of Fractal Extreme.
I can't attach the spreadsheet here, that seems to be the start of my problems.
So I've put the spreadsheet on a zip on mediafire.
http://www.mediafire.com/download/86rrj0qro82c1ex/FI2FXpalconv.zip
Trying to Post that came up with a  double post message or something and after that Chrome wouldn't work.
Chrome has been occasionally obstreperous, often when I'm rendering a video (like now) so can't reboot.

The zip contains a simon014.fxp converted from your supplied text.
I attached (hopefully) a jpg of what it looks like converted.
When you use fxpalload it always enables the striped mode so you need to turn that off when you load the palette in Fractal Extreme.
(Kind of obvious).


The process is to load the FI2FXpalconv spreadsheet.
Now drag the .map file to be converted onto the spreadsheet.
A text conversion wizard should show.
You need to do a fixed width conversion.
The columns may need adjusting in the preview spreadsheet at the bottom of the wizard.
Just drag the column indicators.
After you've clicked ok you should have a new spreadsheet with just the RGB values in column A B and C.
There may be comments in column E or below the 256th row.
So you need to shift-select from Col/Row a1 to col/row c256, copy and paste into colrow a2 of the FI2FXpalconv spreadsheet.
Magically in column Y from row 2 is all the text need to to be copy-pasted into a text file for fxpalload to create the fractal extreme pallette.


* FIpalconv.jpg (60.48 KB, 731x351 - viewed 575 times.)

* FI2FXpalconv.gif (76.3 KB, 1666x790 - viewed 550 times.)
Logged
panzerboy
Fractal Lover
**
Posts: 242


« Reply #9 on: May 26, 2013, 04:00:51 AM »

By the way, the native format of the spreadsheet is Libre Office, so it sould load just fine into Open Office.
I've saved .xls and .xml versions too, but not garuntees they will work in Excel as I don't have Excel.
Libre Office is a free download, Its not as fast as Excel, but it does the simple things I need just fine.
Logged
Dinkydau
Fractal Senior
******
Posts: 1616



WWW
« Reply #10 on: August 15, 2015, 04:50:35 AM »

I think that's probably my text-to-pallette (& vice versa) utilities.
http://www.mediafire.com/download/b8oi6686ec0e0xo/fxutils.zip
That's very useful, thanks.
Logged

Adam Majewski
Fractal Lover
**
Posts: 221


WWW
« Reply #11 on: August 15, 2015, 10:54:59 AM »

What is the licence of your program ?
Logged
panzerboy
Fractal Lover
**
Posts: 242


« Reply #12 on: August 15, 2015, 07:23:32 PM »

I had to check the code, I haven't even put a copyright comment line.
fxpalload.exe and fxpallist.exe are rough as guts command line utilities that work just good enough that I wasn't bothered to create proper Windows programs.
The source code is downloadable here http://www.mediafire.com/download/wqshdpxb5v4cz62/FXutilsSource.zip
By all means use the code in your own apps, just don't sue me for copyright infringement on anything you create from my crufty code. cop
« Last Edit: August 16, 2015, 05:06:52 AM by panzerboy, Reason: Late night comment typos » Logged
Adam Majewski
Fractal Lover
**
Posts: 221


WWW
« Reply #13 on: August 16, 2015, 10:05:53 AM »

I had to check the code, I haven't even put a copyright comment line.
fxpalload.exe and fxpallist.exe are rough as guts command line utilities that work just good enough that I wasn't bothered to create proper Windows programs.
The source code is downloadable here http://www.mediafire.com/download/wqshdpxb5v4cz62/FXutilsSource.zip
By all means use the code in your own apps, just don't sue me for copyright infringement on anything you create from my crufty code. cop

OK. Thx

I was thinking about adding it to :
https://en.wikibooks.org/wiki/Fractals
especially :
https://en.wikibooks.org/wiki/Color_Theory/Color_gradient


You are welcome to edit this book/ ( If you will login that you will be seen as the author)


Adam
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Fractal eXtreme Fractal eXtreme « 1 2 3 4 5 » poorfuckedupnature 66 63606 Last post March 12, 2012, 09:41:04 AM
by cKleinhuis
Conformally converting a square to a torus requires a fractal structure Fractal News across the World msltoe 0 1758 Last post December 27, 2013, 08:15:29 PM
by msltoe
Fractal eXtreme data's General Discussion SeryZone 5 4322 Last post January 07, 2014, 11:47:11 AM
by panzerboy
Fractal Colour Palettes Multi Platform petemaxi 1 4555 Last post September 30, 2016, 09:25:51 AM
by Sabine
Fractal Colour Palettes Announcements & News petemaxi 1 3917 Last post October 08, 2016, 03:06:29 AM
by skychurch

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.421 seconds with 26 queries. (Pretty URLs adds 0.013s, 2q)