[SOLVED] Help needed with specular lighting

Discussion in 'Track Modding' started by enduser, Sep 14, 2019.

  1. enduser

    enduser Registered

    Joined:
    Feb 27, 2018
    Messages:
    105
    Likes Received:
    31
    Hi all, i have a problem with white / grey materials either glowing bright or getting black depending on the sun's position. I have experimented with spec rgb and values in the shader , the spec map, dif map alpha channel, i copy settings from 397 materials , duplicate them as they are (with 3dsimed) and mysteriously they still misbehave in my scenes while they look fine in 397 tracks, eg. bump specular map t1 for billboard adds.

    a. Below is a striking example of this, the flags use bump specular map t1 , in the pic the 3 bright ones are perfect from noon until sunset but in the morning they are black, so i realize i need to reverse the faces but then they get black in the noon.:confused::mad:

    b. Also in red circles these white lines get brighter when they re further away (they use alpha transparency and they re seperate from the road object), how can i fix that?

    Note that th dif map in all these cases is dark grey, it might be greenish grey or something else but in day light it's completely overridden and just glows bright and white.

    Should i use gravel trap shader for everything , mean i dont need all these uv channels usually. Help pls!

    [​IMG]
     
    Last edited: Sep 14, 2019
  2. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    917
    Likes Received:
    182
    Is this your scratch build track or conversion from other game?

    I'm assuming you have followed these guidelines:

    https://docs.studio-397.com/developers-guide/tracks/track-art/guidelines-for-track-artists
    https://docs.studio-397.com/developers-guide/tracks/track-art/ibl-ambient-for-tracks

    It is hard to say from that picture, what is going on.

    Gravel Trap shader is useful with track-side objects (buildings, grandstands, bridges etc.), which requires ambient occlusion (AO). If AO is not needed, BumpSpecMap T1 is good.
     
  3. enduser

    enduser Registered

    Joined:
    Feb 27, 2018
    Messages:
    105
    Likes Received:
    31
    Thx for replying, yes i ve read these guidelines, a big help from the cheat sheet recently was Bump Spec Map T1 Stamp Vertex / Stamp Normal which solved a similar problem with treeline being overly affected by sun position reflecting too much light, so i want to find more shaders like this. Case in point i ll try that in those flags.
    But the problem remains in general, idk if i m doing something wrong or i need to config the material better but thing is tweaking spec values dont do much in that regard while the proper shader like in the treeline example affects lighting much more. Only thing that helps sometimes is high spec power at 100 or more. Anyone with similar experience could be helpful, i hope.

    The track is not mine, its a heavily reworked mod that seems quite old so i presume its an rf1 mod converted for rf2. Senorman has his own version and i asked him but he didnt clarify anything so if everyone knows the author of this track feel free to tell! I ll search for old simbin/gmotor engine game videos in yt to see if the track matches any of those games but for me it looks more like a community mod (if its the latter its one hell of a task)!
    I think its also on steam workshop as hot lap challenge mod bundled with an audi r8 lms from memory so it doesnt look like a conversion from another game.

    This is a secondary hobby for me and id like to share it here but first i ll try to get a permission.
     
  4. Lazza

    Lazza Registered

    Joined:
    Oct 5, 2010
    Messages:
    6,668
    Likes Received:
    2,537
    Could be based on the Com8 version. His was the standard when I was playing rF1. No idea if he's changed his name :)
     
  5. enduser

    enduser Registered

    Joined:
    Feb 27, 2018
    Messages:
    105
    Likes Received:
    31
    Thanks Lazza, i ll see if i can find anything. I also googled that league that has uploaded the hot lap challenge on steam but the site was no more... steam doesnt have PMs i think, but googling today .. its also on RD so now i hopefully can talk to the uploader.
     
  6. enduser

    enduser Registered

    Joined:
    Feb 27, 2018
    Messages:
    105
    Likes Received:
    31
    The flag in the middle is using Bump Spec Map T1 Stamp Vertex which looks much better but the animation doesnt work now...


    [​IMG]
     
  7. Jka

    Jka Member Staff Member

    Joined:
    Jan 31, 2011
    Messages:
    917
    Likes Received:
    182
    First of all, what software you are using for track building? 3ds max or something else?

    Stamp vertex shaders are used with billboarded objects (object face always towards camera). That maybe is not the best shader for animated flags.

    Is animation bone-based or texture map animation? Try to use BumpSpecMapT1 shader and rotate flag more towards the sun, if that makes any difference. Also check that flag mesh does not have any dead verts before exporting.
     
  8. enduser

    enduser Registered

    Joined:
    Feb 27, 2018
    Messages:
    105
    Likes Received:
    31
    Consider it solved, main issue was that faces needed to be reversed and the contrast with the rest of the scene was exaggerated before.
    Many thx for the info, plenty of shaders to get familiar with.. its a texture map anim. I just wanted to show how this shader is much less reflective while T1, Spec T1, BumpMapT1 & BumpSpecMapT1 go nuts with lighting and tweaking spec values in the material doesnt give me very good results so far.
    In the end i worked the other way around , brightened the dif map and because at sun light the logos disapear (turn white ) despite the spec file(?!) i used 15 spec power, fresnel spec min 0 intesity 2 and power 15 so the logos are visible and not bathed in light now, best result i can get so far.

    I have the same problem with add boards and i have done what you say rotating towards or away from the sun as a last resort.

    Also my expectations were a bit high from having worked lately with some static flags Sergio Loro (from f3 classic tracks) has allowed me to use which made them look like fabric, low spec power little bit of transparency and his excellent dif map detail visible, real life like... anyway fine details very few care about. :)

    I have PMed the uploader of the original track in RD, fingers crossed i get a reply.
     

Share This Page