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. Vault
  3. Archived Forums
  4. Students and Beginners

CS:GO Pls help with a glass texture

  • Nthng
  • June 11, 2017 at 5:07 AM
  • Nthng
    • June 11, 2017 at 5:07 AM
    • #1

    Hello, im new in this level desing world, im making a csgo level, and im putting glass wall. i made a texture that actually works, but i realize that only works if u have the video settings on high, if you have those settings on low you wont see the glasses. I dont have idea about how to fix this.

    This is the vmt for the texutre:

    LightmappedGeneric { "$basetexture" "glass/vidrio" "$translucent" "1" "$alpha" ".04" "$surfaceprop" "glass" "$additive" "1" "$refractamount" ".5" "$envmap" "env_cubemap" "$envmaptint" "[1 1 1]"

    }

    Any help will be really apreciatted :)

  • Klems
    • June 13, 2017 at 5:53 PM
    • #2

    Remove the refractamount line. My guess is that refract is an expensive shader, thus is only available in high video settings.

    If you really want your glass to be refractive (I don't think that's the case since there is no normalmap) you can put it in a LightmappedGeneric_DX9 clause or something. I'm not sure how that's actually done in CS:GO. Something like

    "LightmappedGeneric_DX9" { "$refractamount" ".5" }

    Should work. If it doesn't, try to find an expensive material that has a similar looking clause.

  • grapen
    • June 13, 2017 at 7:55 PM
    • #3

    Have you tried increasing the $alpha value? 0.04 is 96% transparent.

  • Mamorex
    • June 14, 2017 at 1:19 PM
    • #4

    1st option

    Make a func_brush with this material:

    Quote

    Quote "Refract"

    {

    "$surfaceprop" "glass" "%tooltexture" "mamorex/glass/glass_d" //texture in Hammer

    "$normalmap" "mamorex/glass/glass_n" "$refracttinttexture" "mamorex/glass/glass_d" "$refractamount" "0.02" //"$bluramount" "1" - use if you want a blur effect

    }

    2nd option

    Just use this material:

    Quote

    Quote "LightmappedGeneric"

    {

    "$surfaceprop" "glass"

    "$basetexture" "mamorex/glass/glass_d" "$alpha" "0.25"

    //for high shader setting

    "$bumpmap" "mamorex/glass/glass_n" "$envmap" "env_cubemap" "$envmaptint" "[0 0 0]" //3x0 for Phong only, higher for Phong and cubemap reflections

    "$phong" "1"

    "$phongexponent" "150" "$phongamount" "[10 10 10 1.0]" }

    Display More

    All values must be changed for your map lighting and setup.

  • Nthng
    • June 15, 2017 at 6:52 AM
    • #5
    Quote from Mamorex

    17 hours ago, Mamorex said: 1st option

    I dont have the materials (.vtf) "glass_d" and "glass_n" in my files, might you please give them to me?

    Quote from Klems

    On 2017-6-13 at 11:53 AM, Klems said: Remove the refractamount line. My guess is that refract is an expensive shader, thus is only available in high video settings.

    This kinda works, but sometimes, in certain angles you still being not able to see the glass wall.

    Thanks!

    Quote from grapen

    On 2017-6-13 at 1:55 PM, grapen said: Have you tried increasing the $alpha value? 0.04 is 96% transparent.

    Yeah, but the thing is that i need the glass texture the more clear possible.

  • grapen
    • June 15, 2017 at 8:31 AM
    • #6
    Quote from Nthng

    1 hour ago, Nthng said: Yeah, but the thing is that i need the glass texture the more clear possible.

    The shaders you want are disabled on low settings, that's just the way things are in CSGO, the middle ground here is to have a desaturated, slightly transparent texture. I know, it doesn't look realistic, but players must be able to identify the glass on all settings, so as to not create any unfair advantage.

  • Mamorex
    • June 16, 2017 at 1:11 AM
    • #7
    Quote from grapen

    16 hours ago, grapen said: The shaders you want are disabled on low settings, that's just the way things are in CSGO, the middle ground here is to have a desaturated, slightly transparent texture. I know, it doesn't look realistic, but players must be able to identify the glass on all settings, so as to not create any unfair advantage.

    https://developer.valvesoftware.com/wiki/Refract

    [Blocked Image: https://developer.valvesoftware.com/w/images/c/cc/Note.png] Note:Will not work when applied to world brushes. [Blocked Image: https://developer.valvesoftware.com/w/images/c/cc/Note.png] Note:When being used on a model, you must specify $model "1". [Blocked Image: https://developer.valvesoftware.com/w/images/c/cc/Note.png] Note:Multiple layers of the Refract shader will not render when applied on the same entity. For refract you must use "Refract" shader, not "LightmappedGeneric". And use it on brush entity or model, func_brush is the best. For me 1st option is working with every graphics settings. glass_d - texture [Blocked Image: https://68.media.tumblr.com/avatar_dbec918561e7_128.png] glass_n - normal map [Blocked Image: http://developer.download.nvidia.com/whitepapers/2008/normalmapdxt_id_files/02_dot2_small.png] [Blocked Image: http://oi66.tinypic.com/2cenhgn.jpg] Create yours with VTFEdit.

  • grapen
    • June 16, 2017 at 7:13 AM
    • #8
    Quote from Mamorex

    5 hours ago, Mamorex said: https://developer.valvesoftware.com/wiki/Refract

    [Blocked Image: https://developer.valvesoftware.com/w/images/c/cc/Note.png] Note:Will not work when applied to world brushes. [Blocked Image: https://developer.valvesoftware.com/w/images/c/cc/Note.png] Note:When being used on a model, you must specify $model "1". [Blocked Image: https://developer.valvesoftware.com/w/images/c/cc/Note.png] Note:Multiple layers of the Refract shader will not render when applied on the same entity. For refract you must use "Refract" shader, not "LightmappedGeneric". And use it on brush entity or model, func_brush is the best. For me 1st option is working with every graphics settings. glass_d - texture [Blocked Image: https://68.media.tumblr.com/avatar_dbec918561e7_128.png] glass_n - normal map [Blocked Image: http://developer.download.nvidia.com/whitepapers/2008/normalmapdxt_id_files/02_dot2_small.png] [Blocked Image: http://oi66.tinypic.com/2cenhgn.jpg] Create yours with VTFEdit.

    The problem with refract is that it distorts, so imo not a very good choice for two way windows in a competitive environment.

  • Klems
    • June 16, 2017 at 4:21 PM
    • #9
    Quote from Nthng

    On 15/06/2017 at 7:52 AM, Nthng said: This kinda works, but sometimes, in certain angles you still being not able to see the glass wall.

    Did you built the mip-map in the VTF? Have you built the cubemap? In any case this is to be expected from a texture with a 0.04 alpha value, 0.04 is legit super translucent. Showing screens and telling us exactly what you want might help us resolve your issue. We still don't know if you want refraction or not?

    The thing you see might simply be the reflection, not the texture. Reflections tends to disappear at an oblique angle.

    Also I would avoid using the $alpha parameter altogether, unless there are several versions of this texture. You can tweak the alpha channel of your VTF to match the translucency.

  • Squad
    • June 17, 2017 at 5:31 PM
    • #10
    Quote from grapen

    On 2017-6-16 at 8:13 AM, grapen said: The problem with refract is that it distorts, so imo not a very good choice for two way windows in a competitive environment.

    Insertion has glass like this. Anyway, that is related to gameplay and not at all a technical issue ;)

  • Nthng
    • June 17, 2017 at 11:13 PM
    • #11

    Thanks to everyone! deleting the "$refractamount" line and increasing a bit the alpha value, seems to fix the problem! :D

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. Custom Gamemodes Contest

    Angel
    July 20, 2026 at 11:46 AM
  2. FAQ

    Angel
    July 20, 2026 at 10:14 AM
  3. Tangerine

    Harry Poster
    July 18, 2026 at 11:10 AM
  4. Any of the old guard still around? D:

    Warby
    July 12, 2026 at 8:23 PM
  5. About our archived forums

    Thrik
    June 30, 2026 at 2:12 PM
  6. Mapcore Discord

    mason_fan123
    June 24, 2026 at 8:52 PM
  7. [CS2] Valley

    Serialmapper
    June 22, 2026 at 11:56 AM
  8. Free Music / SFX Resource - Over 2500 Tracks

    Eric Matyas
    June 18, 2026 at 12:32 PM
  9. Pango [WIP]

    Elowen
    June 11, 2026 at 10:13 AM
  10. [CS2] Dvina

    Jeremy Rivera
    June 11, 2026 at 10:03 AM
  1. Privacy Policy
  2. Contact
Powered by WoltLab Suite™