Page 1 of 1

Ambient light levels

Posted: Thu Jun 21, 2007 8:10 pm
by elite
OK here's a technical question, if anyone can answer it for me.

I was reading on the wiki website that you can change the amount of ambient light that falls upon the dark side of planets and ships.

I have a planetinfo.plist file in this directory: Oolite/oolite.app/Resources/Config/planetinfo.plist

In that file is the following:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN">
<plist version="1.0">
<dict>
<key>universal</key>
<dict>
<!-- Change this value to move the sun closer to or further away from the planet. The game's default
value for this is 20. -->
<key>sun_distance_modifier</key>
<real>210</real>

<!-- Set this to 1 to enable the procedurally generated planet and cloud textures. A value of zero
means use the game's default planet and cloud rendering routines. -->
<key>generate_textures</key>
<integer>1</integer>

<!-- Set this to 1 to draw the cloud textures, 0 to not draw the atmosphere. -->
<key>show_atmosphere</key>
<integer>1</integer>

<!-- The width of the textures generated for planets and clouds. Must be a power of 2. -->
<key>texture_width</key>
<integer>512</integer>

<!-- The height of the textures generated for planets and clouds. Must be a power of 2 and half
of texture_width. Probably take this out later and calculate the value from texture_width. -->
<key>texture_height</key>
<integer>256</integer>

<!-- The ammount of light shed on the dark side of planets and ships. 0.0 - 1.0 -->
<key>ambient_level</key>
<real>0.0</real>
</dict>
</dict>
</plist>

I have had a play around with the file to see if it works. For instance I have changed the sun_distance_modifier part to 210 to make the planet's sun further away to make things a bit more realistic.

However when I change the ambient_level part, there seems to be no noticable difference to the dark side of planets.

This isn't a major concern but it would be nice to make the planets dark side more....... well dark.

From what I understand about this file and what I have read, I see that the <key>universal</key> part means that all the variables in this file are related to ALL planets in the game.
And that is true for the sun distance variable because the sun is further away in the dozen or so planets I visited.

However the ambient light part doesn't seem to work at all.

Does anyone know how to do this?

Thanks.

Posted: Thu Jun 21, 2007 10:22 pm
by LittleBear
Change it to a number like 3.0. That makes the light level three times higher than normal. You'll should just notice the difference at that level.

Posted: Fri Jun 22, 2007 9:09 am
by elite
LittleBear wrote:
Change it to a number like 3.0. That makes the light level three times higher than normal. You'll should just notice the difference at that level.
Yes I have experimented with various numbers but havn't seen any difference.

Posted: Fri Jun 22, 2007 10:23 am
by JensAyton
I can confirm that ambient_level is read, and used as a multiplier for solar ambient light.

Posted: Fri Jun 22, 2007 12:22 pm
by elite
Ahruman wrote:
I can confirm that ambient_level is read, and used as a multiplier for solar ambient light.

So what exactly does that mean?

I read in the tuturial on making and editing oxp's that the number used for ambient light has to be between 0.0 and 1.0. Any number over 1.0 would give a 'cartoon look' to planets.

Like I have said this isn't a major bug or anything but I feel planets would look more real if the night time side was a lot darker.

No number I have put into the planetinfo.plist file seems to make any change.

I assume this is the right file to edit and that it's in the right location?

Posted: Fri Jun 22, 2007 12:58 pm
by LittleBear
It does work, as I've used it in an OXP to light up a system where I'd scripted ships with very dark textures to appear (so the player could see em properly!). But depending on your monitor settings, you may not get a big effect with low values. I think it increases the light output of the background stars and any nebulas, but they don't put out that much light, so turning it up to double its not like turning a torch on the System! Oolite can look very dark on some systems and lightening it up may need you to change a setting with the OS or monitor card.[/i]

Posted: Fri Jun 22, 2007 2:40 pm
by elite
LittleBear wrote:
It does work, as I've used it in an OXP to light up a system where I'd scripted ships with very dark textures to appear (so the player could see em properly!). But depending on your monitor settings, you may not get a big effect with low values. I think it increases the light output of the background stars and any nebulas, but they don't put out that much light, so turning it up to double its not like turning a torch on the System! Oolite can look very dark on some systems and lightening it up may need you to change a setting with the OS or monitor card.[/i]
Ah I see. That sheds some light on things lol.

Well I have the setting at 0.0 which I assume is the dimmist you can get.
Well it still looks ok so I'll leave it at that.

At least the file works because I added...

<key>station_roll</key>
<string>0.2</string>


...to the file and now all space stations rotate at a slower (and far better looking) speed.

Posted: Sat Jun 23, 2007 10:03 pm
by elite
I found out why it wouldn't work.
I had the clearskys.oxp mod installed and that over-rode the ambient light settings in my planetinfo.plist file.