PDA

View Full Version : UnrealEd 3.0 - Exporting the Lights



Leyder Dylan
09-29-2003, 04:59 AM
Hi,

In a few words, I'm working on a T3D Converter (see here (http://users.skynet.be/fa550206/Slug-Production/Data/Projects/Projects-T3D-Converter.htm) for more informations).

I've almost finished the LightMap function (for every light, I calcul the lightmap coord.) and the next step is to store the lights parameters but I've a problem with the color.

First, take a look on this :

http://users.skynet.be/fa550206/Slug-Production/Temp/UnrealEd-Light-Color.jpg

As you can see, I've selected a full red color. In the editor, ther's no problem but when I export the map in .t3d fileformat, the red color is written likes this :



LightBrightness=255
LightHue=255
LightSaturation=127


And finally, my question is : How can I calcul the RGB colors with only the above informations ? I need to have the R color who on the picture is at 255 (FULL).

Michael Steinberg
09-30-2003, 08:34 AM
You might wanna give those a try:
http://www.cs.rit.edu/~ncs/color/t_convert.html

greetings

Leyder Dylan
10-02-2003, 12:15 PM
Hi,

I've tryed the source code but I've this result for the FULL red (255) :

R : -24033.75
G : -32130.00
B : 255.00

Strange, but if you're agreed to help me because I'm searching since a long time for fixing that, here's the source code :
http://users.skynet.be/fa550206/Slug-Production/Temp/HSV.zip

Thanks in advance

Leyder Dylan
10-02-2003, 12:20 PM
Another thing, on the document, the values :

H is between [0,360]
S is between [0,1]
V is between [0,1]

And I've this in the T3D file :
H = 255 ==> OK, no problem
S = 127

Should be between 0 and 1, so I've tryed to convert the number between 0 and 1
==> (1/255) * 127 = 0.4980 ==> OK

V = 255
And the same
==> (1/255) * 255 = 1 ==> OK

Leyder Dylan
10-02-2003, 12:22 PM
Originally posted by Leyder Dylan:
Another thing, on the document, the values :

H is between [0,360]
S is between [0,1]
V is between [0,1]

And I've this in the T3D file :
H = 255 ==> OK, no problem


S = 127
Should be between 0 and 1, so I've tryed to convert the number between 0 and 1
==> (1/255) * 127 = 0.4980 ==> OK


V = 255
And the same
==> (1/255) * 255 = 1 ==> OK

Michael Steinberg
10-03-2003, 07:33 AM
I'm investigating...

Leyder Dylan
10-03-2003, 11:25 AM
Thanks for your help ...