Jump to content

CS:GO Pls help with a glass texture


Nthng
 Share

Recommended Posts

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 :)

Edited by Nthng
Link to comment
Share on other sites

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.

Edited by Klems
Link to comment
Share on other sites

1st option

Make a func_brush with this material:

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

"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]"

}

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

Edited by Mamorex
Link to comment
Share on other sites

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?

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!

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. 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Note.png Note:Will not work when applied to world brushes.
Note.png Note:When being used on a model, you must specify $model "1".
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 avatar_dbec918561e7_128.png
 
glass_n - normal map 02_dot2_small.png
 
2cenhgn.jpg

Create yours with VTFEdit.

Edited by Mamorex
Link to comment
Share on other sites

5 hours ago, Mamorex said:

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

Note.png Note:Will not work when applied to world brushes.
Note.png Note:When being used on a model, you must specify $model "1".
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 avatar_dbec918561e7_128.png
 
glass_n - normal map 02_dot2_small.png
 
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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ;)

Link to comment
Share on other sites

 Share

  • MapCore on Discord

  • Our picks

    • Mapcore X Prodeus Winners Announced!
      The winners of Mapcore X2 Prodeus 
      1st place: Paws [ Retail Therapy ]
      P-link: m-MC0iuUs2j6

      - $1,500.00 USD 
      - One year of Humble Choice 
      - Excalibur Shotgun and Gauntlets (skins)
      - Biker Gloves (skin) 
      - Special winners role on the Prodeus Discord
       



       

      2nd Place: Grays [ Firebase Kodai ]
      P-link: m-5J9cCzaepH

      - $1000.00 USD 
      - 1 month to Humble Choice 
      - Excalibur Gauntlets + Biker Gloves (skins) 
      - Special winners role on the Prodeus Discord
       


       

      3rd Place: Vladd [ Maximum Menace ]
      P-link: m-9yZfaAliyx

      - $500.00 USD 
      - 1 month to Humble Choice 
      - Biker Gloves (skin)
      - Special winners role on the Prodeus Discord
       


       

      All of the winners will also be showcased on our Youtube channel, and because we had so many amazing entries, we’ll be showcasing parts of our Staff Picks too. 

      We want to thank the wonderful folks over at Mapcore for hosting this sick competition, and a big ol shoutout to our sponsor Humble Games (who publish Prodeus), for making a large contribution to our prize pool this time around. 

      Looking forward to the next competition already! Maybe will do a coop one with teams allowed? WHO KNOW!? Can't wait, see you then!
       
      • 2 replies
×
×
  • Create New...