Jump to content
  • Advertisement
Sign in to follow this  
LordSputnik

Yet another Light Question [SOLVED]

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

Hey guys, hopefully this is a simple one. My lighting looks like this: My Lighting The target lighting looks like this: Target Lighting Notice the difference? Mine are all jagged, yet the target has perfectly circular lighting... I was wondering if anyone could tell me how to get from where I am to the target? Is it per-pixel lighting, for instance? If it is, are there any good tutorials on it? Many thanks again! - Sput [Edited by - LordSputnik on May 28, 2009 4:09:27 AM]

Share this post


Link to post
Share on other sites
Advertisement
I'm no expert but it might be per pixel lighting or its with a very high triangle count.
Not sure.
I'd suggest implementing a small shader system.
I'll be around here if you need help with that though I'm not an expert so I'm not sure I'll be able to help you completly.

Share this post


Link to post
Share on other sites
Looks like your using Fixed-Function Vertex lighting, hence the lighting is happening at the verticies only.

To achieve the lighting shown in the other screen, you will have to start learning how to load/use shaders. Per Pixel lighting is what your wanting to do. Theres a good tutorial about it on Lighthouse:

http://www.lighthouse3d.com/opengl/glsl/

Thats shaders using GLSL. You should decide weather your wanting to use CG, GLSL or whatever. Personally I just stuck to GLSL because that tutorial above did a decent job explaining everything.

It may seem a bit confusing at first, but take is slow and pay attention and in no time you'll have some nice per pixel lighting.

Good Luck.

Share this post


Link to post
Share on other sites
Ok, thanks to that great site that TheMonkeyFromMyShoe posted, I've successfully implemented Directional and Positional Lighting Shaders, as described on the site. But now I'm getting this problem with the lighting:

New Problem!

As you can see, for some reason, the ambient light near to the camera is being cut off. It appears to be at any time when I can view the spotlight's effect, and a set distance away from where the light falls.

Any suggestions?

Share this post


Link to post
Share on other sites
*bump* Anyone have any idea? :S

Cutoff problem solved here:

http://www.gamedev.net/community/forums/topic.asp?topic_id=535989

[Edited by - LordSputnik on July 14, 2009 4:17:28 PM]

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!