1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
Like RaceDepartment on Facebook.

Help Please!!!

Discussion in 'Racer Cars' started by MehdiReleh, Apr 24, 2011.

  1. Hey guys...

    I have exported my car to Racer but I'm not sure how can I add Reflection on the car...
    can anyone tell me how can I add reflection???


    Thanks :)

    [​IMG]
     
  2. Bandit?.. Is that you?
    Yes, you can use the modeler.exe program included with racer to create a template of a shader. Then you simply copy/paste this info into a car.shd file for your creation. Refer to the Lambo' example.

    btw sweet Trans-Am
     
  3. Thanks :)
    I saved the shader in modeler and copied the file in the folder where the car is "...data\cars\pontiac" but still there is no reflection... do i have to edit something in car.ini or anywhere else???
     
  4. Welcome Mehdi !

    Your problem is really easy to fix, it's in your shader (material file = shd file) you'll fix the prob. So, it should look something like this :

    Code:
    shader_body~vf_reflect
    {
      cast_shadows=1
      compression=0
      reflect=0.5
      diffuse=.5 .5 .5
      specular=2.1 0.8 0.1
      shininess=45
      emission=0 0 0 
      fresnel
      {
        bias=0.1
        scale=0.2   ; default 0.9
        power=1.5     ; default 2.0
      }
      layer0
      {
        map=body_01.dds
      }
      layer1
      {
        map=$trackenvmap
      }
    }
    
    Don't forget to read racer.nl docs, it's a huge database of infos !

    By the way, do you come from Nogrip ?
    I'm just asking, because I'm doing some 'publicity' for Racer there, & I'm still expecting more people to join us, we really need devs & all kind of skilled people !

    Hope it helps !
    Let me know if you want to test the physical part of your car, I'm using a G25 for it.
     
  5. KS95

    KS95
    RACER Moderator

    Good stuff, sadly every time I recommend someone to try Racer they end up saying it's crap.. it doesn't have this.. doesn't have that, or that it doesn't work. By the time I explain how to get it working, or why it doesn't have those things (it's WIP!) they can't be bothered. :(
     
  6. Thanks guy :)
    no, not from Nogrip...

    I kinda manage to make it work, but instead of reflection it kinda darken the entire texture... i even tried changing reflection and specular but no difference, i cant get a good reflective and specular texture :(
     
  7. remove the diffuse=x x x
    That's darkening your body texture by 50%!
    You probably also want to remove the specular and set reflect=1
    but removing the diffuse=0.5 0.5 0.5 will get your texture back to it's previous brightness.
     
  8. I did them all but still the texture looks really dark... and still no reflection or specularity...
     
  9. What's your video card and which Racer version are you using (your picture looked like it's no-cg)..
     
  10. I'm using the latest version, 8.31 and yes it is no-cg... if i use cg the car is totally black, but if i use no-cg the texture if good but there if no reflection or specularity... and i dont think it's because of my video card since i tried it on few different pc and got same results...
     
  11. Did you try old non-cg shader for the car body in your car_nocg.shd file, something like this:

    shader_your-car-body
    {
    layer0
    {
    map=gradient.tga
    texgen_s=sphere_map
    texgen_t=sphere_map
    emission=1. 1. 1. 1.
    }
    layer1
    {
    map=$trackenvmap
    texgen_s=reflection_map
    texgen_t=reflection_map
    texgen_r=reflection_map
    shininess=10
    specular=0.75 0.75 0.75
    blendfunc=filter
    }
    layer2
    {
    map=your-car-body.tga
    blendfunc=one src_alpha
    }
    }


    Just replace "your-car-body" in the code with whatever name you have for the car body texture. Also, if you already don't have it, include this gradient.tga in the folder containing all of your car files. Hope this helps..

    View attachment gradient.zip
     
  12. Thanks :) but i got the same result... it just darken the entire texture... the only thing that i can think of is that there is something wrong with my texture or body.dof file... do i need to change anything in my model or texture?