Dark Rain fix and some tests

Discussion in 'Track Modding' started by Frederick Alonso, Aug 5, 2022.

  1. Frederick Alonso

    Frederick Alonso Registered

    Joined:
    May 29, 2020
    Messages:
    264
    Likes Received:
    1,496
    I did make a simple example how to fix wrong reflections on your tracks.

    Without the correct ReflectionMapper = Code in your SCN file, many mods will have wrong reflections and black rain on the windshield including official cars.

    Pay attention to the road colors, materials inside the car and the rain drops:
    [​IMG]

    With the code below:
    [​IMG]

    The code you can use and works perfect on my tests. Loch Drummond is using the in Blue way but i found the REFMAP0 with Type=Cubic also works like a charm, if a DEV here advices me for whatever reason the REFMAP0 way is wrong I will update this post:

    ReflectionMapper=REFMAP0 // or REFLECTEDENV
    {
    Type=Cubic // or Type=Planar
    UpdateRate=(100.000)
    StaticSwitch=(500.000)
    TrackingIns=True // or NULL
    IncludeIns=Hills
    }

    ReflectionMapper=STATIC01
    {
    Type=Cubic
    TextureSize=(512)
    UpdateRate=(0.100)
    StaticSwitch=(300.000)
    Pos=(160.97, 4.49, 70.60)
    }

    ReflectionMapper=REFMAP0
    {
    Type=Cubic
    TextureSize=(1024)
    UpdateRate=(100.000)
    StaticSwitch=(300.000)
    TrackingIns=True
    }

    IRRADIANCE_PROBE=IRRAD_GLOBAL
    {
    INFLUENCE_RANGE = (0.0)
    PROBE_POSITION = (157.09,4.81,45.08)
    }

    IRRADIANCE_PROBE=IRRAD_0
    {
    INFLUENCE_VOLUME=PITLANE_IPB
    INFLUENCE_RANGE = (50.0)
    PROBE_POSITION = (45.008,2.575,19.481)
    }


    EXAMPLE of what the IncludeIns should be = The Instance Name of your objects, add the mandatory instances on this list like buildings, barriers, trees, grandstand .. not the road or grass.


    Main difference I noticed:
    REFMAP0
    is dynamic reflections inside the car that are very close around the active camera, some sort of real time reflection.

    REFLECTEDENV
    is for static reflections, when the car goes far from the camera I believe they switch off to safe GPU power, you must have both in .scn file to avoid issues.

    Once I posted an example with a windshield that used REFLECTEDENV instead of the REFMAP0 in the rain, both looked great. Alex S397 told me this was the old way and not very future proof on windshields. So always use REFMAP0 in the windshield shaders or add them with json thru the material editor.

    To show you the reflections: Main Editor Menu > Toggle IBL Visualiser > Enable IBL and Show Convolve. FYI if this is full black or white, you have messed up something in the code. [​IMG]

    Hope this helps ;)
     
    Last edited: Aug 6, 2022
    DanRZ, svictor, DJCruicky and 3 others like this.

Share This Page