I wasn’t very clear in the title, but this is the thing :
I have a simple scene where I’ll have a few characters holding a flashlight (spotlight). The problem is that the light is only visible on the floor but the walls.
As you can see the light is only visible in the floor, but the walls and the character (that black thing) get no light at all. That’s not the normal behaviour of a flashlight.
The texture of the spotlight:
The texture of the wall (an awful texture attached to a Mobile/Diffuse material)
Why I don’t see the the light on the wall? It should be something like this
(sorry for the bad drawing/painting skills)
Any hint? I’m kinda new to Unity (not that new) and now I’m experimenting with light. I want to create a dark scene where barely you can see what it is on the scene using the flashlights.
Could be lots of things.
First of all, we are looking at the scene view, here. That’s good enough in many cases, but it’s best to look at your game view to see what’s really going on, lightingwise.
Have you tried to replace your wall material? I don’t know about the mobile material, but maybe it’s using vertex lighting or some optimization. (If your wall is just a box, none of the vertices are hit by the light or maybe it doesn’t accept the cookie. )
Have you tried to remove the cookie from the light?
The player character doesn’t seem to receive light at all, if you compare it to the other meshes, so that might be something else.
Is there another light in the scene or is this from the editor?
Are some of the meshes/lights set to baked/static ?
I’m 50% closer, I fixed the wall thing. It was in fact the material, not the texture itself.
Here’s the material inspector info
Right next to the “Albedo” option there’s a color picker. In that option I had black color which caused this problem (don’t ask me why I had it in black), now I changed it to white and voilá!
But the character problem continues. I checked if it could be the same problem, I changed the color from the color picker but the problem persists.
I don’t know if this is the normal behaviour. If I shoot light against something black it should at least look more clear, maybe grey, or simply white. I tried changing the texture (material in this case) for the character and it worked, I can see the light effect in the character, so it must be something with the black color. The texture it’s just a 64x64 black square I made in photoshop and attached it to the material of the character
This is the same scene with the caracter using the wall’s texture
and it works, but how to make it work in an object with full black texture? If I can’t find the answer I can just change the color of the texture, but I would like to know anyway.
Black is black. Since this is not the real world, there are no microdetails, no reflections or anything that could catch the light unless you give these informations to the material. Ten times zero is still zero.
To make a black react to light, you need to make it a dark grey, rather than total black. Also materials in the real world are hardly ever so black that they approach a truly black surface. (Since you seem to use the new standard shader, which is based on how real world materials behave.)
Another way would be to make it smoother, so it starts to reflect light. (Similar to the old way of doing this, specular.)
And you could provide reflection probes or a skybox for the object to reflect. This is probably less important in a totally dark environment, though.