Need 50% Aplha: Shader Questions

Hi there,
I am dumbfounded as to why a transparent bumped diffuesed shader works fine on an predominantly blue object, while makes a yellow object black.

What are my alternatives?

Bump.
I am sorry to bump this but I am dumbfounded as to why the shader will work properly on one object, but not on another.

I need these objects to be semi transparent but retain thier natural color.

Thanks.

Hi there,
I am using the Transparent Bumped Diffuse shader on two objects. One is blue, one is yellow. The effect it has on blue is perfect. The effect on yellow is that it becomes black.

What can I do to alleviate this?

You mean on two materials? Objects cannot be blue on yellow.
This yellow material becomes black on each mesh? On default cube for example?
And “how much yellow” materials should be to becomes to black?

No,
what is happening is that I have a piece of art, a sprite which is naturally, blue (artist painted it blue). It looks blue. It is a health meter. I added the Transparent Bump Diffused Shader as I want the meter to be 50% alpha, semi transparent. This worked fine.

Now, I have another health meter which is yellow. Artist painted it yellow, it has nothing to do with color = x. I placed the same shader on as above, however this meter turns black.

??? this is my problem.

Why are you using a bumped shader if you just need it to be transparent diffuse, which seems to be the case? I wonder if the issue is purely that you’re using a bump material and stuck the yellow texture in both slots, and the yellow happens to point the normal map away from the light and therefore turn black?

It’d help a lot if you posted screenshots of both the object in question and its material setup, as well as any lights in the scene or similar.

Also make sure that the texture import settings aren’t doing anything odd to it.

Ok, thanks for the tips.

What shader would you use, to simply allow for alpha adjustments?

If all you want is a transparent diffuse I’d go for “Transparent/Diffuse”, oddly enough. :wink:

I strongly suggest learning about rendering and what these actually do. Understanding what’s going on will make your life a lot easier.

Was I right about the issue?

Not sure. Will check tomorrow.

Once I complete this project and have some income coming in, I will begin to look deeper into all aspects of Unity. Writing shaders is something I have no grasp on.

Ok, so I tried a few different shader with no positive results. Below are images of said object as under 3 different shaders. The only one that is expectable if the first, however, this shader will not allow access to the alpha channel.

Shader: 2D Art For the iPhone (SM2)

Shader: Transparent/Bumped Diffused

Shader: Transparent/Diffused

Is there a way to add an alpha channel to the first? Again, I need to make this object semi transparent.

Bump.

Most of the built-in shaders are designed to be used with lights. If you have no lights in the scene, they will appear black or very dark (whatever the ambient light is set to in the scene’s Render Settings). For the 2D stuff you appear to be doing, the Unlit category of shaders would probably be best.

As an aside, your screen shots contain a lot of extraneous information. On Mac OS you can use Command-Shift-4 to capture only a portion of the screen.

Thanks.
I tried the unlit shaders plus others, in all categories but nothing seems to do the trick.

I understand the reasons why now it might not work, however what I dont get is why the shader does work on another object, see in pic. The only difference between the two is the color.

Open your texture in photoshop, and drop opacity?

Right!
just use a psd!!!

thank you.