Jump to content
  • Advertisement
Sign in to follow this  
paradisepx

Unity Unity light and shadows occlusion

This topic is 1661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Edited by paradisepx

Share this post


Link to post
Share on other sites
Advertisement

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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!