Page 1 of 1

Ocean Overlay Texture for most VT Earth Textures

Posted: 02.10.2006, 01:20
by Don. Edwards
This is something I wanted to try way back when the first VT textures of Earth came out but never found myself actually doing it. The First VT Earth was created by Walton I believe but I could be in error. It was a decent first attempt, but I disliked the ocean coloring that he had gone with. They were very green looking. Of course several newer ones have been made by various other texture artists here on the site. They have of course been based on the NextGen BlueMarble textures. This of course has its own inherent problems, namely that the ocean appear darker along the coastlines than farther out off shore. In my own 16k NGBM textures I have fixed this glitch by building an ocean overlay layer that is added to each texture while I am working on them in the PSD format.

So you may be asking where I am going with all this. Well I have orphaned this layer and turned it into a standalone texture that can be plugged in as an alternative overlay texture. Here is what it does.

I have chosen to use Fightspit's 64k VT Earth texture for demonstration purposes. If you look close or click the image for the full size you will see the dark coastlines that I have mentioned earlier and the overall purple tint of the oceans.

Image

Now here is the same texture at the very same camera angle with my ocean overlay applied via Celeatia's overlay feature.

Image

Of course this is just a quick test version and the polar data is a bit blurry at this point. But I should be able to fix that. But you will notice that the dark areas of the coastlines have been fixed by applying the overlay. I also added the missing polar cap visual data to the layer.

Here is a shot of the overlay itself layered over a plain white Earth.

Image

This is just to show that the texture is in fact totally separate from Fightspit's texture. This means it can be used with any Earth VT texture, no matter what size or who made it as long as it is based on the NGBM textures. At this point it?€™s only at the 8k level and in the DDS format. Creating a 16k version in DDS won?€™t be possible without making it into a VT in its own right. I do plan to do this. AS for making one any larger than 16k I really can?€™t see the need as there really is no detail on the flat texture.

So if this seems to be something the Celestia community would like me to take forward now is the time to put some input in.

As for anyone wanting to possibly add this layer to their VTs if you contact me maybe we can work something out. Of course this would mean totally rebuilding your VTs and this is why I came up with this idea instead.

Don. Edwards

Posted: 02.10.2006, 02:35
by cartrite
Hey Don,
Are you still working with the clouds? I am in state of chaos. I put most of my data on dvd's and put them into storage because of a upcomming move to greener pastures.
Anyhow, a few months ago, I did something similar in a different way. First I wrote a program that was similar to this one.
http://www.celestiaproject.net/forum/viewtopic ... 3110#73110
That program was one of my first attempts at creating a spec map and I since settled on a much different one. I also was forced to put the project on hold because of a lack of disk space. My newest spec generator worked with SRTM3 data and was able to isolate inland rivers and lakes.
Anyhow, here is part of the code that recolored the coastal oceans. You may be able to see what I was doing. If pixels were enountered that was part of the dark coastal waters, I attempted to blend them. The last if statement turned everything brighter, oceans that is.

Code: Select all

         for (int x = 0; x < width; x++)
        {
            unsigned char r;
            unsigned char g;
            unsigned char b;
            r = samples[y][x * 3 + 0];
            g = samples[y][x * 3 + 1];
            b = samples[y][x * 3 + 2];
            if ( r < 0x02 && g < 0x20 && b < 0x15)
                r = 0x02,
                g = 0x05,
                b = 0x14;
            else
                r = r,
                g = g,
                b = b;
            if ( r == 0x08 && g < 0x20 )
                r -= 0x06,
                g = 0x0c,
                b = 0x1c;
            if ( r == 0x07 && g < 0x20 )
                r -= 0x05,
                g = 0x0c,
                b = 0x1c;
            if ( r == 0x06 && g < 0x20 )
                r -= 0x04,
                g = 0x0c,
                b = 0x1c;
            if ( r == 0x05 && g < 0x20 )
                r -= 0x03,
                g = 0x0c,
                b = 0x1c;
            if ( r == 0x04 && g < 0x20 )
                r -= 0x02,
                g = 0x0c,
                b = 0x1c;
            if ( r == 0x03 && g < 0x20 )
                r -= 0x01,
                g = 0x0b,
                b = 0x1d;
            if ( r <= 0x02 )
                r += 0x01,
                g += 0x0a,
                b += 0x10;
       rgb[x * 3 + 0] = (unsigned char) (r);
       rgb[x * 3 + 1] = (unsigned char) (g);
       rgb[x * 3 + 2] = (unsigned char) (b);
        }


