iRacing Background Lights - iRacing Motorsport Simulations - DrivingItalia.NET simulatori di guida Jump to content

Recommended Posts

Posted

iRacing Background Lights

Following a suggestion made by the fellow iRacer Chad Smith, I decided to build some sort of “Ambilight” system, which power some LED’s behind my monitor when the vehicle is under track lights (for night racing). Since the iRacing API doesn’t output such “car under lights” variable, I had to come up with another strategy. The SDK does have a variable with the percentage of the lap that is completed, so I decided to manually create a file which has the light intensity information for every 0.1% of the track, totalizing 1000 lighting information for an entire lap.

I coded a software that would make this task easier. You simply start running around the track and use the numpad keys from 0 to 9 to set the light intensity (0 meaning the LEDs are off and 9 that they are with total brightness) at the current vehicle position. It will automatically interpolate between those values, so you have a nice fade. After capturing that data from an entire lap, you simply save the file, which is a raw text file with 1000 lines, each one with the brightness level at a particular track position

To use the information you captured, simply click the “Load lights file…” button and point to the IRL file which has the lighting information for a particular track. If you have the sim opened, it will automatically detect your current car position (based on the LapDistPct variable) and power up the leds at the right intensity, based on the information stored inside the lights file.

You can see the result below. The video actually didn’t captured the correct intensity of the LEDs at the background. It’s a lot brighter than it seems.

Check out http://fergotech.net

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.