Page 1 of 2

Transparency on mesh

PostPosted: Fri Dec 07, 2018 7:27 pm
by CharlesDoan
Hi, I've tried to find a solution on the forums but I haven't been able to find it. It could be that it's so simple no one bothered to ask. Anyway, I'm trying to have a transparency gradient on my mesh (this is a simple mesh, just a cylinder), so that when I offset the texture, it fades out. Any help would be appreciated! Also, I'm verryyyy new to shaders, so I'm just kind of fumbling through it all. :)

Re: Transparency on mesh

PostPosted: Tue Dec 11, 2018 3:03 pm
by Amplify_Borba
Hello, thank you for getting in touch and for your support!

Could you please elaborate on the effect?
How exactly would offsetting the texture UV's influence opacity? What would make it increase or decrease?

A screenshot or video example would be great, just so that we can better help you achieve it.

Re: Transparency on mesh

PostPosted: Tue Dec 11, 2018 4:46 pm
by CharlesDoan
test.jpg
test.jpg (140.37 KiB) Viewed 5211 times


I was watching one of the beginner videos and thought something like this would work, but it doesn't do anything. I'm probably thinking about it in the wrong way. If I plug it into the opacity clip, it'll work but it won't be a soft edge like I want it to be.

Re: Transparency on mesh

PostPosted: Wed Dec 12, 2018 11:33 am
by Amplify_Borba
If you set your shader's Blend Mode to Transparent and test the following setup, it should fade the object in / out as you drag the slider:

Image

Notice that I'm editing the shader in Material Mode and with the float set as a property, so that I can see the results instantly without having to compile every time I change the value through the slider.

Image

Re: Transparency on mesh

PostPosted: Wed Dec 12, 2018 3:32 pm
by CharlesDoan
test2.jpg
test2.jpg (189.89 KiB) Viewed 5188 times


Hmm, not sure what I'm doing wrong but I get this when I follow the instructions.

Re: Transparency on mesh

PostPosted: Wed Dec 12, 2018 3:41 pm
by Amplify_Borba
Apologies if I wasn't fully clear before, but you'll always need to compile your shader after adding or removing any connection, can you confirm that you've compiled it after changing the node setup?

Re: Transparency on mesh

PostPosted: Wed Dec 12, 2018 3:53 pm
by CharlesDoan
No worries, but yeah I did compile it. I'm going crazy trying to figure out how mine is different and everything looks the same with how yours is setup.

I also just tried starting fresh with a new shader/material and cylinder from Unity but I get the same result.

Re: Transparency on mesh

PostPosted: Wed Dec 12, 2018 4:18 pm
by Amplify_Borba
I can't seem to replicate the behavior you're getting, can you confirm that you're using the latest available version from our website?

If so, could you send us the shader so that we can examine the generated code?

Re: Transparency on mesh

PostPosted: Wed Dec 12, 2018 4:23 pm
by CharlesDoan
Ok, I'll try updating. I just checked and I'm on version 1.58.

Re: Transparency on mesh

PostPosted: Wed Dec 12, 2018 5:29 pm
by CharlesDoan
test3.jpg
test3.jpg (188.61 KiB) Viewed 5174 times

I still get the same result... :cry: How do I send you my shader?