- Home /
Self-Illumination only works across the whole object
Hello Unity users!
I'm in a bit of a bind and was wondering if you all could help.
I'm working on a crate object below:
When I use a bump specular shader, everything works fine. But I have these lights on the crate that I would like to be self-illuminated. The red arrows point to them. As part of the material I used photoshop to make a self-illumination texture using a black-white map where white is the lights and black is everything else. I applied this map to the alpha channel. But when I apply this to a self-illum bump specular shader and attach it to the crate, this is what I get:
As you can see, the whole crate is illuminating.
I've tried attaching the illumination map to the diffuse, the normal, and even its own map as the alpha channel in Photoshop, but nothing works. I'm using deffered lighting in the images above but I also tried forward rendering but it was the same. I am also using Unity Pro if that has anything to do with it.
Any thoughts? I could really use some help.
Thanks!
Dwayne / Phos
It could be that your lights are too bright and illu$$anonymous$$ate the whole thing, starting from the light areas.
If you placed the illu$$anonymous$$ation map in the bump texture's alpha channel, it should work as expected. You could try to tweak the colors a little, so you get less intense lights, and see if they still illu$$anonymous$$ate the entire object.
Thanks for the thoughts, Technique. To respond to your first thought, the crate is self-illu$$anonymous$$ated even in no light (with default lighting turned off). Second, when you say bump, you mean normal map right? I will try tweaking the colors, though. Thanks!
Answer by Girish006 · Nov 14, 2014 at 07:33 AM
How u have created the illumination map?
The areas which has to be self illuminated should be in white color and the rest should be transparent.
He did note that he was using white and black, not white and transparent. Could that be the problem?
OH $$anonymous$$Y GOSH THAT WOR$$anonymous$$ED!!! It looks perfect now! Thank you so much! Yeah, I was using white and black but when I got rid of the black and reapplied the texture it works perfectly! Thank you thank you thank you!
Your answer
Follow this Question
Related Questions
Alpha texture overlaying opaque texture, both with colors? 0 Answers
UGUI button gray shader 1 Answer
Is this the correct way? 1 Answer
How to apply a color to the second texture in this shader? 1 Answer
Accidentally assigned shader to default sprite material, how to revert it back to Sprites/Default? 0 Answers