- Home /
Some textures not affected by light? (With screenshots)
So! I've got a bunch of different textures, and the shader I'm using is the same on all of them, pretty much (the transparent diffuse shader). They're all in the same layer, as well, for now. Anyway, some of them are reacting to light properly and are nice and bright; others are just doing this dark gray thing that I can't figure out. When I switch the textures to something else on the dark gray objects in the following two screenshots, they come up reacting to light, as normal...but I don't know why just these textures have issues. Any ideas?
Cheers
Screenshot 2:: Dark objects in the scene... Screenshot 2: Dark objects in gameplay...
Answer by CaseyW · Mar 04, 2014 at 09:19 AM
I know this is an old question, but this is one solution I found with dark planes.
The local vertical component must be non-zero, even though the plane has no height.
For example my plane was 12, 0, 12 in scale. And it wasn't lit properly.
Once I changed it to 12, 1, 12 it lit up accurately. I double checked and that was the issue for me each time.
Posting this for future visitors :)
HOLY CRAP! I can't believe it was that simple a fix.... I have been battling this issue for a long time on and off.. thank you!
Omg thank you. Just wow, $$anonymous$$A$$anonymous$$ES SENSE RIGHT?
Answer by syclamoth · Oct 18, 2011 at 09:44 AM
Are your normals alright? They might be pointing the wrong direction- depending on the shader, this can have several (mostly bad) effects. Usually you just don't see anything (which is a much more obvious problem) but some shaders still draw the back-faces, but with diffuse lighting it'll look as if they are being lit from behind. Since there are no lights behind the objects, they will end up dark!
Try moving your lights to behind the objects, and see how it looks. If it makes a difference, then try rotating them around 180 degrees, or fixing it up in your 3d modelling package.
(I'm loving the visual style there, btw!)
syclamoth! Thanks for your quick answer. Regrettably, I've tried rotating them around, but no dice. I've also tried transferring the textures to cubes, and one side is correct, but the others are dark. Confusing! So, perhaps it has something to do with the normals on my planes being weird. Originally I had them on unlit transparent shaders, and it looks fine that way--but for some reason diffuse ain't cuttin' it. If you'd like me to, I can send you the .png file of the image. Actually, these aren't 3d objects I made in a modeller--just planes. so they shouldn't have any crazy issues with normals, correct?
Hooray for visual style! I have a kick-butt artist, it's true. I wish I could take credit for it.
If you'd like to see what the game looks like when it's not sucking in this particular way, check out the dev blog, if you'd care to, at radicalClimber.Blogspot.com.
Thanks!
Simon
Answer by Catlard · Oct 18, 2011 at 10:11 AM
I've fixed the problem, though I haven't located the original issue. I just re-created the objects with new planes, and now light bounces off of them correctly. Odd, eh?
Answer by Jonathan Bauer · Feb 20, 2013 at 05:02 AM
I had an issue where specific materials in my scene were appearing darker than they did normally. It happened without me working on these materials in any way, but I was modifying the textures and geometry in Maya, exporting as FBX, then modifying the prefabs. I deleted these problem materials and then reimported the FBXs, which automatically created these materials again, but they appeared at the correct light level again.
Answer by numandina · Jun 23, 2015 at 06:13 AM
I had an issue where some textures were not affected by light, I fixed it by using Diffuse shader instead of Mobile/Diffuse. This is for anyone out there experiencing an issue with lights.