how to change the colour or opacity of a sphere

i’m a bit new at Unity, i mean i’m being taught how to use it at school and i haven’t been told how to change the colour or the opacity of my object. i was wondering if someone could help me with this. please help me.

i want my sphere to look like glass

3 Answers

3

You have to do this via material and shader. Take a look at this tutorial.

EDIT: for glass you have to use specific shader - take a look at shaders at Unity Wiki.

thank you

what do i click to get to the shader

You can set shader on a material, but you have to create new material first and assign it to your sphere.

which is what i've done what now

I don't understand - if you did it, then you're able to change shaders. If you don't know how to change shader, please take a look at the page linked by @tanoshimi. It is explained there.

The visual appearance of every gameobject is determined by the material(s) assigned to it. Materials define colours, textures, and shaders that determine how the object interacts with light in the scene.

Making a material behave like glass is more complicated than simply making it (semi-)transparent - you need to consider reflection, refraction, fresnel effect, viewer and lighting angle etc. - but learning how to apply a transparent material is a good start, so try reading up on that :wink:

well then can you help me make it semi transparent please

"Helping" someone implies that they're putting in a bit of effort themselves too.... did you read the links provided? What have you tried? Which bit did you get stuck on? You need to change the shader of the material on the object to one that supports transparency. Try Transparent/Diffuse for starters. Then click to change the main colour and set the alpha channel to something less than 100% ![alt text][1] [1]: /storage/temp/17958-untitled.jpg

so making it look like glass by adding a shader is how i do it?

if i were to copy and past the coding would i past it into my player object and to lower the opacity which part of the coding would i change http://wiki.unity3d.com/index.php/Transparent_Single_Color_Shader

i am putting in some effort

Go to any folder and right click. Choose “Create → Material” and proceed to edit the albedo color to be what you want it to be. If you alter the transparency, which sounds like what you want to do, the key thing is that you have to change the material’s render mode to “Transparent”–if it is set to opaque it will ignore your alpha choice on your material. Go to your object’s mesh renderer, toggle “Materials,” and change Element 0 to be your material by either dropping it in or clicking the little target doodad and picking your material from the list.

I’m not sure why everyone else here is a dick and provided useless links you could find yourself on Google. The point of this forum is to provide answers.