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

Untitled

Sign in to follow this  
SimmerD

86 views

Sound And Fury

Today I added the rest of the lighting parameters to the level editor. Now the editor properly reflects the color, falloff factors, shadow casting and flicker settings of the selected light. You can also modify the settings in order to adjust them for all selected lights.

It used to be that the only adjustable lighting values in the editor were light color, range and placement. Now I can have flickering lights again, adjust the falloff curves to get various effects, and disallow shadows on certain fill lights.



My basic lighting falloff equation works like so :

Intensity = Constant - ( Distance / Range ) ^ Falloff

Set to defaults, this turns into :

Intensity = 1 - ( D / R ) ^ 2

which is basic 1-d^2 attenuation. It's nice b/c it falls of slower than linearly, so it requires less range to light up a particular area.

Playing with the various settings gives varying attenuation curves.



In the process of adding these options to the editor, I found a fixed a bug with displaying & setting the level's ambient light color as well.

I spent some more time on artwork, and now have pretty good looking barrels in the game, and the obligatory crate.



Here's an interesting pic with a large projected shadow. The size of the shadow map is chosen to match the on-screen size of the character, times an extra factor ( right now set to ~1.0 ), so right now getting really close to point lights can get a bit blocky, but in real-time, with the character moving around a bit, it looks better. Plus the light's flickering as well.

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!