We would like a metal material(which is difficult enough to find for things which are not unity) where the specular colour is modifiable as well as the main colour so that any range of metals may be created from bronze to gold. Normally such an effect may be obtained by using a cubemap, however our attempt for a subshader would not run on the iphone graphics hardware, because to many passes were required.
Another problem is when using a spherical environment map the texture wraps to quickly around the object, so a semi transparent texture should probably be superimposed to give the effect that the material is static.
If you have such a material please pakage it including its dependinces such as the shader and the textures and post it here. if not, but you are familiar with shadelab please do your best to help others solve this problem.
Unity seems decidedly lacking in the metal and glass shader departments.
, previous+primary just puts white + white into your alpha, which is useless.
You don’t need to do Combine texture * constant. You’ve already got the color coming in from the lighting calculation.
Why would metal have emission?
Here’s a quick attempt at gold. I’m not bothering to include a spheremap, as I just tested with one of the first results on Google Images. Throw your own in there and let me know what you think. I’m not sure what you mean by your second paragraph, so I didn’t try it. I’ll modify this if you give me a better idea of what you meant.
It just looks like a spheremap to me. Which is to say, the normals of the mesh, based on the viewing angle, correspond to certain texels. The only way to see no movement in a spheremap is to model a relatively high-poly sphere. Personally, I don’t understand what the point of a spheremap is, other than making things look funky shiny, like Metal Mario. I understand what you’re saying, but I don’t know of any way to do better. So if you have a concrete idea of what you want to do with the “semi transparent texture” you mentioned, I’ll try to implement it; I just don’t understand what could improve things.
A couple suggestions to try:
Paint more dark grey into the edges of the circle on your spheremap. Then the “reflection” won’t seem to affect the entire surface.
Try ObjectLinear or EyeLinear instead of SphereMap.
Unfortunately, without the ability to use cubemaps, the effect is probably never going to give the impression of realism.
Pardon me for resurrecting an old thread but I’d like to use the gold shader in Unity 3 but it apparently doesn’t work for lightmapped objects. Now that Unity 3 uses surface shaders, is it possible to update this to run in Unity 3? I’m looking at the source now but not sure where to start.