[1.40]Diffuse Color Lights

User avatar
Alang7
Posts: 98
Joined: 06 Jan 2013 03:08
Location: Italy

[1.40]Diffuse Color Lights

#1 Post by Alang7 » 04 Feb 2021 00:33

Hi guys! :)

I'm trying to figure out what kind of color system are using the new flares? The old color values no longer works on the newest update, so I bet SCS changed the color calculation.

On .sui file, I read that type of color system: "setup: lumen_hue_saturation". How it works? Maybe some devs could be so kindly to explain me? Thank you :)

EDIT: It's fine, I already understand it myself ;)
User avatar
Braakie
Posts: 525
Joined: 14 Feb 2016 21:23
Location: Holland
Contact:

Re: [1.40]Diffuse Color Lights

#2 Post by Braakie » 26 Feb 2021 09:11

Maybe you can tell how it works. My old colors are very overexposed. I use it for my interior light
User avatar
piva
Posts: 2377
Joined: 29 Oct 2014 16:41

Re: [1.40]Diffuse Color Lights

#3 Post by piva » 26 Feb 2021 09:15

I can be wrong, but looks like SCS move to HSB (Hue, Saturation, Brightness) color scheme when "setup" attribute used.
User avatar
Braakie
Posts: 525
Joined: 14 Feb 2016 21:23
Location: Holland
Contact:

Re: [1.40]Diffuse Color Lights

#4 Post by Braakie » 26 Feb 2021 13:19

I have tried the red color with photoshop, but it comes to completely different HSB values than SCS indicates in e.g. the interior.lights.sii file in the hookup folder.

SCS code says "diffuse_color: (5, 0, 100)" but in photoshop is this white
User avatar
room217au
Posts: 2716
Joined: 17 Jul 2015 01:55
Location: Lakeside

Re: [1.40]Diffuse Color Lights

#5 Post by room217au » 26 Feb 2021 14:22

@Braakie HSB might be Hue, Saturation, Brightness but in \unit\hookup\tr_light_flares.sii it says this:

Code: Select all

	setup: lumen_hue_saturation
which is Brightness, Hue, Saturation, in that order.
If you suck at playing the trumpet, that's probably why.
User avatar
Braakie
Posts: 525
Joined: 14 Feb 2016 21:23
Location: Holland
Contact:

Re: [1.40]Diffuse Color Lights

#6 Post by Braakie » 26 Feb 2021 15:43

Okay, I'm using this website http://colorizer.org/ to try different color codes. But whatever combination I try, I don't get the red color with the values in vehicle_int_light.sii.
The closest thing to it is HSL, but then it is a darker shade of red.

I use this code from the vehicle_int_light.sii in e hookup folder.

Code: Select all

flare_vehicle: flare.vehicle.intlight_bck.red
{
	dir_type: wide
	light_type: electrics

	type: spot
	setup: lumen_hue_saturation
	diffuse_color: (5, 0, 100)               I use this color code
	specular_color: (3, 0, 100)
	range: 2.0
	inner_angle: 5.0
	outer_angle: 100.0
	forward_distance: false

@include "vehicle_bulb_type_incandescent.sui"
}
Maybe lumen equals Lightness. When I increase it from 5 to 50 red really turns red. In the game 5 is enough, when I use 50 it is very bright light.
But when you use the color converter with scs values, red is against black.
User avatar
Etrusan
Posts: 650
Joined: 04 Sep 2014 15:29
Location: Brno, Czech Republic
Contact:

Re: [1.40]Diffuse Color Lights

#7 Post by Etrusan » 26 Feb 2021 17:33

From my undertanding, "lumen" is a unit of light (more lumens, more bright). So HSL seems likely.
Seasonic SSR-650TD; Intel Core i5-6700K; Gainward GTX 1060 6GB Phoenix GS; 2x Kingston HyperX Fury 8GB; 2x Crucial MX500 2TB; 3x Seagate IronWolf Pro; Corsair Force MP510 960GB; 2x 24" AOC I2481FXH; Windows 10

www.etrusan.net
User avatar
Braakie
Posts: 525
Joined: 14 Feb 2016 21:23
Location: Holland
Contact:

Re: [1.40]Diffuse Color Lights

#8 Post by Braakie » 26 Feb 2021 19:14

I did some more tests this afternoon, if you determine the hue and saturation (the color), then you can determine the strength of the color with the lumen. Hence, with a low lumen value, the color is very dark. For red you would then come up with a lumen of 50. higher than 50 is lighter to white and lower than 50 is darker to black.

Thank you to everyone for their input
User avatar
abasstreppas
Posts: 7499
Joined: 06 Feb 2013 20:32
Location: Back on Öland again
Contact:

Re: [1.40]Diffuse Color Lights

#9 Post by abasstreppas » 26 Feb 2021 19:31

Interesting topic. I'm not in beta so I guess I have some work to do updating a whole lot of public mods, once I update my game. ;).
User avatar
Alang7
Posts: 98
Joined: 06 Jan 2013 03:08
Location: Italy

Re: [1.40]Diffuse Color Lights

#10 Post by Alang7 » 26 Feb 2021 22:40

Hi guys,

The first number on the diffuse_color and also on specular_color is the "Lumen = Intensity of the light" second one is "HUE" and third one is "Saturation"

For example, my yellow lights for my talmu looks like this:

diffuse_color: (10, 37, 75)
specular_color: (7, 37, 75)

Hope it helps :)
Post Reply

Return to “Help center - player to player”

Who is online

Users browsing this forum: No registered users and 11 guests