Sign in to follow this  
Followers 0
Nthng

CS:GO Pls help with a glass texture

11 posts in this topic

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

Share this post


Link to post
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
Nthng likes this

Share this post


Link to post
Share on other sites

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

Nthng likes this

Share this post


Link to post
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
Nthng likes this

Share this post


Link to post
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. 

Share this post


Link to post
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.

Squad and Nthng like this

Share this post


Link to post
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
Nthng and Squad like this

Share this post


Link to post
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.

Nthng likes this

Share this post


Link to post
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.

Nthng likes this

Share this post


Link to post
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 ;)

Nthng likes this

Share this post


Link to post
Share on other sites

Your content will need to be approved by a moderator

Guest
You are commenting as a guest. If you have an account, please sign in.
Reply to this topic...

×   You have pasted content with formatting.   Remove formatting

  Only 75 emoticons maximum are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

Loading...
Sign in to follow this  
Followers 0