Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Realistic lighting

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
Odo987
Dangerous
Dangerous
Posts: 121
Joined: Fri Mar 03, 2006 3:56 am
Location: San Francisco
Contact:

Realistic lighting

Post by Odo987 »

Take a look at this photo of Earth, taken during Apollo 13 (yes, the one that blew up):
http://www.hq.nasa.gov/office/pao/Histo ... 0-8591.jpg

Or how about Venus:
http://www.renaissanceastrology.com/images/venus.jpg

Note what the in-shadow portion of a planet looks like. Reality doesn't have background fill-lighting. There's a single point-source of light, and the night-side of the planet is pitch black (occulting stars). I think reality produces a *really* nice effect. One isn't always looking at a disc. Instead one sees discs, crescents, eclipses, waxing and waning.

Could we turn off that extra studio light? Or at least provide me with its coordinates so I can fly over and shoot it out? Yes, I am an astronomy geek. OBAFGKM.
Attacking a Navigational Beacon is illegal. Police are on their way.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

In a major battle your space compass can be damaged, so finding the space station on the dark side would be impossible. (being a pc user I'm a bit twitchy about space compasses)

As far as reality is concerned, there has to be some compromises to make the game "playable" for example generated galaxies, and the time it takes to travel between systems.

That aside I'm all for as much realism as possible and Oolite has really moved the game up a league, with the varied activity levels and action you encounter on your travels
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Odo987
Dangerous
Dangerous
Posts: 121
Joined: Fri Mar 03, 2006 3:56 am
Location: San Francisco
Contact:

Post by Odo987 »

TGHC wrote:
In a major battle your space compass can be damaged, so finding the space station on the dark side would be impossible.
Space stations and ships can self-light. Every Star Trek movie has got a great sequence where Enterprise powers up and her hull-illumination lights switch on one by one. There is no need to change the way man-made objects are lit.

I just object to planetary self-lighting. That wouldn't affect game play.
Attacking a Navigational Beacon is illegal. Police are on their way.
User avatar
Odo987
Dangerous
Dangerous
Posts: 121
Joined: Fri Mar 03, 2006 3:56 am
Location: San Francisco
Contact:

Post by Odo987 »

Here's a pair which give the general idea:

Earth and our moon as photographed from Mars:
http://mpfwww.jpl.nasa.gov/mgs/sci/eart ... modest.jpg

Lave and Station with the night-side gimped out:
http://neil.fraser.name/temp/oolite-001.png

If you are worried about crashing into the night-side of the planet, there's still the mass-lock and the altimiter warning. Neither of which ever get damaged in combat.
Attacking a Navigational Beacon is illegal. Police are on their way.
User avatar
Selezen
---- E L I T E ----
---- E L I T E ----
Posts: 2527
Joined: Tue Mar 29, 2005 9:14 am
Location: Tionisla
Contact:

Post by Selezen »

I actually think that Odo here is on to something as far as the atmospheric feel of the game is concerned. The planets and (scripted) moons can be sunlit and completely dark on the other side without compromising gameplay. Oolite's starmaps are detailed enough to allow the delineation of the dark side against the clearly defined stars and nebulae.

Ships and stations, however, are small enough to still be lit with reflected light from the planet or sun, and be fully visible. Stations will be lit fairly well with reflected light, and nice textures could be made that will show the station clearly against a black background anyway.

It would look nice, and more realistic, but it may be a big job to rejig the lighting that much and might even have an impact on processing time, being so dramatic a change.
User avatar
Cyberian Tiger
Average
Average
Posts: 8
Joined: Tue Jan 10, 2006 10:11 am

Post by Cyberian Tiger »

TGHC wrote:
In a major battle your space compass can be damaged, so finding the space station on the dark side would be impossible. (being a pc user I'm a bit twitchy about space compasses)
Even with the most basic space compass, if you fly to the planet it then changes to guide you to the station.

With regards having man made objects use their own lighting, multiple light sources start making things more and more complex. With regards the "dark side" having it's own lighting, this is just the ambient light setting which is probably extremely easy to change.

I'm not sure if the glowing lights on some objects (police ships, navigation bouys) actually act as light sources.

The sun is a relatively easy light source to make because you can basically ignore any attenuation with distance. (i.e. it's as bright at 1000 km as it is at 1km). Man made light sources don't tend to be bright enough to fudge in a similar manner.

Anyway, to do this sort of thing properly you start having to mess with various GL extensions which may or may not be present in different GL implementations, and it all gets a bit messy.

-CT
User avatar
Odo987
Dangerous
Dangerous
Posts: 121
Joined: Fri Mar 03, 2006 3:56 am
Location: San Francisco
Contact:

Post by Odo987 »

Selezen wrote:
Ships and stations, however, are small enough to still be lit with reflected light from the planet or sun, and be fully visible. Stations will be lit fairly well with reflected light, and nice textures could be made that will show the station clearly against a black background anyway.
TGHC is correct in being concerned about station lighting. Removing ambient or self-lighting (they're essentially the same thing) from ships and stations would be a mistake. Imagine a station on the far side of the planet from the sun. There would be zero direct light hitting it. Zero reflected light too.

I don't believe that man-made objects should have any lighting changes. Just remove ambient light from planets.
Attacking a Navigational Beacon is illegal. Police are on their way.
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

Better still, make it a configurable item.
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1160
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post by aegidian »

For a more realistic approach, yes, the ambient light setting should be much lower than they are. For better gameplay, I think the current levels are fine.

However, I've just added <key>ambient_level</key><real>1.0</real> as an option in planetinfo.plist for v1.64, so you can configure this as you like it.
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

Just to clarify:

I would love to see more realism with the planet textures, lighting etc, it would be really cool to fly low over a planet with mountains, sea terrain etc, and possibly even land!!

My only caveat is that you must be able to visibly locate the station.

I'm currently on a prime trading route in Galaxy 1, Inera - Raale.
Inera is a grey planet and the space station is an Isohedron which is also grey and in the shadow side, it is impossible to find it with the naked eye.

When I play at home I have the room lights off and the light comes throught the doorway of the next room, sufficient to enable hitting S instead of A, but enabling better visibilty on screen.



I like the idea of station lighting very much, which is only visible when you are fairly close and perhaps becomes brighter as you approach it.
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Odo987
Dangerous
Dangerous
Posts: 121
Joined: Fri Mar 03, 2006 3:56 am
Location: San Francisco
Contact:

Post by Odo987 »

aegidian wrote:
I've just added <key>ambient_level</key><real>1.0</real> as an option in planetinfo.plist for v1.64, so you can configure this as you like it.
Sounds great. I look forward to seeing how this looks. Thanks! 8)
TGHC wrote:
I'm currently on a prime trading route in Galaxy 1, Inera - Raale.
You're kidding. That's exactly where I've parked myself, at Raale. Having endless fun blowing up and scooping pretty much everything that crosses my path. Great anarchy world. No police. See you around! :twisted:
Attacking a Navigational Beacon is illegal. Police are on their way.
User avatar
stevesims
Dangerous
Dangerous
Posts: 78
Joined: Wed Jun 23, 2004 4:07 am
Location: London, England

Post by stevesims »

Genuine dark-sides is a great idea and it would indeed add to the realism. Darker dark-sides would give you a nice additional visual clue as to which direction the sun is. However the current lightness of dark sides in Oolite could be explained by your ship's visual sensors providing some dark side compensation, brightening it up.

Arguably dark-side brightness should be a user configurable option within the game on the settings screen alongside the existing resolution and volume settings.

Another thing that would be cool would be seeing city lights visible on the dark sides of planets. :-)

The explanation that the station and other ships have their own lights works for me - not being able to see the station would be a bummer. It would make sense though to come across some pirate ships with their lights turned off - operating in a semi-stealth mode.

One area in which the realism would fall down a little bit with lighting would be on planets with moons since, depending on their orbital position, they should reflect some sun light onto the dark side of planet, and vice versa. Not that I've ever seen a moon though - I run with very few OXPs, and have yet to download an OXP that adds any. Of course fixing this would basically require writing in a ray-tracing engine. :-)
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1160
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post by aegidian »

Plus, the current occlusion detection code is a bit of a mess. It needs bringing into line with the new collision detection code, and having sub-entities work properly. That way, if the docking port is on the dark side of the station it won't be lit by the sun on the other side (as it is now!). *todo*
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
User avatar
winston
Pirate
Pirate
Posts: 731
Joined: Mon Sep 27, 2004 10:21 pm
Location: Port St. Mary, Isle of Man
Contact:

Post by winston »

aegidian wrote:
However, I've just added <key>ambient_level</key><real>1.0</real> as an option in planetinfo.plist for v1.64, so you can configure this as you like it.
If ambient_level isn't present, where does it get the default ambient_level from? I have an ulterior motive asking - oolite-linux with r299, all the planets are bright white now because ambient_light in Universe.m is nan. This doesn't happen with the Mac. Where is the Mac version getting ambient_light=1.0 from? (If it's a difference between how GNUstep is handling not present items, it's easy enough to fix and I have a fix for that ready to commit assuming you don't tell me that I have something missing).

How do we apply ambient_light globally? It seems to me that planetinfo.plist (at least in OXPs) only has an affect on specified planets rather than the entire universe (and I'd hate to have to write a planetinfo.plist with an entry for every single planet. I've never tried OXPing so please forgive the dumb questions!)
User avatar
aegidian
Master and Commander
Master and Commander
Posts: 1160
Joined: Thu May 20, 2004 10:46 pm
Location: London UK
Contact:

Post by aegidian »

winston wrote:
aegidian wrote:
However, I've just added <key>ambient_level</key><real>1.0</real> as an option in planetinfo.plist for v1.64, so you can configure this as you like it.
If ambient_level isn't present, where does it get the default ambient_level from? I have an ulterior motive asking - oolite-linux with r299, all the planets are bright white now because ambient_light in Universe.m is nan. This doesn't happen with the Mac. Where is the Mac version getting ambient_light=1.0 from? (If it's a difference between how GNUstep is handling not present items, it's easy enough to fix and I have a fix for that ready to commit assuming you don't tell me that I have something missing).
Oops! I didn't set a default. Fix committed now.
winston wrote:
How do we apply ambient_light globally? It seems to me that planetinfo.plist (at least in OXPs) only has an affect on specified planets rather than the entire universe (and I'd hate to have to write a planetinfo.plist with an entry for every single planet. I've never tried OXPing so please forgive the dumb questions!)
You can create settings that apply to ALL planets in planetinfo.plist with the key universal eg.

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>universal</key>
	<dict>
		<key>ambient_level</key>
		<real>0.25</real><!-- set ambient light for every system to 25% of Oolite normal -->
	</dict>
	<key>0 7</key><!-- Lave -->
	<dict>
		<key>ambient_level</key>
		<real>0.75</real><!-- set ambient light for Lave to 75% of Oolite normal (overrides universal) -->
	</dict>
</dict>
</plist>
"The planet Rear is scourged by well-intentioned OXZs."

Oolite models and gear? click here!
Post Reply