Planetside Software Forums

General => Terragen Discussion => Topic started by: bigben on August 01, 2010, 07:13:07 AM

Title: night sky texture map data.
Post by: bigben on August 01, 2010, 07:13:07 AM
It's been a while... new job, new computer, slowly getting back to a few fun things.

Found a new data set for creating a night sky texture.. http://www.sergebrunier.com/gallerie/pleinciel/ (http://www.sergebrunier.com/gallerie/pleinciel/)

I'm reverse engineering the image tiles to make some textures for testing in TG. Source files are multiple resolution tile sets of 90° cube faces. Full resolution is 12762 pixels per cube face  :)
Title: Re: night sky texture map data.
Post by: FrankB on August 01, 2010, 08:14:03 AM
Hey! Welcome back!

Cheers,
Frank
Title: Re: night sky texture map data.
Post by: Henry Blewer on August 01, 2010, 08:26:02 AM
The large panel suspended above the woman would be great to have for a ceiling.
Title: Re: night sky texture map data.
Post by: bigben on August 01, 2010, 07:40:02 PM
[attachthumb=#1]

Here's a quick and dirty test of an 8k spherical texture.  Applied a small amount of sharpening, but this should hold up OK in a HD video
Title: Re: night sky texture map data.
Post by: Henry Blewer on August 01, 2010, 08:11:29 PM
That looks remarkable.
Title: Re: night sky texture map data.
Post by: bigben on August 01, 2010, 08:34:52 PM
Running a comparison test with a 40° fov.  Spherical texture vs camera projection of a 4k texture with the same fov extracted from the full res images.  Another very rough calculation... using camera projection you could get down to 15° at full resolution for 1920x1080HD which makes this an extremely useful dataset.

[edit]  Here's the first image.  40° fov, 8k spherical background texture


Title: Re: night sky texture map data.
Post by: bigben on August 01, 2010, 10:06:38 PM
Not exactly the same bit of sky (I think I put a minus sign in the wrong spot  ;)) but you get the idea.  This is a 4k image projected through the render camera with a matching fov.  All images have been processed exactly the same apart from increasing the compression on this one to be able to post it
Title: Re: night sky texture map data.
Post by: domdib on August 02, 2010, 05:27:38 AM
That looks very nice. Welcome back, by the way!
Title: Re: night sky texture map data.
Post by: inkydigit on August 02, 2010, 07:44:44 AM
looking very interesting, and welcome back too!
Title: Re: night sky texture map data.
Post by: Zairyn Arsyn on August 02, 2010, 09:01:26 AM
looks really nice :) looking forward to seeing later developments
Title: Re: night sky texture map data.
Post by: bigben on August 02, 2010, 09:48:33 AM
Thanks for the welcomes... getting my head around some of the geometry tweaks for panoramas. (hopefully) Starting with a basic sequence of spherical textures. If I've got his one right I can organise the latitude, starting position and rotation speed in a database to output a PTGui project to create the image sequence.

For through camera projection I'd need some math help to try and reduce 2 3D rotations into 1, but the potential is there to extend the first database and link it to camera angles to create rotating star backgrounds for a moving camera from the original image data... but one step at a time
Title: Re: night sky texture map data.
Post by: reck on August 02, 2010, 10:18:38 AM
Hey bigben is back!!! I was looking back at some of the old posts in the forum and you made some really interesting posts back then..and then you just disappeared. It's good to see you back on the boards and I look forward to seeing some more of your Terragen experiments. I think experiments is the correct word for your work :)

BTW the sky map looks really good in those renders.
Title: Re: night sky texture map data.
Post by: bigben on August 02, 2010, 10:50:57 AM
Thanks...  yes most of my stuff is experiments  ;) I actually like both versions of the image above.  Zooming in with the spherical star image makes the stars really soft, but it kind of gives the render a telephoto look... pin sharp terrain, softer clouds and even softer stars.. giving an impression of depth.

