Planetside Software Forums

General => Terragen Discussion => Topic started by: bigben on November 05, 2007, 05:53:33 PM

Title: City lights
Post by: bigben on November 05, 2007, 05:53:33 PM
The nerd returns....

My experiment with extracting a city light mask from USGS land cover data worked OK, but the resolution was a little limited.  Started to download the transport layer from the USGS to have a bit of a play. While roads alone don't make up city lights, I worked on the basis that more roads = more lights. Using a combination of layers, blurring images, masking layers and resampling (all pre TG) I came up with this quick test.

This isn't too bad, but some extra masking is needed to dim roads based on the road density. I have some ideas on how to achieve that.... and that will also let me leave more defined roads in built up areas as well. Running a render with some clouds to test some GI settings. Don't hold your breath though... we all know it's going to take a while to render. (detail 1, aa7, GI 2,4, envirolight strength on atmosphere 2.5)

Don't ask me which city it is as I don't know. It's SE of Seattle and on a big'ish river.
Title: Re: City lights
Post by: dhavalmistry on November 05, 2007, 07:03:43 PM
oh this is real good....I was wondering how will I pursue this.....
Title: Re: City lights
Post by: bigben on November 05, 2007, 07:13:25 PM
OK, so it wasn't that painful a wait. Here is the raw render.

Sun altitude -15°
The only lighting is the single luminous surface.

While this was a just a quick and dirty test the potential is pretty obvious. Isn't TG's GI cool?   ;D

[edit] Running one last test render with a little tweaking of the cloud and GI settings. TGD is attached. Ignore most of the surfacing and blending... just a quick hack that needs replacing.

Relevant tweaks include:
GI Settings
Increase GI amount in cloud lighting
Envirolight atmosphere settings
Surface luminosity settings
[/edit]
Title: Re: City lights
Post by: bigben on November 05, 2007, 08:28:23 PM
Here's a raw sample of the image used here.  Coastal areas are a little awkward in that ferry routes are included in the data and need to be edited out of the image.

Convert it to greyscale before playing.

Title: Re: City lights
Post by: bigben on November 05, 2007, 09:06:07 PM
The render crashed, but not before I got a look at the city lights detail. GI quality is definitely a key for luminous surfaces. I had increased GI quality to 5 and the city lights looked much better.
Title: Re: City lights
Post by: sjefen on November 05, 2007, 09:08:15 PM
This is pretty cool bigben.
Title: Re: City lights
Post by: rcallicotte on November 05, 2007, 10:50:33 PM
Neat, BB.  I've done some of this sort of thing, but not inside TG2.
Title: Re: City lights
Post by: bobbystahr on November 06, 2007, 12:14:09 PM
WOW...I'm gob-smacked...this is like flying over by airliner...great contribution mate.. ...
Title: Re: City lights
Post by: Oshyan on November 06, 2007, 02:29:00 PM
Very, very cool and preliminary results are looking great here Ben. I played with some of this stuff myself at some point a while back but didn't get results nearly this nice. Keep it up!

- Oshyan
Title: Re: City lights
Post by: bigben on November 06, 2007, 06:52:19 PM
Thanks guys... running a 640x480 render at the moment with all quality settings maxed out just to see what it looks like. Also added a blue fill light with a broad soft shadow at the zenith to start heading towards a moonlit night. 

One thing I'm having a lot of trouble with is getting thick clouds... no matter how ridiculously large I make numbers they're always thin. Any suggestions or do I just keep hitting the random seed until I get something??
Title: Re: City lights
Post by: cyphyr on November 06, 2007, 07:29:03 PM
Hitting the random seed ain't so bad, you can always move the cloud pattern with a transform shader afterwards to where you want the gaps to be.
Richard
Title: Re: City lights
Post by: Sethren on November 06, 2007, 09:43:57 PM
Nice ideas and inspirational so i decided to make some seamless 2048 by 2048 city night maps. Each one of the five represent different distances from an orthographic view. Hopefully these will be of use.

http://www.sendspace.com/file/z38zui

