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.

Modeler (no lighting)

Discussion in 'Racer Physics and Technical' started by Sneer, Jul 29, 2013.

  1. I have been looking into Racers Modeler over the weekend and I got stuck at the lighting of the car-details (see screenshot). It looks like there is no shading at all. Is this caused by wrong modeler settings?
    I'm getting an error message about unsupported Multi-Sub Object Materials, aswell.
    Is there a way to enable/disable shading? no_lighting.jpg
     
  2. Well that is a weird one, what does your shader(s) look like for these parts?
     
  3. Code:
    vf_speca
    {
      vertex_shader
      {
        file=dyn_standard_v.cg
      }
      fragment_shader
      {
        file=dyn_standard_speca_f.cg
      }
    }
    Code:
    shader_chrome1~vf_speca
    {
      cast_shadow=1
      reflect=0.8
      specular=0.5 0.5 0.5
      diffuse=.8 .8 .8
      shininess=100
      layer0
      {
        map=textures/chrome.tga
      }
    }
    Highlights and reflections are missing aswell.
     
  4. Hmm that is weird, does it work with a vf_standard shader? Also, maybe the vf_speca expects a layer with an environment map for example to function properly, be sure to find that out.

    Also, check the normals on your object :)
     
  5. Remember to set the alpha for your reflective material, since it determines reflection. I usually set mine at about 50%. I've also had issues putting the amb.spec.diff. and shininess outside of the first layer of the shader.

    Alex Forbin
     
    • Like Like x 1
  6. What does it look like in racer (on a track). Also look at the shader for another car that has chtome.
     
  7. Stereo

    Stereo
    Premium Member

    For chrome I've used a shader that looks like this:
    Code:
    vf_chrome
    {
      vertex_shader
      {
        file=dyn_standard_reflect_v.cg
      }
      fragment_shader
      {
        file=dyn_standard_reflect_f.cg
      }
      fresnel
      {
        bias=0.55
        scale=0.45
        power=4.0
      }
    }
     
    shader_chrome~vf_chrome
    {
      ;reflect=1.0
      cast_shadow=1
      reflect=1.0
      shininess=15
      specular=0.2 0.2 0.2
      layer0
      {
        map=chrome.tga
      }
      layer1
      {
        map=$trackenvmap
      }
    }
    chrome.tga is a very dark blue #00000D with no transparency. The numbers here represent to the best of my knowledge how actual chrome should be, with the exception of specular which is problematic because the reflection map already has a sun spot on it.
     
    • Like Like x 1
  8. Solved it now, it was related to flipped faces and normals. I had to create a primitive in 3dsmax, attach my vehicle and remove the primitive afterwards. I'll ban X-View, Reset-X form, Collapse and the normal modifier from my usage from now on. Thanks for this very usefull tip again, William. The chrome-shader looks very good, Stereo.
    Cheers all!
     
    • Like Like x 1