UnrealEd 3.0 - Exporting the Lights

Hi,

In a few words, I’m working on a T3D Converter (see here 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 :

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).

You might wanna give those a try:
http://www.cs.rit.edu/~ncs/color/t_convert.html

greetings

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

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

Originally posted by Leyder Dylan:
[b]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[/b]

I’m investigating…

Thanks for your help …