Page 1 of 1

Cloud textures and transparency

Posted: 01.01.2003, 19:15
by JackHiggins
I recently downloaded a large cloud texture from the blue marble site at http://visibleearth.nasa.gov/cgi-bin/viewrecord?11643 and I was wondering if maybe someone could tell me how to make it transparent with photoshop or something...?

If you go the the page you'll see that it is simply a greyscale image and I havent been able to figure out how to make the darker parts transparent- like the normal clouds.png in celestia... :roll:

Any help would be great thanks!! :D

Posted: 01.01.2003, 19:25
by Rassilon
Do a select by color select black at 128% and inverse checked....copy and paste into new canvas then adjust bright/contrast copy duplicate on top of original and offset the bottom layer x: 3 y: 3 darken it and guass blur at 3 to give a 3d effect....viola nice clouds :mrgreen:

Posted: 01.01.2003, 20:53
by selden
o.O

Talk about doing it the hard way! ;)

Ras' gave you the artist's method -- what to do if you're familiar with Photoshop and other WYSIWYG paint programs.

If all you want is to see more through the dark areas and less through the bright, you can use a different set of tools which, for me anyhow, are much simpler: NetPBM.

Using the 2k JPEG cloud image from the Blue Marble Web page mentioned above, these commands

Code: Select all

#! /bin/sh
jpegtopnm clouds.jpg > tmp1.ppm
ppmtopgm tmp1.ppm >tmp2.pgm
pnmtopng -alpha tmp2.pgm tmp1.ppm > clouds.png


create clouds that looks like this:

Image (this is a link to a high resolution image.)

(The grid shown has nothing to do with the cloud positions. I let them rotate for a while.)

Posted: 01.01.2003, 21:32
by selden
You also can use the Blue Marble cloud pattern as a transparency channel for an image that's all-white (like what is currently used in Celestia)

Code: Select all

#! /bin/sh
jpegtopnm clouds.jpg > tmp1.ppm
ppmtopgm tmp1.ppm >tmp2.pgm
ppmmake white 2048 1024 >tmp3.ppm
pnmtopng -alpha tmp2.pgm tmp3.ppm > clouds2.png


which creates clouds that looks like this:

Image (this is a link to a high resolution image.)

Note the difference: the previous image has translucent grey cllouds while this has translucent white clouds.

(Again, the grid shown has nothing to do with the cloud positions. I let them rotate for a while.)

Posted: 01.01.2003, 23:42
by JackHiggins
I have no way to compile NetPBM (me + programming = :? ) and there are only source packages on their site- so i'll have to go with Photoshop & Rassilon's idea- unless anyone else knows any good image editors that'll do this?!

Ideas...?! :wink:

Thanks all the same though!!

Posted: 02.01.2003, 02:18
by selden
Jack,

NetPBM sources are on SourceForge. Binaries for Windows, Linux, various flavors of Unix, even AmigaDOS and BeOS, are readily availble, although not on SourceForge itself. Or were when I looked a week ago...

Yup. Still are. Scroll down to the bottom of the page http://netpbm.sourceforge.net/

FWIW, I use the Cygwin version.

