1. Forums
  2. Discord
  3. About Mapcore
  4. Patreon Supporters
  • Login
  • Register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • More Options
  1. Mapcore
  2. Discussions
  3. Level Design

specular problems :/

  • Wesley Tack
  • November 30, 2006 at 9:48 AM
  • Wesley Tack
    • November 30, 2006 at 9:48 AM
    • #1

    Hi,

    I've made props with specular maps before, but up to this point I made the specular maps a separate file, like so:

    door_07.vmt

    door_07_spec.vmt

    With this for the door_07.vmt:

    (This shows my specular maps correct)

    Code
    "vertexlitgeneric"
    
    
    {
    
    
    	"$baseTexture" "models\props/door_07"
    
    
    	"$model" "1"
    
    
    	"$envmap" "env_cubemap"
    
    
    	"$envmapmask" "models\props/door_07_spec"
    
    
    }
    Display More

    What I would like to do, is place the specular map in the base texture alpha channel. When I copy/paste that same spec map in the alpha channel and compile it, the whole model is being reflected. This is the code I use for when the spec map is in the base texture alpha channel:

    Code
    "vertexlitgeneric"
    
    
    {
    
    
    	"$baseTexture" "models\props/door_07"
    
    
    	"$model" "1"
    
    
    	"$envmap" "env_cubemap"
    
    
    	"$basealphaenvmapmask" 1
    
    
    	"$envmapcontrast" 1
    
    
    	"$envmapsaturation" 1.5
    
    
    	"$envmaptint" "[0.4 0.4 0.4]"
    
    
    }
    Display More

    The door itself shouldn't reflect, only the window. But the whole door reflects. But it does work when I use a separate _spec file. Anyone know whats up? Or should I just keep using separate _spec files and don't bother?

    thanks!

  • Dennispls
    • November 30, 2006 at 10:55 AM
    • #2

    why is this in wip model section?

  • PhilipK
    • November 30, 2006 at 10:55 AM
    • #3

    Well it works if you use the normalmapalphaenvmapmask (alpha in normalmap), so perhaps you need basemapalphaenvmapmask?

    Worth a try maybe

    I know I had this problem too but I just used the specs separately or in the normal alpha.

  • Wesley Tack
    • November 30, 2006 at 10:59 AM
    • #4
    Quote from Dennispls

    why is this in wip model section?

    cause I got no place else to go!

    thx philipk, i'll try it and let you know

    *edit*

    nope, didn't work

  • FrieChamp
    • November 30, 2006 at 1:16 PM
    • #5

    It's usually a safe bet to post any technical questions in the "engine discussion" section, although the description doesn't really fit in this case. It should be changed actually and I've asked for it before, maybe if we all scream for it it will happen and I won't have to move threads all the time anymore

  • e-freak
    • November 30, 2006 at 3:09 PM
    • #6

    put it in the normal map - that's what im doing normally (wordjk ^^)

  • Wesley Tack
    • November 30, 2006 at 3:30 PM
    • #7
    Quote from FrieChamp

    It's usually a safe bet to post any technical questions in the "engine discussion" section, although the description doesn't really fit in this case. It should be changed actually and I've asked for it before, maybe if we all scream for it it will happen and I won't have to move threads all the time anymore

    Sorry, I wasn't sure where to post it, since its for a model I thought this was the best bet. I actually doubted between posting it in engine or modeling.. looks like I picked the wrong one

    e-freak: I dont have normal maps, where do I put it then ?

  • PhilipK
    • November 30, 2006 at 7:39 PM
    • #8

    Did you try what I said?

    If not you will have to use it in a separate file if you don't have a normal map.

  • Wesley Tack
    • November 30, 2006 at 10:28 PM
    • #9

    yea i did, i posted it, it didn't work.

    and since I don't use a normal map I'll just do as i did before and keep the spec map separate.

    Thanks for the help!

  • PhilipK
    • November 30, 2006 at 11:34 PM
    • #10

    Np, it's wierd tho they don't have support for spec in the alpha of the diffuse.

  • Wesley Tack
    • December 1, 2006 at 12:30 AM
    • #11

    There's so much stuff weird about how Valve makes stuff

  • Campaignjunkie
    • December 1, 2006 at 12:44 AM
    • #12

    This is kind of a weird quirky hack thing, but I think when you're using the base alpha as the spec, you have to actually invert the alpha channel in Photoshop. At least that's what I remember. I think.

  • PhilipK
    • December 1, 2006 at 12:54 AM
    • #13

    hmm the problem here tho is you need to specify that it will use the alpha channel in your diffuse map as specular in the shader.

  • Campaignjunkie
    • December 1, 2006 at 1:17 AM
    • #14

    Well that's what

    Code
    "$basealphaenvmapmask" 1

    is for. So, I would just use seperate spec files to save time and headaches.

  • PhilipK
    • December 1, 2006 at 1:28 AM
    • #15

    so that actually does work?

    but you need to invert the alpha?

    weird shit.

  • Campaignjunkie
    • December 1, 2006 at 2:22 AM
    • #16

    I, uh... I think it works...

  • Wesley Tack
    • December 2, 2006 at 12:19 PM
    • #17

    on interlopers someone replied with the answer:

    Quote from PHISH

    Well I was having a similar problem and I just learned that when using "$basealphaenvmapmask" 1white means no reflection, black means max reflection.

    This is contrary to when you use the normal maps alpha for specular reflection..in which case black means no reflection and white means max reflection. GG valve

    So there you have it, another valve issue, that makes it what? #534?

  • PhilipK
    • December 2, 2006 at 12:28 PM
    • #18

    heh.. you think someone would have noticed..

    i mean if your spec gets inverted ingame it should show.. unless it's really dull. and a dull spec is not good

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!

Register Yourself Login
Discord

The Mapcore Discord is our lively IRC channel of the 2000s reborn. Chat about level design, gaming, and more.

Latest Posts

  1. BELEK: turning Rouen into competitive FPS maps (Godot project, feedback wanted)

    zlatan24
    November 12, 2026 at 6:23 PM
  2. CS2 sticker critique | Would the eye or blade read first on an AK?

    EmberKrakenCS2
    November 9, 2026 at 10:21 PM
  3. dod_poznan

    Smile_2000
    November 9, 2026 at 9:10 AM
  4. [cs2][WIP] De_digital (A side only) Looking for Feedback

    Howw3
    November 5, 2026 at 9:22 PM
  5. Hello from Normandy: Metin, working on a tactical FPS

    Thrik
    November 2, 2026 at 10:19 PM
  6. How do I setup CS1.6 mapping on linux?

    zlatan24
    November 2, 2026 at 6:43 AM
  7. CS:S | de_honor | Map creation process by D'artagnan

    Dartagnan
    November 1, 2026 at 5:41 PM
  8. Made a map maker for my indie game.

    daud2k7
    November 1, 2026 at 4:19 PM
  9. First CS2 Maps DM and Bomb Defusal

    zlatan24
    November 1, 2026 at 3:06 PM
  10. POLYSTRIKE - Finally Announced After Years of Development!

    MetinSaygin
    October 31, 2026 at 10:57 AM
  1. Privacy Policy
  2. Contact
Powered by WoltLab Suite™