Welcome to PlagueFest.com! Log in or Sign up to interact with the Plague Fest community.
  1. Welcome Guest! to interact with the community and gain access to all the site's features.

"Normalmapalphaenvmapmask" "1"

Discussion in Mapping Discussion started by llVeXXll, Sep 21, 2012

  1. Jun 18, 2012
    Posts
    Having difficulty when trying to use specular map AND bump map. I have put my specular map in the ALPHA channel of my normal map vtf. It is just a black and white image. Here is my VMT:

    "LightmappedGeneric"
    {
    "$basetexture" "MINE/CROFT/croftorangetiles"
    "$bumpmap" "MINE/CROFT/croftorangetiles_normal"
    "$envmap" "env_cubemap"
    "$envmapmask" "MINE/CROFT/croftorangetilesenvmask"
    "$envmaptint" "[0.5 0.5 0.5]"
    "$envmapsaturation" "0.5"
    }
    Here is the result I am getting (left is with specular and bump map, right is just with bump map)

    [IMG]

    So can anyone tell me what they think is going wrong? I don't have much experience with specular maps.
  2. Nov 11, 2011
    Posts
  3. Jun 18, 2012
    Posts
    Thanks this is very useful however they don't use specular maps.
  4. Apr 9, 2012
    Posts
    Try removing $envmapsaturation
    If that doesn't fix it, try using $basealphaenvmapmask instead of the one you use now.

    Note that I myself have never been using these options, soI cannot be sure of the solutions, but it's worth trying it out :smile:

    EDIT: Sorry, after rereading like overr 10 times the entire definition of these parameters... It seems that you do not have to use a specular map at all. What these options do, is let either the normalmap or the basetexture generate the specular map. In other words, transformations within your basetexture or normal map will also apply to the reflectivity. As such removing the custom specular map is required I think...

    This is even more logical since looking at your picture, the right texture (without specmap) has indeed an transfirmed reflectivity. If you didn't used normalmapalphaenvmapmask at all, you would simply get a flat reflectivity or instead a completely reflectif texture. Tbh, the right texture as it is now, look perfectly fine.
    • Informative Informative x 1
      JorisCeoen, Sep 23, 2012 Last edited by JorisCeoen, Sep 23, 2012
    • Jun 18, 2012
      Posts
      Sorry the VMT I posted was wrong. I am not using "envmapmask" I am now only using "normalmapalphaenvmapmask" "1" and using the alpha chanel of my normal map for the specular map, It still isnt working. I tried removing envmapsaturation and it did not help. I tried altering envmaptint and it didn't work. I will try using basealphaenvmapmask... but wont that then mean that my diffuse texture will be translucent???
    • Apr 9, 2012
      Posts
      Do not use your specular map at all. Maybe post your latest VMT again, but in any case, if you are referencing to the location of your specular map anywhere in the VMT file, remove that line.

      I don't think it will become transparant, why would it ^^?
    • Jun 18, 2012
      Posts
      OK I finally got it to work, but only sometimes. I found out what the problem was with the last screenshot, the normal map was all messed up, when i tried to add an alpha channel to it, it messed it all up and it went all orange and yellow instead of blue red and green like normal maps should be. I eventually managed to give it an alpha channel without this happening, but it took ages, because I make my normal maps using vtfedit, and have to export them to photoshop. I need a better way of making normal maps I think.

      Before I got it working, i did try basealphaenvmapmask 1. This did not work at all. I thought it would make my diffuse texture translucent because base textures with an alpha chanel usually ARE translucent. It did not do this, which is good, but produced all sorts of errors in the game. Some times, it made the surface not reflect at all, or not reflect the specular map (which is in the alpha chanel of the basetexture) and sometimes it showed up completely black, and in the console it said "***trying to set a pixel shader that failed to load***" constantly 100 of times it said that. :/

      Here is my VMT now that I have normalmapalphaenvmapmask working:

      "LightmappedGeneric"
      {
      "$basetexture" "MINE/CROFT/croftorangetiles"
      "$bumpmap" "MINE/CROFT/croftorangetiles_normal"
      "$envmap" "env_cubemap"
      "$normalmapalphaenvmapmask" "1"
      }

      Here is my VMT for basealphaenvmapmask that is NOT working:

      "LightmappedGeneric"
      {
      "$basetexture" "MINE/CROFT/croftorangetilesbase"
      "$bumpmap" "MINE/CROFT/croftorangetiles_normal"
      "$envmap" "env_cubemap"
      "$basealphaenvmapmask" "1"
      }
    • Apr 9, 2012
      Posts
      I'm happy it worked out! I never used it in any case so I was trying to figure it out more than giving one clear answer, but trying to figure it out helps too ^^