• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by ElianWonhalf · Jan 26, 2014 at 08:31 PM · texturematerialtransparencyvisibleopacity

How to change a texture's (or a material's ?) opacity ?

Well if you know how to change an entire game object's opacity, it's fine too, but I don't think it's possible.

Edit : More information. I would like to apply a water texture on a game object, and make it transparent. I already know about the transparent shaders, but they won't help me...

Comment
Add comment · Show 11
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Armored13 · Jan 26, 2014 at 08:36 PM 0
Share

Why don't transparent shaders help you?

avatar image getyour411 · Jan 26, 2014 at 08:44 PM 0
Share

Re: changing GObj opacity, that sounds to me alot like the often request 'Fade out object' except you'd want to stop the fade from going all the way. This is frequently done by changing the $$anonymous$$aterial's alpha channel

avatar image ElianWonhalf · Jan 26, 2014 at 08:44 PM 0
Share

Because I need the water texture, and I don't think I can mix a water texture with a transparent shader

avatar image ElianWonhalf · Jan 26, 2014 at 08:45 PM 0
Share

The only alpha channel I know on a material is applied to its color, and if I have a water texture, there is no color

avatar image getyour411 · Jan 26, 2014 at 09:11 PM 1
Share

Perhaps you are going for something like this?

http://www.youtube.com/watch?v=kPQJTml1eJs

don't worry about the plane/position/scale stuff, but the $$anonymous$$aterial and texturing setup.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by joelfivat · Jan 27, 2014 at 03:41 PM

The shader is basically a program executed by your graphic card that will compute the color of each pixel of an object.

The shader will take input (texture, values, colors, ...) to compute the pixel colors.

So, for transparency, first you need a shader that handles transparency and then you need to set the right input to the shader.

Usually, a shader takes the alpha channel of the main texture (RGBA) to compute the transparence of the pixels, but that can change according to the shader you are using.

The shader inputs are defined in your material and materials are just another name for a shader with specific inputs.

So, for your problem, you probably need a texture with an apha channel set to half-transparency and set it as the main texture of a shader that handles transparency.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ElianWonhalf · Jan 27, 2014 at 07:39 PM 0
Share

Thank you :) !

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Gradient transparency results in full opacity for half of the gradient 1 Answer

in game - how to partly invisible an object ? 2 Answers

[ problem ] transparent shader !!! 1 Answer

Make a gameobject with textures semitransparent 3 Answers

How to make a GUI Texture (image) transparent? 2 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges