Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    235
  • comments
    509
  • views
    172387

Entity Lighting

Sign in to follow this  
SimmerD

116 views

I added the ambient voxel grid to the level object, and it definitely helps the character look registered in the scene.

The entity lighting is still not quite as smooth as I would like. I adjusted the math a bit when clamping the distances, and this helps a bunch.

Instead of doing

weight = 1 / ( max( 1, distance ) )

I'm now doing

weight = 1 / ( 2 + distance )

Which prevents small distances from being weighted too heavily. This helps quite a bit.

I experimented with making the sampling voxel grid more dense, but the smoothing function looks to make a bigger difference. The issue is not the # of levels of lighting that are possible, but the quick jumping between the levels as the character moves around.

Come to think of it, since I am doing a distance - weighted average, there is no need to exactly sample at voxel centers. I can sample wherever I like, and get a weighted value. I should be able to sample more densely to get smoother lighting, rather than making the voxel grid bigger.

Here's a shot of the latest :
Char in Shadow

Sign in to follow this  


1 Comment


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!