- Home /
Problem with ligthing on voxels
My level is build out of individual blocks that form the level. These can't be moved but it's easy to create a level with them, because you can block out things quickly without having to create new marerials that have the texture in the right scale. At the moment I'm using realtime lighting, but I have run into a problem. One block seems to be not lit properly. I delted and recreated the block from scratch and also moved the hole level, but it doens't fix my problem. I also tried adding a light source right above the block, just to make sure that the block can recieve light. The wierd thing is, that the block becomes brighter indeed, but doesn't merge with the shadows around it. I don't really know what to do now, because I'm only starting to understand what all the lighting options do.
$$anonymous$$aybe the problem is related to the block's normals?
Do you mean the normal map (bump map) of the texture? The model itself is just the standard unity cube. However, I switched it with a plane to improve performance, but the problem is still there.
This does not exclude the possibility that the normals of these standard unity assests, don't match those of the rest of the level.
Separately: I would confirm your $$anonymous$$eshRenderer Settings on both the unity object's, and the "rest of the level" objects match. Is it possible the observed difference in lighting is due to the material applied to the block?
Could you explain to me what is meant with "the normals don't match with the rest of the level"? All of these blocks use the same material, so the lighting applyed to all of them should be the same.
Answer by Simulacr0n · May 11, 2018 at 07:22 PM
Update: I tried some things but nothing fixed the problem. However I think I found the cause for the problem, but I still have no idea how to fix it. As I said, I use realtime lighting. The problem here is, that spotlights, which I use to light the scene, don't support any light bouncing in realtime. This probably causes this dark spot, as there is some kind of "blind spot" for the light. I tried baked lighting, but I can't really seem to get it to work. Either the level is way to bright or I get a message that the baking will need a few hours to bake, which seems way to much for such a small level (About 40*20 units). I anybody has some ideas on how to light an indoor scene (in my case a temple), knows some good rescource that explains it or has a solution for my problem I would greatly appreciate it!
Update 2: I think I solved the problem! By upping the "Pixel Light Count" in the qualtity settings under "Rendering" the problem disappears. I'm not sure if this is the best option, as upping this probably increases calculation times, but I hope this can help anybody else having problems with lighting in the future.