Getting Spec to work in models

Started by Mospheric, December 04, 2012, 02:32:47 PM

Previous topic - Next topic

Mospheric

So I'm an artist working with a mod team on a Left 4 Dead 2 mod. I've never used the Source engine before, and I sure have a lot to complain about (coming from UDK and Unity). So it's been absolutely wonderful to have WWMT to help automate a lot of the details that would have taken me a while to wrap my head around.

So I'm currently working on several props. We've had a few issues getting them working, but the biggest issue is getting the spec map to work. No matter what I try, I can't seem to preview it in the Model Viewer found in the L4D2 Authoring Tools. I'm using Tgas. I put the spec into the alpha of the normal and saved it as a 32bit alpha uncompressed Tga.

When I export from Max, I get the VMT that has the $normalmapalphaenvmapmask "1" I don't see why this shouldn't work after looking over different forums. Any suggestions as to what I could try?

Here's one of the assets from Max that has spec on it.


wallworm

A couple of ideas:

First, if you want to see Specular that is in the normal map, you must make sure that in the Model Viewer both Normal Mapping AND Specular are checked in the Render Tab.

Second, even if you have specular maps in a material, they will not display in a compiled level automatically. You must run buildcubemaps for them to appear (in mods I'm familiar with).

Moreover, in most circumstances, you have to do things like this:

sv_cheats 1
buildcubemaps
mat_hdr_level 0
map mymapname
buildcubemaps
mat_hdr_level 2
map mymapname

This is, I presume, for levels compiled in HDR and LDR. I am not certain yet what it means for some mods like CS:GO where there may not even be LDR.

Hopefully that helps.

Mospheric

Thanks for your quick reply Shawn! I spent the evening trying to figure out my spec issue. I dismantled some of Valve's vmts to check out what they did. Most use a phong shader to create the feel of a spec map while not directly using a spec map. I added a phong shader to mine and got something that looks way better. I'll have to keep tweaking it and hopefully get something decent.

wallworm

Glad you are getting good results. Feel free to share your progress here. Share any tips for others.

wallworm

Just for reference, I've updated WW today that had some material fixes. 1) the compression setting in WWMT got fixed. 2) I added new logic for exporting $phong. If you change your Shader Type to Phong (instead of the default Blinn) and your Material's Specular Color (in Maps rollout) is on (checked) the VMT will use phong. Previously it also required a bitmap in spec color.

SMF spam blocked by CleanTalk