If there are any download issues i apologize as this was the best file hosting service i could find at the moment.
Title: Re: City lights
Post by: bobbystahr on November 07, 2007, 01:53:54 AM
thanks Sethren...they dl'd fine for me.. ...
Title: Re: City lights
Post by: rcallicotte on November 07, 2007, 11:02:11 AM
Sethern - How nice!  Thank you.
Title: Re: City lights
Post by: Oshyan on November 07, 2007, 01:08:22 PM
Sethren, you can always share interesting TG-related files at http://www.ashundar.com/ with a free account. :)

- Oshyan
Title: Re: City lights
Post by: Sethren on November 07, 2007, 03:33:02 PM
Silly me, i usually don't normally visit ashundar any more but i do need to post there from now on. I am working on 2-3 more.
Title: Re: City lights
Post by: bigben on November 07, 2007, 07:09:16 PM
Clouds are a little higher in this one. Nothing, flash, just seeing how long it would take to render with all the quality settings (Detail, AA and GI) maxed out.

Answer 15 hours. I'll work on a better mask before I try this again  ;)   The extra quality does give a better representation of the image mapped surface, although you don't necessarily have to go this far

Planning an approach to Seattle with a full moon and Mt Rainier on the horizon... but that'll be after I get my NZ project a bit nearer completion.
Title: Re: City lights
Post by: sjefen on November 07, 2007, 07:48:51 PM
That is so cool :o
Is the city the only light source in this scene?
Title: Re: City lights
Post by: bigben on November 07, 2007, 08:32:57 PM
No. There is a faint blue fill light at the zenith to provide a reverse contrast to the city lights  in the clouds (accidentally ticked soft shadows on atmosphere... 75° width.. that would have made the render time unnecessarily longer too), but other than that... it's just the surface.

The first image in this post is only lit by the surface.
Title: Re: City lights
Post by: bobbystahr on November 09, 2007, 03:48:39 AM
If any one is interested, I have some very hi res, maps of the whole planet that can be applied spherically, of the cities lit up. If anyone wants them I could post em up at ashunder but I don't know how large a file they allow and I'd have to dig them up.Worked well in Imagine, as far as I let the 'test render' go and I was aiming for the same effect.
Title: Re: City lights
Post by: bigben on November 09, 2007, 05:13:52 AM
Without wishing to dampen your generosity, I think planet textures are possibly better linked from their original sources as they may get updated with better versions as time goes on.

There's a 30000x15000 GIF available from NASA which is more than you could currently load into TG.
http://visibleearth.nasa.gov/view_rec.php?id=1438 (http://visibleearth.nasa.gov/view_rec.php?id=1438)
Title: Re: City lights
Post by: rcallicotte on November 09, 2007, 03:31:36 PM
Love the find, BB.  Thanks!
Title: Re: City lights
Post by: Harvey Birdman on November 09, 2007, 03:59:59 PM
Totally tangential to the thread, but... it's not hi-res if it doesn't show my neighbor's manure pile. Amazingly, Google earth does, a fact which is a source of much amusement here.

:D
Title: Re: City lights
Post by: bigben on November 11, 2007, 04:44:06 PM
With that much manure, it might make the city lights image too if the methane ignites  ;)
Title: Re: City lights
Post by: Harvey Birdman on November 15, 2007, 01:32:07 PM
Now, there's a pretty picture... explosive spontaneous combustion of methane at the bottom of a giant manure pile caused by heat buildup from biological decay... yup. I can see the headlines now. '1 killed, 4 Injured in Natural Gas Explosion'... horse patties flying for hundreds of meters...  oh, yeah.

;D  :D
Title: Re: City lights
Post by: Sethren on November 15, 2007, 01:39:58 PM
LOL!
Title: Re: City lights
Post by: Mr_Lamppost on November 16, 2007, 09:03:54 PM
That's nothing

If you find my house and I am not telling you which one on the aerial photos at 192.com you can see four reclaimed US fire hydrants (Kennedy Valve K81-As), in my garden.  Yes I am in the UK, these were from a US air base in Suffolk.  They have a cap diameter less than 12 inches. 

If you know what you are looking for on that photo you can see why I am called Mr LAMPPOST  ;D

*** EDIT Added *** the photo on Google Earth is at least three years older  ***/EDIT***
Title: Re: City lights
Post by: overlordchuck on November 21, 2007, 08:08:59 PM
Wow...great work on the city lights.  Very, very nice.  Looks pretty darn real.