x


Transparent bumped specular on hair

Hi,

I'm trying to accomplish a basic hair effect for my characters but I can't make it work properly with the transparent materials in Unity3D. I've got a tga file with the diffuse texture in the RGB channel and the transparency I want in the Alpha channel and a different file for the normal map. All of these work fine all together in a Transparent Bumped Diffuse but when I want to add the specular map I can't figure out where to put it. Transparent Bumped Specular seems to be the one done for this aim but it gets both specular and transparent from the same channel (alpha channel in diffuse texture). The Cutout version of it is not an option since the type of transparency I need is not B/W only.

Any idea how can I get this done with no quality lost?? Thanks a lot!!

more ▼

asked Feb 09 '10 at 05:38 PM

Luismi gravatar image

Luismi
215 8 9 16

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Here is a forum thread where I have posted a shader that uses the alpha channel from the main texture to define transparency and a separate gloss map to define glossiness: Specular + Opacity uses the same Alpha map? How?

more ▼

answered Feb 12 '10 at 10:45 AM

Kuba gravatar image

Kuba
581 1 3 10

(comments are locked)
10|3000 characters needed characters left

Good news and bad news in a sinusoidal manner.

  • The good news is that the Unify wiki has a Bumped Colored Specular.
  • The bad news is that it doesn't consider transparency.
  • The good news is that simple transparency is relatively easy to add.
  • The bad news is that if your hair is a single object, you're likely to end up with hair that looks like it's made of glass.
  • The good news is that you could have each strand of hair be an object and get it looking right.
  • The bad news is that's insane. And slow.
  • The good news is that there is a pretty good presentation from a few years ago over at the AMD site about how to build a hair shader to consider that case.
  • The bad news is that I don't know enough about Cg to write such a shader.
  • The good news is eventually I'll need to pay someone to write such a shader, and will probably end up releasing it, but of course would be happy if anyone gets the shader done before that.

(Thought it would be best to end up with a positive one)

Hopefully that'll save you a few trial and error cycles.

more ▼

answered Feb 12 '10 at 10:53 AM

Ricardo gravatar image

Ricardo
5.2k 20 32 96

Thanks lot for your answers!! for the time being i'm using cutout transparency working a bit more on the texture and it looks ok but I will take a look and those materials asap and have a talk with the coder to see what he thinks about it.

i'll post further details if we find out something interesting.

thanks again!!

Feb 17 '10 at 04:20 PM Luismi
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

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

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1740
x1080
x841
x252
x20

asked: Feb 09 '10 at 05:38 PM

Seen: 3441 times

Last Updated: Feb 09 '10 at 05:38 PM