[Solved] Specular maps turn models way too shiny even with a black image. :-\

Started by Jimmarn, January 30, 2016, 01:27:08 PM

Previous topic - Next topic

Jimmarn

Hello, I'm having some troubles with the shader of custom models and brushes.




This is how they turn out, way too reflective. And I don't understand why. I recreated the maps and shaders in Marmoset Toolbag and it looks a lot better, the way it is intended.



Anyone else had this issue and found a solution to the problem?
I have checked the VMT file and I think it's correct.
"VertexLitGeneric"
{

$basetexture "micefinal16/blackplastic/BaseMaterial_albedo"
$bumpmap "micefinal16/blackplastic/BaseMaterial_specnormal"


"$surfaceproperty" "plastic"

$envmap "env_cubemap"
$normalmapalphaenvmapmask "1"
}

wallworm

The likely suspects: Either Gamma problems OR incorrect DXT export settings. Make sure that the gamma of your normalmap bitmap is 1.0. And make sure that both the specular level map node and the bump map node in Slate have the DXT 5 compression. Lower compressions probably won't have the alpha settings you want. (I'm saying both because if using WWMT > Export VTFs only one of the two nodes will be used if they are the same output VTF but two slots in the material).

Jimmarn

The normalmap is exported as a 32bit TGA with gamma set to 1.0
And the DXT is set to 5 

edit: Also Resize sharpening is set to None, I just mistakenly scrolled down and it scrolled the dropdown in the screenshot.
Just doublechecked the TGA, and the Alpha was present there. But I went into the folder for the VTF's and the new Normal does not seem to have been exported out. The only file existing there is the old Normal map before I changed its name to specnormal, and that file has a completely white alpha channel

Edit2: I managed to fix the issue with using the VTF editor, and importing the TGA and saving a VTF Manually with the correct filename and the correct place. So it's working and looking normal now. Thanks again for your help Shawn!

wallworm

If the VTF bitmap name does not match the tga bitmap name, you may need to click the Render to TGA button in Slate and then the export to VTF button. Re-exporting a VTF is only automatic if the TGA filename matches the target vtf filename ( for example, mybitmap.tga and mybitmap.vtf  will export correctly at each change; but if the tga is mybitmap.tga and the VTf is set to be differentname.vtf, the re-export is not automatic and you need to click the Render to TGA button to update the TGA file that is inside the materialsrc folders).

Jimmarn

Aha! Alright, thanks! That will make my life easier in the future  :)
By the way, I just manually edited the shader for my chair as I am not sure how to specify materials using Phong. Is there an easy way to make the material in max with glossiness and specularity to transfer as a phong material within Valve?

Example
"VertexLitGeneric"
{

$basetexture "substance/Greenfabric1_diffuse"
$bumpmap "substance/Greenfabric1_normal"


"$surfaceproperty" "carpet"
$phong 1
$phongexponenttexture "substance/Greenfabric1_spec"
// $phongboost 6
$phongfresnelranges "[0.05 0.5 1]"



}

wallworm

At this point in time, WW VMT Exporter for phong:

Set Standard Material Shader Type to Phong.

The $phongexponenttexture is the Specular Color slot. It was a judgment call I made a few years ago that could have been a different slot... but that's what it currently is right now. Other params can be set inside the Standard Material when you apply a WW Source shader to the material.

Jimmarn

Alright! Thank you! Once again an awesome plugin you've made here. Well multiple awesome plugins

If you're ever to edit the slot, maybe you can use the glossiness slot?

SMF spam blocked by CleanTalk