Titan Network
Community => Multimedia => Demo Recording => Topic started by: Sin Stalker on March 10, 2013, 08:30:42 AM
-
I'm trying to make electric armor blue. The type of blue as the default electric blaster. Can anyone give me a short instruction on how the FXTINT works and maybe a starting point to help me narrow down how to get it?
-
0 1910 FXTINT -16777037 -16777216
This is a color sample from my pain/energy corruptor. Her primary color was red, backset was black, IIRC. I'm trying to figure out the conversion from whatever this is to RGB, because when I just check the numbers, it doesn't come out right.
Michelle
aka
Samuraiko/Dark_Respite
-
Yeah, seems that no matter what I change the numbers to, the electricity comes out white.
Its too bad no one has been able to figure out and make a fx tint converter.
-
Its too bad no one has been able to figure out and make a fx tint converter.
More likely because it's so elementary to us computer geeks that we fail to realise anyone might have a problem with it. Here's the C code - after compiling the program and running it, just type in the RGB value to convert.#include <stdio.h>
int main()
{
int i;
scanf("%X", &i);
i=((i&0x000000FF)<<16)+((i&0x00FF0000)>>16)+(i&0x0000FF00)|0xFF000000;
printf("%d\n", i);
return 0;
}
0 1910 FXTINT -16777037 -16777216
This is a color sample from my pain/energy corruptor. Her primary color was red, backset was black, IIRC. I'm trying to figure out the conversion from whatever this is to RGB, because when I just check the numbers, it doesn't come out right.
The values are stored in the lower three bytes of 32-bit signed integers. The demo commands store them as integers rather than hex strings.
-16777037 = 0xFF0000B3
-16777216 = 0xFF000000
Note that this appears to be in BGR order rather than RGB.
To convert from these values to RGB, you can either use a very simple program in C or use a calculator. #include <stdio.h>
int main()
{
int i;
scanf("%d", &i);
i=((i&0x000000FF)<<16)|((i&0x00FF0000)>>16)|(i&0x0000FF00);
printf("%06X\n", i);
return 0;
}
There are some roundabout ways of doing it with a calculator app (or an actual calculator). The simplest one is to use Windows' calculator app with its' scientific view:
1. Input the number (with sign) when the calculator is in decimal mode.
2. Switch to hexadecimal mode.
3. Done.
A more roundabout way:
- Add -16777216 to the number.
- For each of the three bytes you want to extract:
- M+ the result.
- Calculate modulo (MOD) 256 of the number you have (in other words, the remainder of division of the number by 256).
The integral part of this number is the decimal value for one byte of the number. (fractions do not matter here) - CE and MR.
- Divide the number by 256.
- Now you have the decimal values of the R G and B channels, extracted in that specific order.
- To convert the decimal value to its' hex equivalent:
- Compute modulo 16 of the number. This is the decimal value of your lower hex digit.
- Divide the number by 16 and ignore fractions. This is the decimal value of your upper hex digit.
- 0-9 in decimal equal same hex digit
- 10 equals A
- 11 equals B
- 12 equals C
- 13 equals D
- 14 equals E
- 15 equals F
- Write down the hex notation determined in the last step. This is the RGB value for your power color.
-
Note that this appears to be in BGR order rather than RGB.
Taking a guess, it's likely parsed as an integer and then fed to something like glColor4ubv or glColorPointer as-is. Since x86 is a little-endian architecture, the 32-bit integer -16777037 (0xFF0000B3) will be stored in memory with the low byte first as:
B3 00 00 FF
If re-cast as an array of unsigned char[4] and passed to an OpenGL function, then it would be in the customary RGBA order.
-
More likely because it's so elementary to us computer geeks that we fail to realise anyone might have a problem with it. Here's the C code - after compiling the program and running it, just type in the RGB value to convert.#include <stdio.h>
int main()
{
int i;
scanf("%X", &i);
i=((i&0x000000FF)<<16)+((i&0x00FF0000)>>16)+(i&0x0000FF00)|0xFF000000;
printf("%d\n", i);
return 0;
}
The values are stored in the lower three bytes of 32-bit signed integers. The demo commands store them as integers rather than hex strings.
-16777037 = 0xFF0000B3
-16777216 = 0xFF000000
Note that this appears to be in BGR order rather than RGB.
To convert from these values to RGB, you can either use a very simple program in C or use a calculator. #include <stdio.h>
int main()
{
int i;
scanf("%d", &i);
i=((i&0x000000FF)<<16)|((i&0x00FF0000)>>16)|(i&0x0000FF00);
printf("%06X\n", i);
return 0;
}
Run code? Sorry, I'm not that computer skilled. How do I do this?
-
Run code? Sorry, I'm not that computer skilled. How do I do this?
*sigh*
This should be more up to your speed.
https://www.dropbox.com/s/dtaltzdq6prd4ad/FiXTINT.zip
-
Thank you. I downloaded it and extracted the files. However now I have a folder (and 3 sub folders) with files I have no idea how to run. lol
Not sure what to google or if there is some readme file I am missing?
-
Thank you. I downloaded it and extracted the files. However now I have a folder (and 3 sub folders) with files I have no idea how to run. lol
Not sure what to google or if there is some readme file I am missing?
I just downloaded it and there's an exe file in there.
Run that.
;D
-
I just downloaded it and there's an exe file in there.
Run that.
;D
Weird. I don't have an exe file. I'll try downloading it again.
-
Sweet. Got it. Thank you!
-
So, could you theoretically select any hue beyond the ones we had available to choose from in the GUI, assuming you input it in the correct format, or is there a limitation in the renderer as well?
-
I used this to find the RGB number.
http://www.rapidtables.com/web/color/RGB_Color.htm
So I think you can pick colors or shades that weren't accessible before but I don't know for sure.
-
Never could understand why FXTINT uses this bizarre system of numbers while the costume colors use normal hexidecimal.
-
Most likely someone messed up a numeric format specifier on release and it was retained for backwards compatibility.
Thank you. I downloaded it and extracted the files. However now I have a folder (and 3 sub folders) with files I have no idea how to run. lol
You only need the .exe file directly in the archive itself. The subdirectories contain the application source.
So, could you theoretically select any hue beyond the ones we had available to choose from in the GUI, assuming you input it in the correct format, or is there a limitation in the renderer as well?
Uncertain. Try and see what you get?