Jump to content
  • Advertisement
Sign in to follow this  

proper lighting model?

This topic is 1739 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

so... i'm wondering something...
 
basically, right now.. I set my camera position as the light source, and i have some basic phong + bumpmapping +lightmap, but that means that as you move around... the specularity changes
 
 When, in reality, and to make things seem nicer, specularity is actually based light from static locations, and i *could* use a "specular map" but then say i have tiling on various walls, they would all have the same specularity
 
a lightmap doesn't handle the specularity, so what's the "proper" way to handle this? Have "actual" dynamic lights? So basically a deferred renderer is required for decent performance with many lights and this "proper" specular behaviour?
 
How did older games handle this without deferred rendering? Or did they not?
 
I'm basically looking for a lighting model similar to this:
 
 
Notice the static specular bumpmapping... i'm assuming they at least use some ambient, but do you think that actually has multiple light sources? Or maybe just one light source at some specific position without attenuation?

Share this post


Link to post
Share on other sites
Advertisement

i'm essentially wondering if a fully deferred renderer with true dynamic lights is *required* for proper specularity -- or if there's a more simple way to do it

Share this post


Link to post
Share on other sites

i'm essentially wondering if a fully deferred renderer with true dynamic lights is *required* for proper specularity -- or if there's a more simple way to do it

Specular maps do change how the specularity looks, but generally, they just change the way you look. Imagine you took a black background and made a white smiley face on it then used that as your specular map. If your specular was implemented right, you would only see the face in the specular highlight. So a specular map defines what part of an object can show the specular. You can also use grey to change the intensity. So a specular map can be used on tiling objects.

 

Baked lighting is great. It saves processing time for the user and it looks really good if its done right. The down side is it is a finite resolution and takes up RAM the bigger you make it. Assuming you are going to used baked lighting heres what you might be able to do for your specular:

 

- When you render the light map, write down all the light positions, directions, intensities,etc.

- Make an array or file of all this data. This is your 'dynamic lights' although, their lighting will never actually be rendered.

- When you render your lighting, wherever it is, calculate the specular highlights using your static, fake lights. Again there is no diffuse light, etc coming from these lights.

 

In the future if you want to use normal maps, you can use the same kind of technique. Make a bunch of fake lights, the render the normal map using those fake lights and used some kind of baked lighting. (Normal maps are a bit harder to use baked lighting with because they simulate diffuse, etc, but its still possible.) This may not be the most effective way to do baked and specular lighting, but I'm sure it will suit you. Hope this helped.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!