Phong shading via WWMT doesn't work for me.

Started by CaptainCrazy, December 01, 2013, 07:08:02 AM

Previous topic - Next topic

CaptainCrazy

**This is for Counter Strike: Global Offensive**

Okay so i made a model of a safe but envmap doesn't give a dull enough reflection so I've decided to go with $Phong.  Here's an example of the sort of "sheen" i wish to have on the metal texture (yes i know it's wood in this picture but you get the idea)

As you can see it's not super reflective but has a mild glossiness to it which is what I'm looking for, and i believe that can't be done with envmaps.

Below i shall list my workflow of how i believe i should be doing it but maybe I'm missing something:

1.  Set shader type from Blinn to Phong.  Made sure WWMT is implemented into the material editor
2.  Put my diffuse texture (main texture) into the 'Diffuse' slot.
3. Put my normal map (that has an alpha channel for the Phong to work with) into the 'Bumpmap' slot.
4.  Done the same as in step 3 but this time for the Specular Level slot.
5.  Not touched anything else in the WWMT parameters to be on the safe side.
6.  Exported the textures (for some reason the .VMT exporter wont even do anything from within the material editor)

This is the resulting .VMT file, but for some reason it still reads as using an envmap AND Phong yet there seem to be a few Phong parameters missing:

"VertexLitGeneric"
{

   "$model" 1
   "$phongboost" "1.0"
   "$phongfresnelranges" "[0 0.5 1]"
   "$surfaceproperty" "Metal_Box"

    $basetexture "textures/Phong_test_1"
    $envmap "env_cubemap"
    $envmapmask "textures/phong_test_1_s"
}


So could somebody possibly tell me what I'm doing wrong?  Shawn has tried to help me and I'm sure, from his end, his explanation works but for me something just isn't going right and i end up with an envmap as well as a Phong shader.

Sorry if I've been asking a lot of questions but I've started to make notes of the ones that yield the best results and possible solutions, so that i have them to reference to in the future.

wallworm

I'll look into it shortly. I did a bunch of renovation to VMT exporting these last several months, and I never did test Phong in those updates. Something might be broken.

wallworm

So there was an unnecessary step for $phong, which was checking to see that the Specular Color map was manually enabled. But now the exporter simply checks for VertexLitGeneric and Shader Type set to Phong.

I've also added this new document on this topic here: Phong Material.

CaptainCrazy

But i don't check Specular Colour anyway and it still does it.  I only enable Specular Level.

wallworm

Perhaps I did not explain this enough.

Only some of the phong settings were appearing (those from the Material's WW Phong settings section). But some of the settings come from the material's standard properties. For example, $phong 1 is missing because the version of WW that you've been using will only add it if you have the shader set to Phong AND you check the Specular Color checkbox in the maps section of the material.

I updated WW yesterday so that you do not need to check the Specular Color checkbox in maps to get $phong 1.

In either event, the $phongexponenttexture comes from Specular Color if you need to use that. The page I linked to should give you an explanation of all those settings.

SMF spam blocked by CleanTalk