Different shader depending on Daytime?

Discussion in 'Car Modding' started by Juergen-BY, Jan 11, 2016.

  1. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Hi,
    just wondering if it is possible, to use different shaders, depending on the ingame lightning (day/night)?
     
  2. Tosch

    Tosch Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,872
    Likes Received:
    51
    I don't think so. For tracks you can use visgroups (512 - Removed when night time , 1024 - Removed when daytime) and change the gmt (and with it the shader), but even that is buggy. You have to set the race date exactly for new moon, because the gfx engine only switches to "night mode" when sun and moon are below the horizon. Took me ages to figure that out. :D
     
  3. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Thanks Tosch, i was just wondering how i could use different shader (or maybe gmt`s?) for the lights (car), depending on daytime.
     
  4. Tosch

    Tosch Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,872
    Likes Received:
    51
    I use the high luminance sun shader for light glows. I control the intensity of the light with the alpha channel (transparency of the glow). Here are my settings for the APEX SLS.

    [​IMG]

    What you can try to have a better brightness at daytime is to adjust the RGB values of the shader. Try something grey for Emissive RGB and adjust the alpha channels until you have a good intensity at day and night. The brightness of the diffuse map (light01.dds and light02.dds) plays also an important role.
    If the headlight glow is to bright at daytime you can darken the diffuse and ambient RGB.
     
  5. Juergen-BY

    Juergen-BY Registered

    Joined:
    Jun 16, 2012
    Messages:
    3,089
    Likes Received:
    440
    Thanks for these additional informations!
     

Share This Page