RetouchPRO

Welcome to RetouchPRO, the web community for retouchers.

You are currently viewing as an unregistered guest which gives you limited access. Registration is fast, simple and absolutely free so please, join RetouchPRO today!

If you have any problems with the registration process or your account login, please contact us. If you've forgotten your password, click here.

Go Back   RetouchPRO > Tools > Software > Photoshop Help
Register Blogs FAQ Search Today's Posts Mark Forums Read

Photoshop Help Tips, questions, and solutions for Adobe Photoshop users
One tip or question per thread, please

Reply
 
LinkBack Thread Tools
  #1  
Old 10-21-2005, 03:47 PM
goose443's Avatar
Senior Member
 
Join Date: Aug 2004
Location: Los Angeles, CA
Posts: 225
Gradient Transform

Alright, here's a questions that has been bugging me for a while.

Suppose you want to stretch or squish an image. You could simply used the free transform tool and size the image however you would like.

Now suppose you want to stretch the same image but you want to do it in such a way that the left side of the image is anchored and the right side is moveable and the stretch occurs in a "gradient" from right to left such that the right side has the most stretch and decreases stretch as you travel from right to left so that the left side has no stretch at all.

I have made a very simple jpg to illustrate the point. The upper lines represent the original picture and the lower lines represent the stretched picture (of course the lines would also increase in thickness from left to right). Now in this instance I could have selected each line and transformed it but what I'm looking for is the ability to do this smoothly across the whole image.

This would have many very useful applications including simulating an image wrapping around a cylinder.

