Jump to content
  • Advertisement
Sign in to follow this  
Weng

How to make a lamp post light up?

This topic is 4351 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, I have created a lamp post which is supposed to light up at night. It is made up of a cylinder(the base) and a sphere. How do I create the effect of the lamp post lighting up at night? I placed a light source at the position of the sphere and adjusted the diffuse values. But the entire scene is lighted up instead. I also tried using emissive materials for the sphere but it did not have the "lighting up" effect.

Share this post


Link to post
Share on other sites
Advertisement
When you create a light, one of the functions takes a parameter that points to four values. If you want a positional light, the last value is 1 and the other three values are the position of the light. If the last value is 0, then it means the light is directional and the other 3 values are a light-vector.

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.

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!