Any tricks to do textures with transparencies ?

Tips for creating and manipulating planet textures for Celestia.
Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 8 months
Location: Montreal

Any tricks to do textures with transparencies ?

Post #1by Cham » 08.01.2005, 18:53

I need to do a lot of nebulae, clouds, dust textures with transparencies, saved as PNG pictures files. I'm using Photoshop.

What tricks are you using, with what filters, to do natural looking textures with many transparent parts ? I'm interested in textures like this one :

Image

To have a proper PNG file made for Celestia, I need textures like this, WITHOUT the black parts. Only the foreground texture should be in the file, all the rest should be transparent. Any suggestion ? Any experience to share ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 20 years 11 months
Location: Norway

Re: Any tricks to do textures with transparencies ?

Post #2by rthorvald » 09.01.2005, 15:13

Cham wrote:What tricks are you using, with what filters, to do natural looking textures with many transparent parts ?


Well, it depends on your starting point... If you are starting off with an image where you have to remove colored areas, use the magic wand pick up everything you want to remove. This leaves you with very sharp edges. You can soften the edges several ways:

- duplicate the resulting image, and use gaussian blur on the bottom layer, then set the top AND bottom layer to 50% transparency (or another value that works), and merge the two. Then play with the contrast and sharpness filters to bring back detail in the areas that needs it.

- use the bevel/emboss/glow/drop shadow filters to soften the edges

If you are painting the image from scratch, just use a soft brush near the edges, and paint on a transparent layer

- you can also use the Clone Stamp brush to paint in areas. If the brush is set to a degree of transparency, you will get soft edges to up 100% transparency where you need it, while several strokes gives you increasingly less transparent areas. This is probably the easiest method, as it allows you to copy parts of an image onto a transparent surface with very good transparency control.

- rthorvald

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 8 months
Location: Montreal

Post #3by Cham » 09.01.2005, 17:22

Thanks for the tricks. I'll try some of them tonight.

Until now, I always used the same operations : lasso (magic wand), brush and stamp tools (clone), resize and rotate, twirl, blur, color adjustments and contrast. It's really basic and not powerfull enough to make nebulae. I need more advanced knowledge of Photoshop to make more serious stuff, more efficiently.

What operations do you suggest to make the nebula shown in my first post above ? I need it without stars, with all black parts transparent.
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

rthorvald
Posts: 1223
Joined: 20.10.2003
With us: 20 years 11 months
Location: Norway

Post #4by rthorvald » 09.01.2005, 17:49

Cham wrote:What operations do you suggest to make the nebula shown in my first post above ? I need it without stars, with all black parts transparent.

Well, it seems to me it will be easiest to create it from scratch... Extracting useful pixels from that one will be a dirty job.

You might start with a foreground color of black and a background of Orange - fill the canvas with oe color, then use the Difference Clouds filter to get a texture to work with. Then some lightning effects for variation. Invert it, so the black becomes white, and delete all white with the magic wand. Colorize it, using Hue/Saturation and/or the Color Balance dialog, soften all hard edges with the tools mentioned in the post above, and finally merge everything down to Layer 0 with some transparency...

-rthorvald

Harry
Posts: 559
Joined: 05.09.2003
With us: 21 years
Location: Germany

Post #5by Harry » 09.01.2005, 19:53

With gimp (2.2) you can use Filters->Colors->Color to Alpha to remove the black background, just like you need it for a texture.
You can try getting rid of the stars by using the Despeckle-filter ("Filters->Enhance->Despeckle"), but this isn't perfect (you'll lose some detail). This is the result (looks very ugly on bright background):
Image
I assume Photoshop can do the same, but don't ask me how.

Guest

Post #6by Guest » 09.01.2005, 22:42

Select similar helps a lot for discontinous areas

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 8 months
Location: Montreal

Post #7by Cham » 10.01.2005, 00:18

Thanks for the help. The central trick here, which is new to me, is to use the layers, and make as many layers as we need. Layers are the key !
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

DaveMc
Posts: 79
Joined: 09.08.2003
With us: 21 years 1 month
Location: Woodinville, WA, USA

Post #8by DaveMc » 12.01.2005, 00:45

Cham,

Here's what I do in Photoshop:

1. Open image in photoshop

2. Set colors as foreground=white, background=black

3. click on background eraser & have the settings like this:
-brush size: 100
-limits: discontigous
-tolerance: Between 50% and 70% is usually the best
-protect foreground: OFF
-sampling: background swatch

4. Background erase the whole image, and save as a .PNG file

I actually got this method from somewhere on the forum so I can't take credit for it and I don't remember who originally posted it. It has worked well for me.

Selden also wrote a great method for removing unwanted stars using an alpha channel mask, I think it's posted somewhere on his website.

Dave

Avatar
Topic author
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 8 months
Location: Montreal

Post #9by Cham » 12.01.2005, 03:28

HOLLY COW !

DaveMc, thanks a lot ! That was exactly what I needed !

Thanks again ! :)
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Guest

Post #10by Guest » 14.01.2005, 15:24

Hi, there,
I am user Boux but have lost the password.
OK,
You can do this very easily with The Gimp.
1-Open your picture :lol:
2-Choose the eraser tool and set its opacity to default 100
3-Set the eraser's brush to Circle Fuzzy 19 (or smaller but this one covers most cases)
4-Follow-erase the contours of the nebula, erase some dark spots within the nebula if you wish by clicking the tool on the spots
5-When done, set the eraser's opacity to 50 to 70% according to the level of transparency you are aiming at
6-Erase the whole picture in one pass
8-Save as *.png
9-Enjoy 8)

Here is below a (very) quick and dirty job I have done to illustrate the result. I have put your pic on the Pelican Nebula bilboard.

http://jmmi.club.fr/celestia/Transparency_test.jpg

Guest

Post #11by Guest » 14.01.2005, 15:30

Ooops, it's me again, forgot a point.
When the picture has been loaded, add an alpha channel to it before going to step 2

PTT

Post #12by PTT » 15.01.2005, 17:37

About the same way as Harry, but despeckle in multiple passes and only on a selection.
in the gimp:
1. filters->colors->decompose, hsv
2. copy saturation layer to original image
3. if necesary do a contrast enhance on the saturation layer (2x2 contrast enhance)
4. select by color on a very black spot (star) with toleration of about 160
5. grow selection by 2 or 3 (maybe feather selection)
6. despeckle with radius 3, black -1, white about 248
7. shrink selection of 4 by 1, then grow by 4/5 (i also did a feather by 2)
8. despeckle with radius 7, black -1, white about 248
9. color to alpha with black

Image
http://vulcanus.its.tudelft.nl/~rentor/space/bh_erupt_still2.png for a png version with transparency (ugly on a light background).

succes, Piers

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 6 months
Location: Thyrrenian sea

Post #13by Fenerit » 24.05.2007, 03:11

These metods do not works when the textures so builded are applied on a 3d model having a transparency level in it; both as simple level of transparency color or as plain model color with a glass shader.

Avatar
Fenerit M
Posts: 1880
Joined: 26.03.2007
Age: 17
With us: 17 years 6 months
Location: Thyrrenian sea

Post #14by Fenerit » 25.05.2007, 14:40

Hi, men; I'm in error: now it works! A very hidden setting in my 3d modeller obstructed to me of making what I wanted. Now I can obtain a transparent level in a model without alpha channel or a semi-transparent layer in the relevant texture; being this latter just solid. Nevertheless, someone could have to tell me: "Hey boy: you are a very hard brain, not Celestia!". :P


Return to “Textures”