Single Posted May 3, 2015 Report Posted May 3, 2015 I would like to see the first 2 examples in game. First floor with a simple tiled normal (large tiles) would look awesome imo "LightmappedGeneric" { "$basetexture" "de_mirage/tile/tile_ver4_diffuse" "$bumpmap" "de_mirage/tile/tile_ver4_normal" "$surfaceprop" "tile" $normalmapalphaenvmapmask 1 $envmap env_cubemap $envmaptint "[1.0 1.0 1.0]" $envmapsaturation 0.4 $envmapcontrast 0.5 $envmapanisotropy 1 $envmapanisotropyscale 1.0 $envmaplightscale 0.7 $phong 1 $phongexponent 40 $phongMaskContrastBrightness "[0 5]" $phongAmount "[4.1 4.2 4.0 1.0]" } "LightmappedGeneric" { "$baseTexture" "concrete/hr_c/hr_sidewalk_b" "$surfaceprop" "concrete" "$bumpmap" "concrete/hr_c/hr_sidewalk_b_ssbump" $ssbump 1 $ssbumpmathfix 1 $normalmapalphaenvmapmask 1 $envmap env_cubemap $envmaptint "[7.0 7.0 7.0]" $envmapsaturation 0.6 $envmapcontrast 0.2 $envmapanisotropy 1 $envmapanisotropyscale 1 $envmaplightscale 0.6 $phong 1 $phongexponent 40 $phongMaskContrastBrightness "[0 5]" $phongAmount "[4.1 4.2 4.0 1.0]" } Probably not the best scenes to use, but I guess it shows what it was meant to. 1488 and Vaya 2 Quote
Vaya Posted May 3, 2015 Report Posted May 3, 2015 looks awesome never the less. I think phong suits open areas better but it still works well in both scenes. Going to play about it with myself soon and see if I can work it into my current map. Quote
TheGuma Posted May 3, 2015 Report Posted May 3, 2015 (edited) If you think that's impressive, you've seen nothing... Here's how it looks like with some different settings + Displacements Edited May 3, 2015 by TheGuma cashed and leplubodeslapin 2 Quote
Pampers Posted May 3, 2015 Report Posted May 3, 2015 Year 2007 called and wanted their phong shading and text editor shader tweaks back 1488, Lajron, Evert and 9 others 12 Quote
Steppenwolf Posted May 5, 2015 Report Posted May 5, 2015 That's handy. Now everything can look like it's covered in a thin layer of wax. Vaya 1 Quote
will2k Posted May 6, 2015 Report Posted May 6, 2015 Year 2007 called and wanted their phong shading and text editor shader tweaks back With Valve, the call went straight to voice mail Quote
The Horse Strangler Posted July 15, 2015 Report Posted July 15, 2015 (edited) Whatup pimps, lots of confusion in this thread, so I wanted to hop in and maybe clarify a few things on how phong works and what it actually does.First off, phong is a specular shading method that emulates specular highlights on a surface, essentially defining the roughness of the surface itself. Phong is one of many specular reflection methods, there are others out there like Blinn/Cook–Torrance/Beckmann etc. Source already has a vmt setting called specular though, so that makes it super confusing. Phong wasn't added into the source engine until somewhere around 06/07 I believe, and valve never felt the need to change it (physically based wasn't even a thing at all back then.). In the current gen it's very important to not confuse specular with environment mapping. Environment mapping are the familiar cubemaps we sprinkle thruout our maps, whereas the various specular and envmap settings define the contrast, intensity and color of that cubemap reflection.Phong is a real-time intinterpolation of a surface's normal and a light vector (which direction the light is pointing). These two combined create a specular reflection. That being said this is why only the cascadded sun ent works for phong right now. it's a realtime light shadowmap that has readable realtime vectors. Apparently these vectors are exposed to models as well, it would be nice to see point and spotlights effecting brush surfaces, but I doubt it. Here's a explanation of how the phong settings work:$phong 1 // Enables Phong $phongexponent 40 //Controls the size of the specular highlight. Smoother surfaces should use higher values (glass/marble/ceramic) while rough surfaces should use lower values (dirt/wood/cardboard) $phongMaskContrastBrightness "[0 5]" //This is specific to the valve implementation of the shader. This takes the existing phong map and powers it, higher values cause whitespots to become much more intense, while causing darker areas of the mask to get even darker. (think of like multiplying layers ontop one another in photoshop) $phongAmount "[4.1 4.2 4.0 1.0]" //This is a weird one, but I assume it controls the specular intensity on each vectore, being xyz. The 4th float must be the alpha of all of those channels combined, and thus should act as a overall intensity slider. Tuning these values could allow you to create some really interesting Fresnel on various surfaces (specular sheen on finely woven clothes and satin) $phongfresnelranges "[0.02 0.02 0.02]" // This is the actual fresnel ranges, except it's not really designed for accurate specular representation. Besides, brush work won't even be as complicated as model geometry (tons of dips and convexities) so I would advise keeping this at default. It generally ends up creating a rimlight like effect via specular, which is not ideal for csgo's realistic style $phongBoost "30" // Straight up multiplies phong I've added these as comments so it should be safe to drop that template up there and paste it into a vmt without it spitting out an error. Anyways I hope that clears some of it up. A quick note on some surfaces, Metals should generally have a medium sized exponent with the envmapsaturation set to 0.5 to create a tinted specular reflection that's somewhat dark and lacks color. Rough surfaces like wood and concrete should probably use a lower phong exp value (maybe 15?). Obviously none of this is tied to any physically based system, but it is possible to achieve some of those results. Just keep playing with specular and evnmapping respectively. Edited July 15, 2015 by MrTwoVideoCards Radu, blackdog, jackophant and 6 others 9 Quote
jackophant Posted July 15, 2015 Report Posted July 15, 2015 as this is vmt related, would this same process work for setting phong on csgo weapon skins? Even per channel?I'm thinking along the lines of the official slaughter/dark water skins valve have, as I can't recall anything else using this type of effect?Or am I getting ahead of myself here, tricking myself into thinking I've understood this? Quote
The Horse Strangler Posted July 16, 2015 Report Posted July 16, 2015 Yeah, it should work the same. jackophant 1 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.