• "Bite off more than you can chew and then chew like hell." - Peter Brock
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Reflections on the glasses and wheels

Discussion in 'Racer Problems & Fixes' started by Eholov, Apr 2, 2013.

  1. Eholov

    Eholov

    Messages:
    223
    Ratings:
    +75
  2. Mr Whippy

    Mr Whippy

    Messages:
    2,977
    Ratings:
    +456
    Reference a car like the Gallardo which I just updated, which might give you some clues to good texture and shader values.

    Dave
     
  3. Eholov

    Eholov

    Messages:
    223
    Ratings:
    +75
    Thank you. what am I doing wrong?

    Code:
    vf_glass
    {
      cast_shadow=0
      vertex_shader
      {
        file=dyn_standard_reflect_window_v.cg
      }
      fragment_shader
      {
        file=dyn_standard_reflect_transparency_window_f.cg
        ;file=dyn_standard_reflect_window_f.cg
      }
    }

    Code:
    shader_windows~vf_glass
    {
      sort_offset=2
      reflect=1
      shininess=16
      specular=0 0 0 0
      fresnel
      {
        bias=0.04
        scale=0.96
        power=4.5
      }
      layer0
      {
        map=windows.tga
        blendfunc=one src_alpha
      }
    layer1
      {
        map=$trackenvmap
      }
    }
    
    3.jpg
     
  4. Alexander Knoll

    Alexander Knoll
    NEVER GIVE UP!!

    Messages:
    1,417
    Ratings:
    +286
    hmm...not realy sure where your problem is...use the right material name and it works well...
    [​IMG]
    ...try

    Code:
    vidros
    instead of windows...

    for me it was a 3 min. job...if i'm not sure about material names i load the model in to racer modeler.exe and hit the "Make template shader" button...and voi la...

    ...oh and this is the shader i use, i'm sure not the best, but...

    Code:
    vf_reflect
    {
      vertex_shader
      {
        file=dyn_standard_reflect_v.cg
        ;file=dyn_standard_reflect_v.cg
      }
      fragment_shader
      {
        file=dyn_standard_reflect_f.cg
        ;file=dyn_standard_reflect_f.cg
      }
    }
    and

    Code:
    shader_vidros~vf_reflect
    {
      cull=none
      sort_offset=1
      reflect=0.4
      diffuse=1.0 1.0 1.0
      ambient=1.0 1.0 1.0
      cast_shadow=1
      layer0
      {
        map=windows.tga
        shininess=20
        blendfunc=blend
        specular=0.0 0.0 0.0 1.0
        depthwrite=0
      }
      layer1
      {
        map=$trackenvmap
        depthwrite=0
      }
    }
    ...have fun...
     
    • Like Like x 1
  5. boomer541

    boomer541

    Messages:
    1,346
    Ratings:
    +163
    • Like Like x 1