WIP WIP
goofed on this a bit at lunch, old style soda machine
i have some questions for you people (and vig) i want the glass on the door to be transparent so you can see the sodas behind it. when i've tried alpha it made a lot of sorting issues.
what is norma shader stuff i need to use for tf props? to get the phong look thing going?
Replies
First, I think the glass has to be a seperate object from the case. (Assuming you want it breakable). If not, find a prop with some transparency (their glass textures) and steal the code from the VMT file. Same goes for finding out the phong shader - which, last I looked, was $phong at the beginning of the VMT. But like I say, its been awhile.
Cool prop. Simple & fitting.
Also, I think the rounded corners at the top are hopelessly lowpoly by current standards. :poly114b:
Looks great btw. I love retro coke machines so much.
anywho...
Yup it should be broken up into two models placed at the same location. Opaque($surfaceprop "metal") and opacity mapped ($surfaceprop "glass"). That's what I was doing for the first set of windows on the bridge before I redesigned it. For something like this you might want to not fiddle with a glass mdl and just use a hammer brush where ever you place the prop, kind of a hack fix but certainly easy.
The surface properties are compiled into the model using $surfaceprop in in the .qc file and the $surfaceprop in VMT is ignored. So even if you have a seperate VMT with $surfaceprop "glass" for the glass the entire model will decal like the surfaceprop in the .qc file.
Before you break the model up, I'm curious if adding $mostlyopaque to the .qc file would fix the sorting issue. It helps sorting issues with hair. But it won't solve the two material type on one model issue so in the end you'll need to break it up.
Aesir, for the most part they are pretty tight on their use of glass, it doesn't fit well with the painted style and some older video cards have issues with opacity sorting so you end up creating a "what if this player has a pre DX9 video card" material, its a pain to test, and most of the time I think they just didn't want to bother so they would leave the window open, or on vehicles roll the windows down or dirty them up. The crappy thing about working with source is that all the .qc files are not included so its hard to see how they compiled props, and we're left having to piece it together info from the wiki and what we know about the prop/model =/
The examples of glass I can find are:
models\props_mining\window_industrial01
models\props_2fort\lantern001
models\props_badlands\glass_silo
models\weapons\v_bottle
"VertexLitGeneric"
{
"$basetexture" "player/surfer/surfer" (path to your diffuse texture)
"$bumpmap" "player/surfer/surfer_normal" (path to your normal map)
"$phong" "1" (switches phong shading on)
"$phongexponenttexture" "player/surfer/surfer_exponent" (path to your gloss map, aka exponent map, if used)
"$phongexponent" "5" (gloss value for whole material, overrides exponent map if present. 0-255 range)
"$phongboost" "3" (muliplies your spec map by this amount. Can be less than 1 to reduce strength of spec)
"$lightwarptexture" "player/janitor/base_warp" (ramp texture which can add various shading effects, including toon)
"$phongfresnelranges" "[0.5 1 2]" (muliplies specular according to viewing angle. First number is straight on, second is 3/4s, third number is glancing angles)
"$halflambert" "1" (alters shading a bit. Best used on organic meshes. Bit hard to explain without pictures)
"$rimlight" "1" (enables rim lighting)
"$rimmask" "1" (enables masking of the rimlight, using alpha channel of exponent map)
"$rimlightexponent" "15" (the rimlight falloff)
"$rimlightboost" "3" (multiplies rimlight strength)
}
Note that the spec map is greyscale, and goes in the alpha channel of the normal map. If you dont have a normal map, you can add the line :
"$basemapalphaphongmask" "1"
to use the alpha channel of your diffuse texture as a spec map. You might need to invert it if you do this though.
It might be good to comment out (-- or // infront of the line) sections of it to test and see what it does. This looks like just about ever setting for phong you'll ever encounter to get that TF2 character look. For some props like yours, I bet you end up using half of this, but its good to know what the rest does
nice one.
I didn't know about the render spline tick in max, I loves it now