Game Development Community

What is the actual process to getting specular maps/specular masking to work?

by Daniel Peavey · in Artist Corner · 03/26/2009 (9:25 am) · 4 replies

Hey everyone.

I've been banging my head against a wall trying to find a way control the specularity on my assets. Color spec maps or spec masking - doesn't matter. I'll take either. So far, as far as I can tell by RTFM, I can only control the specular power as a whole and a few other related commands. I explored attaching alpha channels to my diffuse and normal maps, and "attempted" to dig through the related source code and HLSL to figure out if there is any function I've missed. No results.

Any input?

#1
03/26/2009 (10:14 am)
I was worried about this one at first too. You use the alpha channel of your .png diffuse textures for specular masking. If you are using Photoshop, it will most likely not export the alpha channel properly. There is a plug-in called "Super PNG" which exports alpha channels properly.
#2
03/26/2009 (12:51 pm)
super png for photoshopIf you use this with the default PNG formatter installed, you will need to use the commands of "open as" and "save as" SUPERPNG. Otherwise if you default this to the png format, you won't have to worry so much...I suggest you have both as they are both useful for game-dev.
#3
03/27/2009 (12:01 pm)
Also DDS and JNG also support alpha channels and they can be loaded by TGEA and T3D.

PNG isnt bad but its a beast when it comes to distribution size and generating the mip maps for it can eat up your vram quickly. DDS is a compressed format that stays compressed in vram and can hold pre-generated mipmaps, but it can give some pixelated results. JNG is basicly JPEG with Alpha channel, so it compresses better than PNG and holds the same data, but its more of a pain in the ass to work with.

If you are working on a small 20mb or less web deployment project go with JNG. If you are making something larger your best bet is to go with DDS in the long run.
#4
03/30/2009 (5:44 pm)
Thanks a bunch, everyone. I'm using DXT1-5 compressions with DDS's with working with spec maps, and with great success!

Hasta.
-dan