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.

Dark GDK / Getting rid of ambient light

Author
Message
aersixb9
16
Years of Service
User Offline
Joined: 29th Nov 2007
Location:
Posted: 17th Dec 2007 00:54
I'm making a solar system spaceship game, and I just want one light source, the sun. I've got that working, and the planet and moon are lit nicely from the sun. However the dark side of the planets isn't very dark...it's almost like there's an ambient light on that I need to turn off somehow...

Anyways, here's a picture.

As you can see, the dark side of the moon is kind of dark, but I want it to be totally black, invisible if you will! How can I go about doing this?
dbGamerX
16
Years of Service
User Offline
Joined: 23rd Nov 2007
Location:
Posted: 17th Dec 2007 01:11 Edited at: 17th Dec 2007 01:11
If the 3D map already has lighting in it, use

where iObject is the map. If the map is split up (eg. earth.3ds, sun.3ds etc) then use

where iPercentage is the percent. 0 means no ambient light.

OR, you could use both (If you can.)

dbPrint ( "Sig" );
aersixb9
16
Years of Service
User Offline
Joined: 29th Nov 2007
Location:
Posted: 17th Dec 2007 01:30
Works like a charm! (I used dbSetAmbientLight ( 0 ) Thanks a ton! You're awesome! Here's a haiku I wrote to your greatness:

dbGamerX
you made my universe dark
for that I thank you

Login to post a reply

Server time is: 2024-11-17 00:19:29
Your offset time is: 2024-11-17 00:19:29