So for animating the star field I produce a high res equirectangular panorama with south in the centre of the image. I then load this several times into a new PTGui project. In my case I want the south pole to be 53° above the horizon so I set the pitch for all input images to 53°. I then increment the roll of each input image slightly for the rotation, outputting a "smaller" panorama as individual layers. This gives me a numbered sequence of images.

In TG2...
1: Add a constant scalar next to the background node (for easier acess)
2: In the internal network of the background, remove the shader and replace it with a default shader.
   - set the image projection to spherical and increase the luminosity
3: Above that add a multiply colour node
   - connect the constant scalar to one input
   - connect the output to the colour and luminosity functions of the default shader [edit] (connecting the image to the colour function via the smae multiplier as the intensity was a bad idea, reduces saturation if you use a low multiplier at night).
4: Add an image node, replacing the sequential number (I'm using 4 digits) with "%04d" (filename%04d.tif")
   - set the projection to spherical [edit] FlipX! [/edit]

... and you're done.

Increasing the luminosity helps the stars punch through thin cloud but it will also make it show up in "daylight"  This is why I added the constant scalar/multiply nodes. This provides some control so that you can tweak the intensity of the stars and sunlight strength separately, giving you the control you need through twilight in an animation.
Title: Re: night sky texture map data.
Post by: bigben on August 02, 2010, 07:04:35 PM
Going to stop the rendering and make the terrain a little nicer... the test clip will get posted here ... http://www.vimeo.com/user4301194/videos (http://www.vimeo.com/user4301194/videos)
Title: Re: night sky texture map data.
Post by: MGebhart on August 02, 2010, 08:23:11 PM
Very, very cool guys.
Title: Re: night sky texture map data.
Post by: bigben on August 02, 2010, 11:53:14 PM
OK. Biting the bullet and rendering a 75 frame HD animation. trees and a lake, animated clouds and a camera pan to see how well it holds up.  Frame 1 will look something like this...
Title: Re: night sky texture map data.
Post by: Kadri on August 03, 2010, 12:42:10 AM
Welcome back , Bigben  :)
How long does it take to render one frame? What's your computer specification ?
Title: Re: night sky texture map data.
Post by: bigben on August 03, 2010, 01:40:35 AM
about 1.5 hrs.  1.5'ish million trees total, 3 tree models. 4 threads chewing up about 1.5Gb RAM

Intel i7 950 @ 3.07GHz, 8Gb RAM.
Title: Re: night sky texture map data.
Post by: Kadri on August 03, 2010, 02:40:49 AM

Thanks , Bigben  :)
Title: Re: night sky texture map data.
Post by: domdib on August 03, 2010, 05:45:46 AM
The Milky Way is gorgeous.
Title: Re: night sky texture map data.
Post by: bigben on August 08, 2010, 05:50:51 AM
Had a look at 60frames as an animation and found a typo when I was setting up the rotation angles for the background, so there was a horrible jump at frame 30.  I badly wanted to tweak some of the timings as well so I've restarted the render and made it a bit longer.  Clouds were changing shape too slowly, waves, camera pan and star rotation were too fast... and while I have no moon in the shot, it is a moonlit scene... moon elevation goes from 30 to 0 which then meant tweaking the red decay to make it look more natural.

Also digging back into the memory banks, and I've recreated my progressive render generator in a database I made for my favourite commandline tools... slowly getting back into the swing of things.

Here's one with a low moon elevation (4.4°) ... oh yes.. extended the length to 300 frames.
Title: Re: night sky texture map data.
Post by: bigben on August 18, 2010, 07:11:05 AM
On the home straight... working through the odd numbered frames now  ;)
Title: Re: night sky texture map data.
Post by: domdib on August 18, 2010, 07:40:01 AM
Really looking forward to the finished product!
Title: Re: night sky texture map data.
Post by: bigben on August 18, 2010, 10:02:50 PM
It will be Tuesday before I can upload it anyway. Only have a free vimeo account and I posted a real time lapse a couple of days ago.  Up to frame 111