Specular Lighting Issues?

Discussion in 'Content Creation' started by KennyWah, Feb 7, 2015.

  1. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,658
    Please help, my specular map is all wrong, but I don't get what I did wrong.

    c10a0fbff8.jpg


    Did some work, that is actual secular, but this is the result.

    4957513f06.jpg

    - - - Updated - - -

    any help would be very great.
     
    #1 KennyWah, Feb 7, 2015
    Last edited: Feb 7, 2015
  2. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,695
    If you put more info..
    We can't really know what you did :p

    A picture of your spec map maybe?

    Also the part of the material.cs about that material?
     
  3. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,658

    Code:
    singleton Material(st_engR){
       mapTo = "st_engR";
       diffuseMap[2] = "vehicles/pickup/engineR_d.dds";
       specularMap[2] = "vehicles/pickup/engineR_s.dds";
       normalMap[2] = "vehicles/pickup/engineR_n.dds";
       diffuseMap[1] = "vehicles/pickup/engineR_d.dds";
       specularMap[1] = "vehicles/pickup/engineR_s.dds";
       normalMap[1] = "vehicles/pickup/engineR_n.dds";
       diffuseMap[0] = "vehicles/common/null.dds";
       specularMap[0] = "vehicles/common/null.dds";
       normalMap[0] = "vehicles/pickup/engineR_n.dds";
       //diffuseMap[3] = "vehicles/pickup/engineR_d.dds";
       //normalMap[3] = "vehicles/pickup/engineR_n.dds";
       specularPower[0] = "16";
       pixelSpecular[0] = "1";
       specularPower[1] = "16";
       pixelSpecular[1] = "1";
       diffuseColor[0] = "1 1 1 1";
       diffuseColor[1] = "1 1 1 1";
       diffuseColor[2] = "0.7 0.75 0.8 1.2";
       useAnisotropic[0] = "1";
       useAnisotropic[1] = "1";
       useAnisotropic[2] = "1";
       //diffuseColor[3] = "1.5 1.5 1.5 1";
       castShadows = "1";
       translucent = "1";
       translucentBlendOp = "None";
       alphaTest = "1";
       alphaRef = "0";
       cubemap = "BNG_Sky_02_cubemap";
       beamngDiffuseColorSlot = 2;
       materialTag0 = "beamng"; materialTag1 = "vehicle";
    };
    

    Image after Jpeg Conversion: [Looks the same just like 1% lower quality from the actual texture]
    38be5bfbf1.jpg

    Edit: ^ This is so bad ^

    - - - Updated - - -



    Never mind I think I've learned how UV mapping works, because I needed to use seams and unwrapping.

    This is the new results of the third UV attempt and new textures again. [model and 1 seam are imperfect, but I don't think it deems another 2hrs of work]

    01d89f5f81.jpg

    Secular map:

    e13d75a170.jpg
     
    #3 KennyWah, Feb 9, 2015
    Last edited: Feb 9, 2015
  4. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,695
    This

    Code:
       diffuseMap[2] = "vehicles/pickup/engineR_d.dds";
       specularMap[2] = "vehicles/pickup/engineR_s.dds";
       normalMap[2] = "vehicles/pickup/engineR_n.dds";
       diffuseMap[1] = "vehicles/pickup/engineR_d.dds";
       specularMap[1] = "vehicles/pickup/engineR_s.dds";
       normalMap[1] = "vehicles/pickup/engineR_n.dds";
       diffuseMap[0] = "vehicles/common/null.dds";
       specularMap[0] = "vehicles/common/null.dds";
       normalMap[0] = "vehicles/pickup/engineR_n.dds";
       //diffuseMap[3] = "vehicles/pickup/engineR_d.dds";
       //normalMap[3] = "vehicles/pickup/engineR_n.dds";
    Basically you are using 3 layers of textures.

    Layer 0 has a null texture.
    Layer 1 has Diffuse, Normal and Spec map by you
    Layer 2 has again normal and spec map.

    I think that's the problem. You are adding the same texture twice, one on top of the other.

    Code:
       //diffuseMap[2] = "vehicles/pickup/engineR_d.dds";
       //specularMap[2] = "vehicles/pickup/engineR_s.dds";
       //normalMap[2] = "vehicles/pickup/engineR_n.dds";
       //diffuseMap[1] = "vehicles/pickup/engineR_d.dds";
       //specularMap[1] = "vehicles/pickup/engineR_s.dds";
       //normalMap[1] = "vehicles/pickup/engineR_n.dds";
       diffuseMap[0] = "vehicles/pickup/engineR_d.dds";
       specularMap[0] = "vehicles/pickup/engineR_s.dds";
       normalMap[0] = "vehicles/pickup/engineR_n.dds";
       //diffuseMap[3] = "vehicles/pickup/engineR_d.dds";
       //normalMap[3] = "vehicles/pickup/engineR_n.dds";
    Try this, I commented out Layers from 1 to 3.
     
  5. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,658

    This did not seem to effect anything, and I am also getting black/white textures at specific angles, especially when driving in circles with.. [even with the whole front body removed].
    I don't know how to fix this, as I do not know the cause.[had this already]

    a22c6e96de.jpg

    217154f385.jpg

    0b2a8f810a.jpg

    d6dbfd8f89.jpg

    b7f7e7900a.jpg
     
  6. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,695
    Uhmm, maybe a problem with normals? Can I see your texture? If you disable the normal it works?
     
  7. KennyWah

    KennyWah
    Expand Collapse

    Joined:
    Jan 16, 2013
    Messages:
    2,658
    Tried commenting out normal... no effect /=

    By the way, thanks for the ongoing help.

    I switched back to the first style of textures [the one after I got the UVs corrected]

    here are all texture maps

    Diffuse

    eb67669f71.jpg

    Secular

    5ab8753877.jpg

    Normal

    4008cac277.jpg

    Edit: Tweaking normal map, it is caused by it..

    - - - Updated - - -

    I tweaked the crap out of the normal... ended up being literally a plain black texture that works for this...

    to cut to the chase...

    no more unnatural scatter.

    2db421dd20.jpg
     
    #7 KennyWah, Feb 10, 2015
    Last edited: Feb 9, 2015
  8. Nadeox1

    Nadeox1
    Expand Collapse
    Spinning Cube
    BeamNG Team

    Joined:
    Aug 5, 2012
    Messages:
    14,695
    Your normal map is quite odd. The "Flat" part should be the same colour of the the rest, not that lighter-purple.

    At this point I'm clueless of what you did, if your texture are really working or etc. If you need further help I could give that thing a look, or we could still try to go on trial&error here.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice