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

Let there be Light

Sign in to follow this  
SimmerD

142 views

Yesterday I fixed the lighting on the dust particles, and also the ambient on the entities. For the ambient solution, rather than storing, retrieving & filtering stored normals or occlusion info, I simply cast a short 5 meter ray from the objects center upwards and track the first intersection. Based on how close the intersection is, I darken the object. For movable entities, this is a really good approximation of occlusion, b/c occluded areas tend to be underneath things.

The same trick applies to the dust. Also, for the dust particles, I use similar code for the non-shadowed entity light occlusion. For the dust, I ray cast once when creating it towards any nearby lights, and do software lighting with a normal of <0, 1, 0>. I then blend between the dust's regular color and the color * the ligh color, and add the ambient.

I'm relieved that this worked so well, b/c I didn't want to kill the dust or do something more involved.

I debated lighting the dust even more accurately by using my old Averaged-L bump mapping idea and/or using the diffuse environment cubemap, but I'm trying to finish this, so that will have to wait for the next engine...

I'm working on the 1st actual game level right now, the Dig site where your character and the other members of your archeological team surprise & are attacked by lizard-like aliens.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

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!