Jump to content
Site Stability Read more... ×
  • Advertisement
Sign in to follow this  
Slug

Luminosity, how to?

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

Hi everyone, what the trick to control the luminosity of a scene? I mean, in my engine, not all the object are not all lighting the same way, and some are not. So, did the're is a gl command or something like that? and writing to the pixel directly would surely kill the performance... How should i do?

Share this post


Link to post
Share on other sites
Advertisement
im not to sure what youre doing but
if youre using lighting there is a global_ambient variable that u can see if my memory is correct the defualt value is 0.1

Share this post


Link to post
Share on other sites
The problem is that i'm not always using lighting in my game. I use it for some models and not for some other one...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
This is an easy issue to have problems with. You need to make a design decision and stick to it. Either dedicate yourself to OpenGL's lighting for all of your models, with the ability to enhance/improve the lighting through vertex and pixel shaders. Difficult method but usually can yield best results.

Or, you can decide to fake it all. This depends on certain factors, like if you want to use bump/normal mapping, true per-pixel lighting, or materials. But, it can be easy to implement and faster on older machines, and still look not too bad. I had thought about this approach for my engine, which had currently used only the fixed-function pipeline. Using some projective texture tricks with 2D attenuation maps, you can make nice fake "per-pixel" lights, throw in shadow mapping, and some simple phong shading for model's vertex coloring, and you have your fake global illumination system.

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!