Posted: 02.01.2003, 07:58
by Don. Edwards
OK I don't believe I am actualy beating Fridger to this but you can use The GIMP. Download GIMP and install it. Now open your cloud texture with Gimp. Right click the image file and select open with. If you have Gimp already installed and you have used it it should apear in the list with the other image programs. If you just installed it then select choose program and navigate to the directory were Gimp was installed and choose Gimp. This will open your cloud texture in Gimp. Several windows will pop up. The only one you need to worry about is the one with a small menu at its top. Now you need to know how big your image is such as 2048x1024. Go to the Gimp menu and select file and then select new. A window will open and you now will have to set the size of the new image. Set it to the same size as the one your working on and also toward the bottom of the window the will be an option for rgb or greyscale. Select greyscale. Now a new window that is all white will pop up. Now go and do this again and make a second new blank greyscale image. Now your should have 2 image windows. Go to the window that has your cloud texture. Right click in the middle and select edit and then copy. Now go to one of the new blank white windows and right click and select edit paste. You should now have 2 windows with your cloud texture. Now go and close the window that the original was in. Now you should only have the 2 new image windows, one with a copy of your clouds and one that is blank white. ok here is were we make the clouds. Go to the blank white window, right click and go down the menu till you come to image then at the top of the next menu that pops out choose mode and then at the next popup menu choose compose. A new window will pop up. Now at the left in this window you will see a row of coices for you image. The one you want is the second one RGBA (RGB with Alpha chanel) click it. Now on the right you will see four long rectangle boxes. They each should have an image of the blank white image. Go to the bottom one its called Alpha and click it. A small popup will fall from the section and you will see 2 images there. One will be white and the other will be your cloud texture. Choose the cloud texture. This will now set your cloud texture image as the alpha channel. Leave all the other white image boxes alone and click ok. This will generate a new image and a new window will now open with your new cloud texture. Rght click in the middle and choose file and save as. It the next popup menu that comes up give your new cloud texture a name in the botton section and click the by extesion button. Scole down to you come to .PNG and click png. Now another popup will come up. In it select save background color and save resolution and click ok. This will save your new cloud texture or now we can call it a cloudmap. Now before closing all the windows consider wether you might want to make a .dds file with this cloudmap. If you might then right click the cloudmap image again and save as before but this time in the dialog choose TGA instead of PNG. You can't use this image in Celestia as a TGA but you can convert it to a .dss with the NVDXT utility. If you don't paln on making any .dds files than you can just close the GIMP and your done. Hope this helps you. I think I went into a little more detail than Fridger did in the past. It sounds like alot of work but after you have done it once you will see it only takes a few minutes and you are all done. Good Luck and if you have any more questions I will check back here or you can PM me.

editor

Posted: 06.01.2003, 06:16
by John Van Vliet

Posted: 06.01.2003, 20:02
by DavidR
Rassilon,

I have tried your method with photoshop 7, and the DDS plugin of nvidia. http://developer.nvidia.com/view.asp?IO ... ion_plugin

He works fine, but I can only save the image with trasparency in PNG.

Do you explain to a neofite, how to save the PSD file in DDS with transparency ?

Posted: 06.01.2003, 20:41
by chris
DavidR wrote:Rassilon,

I have tried your method with photoshop 7, and the DDS plugin of nvidia. http://developer.nvidia.com/view.asp?IO ... ion_plugin

He works fine, but I can only save the image with trasparency in PNG.

Do you explain to a neofite, how to save the PSD file in DDS with transparency ?

There are several different types of DDS files . . . DXT1 textures have no transparency. DXT3 and DXT5 textures do have transparency; try saving as DXT5 and you should see that transparency is preserved.

--Chris

Posted: 06.01.2003, 21:54
by DavidR
Thanks Chris,

He works very fine with DXT3! 8)

Posted: 07.01.2003, 00:30
by DavidR
If any like, :roll:

I have posted my test clouds in http://mypage.bluewin.ch/dro/celestia/earth_clouds.zip ...

Posted: 07.01.2003, 01:28
by selden
It works fine for me! My framerate even stays up at 30fps when using your dds file.

What resolution is your cloud map?

It's usually a good idea to include the resolution with the image. Some people include it as part of the file name (e.g. cloud_map-1k.dds for an image that's 1024x512) and let the user rename the file(s) appropriately. Some people mention it in a text file included in the zip file, especially when lores, medres and hires images are included that have the same name.

Posted: 07.01.2003, 08:52
by Don. Edwards
Well I have a problem with most of the cloudmaps that are on the web. Most of them are taken at the infered wavelegth and we don't see at that wavelength so much of the cloud data is missing. Most of the cloudmaps that get made and created for Celestia and other programs are based on these infared images and they tend to give the wrong impresion of the Earths cloud cover. Even the the best cloud textures available From Fridger or my modified version of it is inacurate. Earths cloud cover is greater than any of these clouds maps show. I was able to do some magic with photoshop to bring some of the less visible clouds into the visual range and thats were my version of Fridger's clouds is diferent plus I did a few twists here and there to give some the low presure areas alittle more realism. I won't be happy until I can find one that is at least 2048x1024 and is of the clouds at a true visual image. Earth's cloud cover at any given time should be close to 60% give a little each way.

Posted: 07.01.2003, 09:42
by DavidR
Selden,

The resolution is 2048 x 1024. I have changed the name of file.

http://mypage.bluewin.ch/dro/celestia/e ... uds_2k.zip ...

Posted: 07.01.2003, 19:07
by selden
David,

Thanks!

Don,

All the publicly available images of clouds in the visual wavelengths that I've found are of relatively small areas and have geopolitical boundaries drawn on them. grumble.