Game Development Community

Adding specular maps in TGEA

by Florian · in Technical Issues · 02/21/2007 (8:42 am) · 5 replies

Hey,
I was wondering how to add speculars to materials
but no normal speculars but with specular grayscale bitmaps
i asked this before and one said to paste your speculars in the alpha channel of your texture, i tried this but it didnt display the texture anymore
can someone help me with this?

tnx =)

florian

#1
02/23/2007 (8:21 am)
So nobody can help me out?
#2
02/23/2007 (11:07 am)
Write a custom material which takes a diffuse map and a an alpha map. Do the lighting calculation, multiply result * diffuse map, then add specular * alphaMap.
#3
02/23/2007 (12:43 pm)
Are you sure you did it properly? I'm sure TGEA already does multiply the resulting specular color by the diffuse texture alpha. Lower alpha values will reduce the specular intensity.
#4
02/23/2007 (3:36 pm)
Ok, i do not know how to write costum shaders/materials...
does anyone has a tutorial on how to do this?

and what i forgot to ask is as what kind of extension do you have to export the texture?
Im trying as .dds as png or jpg only export 3channels
also, if you have to export as .dds, what kind of .dds should you use, cause there are a lot of options
#5
02/26/2007 (12:33 pm)
This should work for normal Materials. You should be able to just use a grayscale alpha channel in the base texture to modulate the specular. This will only work with .png and .dds, although with .dds you need to make sure it's the right type. If you are using .png, and a recent version of photoshop, you should use an old copy of the SuperPng plugin.

You can get it here:

tdn.garagegames.com/wiki/Editing_Beginner/Tools/SuperPNG