- Home /
Get map of shadows on a gameobject
Is it possible to get a map or something of where on a gameobject are shadows and where aren't? I need this, because I wan't self-illumination only at places where are shadows. I'm just using the default shadows, no pro shadows or lightmap.
Answer by TowerOfBricks · Apr 14, 2011 at 01:05 PM
A "map of shadows" generally means a lightmap. The shadows you are referring to are self-shadowing and could be calculated using the beast lightmapper with "lightmap selected". You have to make sure your lights don't cast shadows (if you only want self-shadowing). Switching the quality to "low" could help actually since you seem to want only shadows and no fancy effects. Some work on it in photoshop afterwards could also be needed.
There is also a lightmapper on the wiki which you could customize to only return self-shadowing.
I want to get the map during runtime, since the scene is dynamic. Is this possible?
When I think about it, I think it would be better to write it as a shader. I know there are shaders which reveal a texture based on light so why not the other way? Though I don't know much about shaders?
Your answer
Follow this Question
Related Questions
Baked light problem 0 Answers
how to use external (vray) lightmaps in unity 1 Answer
UV maps won't import?? 1 Answer
Directional and Spot Light Shadows not working as expected 1 Answer
Light Probes - dynamic conditions 0 Answers