Page 1 of 1

Any tricks to do textures with transparencies ?

Posted: 08.01.2005, 18:53
by Cham
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 ?

Re: Any tricks to do textures with transparencies ?

Posted: 09.01.2005, 15:13
by rthorvald
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

Posted: 09.01.2005, 17:22
by Cham
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.

Posted: 09.01.2005, 17:49
by rthorvald
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

Posted: 09.01.2005, 19:53
by Harry
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.

Posted: 09.01.2005, 22:42
by Guest
Select similar helps a lot for discontinous areas

Posted: 10.01.2005, 00:18
by Cham
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 !

Posted: 12.01.2005, 00:45
by DaveMc
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

Posted: 12.01.2005, 03:28
by Cham
HOLLY COW !

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

Thanks again ! :)

Posted: 14.01.2005, 15:24
by Guest
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

Posted: 14.01.2005, 15:30
by Guest
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

Posted: 15.01.2005, 17:37
by PTT
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

Posted: 24.05.2007, 03:11
by Fenerit
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.

Posted: 25.05.2007, 14:40
by Fenerit
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