Jump to content
  • Advertisement
Sign in to follow this  
MajSlayer

Increase the Lighting in XNA

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

How does one go about increasing the light level in XNA? My problem is XNA's rendering on defualt, is way darker than 3DS Max 2009. And I'm just to new to understand all the renderstate commands currently:( Could someone help me out, Thanks, MajSlayer

Share this post


Link to post
Share on other sites
Advertisement
Are you using BasicEffect to render your models? I'd imagine you are, as this is the default effect assigned if you import a model. In that case, you can increase the ambient lighting by setting a higher value for the AmbientLightColor property. You can also increase the dynamic lighting by increasing the DiffuseColor property of the effect's BasicDirectionalLights.

Share this post


Link to post
Share on other sites
What you're probably looking for are parameters of the BasicEffect, instead of renderstates. The basic effect class provides a basic shader that allows you to control the lighting quite well, so I'd advise you to take a look at the documentation for a complete overview. Most of them come pretty close to the once Max uses (at least in Max5 [wink]), but some useful parameters would be:

BasicEffect.DirectionalLight0 through BasicEffect.DirectionalLight2

These allow you to set up the color and direction of up to 3 'spotlights' in the scene.

BasicEffect.AmbientLightColor

Allows you to set the general 'lightness' of the scene, the amount of light outside of the spotlights.

BasicEffect.EmissiveColor

Determines how much the material 'lights itself', that is how much light it produces outside of spotlights and added to the ambient color.

Hope this helps [smile]


Edit: I guess it would have if I hadn't been beaten to it, again. You're not human MJP ;)

Share this post


Link to post
Share on other sites
Quote:
Original post by remigius

Edit: I guess it would have if I hadn't been beaten to it, again. You're not human MJP ;)


If you'll excuse me now, I have to return back to my home planet.

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!