# Set specular map from alpha channel

I'm making an importer for a xbox360 game. Specular data is in the alpha channel of the image. Once I have enabled the alpha for image, blender does: "RGB" + "A" = "ARGB". But I need the "RGB"` to stay "RGB" for diffuse colors, and use "A" for the specular intensity map.

Right now I'm copying the same image with alpha disabled for diffuse, and with alpha enabled for specular, but copying a lot of hi-res textures is not an option.

How do I stop alpha affecting the diffuse colors? Or how do I set RGB for diffuse color map, and alpha for specular intensity map?

[update]

Unticking the "Image sampling -> Alpha -> Use" does not work(the image only becomes darker). Here is the .blend file.

On the image above: At the left, alpha is on - specularity is ok diffuse is not and at the right alpha is off - diffuse is ok but specularity is not

• Unticking the "Image sampling -> Alpha -> Use" does not work(the image only becomes darker) – oxtvy Jun 8 '13 at 17:46
• You might want to edit your question to include that information, comments are easier to overlook. (Especially if there are a lot of them). – Stephen Jun 8 '13 at 18:03
• @oxtvy yes, please be as specific as possible. – iKlsR Jun 8 '13 at 18:09
• unfortunately I don't have enough points to post an image with example – oxtvy Jun 8 '13 at 19:07
• @oxtvy just upload and put the link in the post, I will add it properly for you. – iKlsR Jun 8 '13 at 19:08

For your first question, to stop your diffuse texture from using the alpha channel of the image, go to the Texture tab and under Image, untick Use Alpha.

Here is how it looks now as compared to those above.

If you tick Specular under Influence, Blender will automatically use any specular highlights in the image .

Additionally, you can check parts of your textures you want to be affected and or by how much under Influence in the same texture tab.

You could extract the alpha channel in an image editor and save it as it's own file. Load the black and white file into Blender and use it as a specular map(using the specular influence).

• Using stencils mean more textures. Blender can automatically pick different channels from an image.. bump, normal etc. – iKlsR Jun 8 '13 at 21:44
• That's true, and that's probably what I would do if I wanted a simple spec map. However, this second method would allow more customization in the editor. – CharlesL Jun 8 '13 at 21:45
• This is for an import plugin, i can't do this manually. The options actually are here, but don't work in the expected way. Maybe this is a regression and i should report this on blender's bug tracker – oxtvy Jun 9 '13 at 6:06

you could do this this way:

1-on the material panel, put the specular intensity to 0.(anyway here you can change the color of the specular.. but the intensity we want to take that from the tga) 2-on the texture (tga) on the influence panel, activate Color, Alpha, and Specular Intesity to 5 for example.

And that's it.