Maybe there's an easy answer but I haven't been able to find it.
Attached Images
File Type: jpg Transform.jpg (4.7 KB, 32 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #2  
Old 10-21-2005, 11:07 PM
Kraellin's Avatar
Moderator
 
Join Date: Apr 2005
Location: somewhere over there
Posts: 6,241
Blog Entries: 4
i can think of two possibilities here. one, use the liquify tool (if you're using Photoshop) or the warp mesh (if you're using Paint Shop Pro). and two, make a custom displacement map and use the displacement map tool (Photoshop and Paint Shop Pro).

Craig
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #3  
Old 10-22-2005, 06:10 AM
Senior Member
 
Join Date: Jul 2004
Location: Brooklyn
Posts: 310
Quote:
Originally Posted by Kraellin
i can think of two possibilities here. one, use the liquify tool (if you're using Photoshop) or the warp mesh (if you're using Paint Shop Pro). and two, make a custom displacement map and use the displacement map tool (Photoshop and Paint Shop Pro).

Craig
As you noted, Goose, stretching with transform is linear and the effect is spread evenly throughout the selection.

Regarding liquify: I use it a lot when I'm trying to deform text over a surface that recedes or curves away from the viewing plane, i.e. a logo on a football or basketball Use a large brush, large enough to cover the areas being deformed, a high Brush Density setting and a low Brush Pressure. The high density will minimize the natural tendency of the brush effect to be stronger in the middle, with the edges dragging along behind. Low pressure allows you to start with a small stroke at the edge and repeat, each time extending the sweep of the brush.

Another possibility: if you're actually trying for a perspective effect, and have CS2, pasting your gradient into a grid using the perspective tool would accomplish the task effortlessly. If you don't want the vanishing point, you still might be able to stretch the sides back out, depending on the type of image.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #4  
Old 10-23-2005, 07:01 PM
goose443's Avatar
Senior Member
 
Join Date: Aug 2004
Location: Los Angeles, CA
Posts: 225
Thanks for the tips. That's about as close as I've come myself. I was just hoping there was some more precise way of doing this type of transform. I think it would be useful for quite a few situations.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #5  
Old 10-24-2005, 02:39 AM
Panpan's Avatar
Senior Member
 
Join Date: Jun 2005
Location: Gatineau, QC Canada
Posts: 315
I tried with the displace filter. This meant a lot of tries because there is no visual feedback with this filter. I can now say that other ways like spherize, transform or liquify would be easier.

Basically I used the foreground-to-background gradient from 50% grey to black as the displacement map. I filled the rest of the map with 50% grey (for no displacement). This gives a full tube effect rather than the half tube you requested, but I figure that's even better if you want to wrap around a cylinder anyway.

I applied the map with displacement 350 horizontal and 0 vertical. That's where working blind was a pain. I had to try many values until I found 350. Note that this would change if the image size changed.

In the attachment, I show the displace map I built below. The result is on top.

The glass filter is similar to displace and gives visual feedback, but it does not seem to segregate horizontal and vertical displacements to separate channels (red and green) like displace; it seems to work only with the red channel to displace both directions at once.

So in the end, I would recommend something else if you want a non-linear transform.

Pierre
Attached Images
File Type: jpg Transform-panpan1.jpg (19.5 KB, 15 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #6  
Old 10-24-2005, 05:01 AM
Panpan's Avatar
Senior Member
 
Join Date: Jun 2005
Location: Gatineau, QC Canada
Posts: 315
To get a half-tube effect with a displacement map, using a foreground-to-background gradient of 50% grey to 25% grey doesn't work. It only gets you a full-tube effect half the size of the 50% to 0% gradient.

What you have to do is stretch the 50% to 0% gradient to twice the size of the selection. I've attached an example.

I had to fiddle with the horizontal displacement number again. I thought that since 350 worked for the full tube, 700 would work for the half-tube. The number I had to use was 585 .

Pierre
Attached Images
File Type: jpg Transform-panpan2.jpg (20.3 KB, 13 views)

Last edited by Panpan : 10-24-2005 at 05:06 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #7  
Old 10-24-2005, 03:24 PM
goose443's Avatar
Senior Member
 
Join Date: Aug 2004
Location: Los Angeles, CA
Posts: 225
Thanks for the attempts Pierre. You got a lot farther than I did. I was wondering why there were multiple lines in your results and how that would translate to an actual photograph. In any event it's an innovative and impressive solution.

It's disappointing that Photoshop wouldn't come with a more straightforward filter for this sort of application. It seems like the type of situation people would fall into pretty frequently.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #8  
Old 10-24-2005, 07:42 PM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 309
Math 2
Curve It Squish
Cannify with Displace
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #9  
Old 10-25-2005, 11:48 AM
goose443's Avatar
Senior Member
 
Join Date: Aug 2004
Location: Los Angeles, CA
Posts: 225
Stroker, looks like it's all in the displacement maps! Thanks for the links. I'll have to check them out at length when I have more time.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #10  
Old 10-26-2005, 08:19 PM
Cameraken's Avatar
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,112
Hi Goose.

Stroker writes some great stuff but he really Jumps in at the deep end. I tried reading his links but it just went way over my head.
This link is far more novice friendly and gives enough information to get this job done.
http://www.thegoldenmean.com/technique/displace1.html

I really want to learn about this filter as it is going to be useful with my next little project (Brush Strokes)

Here is a little summary of what I think I have learned so far. From Goldenmean, Worth and Stroker. I hope someone will correct me if I’m wrong.

A D-Map is a PSD file which will manipulate the pixels in another file.
Black moves pixels to the right and/or down. White moved pixels left and/or up
Mid gray in the D-Map produces no movement.
Channel one (Red) produces horizontal movement
Channel Two (Green) produces Vertical movement
The blue channel has no effect.

Goose wants to make a gradient going from no shift at the left to maximum shift at the right. Therefore you will need to construct a D-Map going from mid grey to black

You will only need channel one (Red) as you do not need to change the height.

I tried using your example but it was confusing because there is no reference. So I used a ruler (Courtesy of Stock Exchange)

If you want to play along please download 296245_8226.jpg (Attached)

Step 1.
Open 296245_8226.jpg. Click the channels. Fill the Blue and Green channels with 50% grey as they are not needed.
Fill the red channel with the gradient. Grey at the left and black at the right.
This should give you an image like in my attachment. (converted to jpg)
Save this as 296245_8226DM.PSD. (must be a PSD)

We now have our D-Map.

What we need to do now is enlarge our canvas to make room for the enlarged image so that it won’t get clipped.

Step2.
Open 296245_8226.jpg
Copy it to a new layer. Now go back to the bottom (background layer) and enlarge the canvas size.
Set the background colour to mid grey
Image > Canvas Size
Make the new canvas size 11 Inches Wide which will give plenty of room.
Anchor the picture at the left as we are expanding to the right.
You should have something similar to my attachment.

We are now ready to apply the D-Map.

Step 3
Select (click) the top layer

Filter > Distort > Displace.
This brings up a box and the settings are important.

Horizontal Scale (this will control the effect we want) Set it to 300
Vertical Scale. Set to 0
Stretch to Fit Checked
Repeat Edge Pixels Checked

Click OK and navigate to 296245_8226DM.PSD

And there you Go!
You should now have something similar to my last attachment
A Gradually stretched Image.

I hope this helps. I have certainly learnt a lot from this.
Any questions. Just ask and I’ll learn some more

Stroker where is that rock? This is really simple stuff to you but to a novice (me) it’s heavy going to start with.

Ken
Attached Images
File Type: jpg 296245_8226.jpg (16.7 KB, 12 views)
File Type: jpg 296245_8226DM_psd.jpg (14.5 KB, 6 views)
File Type: jpg 296245_8226_11Canvas.jpg (50.6 KB, 14 views)

Last edited by Cameraken : 10-26-2005 at 08:29 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #11  
Old 10-26-2005, 08:23 PM
Cameraken's Avatar
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,112
Last Picture

Ken
Attached Images
File Type: jpg 296245_8226_Done.jpg (99.6 KB, 12 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #12  
Old 10-27-2005, 03:27 AM
Stroker's Avatar
Senior Member
 
Join Date: Jan 2005
Posts: 309
The rock is hiding under the bed.

If you want to get serious about understanding Displace, start at the very beginning of Technical Slop and go through it slowly. Displace takes several things into consideration and can be a mess to untangle and understand at first. When I had my first epiphany, it took me 2 days to understand it. Then it took me 2 years to write about it.

Start at the beginning and take it slow.

One of the best ways is to read Power Distort. One chunk at a time and do the exercise. Do not move on to the next chunk and exercise until you understand.

Two quick notes:
1. A D-Map does indeed have to be a PSD and the composite thumbnail preview option has to be turned on when saved. The composite preview is what Displace reads.
2. The Interpolation setting in Options will have an affect. The chosen interpolation method is what is used to sample the D-Map when Stretch to Fit is turned on.

If I get in the mood, I might come out of retirement for a bit and post some stuff specific to this thread.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #13  
Old 10-27-2005, 01:55 PM
Cameraken's Avatar
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,112
Thanks Stroker

Yes that’s what I thought. Power Distort1 Here I come.

I’ve got some great ideas for brush strokes that will need this lot.
I don’t know if it’s possible yet. So I need to know what can be done.

After that I’ve booked 10 Days on Byros Beach with Biker Chic (That’s 1.43 Weeks Byro)


Ken
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #14  
Old 10-27-2005, 04:08 PM
goose443's Avatar
Senior Member
 
Join Date: Aug 2004
Location: Los Angeles, CA
Posts: 225
Thanks Ken,

This makes things a whole lot clearer. I noticed in the final pics though that there is quite a bit of distortion (other than the desired one). Is there a way to reduce this?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
  #15  
Old 10-27-2005, 06:29 PM
Cameraken's Avatar
Senior Member
 
Join Date: Feb 2005
Location: Lancashire (UK)
Posts: 1,112
Goose.

I'm Glad this made things a bit clearer. (It certainly did for me)

Yes you are right. I did not expect to have to distort by 300% to get this. And there are some diagonal lines in my results which should not be there.
I am going to spend some time here
http://tech-slop.serveit.org/powerdistort/index.shtml

If I find some answers then I’ll be back.


In the meantime there is an easier answer to your initial question if you just need to get the job done.


1) Open Transform.jpg
2) Filter > Distort > Spherize - Amount 100% - Mode > Horizontal Only > OK

You will need to fiddle with the position of the bit you need to transform


That’s it.
This will give you what you wanted.

Hope this Helps.


Ken

Last edited by Cameraken : 10-27-2005 at 06:52 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Float This Post!Stumble this Post!Google Bookmark this Post!Yahoo Bookmark this Post!Live Bookmark this Post!Share this post on Facebook
Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gradient Map Corrections snapshot Hidden Power Support 2 09-22-2007 06:29 PM
Gradient tool generates stripes stefan kanya Input/Output/Workflow 4 08-05-2006 01:24 AM
Replacing the Sky -- Using a Radial Gradient gmitchel Photo Restoration 0 10-16-2004 08:38 PM
Smoothing Large Blotches kthurner Image Help 15 01-14-2003 12:02 PM
Gradient Layer Mask Doug Nelson Photo Compositing 0 05-20-2002 12:28 AM


All times are GMT -6. The time now is 06:00 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 Doug Nelson. All Rights Reserved moo




1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50