fading problem... andeeee, higgyb, anothervenue...any body help

Hello, i’m working on my university since log ago, but my exam times, i back to it, complete some parts… and now i have problem with fade my object…
my object it 3D character…
and when my camera come near to it it should fade out and transparent…

i used alfa channel of color it didnt worked, i also use transparent>Bumped Diffuse shader and then apply this, again didnt worked and gived me something wired…
what should i do?
if wrong section say it’s wrong cuz i gonna die if dont complete my project soon…

currentDistance = Mathf.Clamp (currentDistance, minDistance, maxDistance);
print(currentDistance);
if (currentDistance<2.5)
{
print(currentDistance0.25f);
target.gameObject.renderer.material.color=new Color(target.renderer.material.color.r, target.renderer.material.color.g, target.renderer.material.color.b, (currentDistance
0.25f));
}

As far as I can remember now, the shaders of the transparent type for transparency use texture alpha-channel only and don’t react to tint color alpha value.

You can create your own transparent shader using Strumpy Shader Editor. It’s pretty easy and very powerful tool. Create a “float input” node and connect it to the master node’s “alpha” input.

PS

490485--17223--$2.PNG

490485–17221–$TransparentBumpedDiffuse.zip (3.02 KB)

man tnx, i hope it work for me :slight_smile:

there’s no such “opacity” things… !!!

i used ur own shader…
it’s transparent even while value is 1…
493591--17360--$lol.png

>there’s no such “opacity” things

Opacity is a renamed float input node

>i used ur own shader…
>it’s transparent even while value is 1…

Don’t know:

u sure used this?
TransparentBumpedDiffuse.zip (3.0 KB, 7 views)

maybe becuz the color of box it’s not so obvious

Absolutely. I downloaded the shader from my post above before testing it. _Opacity = 1 makes the box fully opaque, and _Opacity = 0 makes it fully invisible.

then why in my picture…?
sry for begin late,… i have one hard exam tomorrow

Here’s picture from ur shader render

and here Engine Bumped Diffuse render

so, did you figure any thing?

Don’t know. For me it just works.

:frowning:
for me still dont work.

who to switch matterial?