Hi Guys, I am not sure if someone else has already asked about this, but is there a shader in Unity that supports apha maps? If not does anyone knows how to write a custom shader that supports it? Thanks
I mean an opacity map just like in 3ds max. A black and white image. Everything in white will be visible and everything in black will be transparent.
You need to use an image editor to put that black white image into an alpha channel of your colour image. Then once it's in unity, use it with one of the Transparent shaders, such as Transparent/Diffuse. (notice in the inspector, for the transparent diffuse shader, it says "Base(RGB) Trans (A)". This is telling you that the A (alpha) channel will be used for the transparency.
Here are the DAZ Studio to Unity Texture/Shader Mappings that work for me. I'm still very new to this stuff so please if anyone knows better please update this thread. DAZ / Unity Texture Mapping Filename_M (Texture Map) Import Texture Filename_B (Bump Map) Import Normal Map (Do not generate grey scale) Filename_Tr (Transparency Map) Import Normal Map ( Do not generate grey scale ) DAZ / Unity Shader Mapping (B, M) Bumped Diffuse (Tr) Transparent/Diffuse (B,Tr) Transparent/Bumped Diffuse Digimi Texture Atlas diffuse_Image_1_AtlasUVs Unity Texture Map Type Diffuse opacity_Image_1_AtlasUVs Unity Transparency Map Type (Tr) In the situation where a material is using (B, M, Tr) I'm using Transparent/Bumped Diffuse Shader but is there a better shader option?
Hi! Would you please explain how to insert alpha layer into texture? No graphic designer that I know know how to do that
in photoshop you go to the channels palette and hit the "create new layer button", photoshop automatically creates an alpha channel; then you just paste or paint whatever alpha you want to use (white: opaque; black: transparent) but I am having problems with it too: the transparency sorting doesn´t work in my case; and the tutorial posted by eugenem79 seems a bit strange to me as it doesn´t mention how to deal with semi-transparent areas in your texture; gonna do some research. as soon as I get it I will give you an update. EDIT: I had this sorting problem while using one shader for a window (frame and glass); as soon as i applied a second shader to the glass, the transparency sorting worked.
It's simple, really. You make your texture in a format that supports transparency (PNG for example) and make the transparent parts of your model transparent on your color map. Basically your color map is also your alpha map. You just have to use a shader that supports transparency and import your texture with the alpha.
For anyone else finding this, if I am understanding the initial question properly, you can just use a standard shader and in the material set the alpha source to "From Gray Scale" and put a check mark in Alpha is Transparent. Then set the material rendering mode to Transparent cut out or fade. Of course you can also use transiency as mentioned above but if you want a black and white alpha map that's how you can do it.
you can use psd file as a texture with a alpha channel, then create a material with shader from legacy shader, then transparent->cutout->diffuse.In this shader you can see input texture has both Base(RGB) Trans(A),so it shows that it can accepts Alpha channel also this texture has four channels RGBA