- Home /
use Alpha channel for specular mapping
Hello
I'm using an alpha channel in photoshop for my specular map. I've got a uvw-map that contains metal and wood, so I want the metal to have a lot of specular and the wood none. As a PSD file this works perfectly in Unity, but I want to create an asset to share with other people and am not sure if a PSD file is appreciated... I can't get the file to be saved including the alpha channel as a PNG from photoshop... Does anyone know how to do this or if it is no problem to just leave it as a PSD file for other users?
Answer by RC-1290 · Oct 04, 2012 at 02:40 PM
You can use the SuperPng plugin to save a custom alpha channel. In Photoshop, you first create a new channel, which is called Alpha 1 by default. The data in this channel will determine the specularity (black for no specularity, white for full specularity). The plugin adds SuperPng as a save format, which makes an extra window pop-up when saving. In this window you can select the Alpha 1 channel.
It will then save the image as a regular png file, but with the alpha channel not set as the default transparency but with the custom alpha channel you created.
The SuperPng plugin works perfectly! I recomment to use it if you are using photoshop, it is the easiest way to get the Alpha channel into Unity and the smallest in size Great work RC-1290!
Answer by Broheim · Oct 04, 2012 at 11:56 AM
Use .png. The alpha will not be taken from the Alpha Channel, but from the Alpha in your layers. png uses lossless compression, i think it may be the best format for unity if you don't require editability. Or use .tga. The alpha of the tga will be taken from what you have in the alpha channel in the psd files.
I would guess it's normal not to put your psd files in the unity project since they will make it heavy. Also .psd files may produce some bugs when getting read by unity.
Photoshop CS and higher, may cause artifacts when export to PNG, if you use Photoshop export to TGA.
Answer by Code Noctis · Oct 04, 2012 at 01:04 PM
Thanks! The TGA file worked When you save as .tga it needed to be 32 bit though, but this probably makes sense (I'm not very technical guy) I still need to figure out the PNG version... I tried to flatted my whole psd file to 1 layer, then add another layer underneath this one with my specular picture, but that didnt work. I only know how to use it in a way that black is 0% shiny and white 100% shiny, so maybe I need to make black transparent or something?
Anyway I've got a solution, so thanks again Broheim!
Answer by SarperS · Oct 04, 2012 at 02:44 PM
If you save it as a PNG, all the transparent areas in your PS canvas will automatically form the alpha channel. As far as I know, it's not possible to add custom alpha channels for PNG in PS (maybe there is a plugin for it?) so it doesn't solve your problem in the case of creating specular maps. 32bit TGA is the best solution in my opinion.
Answer by Thousand · Jan 12, 2013 at 03:16 PM
thanks for the SuperPng tip! In my case, the tga´s with Alpha (1k) have 4 MB, the png´s created wirh SuperPng (1k) about 600k - and size matters...
Your answer
Follow this Question
Related Questions
PNG vs TGA format for alpha to get right specular shading 0 Answers
A PNG appears differently from its PSD 3 Answers
Remove white edges on texture help 2 Answers
Best practices...to use .PSD or .PNG files for my texture assets? 3 Answers
About shader! 0 Answers