Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

stickben

directx lighting

This topic is 5780 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!, Im really new to the directX community and I was wondering if someone could give me a hint about how to do lighting. Currently I have a program that generates terrain and puts a texture over it, I can adjust the levels of lighting, but there is no shadow around the tops of peaks, and it always looks the same no matter what angle you look at it. Any sugestions? Thanks! Ben

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
there is a lighting tutorial in the directx sdk.

direct3d lighting will not produce shadows.
I think it should just like in 3d studio max it makes shadows automatically when you put in a light.

Share this post


Link to post
Share on other sites
Do mean that the back side is not dark at the top of the peak like it should be? If you do, you may need to adjust the normal vector at the vertex or vertices that form the peak. If the vertex is for both a front face and a back face, and the normal is and average between the two, then it may not look right. To may need to point that vertex normal away from the light some more. This only applies if you are lighting per vertex. IF you are lighting per face, then I have no idea what''s wrong. Hope this helps.

________________________
Grab your sword, and get prepared for the SolidSteel RPG engine, coming soon...(i.e. when it''s done)

Share this post


Link to post
Share on other sites

  • 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!