• SFM shiny textures on specific parts of the model?
    18 replies, posted
Wasn't really sure where to put it. Here, or on SFM. Some time ago I made a drum set for sfm that got really popular over time. Now I want to retexture it for a music video I'm making. My small problem is the fact that I'm not really experienced with vmt's and stuff and don't really know how to make certain parts of it.....shiny, like metal (rims, hardware and the cymbals + maybe some glitter on the toms). The current drumset can be found [URL="http://steamcommunity.com/sharedfiles/filedetails/?id=142320594"]HERE[/URL]. Also, my current vmt: [CODE]"VertexLitGeneric" { $phong 1 $phongexponent 20 $basetexture"models/sfm_instruments/sfm_drumset" $surfaceprop metal $bumpmap "models/sfm_instruments/sfm_drumset_bump" $phongboost 1.0 $phongfresnelranges "[0 0.5 1]" }[/CODE] I'll probably redo the entire uv ;_;
Don't put the phong lines before the basetexture, for the love of all that is holy. $envmap is something close to what you're looking for. Combine it with $phong.
[QUOTE=Drsalvador;44857639]Don't put the phong lines before the basetexture, for the love of all that is holy. $envmap is something close to what you're looking for. Combine it with $phong.[/QUOTE] Roger that. Ok. Now the env seems to work no problem. The problem appears when I want to add a mask....because it does nothing. I used the alternative method form [URL="https://developer.valvesoftware.com/wiki/$envmapmask"]Here [/URL] but somehow I just can't export the alpha channel from photoshop (using the vtf tool). Everytime I check the alpha channel in vtfedit it's all white. I have tried exporting with either 1 Bit and 8 bit alpha ;_;
[QUOTE=aln447;44858640]Roger that. Ok. Now the env seems to work no problem. The problem appears when I want to add a mask....because it does nothing. I used the alternative method form [URL="https://developer.valvesoftware.com/wiki/$envmapmask"]Here [/URL] but somehow I just can't export the alpha channel from photoshop (using the vtf tool). Everytime I check the alpha channel in vtfedit it's all white. I have tried exporting with either 1 Bit and 8 bit alpha ;_;[/QUOTE] Make sure you have a background layer, having a floating layer 0 will not cut it. Also make sure your alpha is named "Alpha 1"
[QUOTE=Lt_C;44859570]Make sure you have a background layer, having a floating layer 0 will not cut it. Also make sure your alpha is named "Alpha 1"[/QUOTE] Ok, fixed this issue, just to find another.....as soon as I replaced the textures all of the envmap...is gone. I mean the model is pretty much matte. Here's te new vmt: [QUOTE]"VertexLitGeneric" { $basetexture"models/sfm_instruments/sfm_drumset" $envmap env_cubemap $basealphaenvmapmask 1 $phong 1 $phongexponent 20 $surfaceprop metal $bumpmap "models/sfm_instruments/sfm_drumset_bump" $phongboost 1.0 $phongfresnelranges "[0 0.5 1]" }[/QUOTE]
$basealphaenvmapmask 1 should be "$basetexturealphaenvmapmask" 1
Wiki - 'Alpha channels embedded in $basetexture work in reverse. Black areas are reflective, white areas are matte.' This possibly?
[QUOTE=Major_Vice;44860588]$basealphaenvmapmask 1 should be "$basetexturealphaenvmapmask" 1[/QUOTE] Nope [editline]20th May 2014[/editline] [QUOTE=Wigbig;44860600]Wiki - 'Alpha channels embedded in $basetexture work in reverse. Black areas are reflective, white areas are matte.' This possibly?[/QUOTE] Tried everything from the wiki. Even had a place in the model when right side is full black, and right side is pure white.
I would try using either $phong or $envmap reflections, not both together, although I did find this old thread which seems to discuss using both: [url]http://gamebanana.com/threads/154375[/url]
[QUOTE=aln447;44860639]Nope[/QUOTE] My bad, had to pull up a vmt: [code] "$basemapalphaenvmapmask" 1 "$envmap" "env_cubemap" "$envmaptint" "[ 1 1 1 ]" [/code]
[QUOTE=Wigbig;44860764]I would try using either $phong or $envmap reflections, not both together, although I did find this old thread which seems to discuss using both: [url]http://gamebanana.com/threads/154375[/url][/QUOTE] Removing the phong lines resulted in nothing but...loss of phong. Slowly running out of ideas here :L Source...why do you have to be such a bitch..
[QUOTE=Wigbig;44860764]I would try using either $phong or $envmap reflections, not both together, although I did find this old thread which seems to discuss using both: [URL]http://gamebanana.com/threads/154375[/URL][/QUOTE] Using both should work perfectly fine and it makes for a pretty good effect on models. If you stare into something shiny and a light source gets reflected back, it's going to produce a nasty glare that shines right in your eyes, similar to what phong with proper parameters may appear to do. They don't exactly have any conflicts together aside for both using the normal map's alpha mask. [QUOTE=aln447;44861108]Removing the phong lines resulted in nothing but...loss of phong. Slowly running out of ideas here :L Source...why do you have to be such a bitch..[/QUOTE] Here's the same material cleaned up to help make things at least a little easier to read: [code]"VertexLitGeneric" { "$basetexture" "models/sfm_instruments/sfm_drumset" "$bumpmap" "models/sfm_instruments/sfm_drumset_bump" "$normalmapalphaenvmapmask" "1" "$envmap" "env_cubemap" "$envmaptint" "[1 1 1]" "$phong" "1" "$phongboost" "1" "$phongexponent" "20 "$phongfresnelranges" "[0.05 .5 1]" } [/code] If you want parts of the model to have noticeably different parameters, just split it into a second material. It's really not too big of a deal if it's just one or two extra materials, especially since this is for SFM instead. If not, just use your specularity map in the normal map's alpha channel or replace $normalmapalphaenvmapmask with $basealphaenvmapmask (I don't know where basetexturealphanevmapmask came from).
[QUOTE=CaptainBigButt;44863634]Using both should work perfectly fine and it makes for a pretty good effect on models. If you stare into something shiny and a light source gets reflected back, it's going to produce a nasty glare that shines right in your eyes, similar to what phong with proper parameters may appear to do. They don't exactly have any conflicts together aside for both using the normal map's alpha mask. Thanks. That was the first plan, but the wiki said that I can't use a seperate tex for the env if I'm using bumpmaps. Here's the same material cleaned up to help make things at least a little easier to read: [code]"VertexLitGeneric" { "$basetexture" "models/sfm_instruments/sfm_drumset" "$bumpmap" "models/sfm_instruments/sfm_drumset_bump" "$normalmapalphaenvmapmask" "1" "$envmap" "env_cubemap" "$envmaptint" "[1 1 1]" "$phong" "1" "$phongboost" "1" "$phongexponent" "20 "$phongfresnelranges" "[0.05 .5 1]" } [/code] If you want parts of the model to have noticeably different parameters, just split it into a second material. It's really not too big of a deal if it's just one or two extra materials, especially since this is for SFM instead. If not, just use your specularity map in the normal map's alpha channel or replace $normalmapalphaenvmapmask with $basealphaenvmapmask (I don't know where basetexturealphanevmapmask came from).[/QUOTE]
[QUOTE=CaptainBigButt;44863634]Using both should work perfectly fine and it makes for a pretty good effect on models. If you stare into something shiny and a light source gets reflected back, it's going to produce a nasty glare that shines right in your eyes, similar to what phong with proper parameters may appear to do. They don't exactly have any conflicts together aside for both using the normal map's alpha mask.[/QUOTE] Splitting the two to separate maps makes a huge difference in source! Phong, with the right exponent, can simulate a whole range of materials from blunt rubber to polished glass. Source specular, on the other hand, is almost exclusively a metallic shader. For example, I made a container that had polished metallic surfaces on top of a blunt black plastic, and an unpolished copper top. Pay attention that the only thing that has specular highlight is the silverish material, despite there being decent phong reflection across the entire object. [t]https://dl.dropboxusercontent.com/u/21161113/SFM/scifi_am_container.jpg[/t] These are the maps I made: [t]https://dl.dropboxusercontent.com/u/21161113/random/source_submaps.jpg[/t] No second material, just knowledge of the shader system. Here is the vmt: [code] "VertexLitGeneric" { "$basetexture" "models/lt_c/sci_fi/am_container" "$bumpmap" "models/lt_c/sci_fi/am_container_n" "$halflambert" "1" "$selfillum" 1 "$selfillummask" "models/lt_c/sci_fi/am_container_illum" "$selfillumtint" "[ 0 .5 1 ]" "$basetexturealphaenvmapmask" 1 "$envmap" "env_cubemap" "$envmaptint" "[ 1 1 1 ]" // "$envmapFresnel" "1" "$phong" "1" "$phongexponenttexture" "models/lt_c/sci_fi/am_container_exp" // "$phongexponent" 5 "$phongboost" "2" "$phongfresnelranges" "[ .3 1.2 8]" "$PhongAlbedoTint" "1" } [/code] Note, albedo tint does throw off this example a bit, but the basic idea is there. You [I]can[/I] and [I]should[/I] split up your maps.
[QUOTE=Lt_C;44864266]Splitting the two to separate maps makes a huge difference in source! Phong, with the right exponent, can simulate a whole range of materials from blunt rubber to polished glass. Source specular, on the other hand, is almost exclusively a metallic shader. For example, I made a container that had polished metallic surfaces on top of a blunt black plastic, and an unpolished copper top. Pay attention that the only thing that has specular highlight is the silverish material, despite there being decent phong reflection across the entire object. [t]https://dl.dropboxusercontent.com/u/21161113/SFM/scifi_am_container.jpg[/t] These are the maps I made: [t]https://dl.dropboxusercontent.com/u/21161113/random/source_submaps.jpg[/t] No second material, just knowledge of the shader system. Here is the vmt: [code] "VertexLitGeneric" { "$basetexture" "models/lt_c/sci_fi/am_container" "$bumpmap" "models/lt_c/sci_fi/am_container_n" "$halflambert" "1" "$selfillum" 1 "$selfillummask" "models/lt_c/sci_fi/am_container_illum" "$selfillumtint" "[ 0 .5 1 ]" "$basetexturealphaenvmapmask" 1 "$envmap" "env_cubemap" "$envmaptint" "[ 1 1 1 ]" // "$envmapFresnel" "1" "$phong" "1" "$phongexponenttexture" "models/lt_c/sci_fi/am_container_exp" // "$phongexponent" 5 "$phongboost" "2" "$phongfresnelranges" "[ .3 1.2 8]" "$PhongAlbedoTint" "1" } [/code] Note, albedo tint does throw off this example a bit, but the basic idea is there. You [I]can[/I] and [I]should[/I] split up your maps.[/QUOTE] [del]Are you talking about using a different vtf with the map? Because from what the wiki said, I can not use it if I have bump maps. inb4 I'm noob here.[/del] Figured out what you meaned :P
[del]Okay. I tried to apply the mask with the bumpmaps alpha but no effect here[/del] FIXED!! The issue happened to be....in the fucking map -.- I was testing the model on the stage map (loads quickly). First time the env worked on the entire model, so I thought that the map issue is impossible, but changed it to 2fort just for the fucks of it and.....It worked. Source....you dick. Thanks all for the help!
That's because stage doesn't have any cubemaps. Same with black void.
[QUOTE=PalmliX;44871564]That's because stage doesn't have any cubemaps. Same with black void.[/QUOTE] That's what I found out later, but see for yourself. Image taken right before the second problem was displayed. [t]https://dl.dropboxusercontent.com/u/69842270/link/shinyh.jpeg[/t] That's basically what kept me off. ps. Here are some images of the model after retexturing. [t]https://dl.dropboxusercontent.com/u/69842270/link/drums1.jpeg[/t] [t]https://dl.dropboxusercontent.com/u/69842270/link/drums2.jpeg[/t] of anyone here is a fan of my works (which I kinda doubt) then...I'm back :)
I know this isn't really a final yet but you should really increase the number of passes on the shadows you baked to remove that noisy feel it has to it. Alternatively you could use smart blur in photoshop but that creates more of a TF2 style dirt rather than actual shadowing.
Sorry, you need to Log In to post a reply to this thread.