question about alpha layers on model textures

How do I get the alpha layer to take effect in Unity?

This is what it’s supposed to look like:

This is what it looks like in Unity:

What am I doing wrong?

What shader is it in? It needs to be in a Transparent/Something shader.

Also make sure the texture format in Unity is RGBA Something and not RGB so the alpha channel gets used.

–Eric

Both the top screen and the hatch cover below it have an alpha map. This way the screen looks like a screen and the openings in the hatch below it are open to see the fuel tank (2D) below it.

The import converts it to an RGBADXT5 or something like that.

I’ll try changing the shader and see if that does it. It is currently a lambert material on both of those parts.

Ok, using RGBADXT5 the alpha does not work.

Importing as RGBA 16bit I get this:

Can you not assign a shader on a per object basis? I selected just the top screen object and set the shader to “transparent/diffuse” for that one object only. It affected ALL the objects below it and turned the hull transparent. It also made the wheels and tracks completely disappear and they use separate textures.

This import setting also had some odd effects on the texture itself as shown by the weird colors on the side skirts. It should be just some simple black shading for grime. Not technicolor stuff.

Can someone tell me best import settings for a psd with an alpha layer? I also noticed the the color is more saturated on the texture with the alpha than it is on the turret texture which has no alpha. This causes the colors to not match. It is Unity doing this as all colors are correct in Maya7.

When you change a shader, you’re changing the shader for that material. Hence, all objects using that material will have their shader changed. So any objects you want to have different shaders should have different materials.

–Eric

Im happy to have a closer look, if you want to send me the file-pm me and I’ll give you my email.

But first maybe try the vegetation 2-pass shader on it. Its robust for most things alpha.

AaronC

Let me try this first Targos. I’ll get back to you if I can’t get it to work right.

I have assigned the parts lambert materials.

They are:
lambert1
lambert2
lambert3
lambert4

I assigned these in Maya7. In Unity, it is setting everything to lambert1, apparently, so if I change the shader for lambert3, all the others change as well.

I can’t figure it out but I’ll keep trying.

If you want to go down the four Materials road, you need four materials. select the one you have at the moment and Apple+D 3 times in project view to create 4 materials. then assign appropriate shaders to each one, then apply each one to the right object.

Let us know how that goes.
AC

I followed the manual but it does not mention that there is a sub menu after transparent/cutout. The manual implies I can just pick transparent/cutout, which from the description in the manual is what I need as the screen and hatch are similar to a fence.

Still can’t get it to work right and it is frustrating. Moving the alpha cutoff slider causes unanticipated effects and seems to work opposite to what I want. It will either make the entire mesh transparent, as well as the object beneath it, or will show the entire object without the effect of the alpha. I made a new material in Unity for the screens and a new material for the hatches. Maybe something in the hierarchy?

Hmm, should be pretty straightforward; not sure what’s going wrong. Here’s a little example package of an alpha texture…maybe that will help. You should be able to use RGBA DXT5; only use something else if you’re seeing blocky compression artifacts, because uncompressed textures take up a lot more VRAM and aren’t usually necessary for typical game object textures.

–Eric

62852–2302–$alphatextureexample_638.unitypackage (63.6 KB)

Thanks Eric.
I’ll check it out when I get home tonight. If only I didn’t have to work and could just play with Unity all day :frowning: