View Full Version : Dota 2 Cosmetics - Specular exponent?
07-31-2012, 04:58 PM
Hello everyone, if there is a better area to post this please let me know.
I cannot get my mask2.tga to show in the in game preview, everything else is working. I thought the issue may be because I didnt have it applied to the specular color channel of my PhongE material in Maya but that had no affect on the issue.
I've come to the theory that perhaps its that my specular exponent is not set and thus my full white alpha is not blowing the specular out on my item in preview. Below is the information from Valve on the mask2 32 bit specular map.
"Alpha is the scale factor of specular exponent from shader. For example, if the specular exponent is set to 16, then values for this channel of 0...255 will control exponent values from 0 to 16. Look at the hero's specular exponent number to get a good idea of what values to use in this channel for your item."
Where is this "specular exponent number"? I see nothing of the sort on the shader in Maya.
07-31-2012, 08:41 PM
The specular exponent number is part of the VMT - the valve material file that defines the texture in the engine. Looking in the source files of any model you should be able to find a .vmt and get some idea of how they work...they're pretty simple :)
Hope that helps.
07-31-2012, 10:34 PM
08-01-2012, 10:26 AM
Hmm yes that makes sense I should have checked there.
However, if the exponent is in the VMT then it must be prespecified for each item? Considering you submit .tga files as your textures, and .fbx as your model. The compiler just applies the stored VMT properties to the uploaded files for preview?
Even using valves default mask2 file on my model I see zero specular, the model is completely matte, also does not receive shading.
Anyone have ideas?
08-01-2012, 10:39 AM
You can see I've plugged in the default mask1 and 2 textures for DKs original weapon. I would expect to see some gloss/spec on the texture where the UVs and the mask intersect, but I do not. Making me relatively sure the masks are being discarded entirely during the compile.
08-01-2012, 12:26 PM
If you don't control the .vmt your pretty low on options. Is there a weapon that does look the way you want that you can compare against?
08-01-2012, 12:50 PM
I'm using the default DK sword to compare, all of his gear has a level of gloss and metal look to it, without specular working my item will stand out on him like a sore thumb.
I noticed if I export the model FBX without the textures im using plugged in to the color and bump channels on the shader, they do not load properly in Dota 2 when i preview.
My question is, does anyone know where to load the mask1 and mask2 textures in the PhongE shader in Maya before exporting? I think this may be my issue. (I have tried Mask2 in specular color channel, didnt work.)
08-01-2012, 01:22 PM
See I've never gone through the workshop but I know source well. I'm used to manually creating and adjusting vmts and mdls. I'm not sure what the heck it's doing for you in the background.
08-01-2012, 01:33 PM
Yeah totally, I'm in the same boat I work in source for my job and manually export VMTs VTFs.
My problem turned out to be on the exponent alpha on Mask2.
I was testing this layer with full black and full white to try to get a specular. Turns out you must be in the mid range to get anything or it completely kills the shadows and specular on the item.
08-01-2012, 06:32 PM
i think you must use the same texture to model,not the DKs original weapon. also must be same resoultion and size. the files name too.
08-01-2012, 07:30 PM
It doesn't have to be mid range, it just can't be completely black. If it's completely black, the compiler discards it and then the shader thinks it's fully white. I like putting a little dot in the corner, in between UV islands.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.