1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Headlight glass shader - help!

Discussion in 'Racer Physics and Technical' started by Splashonda, Feb 27, 2011.

  1. Hi guys! I'm having a bit of an issue with the headlight glass of my Challenger. As you can see from the screenie with the lights turned off, the glass reflects a bit of the track, such as it should in reality! The problem is that, when I turn on the lights, that reflection should disapear, but it doesn't! I'm tired of tweaking the shader and the alpha quantity on the .tga, but I can't get it right!

    Is there any trick to make the reflection disappear when i turn the lights on?

    screenshot038.jpg screenshot039.jpg

    I'm using this shader:

    Thanks in advance! :cool:
  2. Use my audi s4´s glass shader.

    Inside car shader, you have glass.tga section glass_shader. try it at challenger.

    I use 2 different tex for headlight glasses and windows. Headlights must be more clear and transparent, besides windowns one.
  3. I'm also using two separate shaders!

    I can't seem to understand one thing in your Audi shader. At the headlight glass material, you make reference to "shader_glass~vf_reflect_window" and vf_reflect_window doesn't exist in the car.shd! So it makes the head/tailight glass shader to be broken (it appears gloss grey, with no alpha).

    I'm using v0810, so I don't know if it's something to do with that...
  4. hmmmmmmmmmmmmmmmmmmmmm let me check it
  5. Any more suggestions?
  6. Can I ask you? I'm not new here, and I don't want to post new thread. I don't know hot to open .shd file?
  7. KS95

    RACER Moderator

    Open it with notepad/wordpad :)
  8. The best way to do this is to have the lamp as a reflect material, then just put the glass shader on the glass cover of the lamp itself.

    Then have a standard material using a blendfund=blend (use alpha to fall off the glow) and emission value on a plane that sits proud of the lens/reflector.

    That should be it.

    The reflection on the glass is always there, as is the one on the reflector. Within a HDR environment, you use a big emission value to blow out the reflection intensity, so all you tend to see is the emission from the reflector/bulb.

    Experimentation will be key. Check my Lambo update to see how I did it on that, same kinda principle... should be easy with just default shaders!


  9. +1 Dave, one way of doing it !

    Somehow I get a similar issue on my updated car, where from my incar view (it's just the same model as for the exterior for now), I can't see my car lights, because of the windshield shader & params I've set. Got 2 aligned surfaces pointing (Normals) outwards & inwards with reflection on...
  10. Thanks Dave! I'll try it tomorrow and let you know!