Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Unity's documentation for the "Transparent Bumped Specular" shader/material-type is simply a concatenation of each of the descriptions for its Transparent and Specular Shaders (and also Bumped, but that doesn't apply to the question):

Transparent Properties

This shader can make mesh geometry partially or fully transparent by reading the alpha channel of the main texture. In the alpha, 0 (black) is completely transparent while 255 (white) is completely opaque. If your main texture does not have an alpha channel, the object will appear completely opaque.

(...)

Specular Properties

(...)

Additionally, the alpha channel of the main texture acts as a Specular Map (sometimes called "gloss map"), defining which areas of the object are more reflective than others. Black areas of the alpha will be zero specular reflection, while white areas will be full specular reflection.

To me this translates to:

  • I have a mesh representig a car tire
  • The texture need to be very shiny on the rims parts, and almost not shiny at all for the rubber parts
  • Also since the rim is really complex, (with like cut-out decoretions and such), I will not build that into the mesh, but fake it with transparency in the texture
  • I can't do all this using Unity's "Transparent Bumped Specular" shader, because the "rubber" part of the texture will become semi transparent due to me painting the alpha channel dark-grey (because I want it to also be less shiny).

Is this correct? If not, how can I make this work?

share|improve this question

3 Answers 3

According to the way the documentation lays out the single alpha channel for both specular and transparency you are correct in your assumption.

If you want full control over the textures my solution would be to separate your tire and rim-hubcap models so you can texture each individually. This would allow you to create a Transparent Bumped Specular on the rims for the cutout and shine control but also allow you to use a Bumped Specular on the tire wheel so you can get a more rubbery look without the transparency.

share|improve this answer

I don't have access to Unity at the moment, so I can't confirm but this is what I believe it means.

The alpha channels and specular maps are two different things. It's entirely possible to have the entire alpha channel as white, with a specular map specifying the rubber of the tires to be a dark grey / "non glossy". I'm guessing you do not need the transparency here, so just leave the alpha channel white, and apply your specular map.

Perhaps Bumped Specular would be better to avoid this confusion? I'm pretty sure there's a bumped specular shader.

share|improve this answer
    
thanks, but I don't think there is (or, at least, I wasn't able to find) a material amongst Unity's defaults that allows you to have transparency and various specularities at the same time. I did make my own shader that does that (transparency comes from diffuse's alpha, specularity's glossiness and shininess come from separate b/w specularity map's color and alpha channel). –  Shivan Dragon Mar 21 '13 at 13:32

Warning: Not a unity user, so I wouldn't know if unity offers these techniques. The concepts are simple and applicable regardless. (And this just got bumped)

  1. Color keying: Check if the alpha or color is equal to a magic cutout value.
  2. Alpha partitions: Obtain separate specular and transparency values using line equations.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.