Page 1 of 1

How do I create some transparency in a jpg texture?

Posted: 10.05.2007, 01:34
by fsgregs
Hi all. There are times when I want to create a semi-transparent texture for use in Celestia ... allowing some background image to partially come through. For example, I am trying to create an overlay texture of a Red Dwarf that I can place on a sphere surrounding an existing star. Unfortunately, SSC controlled textures can be dull, even with "emissive true" turned on. It would be great if the texture was semi-transparent, so some of the brightness of the default star shines through the overlay.

Is there a free graphics program that will allow me to create a semi-transparent png texture from a jpg texture? The simpler the better!

Any help would be appreciated.

Thanks

Frank

Posted: 10.05.2007, 02:21
by Cham
fsgregs,

jpeg files don't include any alpha chanel. You will need to add some transparency effect (or remove some parts of the picture ?) from within you graphics app (Photoshop and the like), then export the result as a PNG file.

Posted: 10.05.2007, 03:37
by rthorvald
Cham wrote:You will need to add some transparency effect (or remove some parts of the picture ?) from within you graphics app (Photoshop and the like), then export the result as a PNG file.


Either that, or make the sphere in a 3d app (like anim8or), import the jpg there and make it to a transparent material you can apply to the sphere, then export it to a cmod. This allows you to map the inside of the sphere too, which isn??t possible otherwise. (Might be useful if you can see the inside from some outside angles). Of course, the best result would be to do that with a png, but jpgs will work in a limited fashion...

- rthorvald

Posted: 10.05.2007, 04:39
by Don. Edwards
Frank,

I don't know if you saw my test image I posted on "Gliese 581 c Texture" thread, but I have given it try and it does work. Here is what a semi transparent texture looks like over the top of a G class star.

Image

But you do have to use a PNG file. A really good program that is free and works allot like photoshop but is easy to use is Paint.Net. It needs to have .Net 2 or 3 installed on your system for it work, but for a free program photo/textrue editor its fantastic. Contact me via PM if you need any help. I can tell you how I did in the screen shot.

Don. Edwards

Posted: 11.05.2007, 19:22
by Don. Edwards
Frank,

This is an update I have made for the Gliese 581 add-on, well for my own use. It would be nice if this could be done to more of the Red Dwarfs.

Image

What do you think, I believe its much more realistic as what we think it would look like.

Don. Edwards

Posted: 14.05.2007, 00:43
by fsgregs
Don:

I love your newest Red Dwarf texture. Would you be willing to make it available for us all to use?. It is brighter than the one I posted.

I wonder, however, if a Red Dwarf would have such huge flares and prominences. It is small and its nuclear fusion fires are quite modest. While a Red Dwarf does spin quickly (I think), its magnetic fields may or may not be as powerful as a larger star. I don't know personally.

Anyway ... I have Paint.net and it runs fine, but when I tried to explore how to convert a jpg texture into a png texture with a semi-transparency alpha channel, I got completely lost. Could you PM me with the steps needed to add a 50% transparency to a jpg image using paint.net? Just walk me through the steps (1. Load jpg texture into paint.net ... 2. Click on ... etc.)

Thanks

Frank

Posted: 14.05.2007, 10:23
by Don. Edwards
Hey Frank,

I might share the texture if there was more interest. The flares look so big because I simply didn't scale them down. I will probably do that for average Red Dwarfs but this might work for Red Dwarves that are considered flare stars like Proxima Centuri.

As for a quick tutorial sure why not. Open Paint.Net drop in your texture or on the menu choose "File" and open and navigate to your texture. Paint.Net will ask if you want to open the new file or to merge with the present blank one, choose open. Now you need to save your file as a .PNG first. So do that. Close the .bmp or .jpg version you have open and open the .png version of the file. Now go to the menu and choose "Layers" and in the drop down menu choose "Layer Properties". A small window will open and toward the bottom you will see Opacity and a slider. All you have to do is slid the slider to the left, lower the opacity of the texture, this gives it transparency. Set the transparency to the level you want and then save the texture. That?€™s it, you just made a semi transparent texture ready to use as you see fit. If you have any problems you can PM or we could chat possibly in MSN messenger for a more accurate walk through of this or to discuss the use of the Red Dwarf texture. You are still in my list on MSN. Hope this helped.

Don. Edwards

Posted: 15.05.2007, 02:06
by fsgregs
Don, thanks for the tip. I was able to successfully add 60% transparency to the red dwarf texture, and I edited my ssc file to use it instead of the jpg file.

When I view it in Paint.net, it is clearly transparent.

Strangely, when I load Gliese 581 in Celestia, the texture shows no transparency at all. It is 100% opaque.

Is there something I am missing here? I have placed a spherical planet around Gliese 581. That is what the texture is for. Will a planet texture wrapped around a sphere that encases a star show transparency and allow the underlying star shine through? Maybe Celestia just doesn't do such a thing!!

Frank :?

Posted: 15.05.2007, 02:30
by Don. Edwards
Hey Frank,

Ok, try adding the lines of code for having clouds, and then give the main sphere a no texture and then move your semitransparent texture to the clouds. This should work just fine. See how this looks. I did allot of playing and have come up with some very interesting texture combos. I will post some screen shots so you can see what I mean.

Don. Edwards