Jump to content

Recommended Posts

Posted

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.

test.jpg

*edit - Should've created this in the 2d Art forum sorry

Posted

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.

Posted

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.

Posted

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.

window01.jpg

window02.jpg

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

}

}

Posted

"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 :D

Additional params can make your detail texture too hidden, so use it later, the all works fine:

"$detailblendfactor" .8

"$detailblendmode" "0"

Posted

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.

Posted

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

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...