This changed most of the dark coatal waters lighter. Then I created a ocean overlay texture from that. Mine was mostly mono colored though and with all the other textures I load onto the earth, I can hardly use it anymore. My system can't run that many textures at once so I just use the base texture that has a recolored ocean.
At one time, my system can load a base texture with alpha spec, normalmap, cloudmap, and cloud normalmap, with a fps = 5 or less. I think the ocean overlay brought it down to 3 fps.
For the majority of users though, I'm sure a correction to BMNG's dark coastlines would be welcome. I remember that I was advised to correct the problem with overlays. That would be the proper way to go I guess because the color could always be changed without affecting the base texture.
Anyhow, good job. Take it easy..

cartrite

Posted: 02.10.2006, 03:41
by Don. Edwards
Hey Cartrite,

Well I kind of had to take a sidestep o the clouds. I lost another hard drive do to old age and lost a great deal of data, mostly the new cloud data images. I can always redownload them, but I too am getting shy on storage. But I will be getting a nice big hard drive here real soon. I did discover a problem with the 16k VT clouds I made, mainly seems. That can be fixed of course.

As for the overlay, I did forget to mention that it can also be used on smaller textures as well. Meaning it could be used on a 16k, 8k textures as well. In the above image of the overlay in use, I have lightened it up a bit to make it stand out. I have always used an ocean layer to apply to all previous Earth textures I made in the past. That way it was always easy for me to migrat4e it into another texture. An important feature now when working with 12 diferent NGBM textures.

Take it easy guy...

Don. Edwards

Posted: 02.10.2006, 08:09
by bh
Hey Don! You know what I think about the water coverage as regards colour...these look pretty damn fine...great stuff.

Posted: 08.10.2006, 23:54
by fsgregs
Don. This is EXACTLY the fix I was looking for that prevented me from downloading the new Earth VT textures. I just hated the dark, almost black oceans from the new Blue Marble textures. I can now begin to download them for use on my own home system.

You overlay is just what the doctor ordered. Pleease email it to me.

Just a quick question, however. In Celestia 1.4.1, how is it implemented? Do we do this via a command in the ssc file?

Frank

Posted: 11.10.2006, 03:16
by Don. Edwards
Ok, I have 4 more shots here. Sorry for not thumb nailing them.

The first is again the NGBM without the overlay.
Image

The second is an untouched version of the overlay texture as I am using on the NGBM textures. It simply corrects color defects and adds a little bit of detail to the vast flat oceans. It also changes the coloring of many large lakes and seas.

Image

The next is just like the one in my first post, slightly lightened a bit.

Image

And finally the last one is vastly lightened to the level of what I call PaleBluDot. It will be good for video cards that can't render haze effects and makes the oceans appear very dark.

Image

So in the end I will releasing 3 versions of the Ocean overlay. Each will be packaged separately. Each will be a single 8k DDS texture. I am also making a 16k version that will be in VT DDS. The 16k really isn't needed except for polar ice detail when getting in closer. There will only be one version of the 16k version. It will be based on the main overlay I am using to make all the seasonal textures. So it will be dark and simply for use in color correction for those that want to use it for that purpose.

I should have the 8k versions uploaded and ready by this weekend. The 16k will follow as soon as I have the time to finish it. It still has to be cut into tiles and compressed. With work it may not be ready until the end of the month.

As always any and all comments are welcome.

