How to Add Realistic GT3 Night Lighting to Your iRacing Cockpit With SimHub

If you have ever watched real GT3 onboard footage from night races like Daytona, you have probably noticed the small blue cockpit light glowing inside the car. It is subtle, but once you see it, it adds a ton of atmosphere. The light reflects off the driver’s gloves, the roll cage, the safety net, and different white surfaces inside the cockpit.

I wanted to recreate that same effect inside my iRacing rig.

Using SimHub, the Cockpit Auto Ambient Light add-on, and a small JavaScript condition, I was able to create a blue cockpit light that automatically turns on at night and turns off during the day. This makes nighttime racing feel more realistic without needing to manually toggle anything before each session.

Here is how I set it up.


What This SimHub Lighting Mod Does

The goal of this setup is simple:

When the iRacing session time is between 7:00 PM and 7:00 AM, SimHub turns on a custom blue cockpit light.

When the session time is outside that window, the light turns off.

This gives your sim cockpit a real GT3-style nighttime glow and helps replicate what you see in real-world endurance racing footage.

The effect is especially noticeable on:

  • White racing gloves
  • Roll bars
  • Safety nets
  • Interior cockpit details
  • Wheel rims and dash areas
  • Anything reflective or fluorescent inside your rig

It is not a performance mod. It is purely for immersion, but it makes a big difference when you are running night races in iRacing.


What You Need

For this setup, I used:

  • SimHub
  • Cockpit Auto Ambient Light add-on
  • Philips Hue Play lights
  • A Philips Hue light strip
  • iRacing telemetry
  • A custom JavaScript condition inside SimHub

In my setup, I have three lights total:

  • Two Philips Hue Play lights
  • One center light strip

I assigned the custom blue GT3 cockpit light to the center light strip. That way, my left and right lights can still be used for other SimHub effects, while the center strip handles the blue cockpit glow.

You can use a different light setup, but keep in mind that if you only have one or two lights, this effect may override other lighting effects depending on how you configure priority inside SimHub.


Step 1: Install Cockpit Auto Ambient Light

First, you will need the Cockpit Auto Ambient Light add-on for SimHub.

This add-on gives SimHub control over your cockpit lighting zones and lets you assign lighting effects based on game data, telemetry, flags, pit limiter status, spotter alerts, and custom conditions.

Once installed, make sure your lighting zones are properly configured.

In my setup, I am using the cockpit zone triple configuration with full control of selected lights.


Step 2: Choose the Light You Want to Use

The next step is deciding which light should become your GT3-style blue cockpit light.

I recommend assigning this to a dedicated light if possible.

In my case, I use my center light strip for the blue cockpit glow. My Philips Hue Play lights are still available for other effects.

My device setup includes:

  • Philips Hue flags
  • Custom 1
  • Pit limiter

This matters because lighting priority determines which effect wins when multiple effects are active at the same time.

For example, I have my effects prioritized like this:

  1. Custom 1 — Blue cockpit light
  2. Spotter
  3. Racing flags

You can adjust this depending on which effect you want to take priority.

If you want flags, pit limiter, or spotter warnings to override the blue light, make sure those effects are higher in priority than the custom cockpit light.


Step 3: Create a Custom Effect in SimHub

Inside Cockpit Auto Ambient Light, create or edit Custom 1.

I named mine:

Blue Light

Then configure the custom effect with the following settings:

  • Enable Use JavaScript
  • Enable Use global JavaScript extensions
  • Set the mode to Fixed
  • Choose your blue color
  • Disable blinking unless you specifically want a blinking effect

For my setup, I used a dark blue color:

#4338CA

This gives the cockpit a deep blue glow without being too overwhelming. Depending on your monitor, room lighting, and Philips Hue brightness settings, you may want to make this brighter or softer.


Step 4: Add the JavaScript Code

This is the code that controls when the blue cockpit light turns on or off.

var tod = NewRawData().Telemetry["SessionTimeOfDay"];

// iRacing SessionTimeOfDay is returned in seconds.
// 7:00 PM = 68400 seconds
// 7:00 AM = 25200 seconds

if (tod >= 68400 || tod <= 25200) {
    return 1;
}

return 0;

This code checks the current iRacing session time of day.

If the session time is after 7:00 PM or before 7:00 AM, the script returns 1, which turns the custom light on.

If the session time is between 7:00 AM and 7:00 PM, the script returns 0, which turns the custom light off.


Why This Code Works

iRacing reports the session time of day in seconds.

For example:

  • 7:00 AM = 25,200 seconds
  • 7:00 PM = 68,400 seconds

So the logic is:

if the session time is greater than or equal to 68400
OR
if the session time is less than or equal to 25200
turn the light on

That creates a nighttime window from 7:00 PM through 7:00 AM.


Important Note About Headlight Detection

Originally, I wanted this to key off the actual cockpit light or headlight state, but I could not get that working reliably.

The headlight toggle data appears to behave differently than expected, at least with the properties I tested. Because of that, I chose to key the effect off SessionTimeOfDay instead.

This is not a perfect one-to-one match with the exact moment that cockpit lights would turn on in the real car, but it works reliably and automatically activates the blue light during night sessions.

If someone finds a more accurate telemetry property for interior cockpit lights or headlights, I would love to test that in a future version.


Recommended SimHub Settings

Here is the basic setup I recommend:

Effect Name: Blue Light
Effect Slot: Custom 1
Mode: Fixed
Color: #4338CA
JavaScript: Enabled
Global JavaScript Extensions: Enabled
Blink: Off
Night Activation: 7:00 PM to 7:00 AM

You can adjust the color depending on your room and setup. If #4338CA is too intense, try a softer blue. If it is too dark, increase the brightness in Philips Hue or choose a brighter blue.


Best Use Cases for This Mod

This works especially well for:

  • iRacing Daytona 24
  • GT3 night races
  • IMSA endurance events
  • Nürburgring night sessions
  • Sebring night practice
  • Le Mans-style sessions
  • Any hosted session with time progression

If you are racing in VR, triples, or an enclosed cockpit rig, the effect becomes even more noticeable.


Final Thoughts

This is a small SimHub tweak, but it adds a lot of immersion.

The blue light gives your cockpit that real GT3 night-racing feel and helps make endurance racing in iRacing feel more alive. Seeing the blue glow reflect off your gloves, wheel, and cockpit area makes the rig feel closer to what you see in real onboard footage.

It is not complicated to set up, either. Once you have Cockpit Auto Ambient Light working, it only takes a custom effect and a few lines of JavaScript.

If you try this setup, play around with the color, brightness, and light placement until it matches your rig. Every room and cockpit setup is different, so the best result will come from tuning it to your own environment.

Hope this helps increase your immersion, and I’ll see you on the grid.


SimHub GT3 Night Light Code

var tod = NewRawData().Telemetry["SessionTimeOfDay"];

// iRacing SessionTimeOfDay is returned in seconds.
// 7:00 PM = 68400 seconds
// 7:00 AM = 25200 seconds

if (tod >= 68400 || tod <= 25200) {
    return 1;
}

return 0;

Scroll to Top