Advertisement

Unity light and shadows occlusion

Started by May 24, 2014 07:18 PM
0 comments, last by CowKing 10 years, 5 months ago

Hello, i am creating a voxel game on Unity(free edition) but i have a problem on lights.

While going deeper and deeper in the caves, there is no shadows linked by direction light anymore but the blocks continue to be lighted.

How can i disable this to enable darkness in the deep.

Sorry for my english, i'm French.

Cordialy,

ParadisePx

If this has a Minecraft aesthetic, I wouldn't use a traditional light at all. Each cube would be "lit" by itself with the use of vertex colors. It would read the value of the fake light/lights(prefab of some sort with a LightScript component; probably only need omni light and directional light) and edit its own vertex colors based on the normal.

The beauty is that you only need to update when: the cubes are on screen, a cube next to it has been modified(added/removed). I assume you have a way of culling the cubes that are surrounded on all six sides.

Unless ofcourse you're going for an actual complex voxel system, in which case, I got nothing at the moment.

This topic is closed to new replies.

Advertisement