Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My very first FAQ :)

Status
Not open for further replies.

blueark

Technical User
Apr 16, 2002
1,212
IE
After all these months, I've finally written a FAQ! faq229-2880

It basically explains how to create an action that generates scanlines automatically. There's been a few questions about this recently, so hopefully some of you will find it useful. Let me know what you think, or if anyone finds any errors/improvements feel free to post!
 
Well done blueark,

Here is my contribution:

Variation 1:
Open your image and get the image's width dimension IMAGE|IMAGE SIZE and then open a new document with the same width as your other image and make the height 2.
1-A: If you want your image to be a solid color with a gradation:
Select the solid color you want and black on the toolbar. Then select the gradient tool and draw a linear horizontal gradient. Then use the pencil tool (width: 1pixel) and draw a single pixel horizontal line at either the top or the bottom of the 2 pixel width image. Merge all the layers together (Ctrl+Shift+E) and goto EDIT|DEFINE PATTERN and then open a new image with the same width and select EDIT|FILL (choose pattern, and choose the actual pattern), then put any extra info you want.
1-B: A gradient line from solid color to black with a transparent line:
Basically follow the same method as 1-A: except instead of using the pencil to draw a line use the marquee tool to select only a 1 pixel horizontal line on either the top or the bottom of the 2 pixel height image and delete that part of the gradient. Select All EDIT|DEFINE PATTERN and then on your existing image EDIT|FILL (choose pattern, and choose the actual pattern) and continue with anything else you may want.

Variation 2:
Make a new document width= 1 pixel and height= 2 pixels then use the pencil to make a dot on either the top or the bottom of the 2 pixel height image and then select all EDIT|DEFINE PATTERN and then on the image you wish to add the scanline to make a new layer and goto EDIT|FILL and choose pattern and the actual pattern and then add a layer mask to the scanline layer (See what I wrote in FAQ229-1962 for instructions on how to make a layer mask)

Variation 3:
Windows users download:
Mac OS - 9 download:
Mac OS - X download:

Then install those free filters into you plugins folder and then use the TRANSLINE filter found in FILTER|FLAMING PEAR|TRANSLINE. This filter doesn't actually add a line but rather it deletes a line from your image, then you simply put a new layer underneath it of your desired choice.

All these variations that I have mentioned can also be changed by changing the height dimensions of the scanlines or by making them vertical.

Hope this helps blueark!
greenjumpy.gif
NATE
 
Thanks for that! I haven't got Photoshop in front of me right now so I'll try them out later.

With Variation 1, my only concern is how they would work as part of an action, which is my main aim. Is it possible to automatically determine the dimensions of an image without manually looking it up, or more to the point, is it possible to create a gradient that will always match the dimensions of an image? I don't know of any way off the top of my head, so maybe that could be something that you do after running the action. In other words, for variation 1-A, run the action then create a gradient under it. For variation 1-B, run the action, choose 'Preserve Transparency', and draw your gradient on the same layer.

Variation 2 got me thinking about layer masks, which I think would be a good improvement. Some of the steps were really only concerned with preventing the whole scanline layer becoming opaque. I think I'll change that to filling the whole layer with a foreground color, adding a layer mask and filling that with the pattern instead. In fact, another variation is adding the layer mask to an existing layer, thus having the same effect as Variation 3.

Like I said, I'll test these out later, but I should have an updated version in the next day or so. Thanks for your input - I'll be sure to give you a mention!
 
Hi,

I don't think I quite explained variation 3 enough or well enough. It removes a whole horizontal line every other line going vertically, then you add a colored layer behind. It's similar to adding colored lines over top because the end look is indentical, this way removes the lines from the image and makes changing the "line" to another color very easily. That's what I like the best about it I don't have to mess around with HUE/SATURATION or making a new pattern to change the color of the lines.

Thanks for the mention.
greenjumpy.gif
NATE
 
I think you explained it perfectly well... I think my explanation was lacking though (wouldn't suprise me, I'm really working too hard these days!)

What I was getting at was this: If you have an image on a layer, and you created a layer mask that contained a scanline effect, the result would appear to be every other horizontal line being transparent. Like you said, it's easy to add a solid color layer beneath this and change it's color at will. In fact, even if the scanline was over the image, by selecting 'Preserve Transparency' for that layer it's just as easy to change the color without having to mess with new patterns.

Anyway, here's my progress so far. There were one or two hitches with the layer mask approach (this mightn't apply to all versions of PS, but I'm trying to get it to work in v5.0 for now). I got it working in the end, again thanks to another one of your points. Basically it involved filling the new layer with a solid color, creating a new temporary file where the pattern was defined, and then going back to create the mask and fill it with the pattern. It's just a matter of being careful about the order in which things are done, so I'll have another think about it and update the FAQ. Thanks again for your suggestions!
 
Hi,

There's nothing wrong with creating a temp file to make a pattern, then define it, and close without saving.

You could also juse have the action make a new layer create your pattern on that layer and then use the marquee to select only the pattern part and define that then delete the layer.

Either or...doesn't matter both will work, might be less confusing to a novice user if you don't have the action open a new document and start doing something but rather keep it in the same document.
greenjumpy.gif
NATE
 
Yeah, I've tried both, but I'm was a little concerned about using too many layers, especially with large files with lots of existing layers. Once the action is set up, one method isn't any more difficult than the next - just click once and away it goes. For large files, though, there is a real performance benefit in defining the pattern in a seperate file.

I also tried defining the pattern in the same layer as the scanline, but this causes problems with being able to use the foreground color. It's not an impossible problem, but it is messy so I think I'll avoid it!
 
hey hey, didn't know if there was any other way to reply to you from my threads. Thanks for the convolutio masks. It works a treat, I was getting no where ;-) Jess
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top