Don. Edwards

Posted: 11.10.2006, 09:47
by bh
Looks super Don...can't wait to try.

Posted: 18.10.2006, 02:19
by Don. Edwards
Sorry for the delay. I had to work over the weekend so that kind of threw off getting everything put together for the upload. I am hoping that everyone that wants to use this finds the best way to do it. I am sure there are several ways to implement the overlay texture. The easiest way is to add the overlay texture line to your Solarsystem.SSC's Earth code. It should look like this.

"Earth" "Sol"
{

Texture "BMNG.ctx"
OverlayTexture "8K-Ocean-overlay-1.dds"
NightTexture "land_ocean_ice_lights_aurora_4k.dds"
SpecularTexture "Earth8kSpec2.dds"
Color [ 0.85 0.85 1.0 ]
SpecularColor [ 0.5 0.5 0.51 ]
SpecularPower 25.0
# HazeColor [ 1 1 1 ]

This of course is just an example. The other way to use it would be to create an entry for an alternate texture which would give you the ability to toggle the overlay texture on and off. There are many ways to add this to your Celestia install. It can be added to your solarsystem.ssc or it can be added as a separate .ssc file and placed in the Extras Folder/Directory.


Ok so here are some final shots. These are of what they do to the actual texture.

The first is what the original BMNG texture will look like without the overlay.
Image

This version #1 of the overlay. This is for those that want to correct the errors in the oceans and the color but want to keep the oceans dark.
Image

The is version #2 of the overlay. This is for those that wish to correct the errors and wish to just bump up the oceans color and brightness values a pinch.
Image

This is version #3 of the overlay. This is for those of you that have a video card that doesn?€™t render haze effects and that the oceans look very dark to almost black. This will help lighten things up.
Image


Ok so here are some download links. All the overlay textures are 8k DDS. They should work with a 128MB video card just fine. I have tested these with

Version #1
http://216.231.48.101/~impulse/pictures ... rlay-1.zip

Version #2
http://216.231.48.101/~impulse/pictures ... rlay-2.zip

Version #3
http://216.231.48.101/~impulse/pictures ... rlay-3.zip

I am expecting some feedback from those of you who use these. If any of you find something wrong please let me know.

Don. Edwards

Posted: 18.10.2006, 12:01
by ANDREA
Don, I just downloaded and checked the version #1 of the overlay.
I use it with BMNG 128k VT, and I found something strange, at least IMHO:
it works very well with all the Render Paths, with the only exception of OGL2. 8O
FYI.
Anyhow it's a very nice and needed addon, and moreover now 128k poles look like they are, WITH ice! :wink:
Well done, thank you.
Bye

Andrea :D

Posted: 18.10.2006, 12:13
by bh
Hi Don..just downloaded and installed ver3. I can't see the texture.
Here's my ssc...

"Earth" "Sol"
{
Texture "earth.*"
OverlayTexture "8K-Ocean-overlay-3.dds"
NightTexture "newlights4k.jpg"

SpecularTexture "earthspec4k.jpg"
Color [ 0.85 0.85 1.0 ]
SpecularColor [ 0.5 0.5 0.55 ]
SpecularPower 25.0
HazeColor [ 1 1 1 ]
HazeDensity 0.3

I've tried different render paths to no avail. Do I need to alter the ssc for the virtual tex in my extras folder?

They look superb in your previews Don...great work!

Posted: 18.10.2006, 14:02
by ANDREA
bh wrote:Hi Don..just downloaded and installed ver3. I can't see the texture.
I've tried different render paths to no avail. Do I need to alter the ssc for the virtual tex in my extras folder?

Yes bh, without this change it didn't work for me too. 8O
This is how it looks now: :wink:

Image
Bye

Andrea :D

Posted: 18.10.2006, 14:07
by bh
Thanks Andrea, will give it a try. I thought I was pretty good on sscs but it's all changed a bit! :oops:

All working now, thanks Don and Andrea.