Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / V1.20 - Set Ambient and Set Object Ambient

Author
Message
Robert The Robot
18
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 24th Feb 2008 11:21
I've been playing around with these commands and I'm getting some unusual results. (I know the set ambient command has been made kind of redundant, but bear with me).

It seems that all objects and matrices are still affected by the Colour Ambient Light command, and that this seems to overwrite/dwarf any Set Object Ambient commands. Also, while Set Ambient no longer works with objects, it no longer works with matrices either.

So, is there a way to adjust the background lighting effects of a matrix without ruining your objects, and how can you control the light's intensity? (Or should I just not use these commands when there are matrices around?)

Did you hear about the two criminals who crashed their getaway car into a cement mixer? Police are looking for two hardened criminals...
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 24th Feb 2008 17:04
Quote: "Also, while Set Ambient no longer works with objects, it no longer works with matrices either."

This is incorrect. It has a more direct effect on matrices. It still affects objects as well. Part of the trick, is positioning the default light 0. It is set as a directional light by default(you can change this if you want) so positioning it is very important to attaining good lighting. Check out the following example. Press space to switch the lighting. Rotate camera with mouse, move with arrow keys.




I still have trouble getting it right. Even after I wrote the example above, I ran into problems with lighting in old code that I couldn't figure out. Check out this link:

http://forum.thegamecreators.com/?m=forum_view&t=120846&b=10

Enjoy your day.

Login to post a reply

Server time is: 2025-06-04 01:46:15
Your offset time is: 2025-06-04 01:46:15