Amplifying your potential.

how do I set the opacity on a texture?

Node-based Shader Editor
7 posts • Page 1 of 1

how do I set the opacity on a texture?

Postby sandbucket » Thu Nov 23, 2017 2:53 pm

Hi guys,

I'm pretty new to this and I'm getting the hang of the interface,

I wanted to know if there is a way to get a texture to be transparent over another texture?
I am trying to simulate a flowing sand effect.

This is without the waves: https://i.imgur.com/tTx5h9F.png
This is with the waves (animated): https://i.imgur.com/aoa7t46.png
This is where the waves texture is located: https://i.imgur.com/MyORO3C.png

I'm trying to get the waves texture to have like around 25% opacity, I'm not sure how to change the alpha channels.
Let me know is this is possible and thanks!

Edit:
I also wanted to know if I can change the overall color of the waves to white through the Amplify Shader Editor? with the opacity in place.
sandbucket
 
Posts: 6
Joined: Thu Nov 23, 2017 1:29 pm

Re: how do I set the opacity on a texture?

Postby Amplify_Borba » Thu Nov 23, 2017 3:22 pm

Hello!

In order for us to best help you, would you be able to share your shader or a screenshot encompassing all its nodes?

If you want to blend two textures, you may use the lerp node for that effect, and to apply tint you can use the multiply node, although we'd recommend considering having and using a separate grayscale texture for the intended effect.

Looking forward to your reply!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 131
Joined: Mon Jul 24, 2017 9:50 am

Re: how do I set the opacity on a texture?

Postby sandbucket » Thu Nov 23, 2017 4:04 pm

Hi Borba!

This is my entire shader for the wave effect: https://i.imgur.com/pqRJAGE.png

I'll try that lerp node out and report back on this post if I got it to work.

Edit: I don't necessarily want to blend two textures, but rather have a main texture, and another texture on top with a low opacity.

Edit Edit: hmm.. i see the lerp node has an alpha input, maybe if I use a float on that to control it.
sandbucket
 
Posts: 6
Joined: Thu Nov 23, 2017 1:29 pm

Re: how do I set the opacity on a texture?

Postby sandbucket » Thu Nov 23, 2017 4:25 pm

I think I got it, but is there anyway to create a deadzone on the texture where the waves dont hit?

I have rocks built into the ground texture and the waves are going over the rocks, how would I make the animation ignore a certain part of the texture? Let me know if this is possible and thanks!
sandbucket
 
Posts: 6
Joined: Thu Nov 23, 2017 1:29 pm

Re: how do I set the opacity on a texture?

Postby Amplify_Borba » Thu Nov 23, 2017 4:57 pm

As per your shader sample, you could achieve that effect by multiplying the emission with a mask, which would contain the ground in white and the rocks in black so that they would be ignored.

This operation would have to be introduced right between the emission input and its last connected node.

Please let us know if this helps you achieve your intended result, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 131
Joined: Mon Jul 24, 2017 9:50 am

Re: how do I set the opacity on a texture?

Postby sandbucket » Thu Nov 23, 2017 8:08 pm

Hey Borba,

It works smoothly :D thanks!
sandbucket
 
Posts: 6
Joined: Thu Nov 23, 2017 1:29 pm

Re: how do I set the opacity on a texture?

Postby Amplify_Borba » Fri Nov 24, 2017 11:06 am

No worries, glad to be of assistance!

Have you had the chance to rate and review Amplify Shader Editor? It would be awesome if you could share your experience with the Unity community, the Unity Asset Store thrives on user interaction and direct feedback.

Every bit helps, your feedback is extremely valuable to us!

Feel free to get back in touch if you have further questions or if you would like us to help promote your project once it is released, thanks!
Customer Relations at Amplify Creations
Learn more about our offering: Amplify Creations Products
Amplify Shader Editor won the Asset Store Best Tool Award - Thank you for your support!
User avatar
Amplify_Borba
 
Posts: 131
Joined: Mon Jul 24, 2017 9:50 am


7 posts • Page 1 of 1

Return to Amplify Shader Editor

Who is online

Users browsing this forum: No registered users and 1 guest