[VMT]Phong Shmong
FBOTheLiuetenant
04-04-2007, 09:04 AM
It's been a long time away from DOD, but here is a preview of .vmt settings that produce some nice results.
I probably will mess with them for a while longer, but here is the .vmt I used. If anyone has suggestions or whatnot feel free.
"VertexLitGeneric"
{
"$baseTexture" "models\weapons\v_models\nc_aks\upper"
"$bumpmap" "models\weapons\v_models\nc_aks\upper_norm"
"$envmap" "env_cubemap"
"$normalmapalphaenvmapmask" 1
"$phong" "1"
"$phongexponent" "25"
"$phongboost" "1"
"$phongfresnelranges" "[0.5 1.5 3.0]"
}
BERSERK3R
04-05-2007, 04:01 PM
This is a good one mate, good post!
This can be quite usefull.
The phong effects on those screens, all use the game phong code as shown?
I quite like it.
I'll give it a go sometime.
Wile E Coyote
04-05-2007, 04:12 PM
Actually, From what I see in the picture, that setting would be ideal for the Garand, Carbine, Colt and Tommy and MP44 (and some BARs) all of which had a parkerized finish. I briefly messed around with the VMT variables but quickly became occupied with other things :) I'm gonna test these settings out on the afformentioned weapons. Thanks!
FBOTheLiuetenant
04-08-2007, 08:10 PM
If I believe correctly they do all use the same settings, or for the fresnel ranges they do for sure. Thanks for the feedback guys. I'll try them out on some DOD weapons and post screens. I used these settings on a Colt model for CS:S, it doesn't look parkerized but if I can tone down the normal it should look better.
edit:
Heres the colt I was referring to
edit edit:
Alright so I downloaded one of your Garand skins Wile and I think there is a bit of a difference :/ between the phong. These are taken using the settings posted in this thread.
BERSERK3R
04-09-2007, 05:56 AM
I can't find a good screenshot, but for the ones who have played Call of Duty 3 on the xbox360 know that the "phong" looks insanely awsome.
I wonder which kind shader it uses.
Anyone more info about this?
Wile E Coyote
04-09-2007, 07:11 AM
That looks really good dude. Really good. That's the look I wanted to acheive.
*Edited comments until I can get more definite info on a couple of items*
FBOTheLiuetenant
04-09-2007, 02:52 PM
Yeah I really like how the Garand turned out. I might change the fresnel ranges to something like [0.5 1.75 2.25] for the Garand because of all the roundness, but for models that have more straight lines have them be more like the original ones [0.5 1.5 3] or so.
BERSERK3R
04-09-2007, 03:13 PM
What about the bar.
I find it hard to phong it realisically.
I think the fresnel range is the thing, can you have a go at it?
Can you explain a bit how that fresnel works.
Does it have to do with the radius/dividing of light?
Also do you have a idea how the shaders work of cod3 for example?
That uses a shader which has some very unreal results, and not seen before on dods weapons.
And it will most likely use phong shader.
FBOTheLiuetenant
04-09-2007, 05:43 PM
I don't know anything about COD, so I can't explain much, but I'm positive that COD2 & 3 use phong.
Fresnel values relate to the intensity of the phong in relation to the orientation of the polygons.
[0.5 X.X X.X] (this value is for surfaces facing away from the light source)
[X.X 1.5 X.X] (this is for surfaces that are in between being perpendicular and away from the light)
[X.X X.X 3.0] (and this is for surfaces that directly face the light source.
Yeah I take a shot at phongin the BAR. I'll do exponent textures for either a wooden stock or bakelite.
Wile E Coyote
04-09-2007, 06:40 PM
After learning a bit more now, I'd have to say I prefer using an exponent map over the "phongexponent".
FBOTheLiuetenant
04-09-2007, 08:01 PM
They do come in handy for when you want both wood and metal. Yeah I still have a bit of learning to do with phong.
lordfantas
04-10-2007, 11:32 AM
After learning a bit more now, I'd have to say I prefer using an exponent map over the "phongexponent".
what sort of techniques do you use to make an exponent map?
BERSERK3R
04-10-2007, 12:38 PM
I got these results with the normal fresnel settings, and looks quite awsome when the light shines at the right angle and for the bar it seems that I need to have [0.5 X.X X.X] and also tried that, and give it a go ingame now and make some screens.
Here are the screens from the 1,3,6 fresnel:
http://img440.imageshack.us/img440/5946/bar1pa4.png
http://img440.imageshack.us/img440/8886/bar2fv2.png
FBOTheLiuetenant
04-10-2007, 05:24 PM
That does look nice! But I wonder how it looks ingame. Also beyond just changing the fresnels changing the phong exponent affects the size of the shine. If I remember the larger the value the smaller(tighter) the shine.
I don't know how properly I do exponent maps, but I achieve results I like:
I begin by desaturating the base texture, for wooden areas, or parts of the skin that need less phong or none at all I make them black or a dark gray. Areas of metal or other shiny materials you can make lighter shades.
I've also experimented with inverting the exponent map once I've gotten it to where I like. This makes the phong have much smaller areas of lighting, but also looks like plastic, glass or just wet. Want to experiment with newer .vmt settings but this has very limited use.
Trp. Jed
04-11-2007, 03:26 AM
Fresnel values relate to the intensity of the phong in relation to the orientation of the polygons.
[0.5 X.X X.X] (this value is for surfaces facing away from the light source)
[X.X 1.5 X.X] (this is for surfaces that are in between being perpendicular and away from the light)
[X.X X.X 3.0] (and this is for surfaces that directly face the light source.
<pedant>
Actually, thats not quite right. It refers to how much light it reflected based on the angle of the polygon normal to the viewing angle.
</pedant>
The fresnel angles is what creates the rim lighting component which tends to make the polygons on the edge of the model that are curving away from the player brighter. These bright faces get picked up in the HDR pass and are bloomed out giving the edges a slight glow to them. Its like when you look at someone with the sun directly behind them and you get a sort of white halo around them.
Rim lighting/Fresnel angles are not related to phong at all. It's just an extra effect pass put in as part of the phong shader code. It's actually part of the HDR processing branch.
So you don't have to use it and in some cases might no even be realistic for weapons. If you want to disable it just use [0 0 0] as the fresnel angles.
Sabre
04-11-2007, 04:08 AM
I don't know how properly I do exponent maps, but I achieve results I like:
I begin by desaturating the base texture, for wooden areas, or parts of the skin that need less phong or none at all I make them black or a dark gray. Areas of metal or other shiny materials you can make lighter shades.
I love you FBO! That method just allowed me to create some half-decent exponent maps and get perfect phong shaders onto Soul_Slayer's MP40...
FBOTheLiuetenant
04-11-2007, 01:56 PM
Hey np Sabre, I'm still learning stuff too thanks to Jed :) I knew it was something like that but it was a while since I looked at the tutorial I learned from.
isnogud
11-04-2007, 02:03 AM
Jepp, these are great Hints, but the Problem regarding shiny player models is still not solved.
Day of Defeat Forum Archive created by
Neil Jedrzejewski.
This in an partial archive of the old Day of Defeat forums orignally hosted by
Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.