Nthng Posted June 11, 2017 Report Posted June 11, 2017 (edited) 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 June 11, 2017 by Nthng
Klems Posted June 13, 2017 Report Posted June 13, 2017 (edited) 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 June 13, 2017 by Klems Nthng 1
grapen Posted June 13, 2017 Report Posted June 13, 2017 Have you tried increasing the $alpha value? 0.04 is 96% transparent. Nthng 1
Mamorex Posted June 14, 2017 Report Posted June 14, 2017 (edited) 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 June 14, 2017 by Mamorex Nthng 1
Nthng Posted June 15, 2017 Author Report Posted June 15, 2017 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.
grapen Posted June 15, 2017 Report Posted June 15, 2017 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. Nthng and Squad 2
Mamorex Posted June 16, 2017 Report Posted June 16, 2017 (edited) 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:Will not work when applied to world brushes. Note:When being used on a model, you must specify $model "1". 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 glass_n - normal map Create yours with VTFEdit. Edited June 16, 2017 by Mamorex Squad and Nthng 2
grapen Posted June 16, 2017 Report Posted June 16, 2017 5 hours ago, Mamorex said: https://developer.valvesoftware.com/wiki/Refract Note:Will not work when applied to world brushes. Note:When being used on a model, you must specify $model "1". 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 glass_n - normal map 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 1
Klems Posted June 16, 2017 Report Posted June 16, 2017 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 1
Squad Posted June 17, 2017 Report Posted June 17, 2017 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 1
Nthng Posted June 17, 2017 Author Report Posted June 17, 2017 Thanks to everyone! deleting the "$refractamount" line and increasing a bit the alpha value, seems to fix the problem!
Recommended Posts