6
\$\begingroup\$

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?

\$\endgroup\$

2 Answers 2

1
\$\begingroup\$

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.

\$\endgroup\$
-1
\$\begingroup\$

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.
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .