m8nkey Posted October 12, 2007 Report Posted October 12, 2007 I'm trying to create some reflective glass textures for the map I'm working on and I've ran into a problem. I copied the VMT from a texture that had the effect I'm trying to achieve though i realise the surfaceprop wouldn't suite my texture. I also used the same setting in the VTF as the texture with the desired effect. VTF setting: No Compression Eight Bit Alpha Here's the VMT: "LightmappedGeneric" { "$basetexture" "cs_duke3d/test" "%keywords" "duke" "$surfaceprop" "concrete" "$detail" "detail\noise_detail_01" "$detailscale" "7.345" "$detailblendfactor" .6 "$detailblendmode" 0 "$envmap" "env_cubemap" "$basealphaenvmapmask" 1 "$envmapcontrast" 1 "$envmapsaturation" 1 "$envmaptint" "[ .6 .6 .6]" "LightmappedGeneric_HDR_dx9" { "$envmaptint" "[.25 .25 .25]" } "LightmappedGeneric_DX9" { "$envmaptint" "[.25 .25 .25]" } } The material displays normally in Hammer material browser but I get checkers when applied to a brush. *edit - Should've created this in the 2d Art forum sorry Quote
clayman Posted October 12, 2007 Report Posted October 12, 2007 if you open up the example folders in the sdk, you will probablly find it there, otherwise check the valve source engine wiki.. or File > Make reflections Quote
Bluestrike Posted October 12, 2007 Report Posted October 12, 2007 I see the vmt lists a detail file, out of my head I only think css uses detail textures, and a purple checkered texture ingame and not in hammer sounds like a typical missing detail texture error. So try with removing that line perhaps. Quote
m8nkey Posted October 12, 2007 Author Report Posted October 12, 2007 That worked Bluestrike, thanks a ton XD. I'm still getting used to working with VMTs. Quote
fonfa Posted October 13, 2007 Report Posted October 13, 2007 detail textures are ugly anyways. you're better off without them Quote
Uragan_Lex Posted October 13, 2007 Report Posted October 13, 2007 I edit & simplify your vmt: "LightmappedGeneric" { "$basetexture" "cs_duke3d/test" "%keywords" "duke" "$surfaceprop" "glass" "$envmap" "env_cubemap" "$envmaptint" "[.25 .25 .25]" "$translucent" "1" "LightmappedGeneric_HDR_dx9" { "$envmaptint" "[.12 .12 .12]" } } For realistic reflections in glass put env_cubemap entity, go to their properties and make it 256x256 size - clear reflections more realistic. Also in env_cubemap properties you can connect glass brushes - use "brush sides" option. Quote
Rick_D Posted October 13, 2007 Report Posted October 13, 2007 detail textures are ugly anyways. you're better off without them lol wut Quote
m8nkey Posted October 16, 2007 Author Report Posted October 16, 2007 Thanks for the suggestions Uragan. I still have some reading to do on env_cubemaps. Here's some pics of 2 textures I'm working on. First one was raped from hl2 textures. The second was made from a sample I found at http://www.mayang.com The second texture is a bit grainy and too sharp but I'm happy with how it looks in game with reflections masking the grain on the glass. I'm still having problems combining texture effects. For some reason my reflective textures with alphamaps don't like my bumpmaps (though standard lightmapped generic's work fine with them). Haven't had any luck at all with detail textures at all either. I've extracted the VTF from the GCF and put it in my WIP directory. I've also played with the syntax as I noticed the VMT's in CS use "\" not "/". I really appreciate the support here. I've gone through the Wiki repeatedly (and still do) and every other source I could find on the subject. Here's the VMT with remarks for what's not working: "LightmappedGeneric" { "$basetexture" "cs_duke3d/window01" "%keywords" "duke" "$surfaceprop" "glass" "$detail" "detail\noise_detail_01" <--- Not working "$detailscale" "4.283" "$detailblendfactor" .8 "$detailblendmode" "0" "$bumpmap" "cs_duke3d/window01_normal" <--- Not working "$envmap" "env_cubemap" "$basealphaenvmapmask" 1 "$envmaptint" "[.45 .45 .45]" "LightmappedGeneric_HDR_dx9" { "$envmaptint" "[.23 .23 .23]" } } Quote
Uragan_Lex Posted October 17, 2007 Report Posted October 17, 2007 "LightmappedGeneric" { "$basetexture" "cs_duke3d/window01" "%keywords" "duke" "$surfaceprop" "glass" "$bumpmap" "cs_duke3d/window01_normal" <--- Not working "$envmap" "env_cubemap" "$envmaptint" "[.45 .45 .45]" "$normalmapalphaenvmapmask" "1" //only way to use specular map with normal map on same texture - place specular map to alphachannel of normalmap (save to vtf with templae "normal map with alpha") and use this key in vmt "LightmappedGeneric_HDR_dx9" { "$envmaptint" "[.23 .23 .23]" } } About detail textures - use this simple syntax to see "work or not work": "$detail" "cs_duke3d\window01_normal" //gigi "$detailscale" "1" - if your window looks like violet-pink shit - it works Additional params can make your detail texture too hidden, so use it later, the all works fine: "$detailblendfactor" .8 "$detailblendmode" "0" Quote
m8nkey Posted October 18, 2007 Author Report Posted October 18, 2007 hmmm, I noticed normal maps could have an alpha so thought along that path but wasn't aware of the "$normalmapalphaenvmapmask" string. The specular map already has an Alpha 'cause not all the texture is reflective. Guess I can't have that AND a bump map. Thanks for the advice though. From what I read that's the way to go for creating reflective concrete and ground surfaces. Redone those textures, did the second one from scratch so it doesn't look like it's been sharpened. Quote
e-freak Posted October 18, 2007 Report Posted October 18, 2007 You can make a texture Reflective, Transparent and Selfilluminated + Normalmap and Difuse. Put the reflective in a single texture (8bit), put the transparency into the normalmap and the selfillumination into the difuse. I'ven't got the code here but I'm pretty sure this was possible Quote
Uragan_Lex Posted October 19, 2007 Report Posted October 19, 2007 >>Put the reflective in a single texture (8bit) That will not works(silently - it just wont work) - then normal map present in vmt only way to use specular map is put it to normal map alphachannel. Here live topic: http://www.hl2world.com/bbs/reflection- ... 48011.html Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.