View Full Version : arbitry graident?

12 December 2003, 05:36 AM
How can I make a smooth gradient that follow the contour of my selection? for example I have a shape of a star I want the gradient to fall in a shape of the star in the center.

Is there any other way to achieve this? This has been my all time hardest PS problem...especailly if you have a very irregualr smooth curved selection, cloning severl straight gridents will not work...

Ian Jones
12 December 2003, 07:24 AM
I'm not sure I totally understand your question. You could try using gaussian blur to soften a shape, then use that to define a gradient range.

12 December 2003, 09:28 AM
do it in illustrator.

12 December 2003, 10:43 AM
You must try KPT pluggins...I think you will get it in the KPT 3.0 set:thumbsup:

12 December 2003, 03:51 AM
Originally posted by halo
do it in illustrator.

I don't have illustrator

12 December 2003, 05:53 AM
just say u want ur star to be coloured black for the outer n has brighter colour inside.

duplicate the object, n resize it. ( in smaller size)
then place the object in upper layer position.
then use gausian blur on it a little .

u know have one big star n a small star in it.

now, duplicate ur big star n color it black. then place it under the other big star.

now, u should have your layers positioned like this :
1. small white blurred star.
2. big white star
3. big black star
4. background

the next step is adding masking on the seccond layer ( the big white star layer).
user reveal all masking.

now with magic wand tool, select the area outside of the big white star.
then go to the masking layer ( the layer placed next to the big white star layer). use the paint bucket tool, n paint all off the area outside the white star black ( in the masking layer, so it wont effect any of ur work so far).

the last step, deselect all of ur work. ( u should have it selected in a star shape previously).
now still on ur masking layer, choose Filter > Blur > Gaussian blur.
set to the blur size u prefer, then apply it.

note : the small white star on the top is just to keep ur star shape inside of the big star.

did it solve the issue?

12 December 2003, 02:05 PM
sorry this isnt it, the gradient i'm looking for is a complete smoothed interpolation. your one looks like a blured filtered, it removes the detail of the object.

12 December 2003, 02:31 PM
it should look some thing like this, except this is an approximation, i doubt it looks like a real arbitary gradient, but it should contain the original details, with more smoothed interpolations

12 December 2003, 03:21 PM
Do you have a 3d prog at your disposal?

12 December 2003, 04:29 PM
yeah, but I'm really looking for a ps solution

12 December 2003, 11:30 PM
why can't you just blur the one you have?

anyways, make yer star shape in one layer. create a new layer and using the diamond gradient tool, create a gradient that fades to transparency (I used one called Shiny Sphere under the Special Effects gradients...then replaced the black with transparency...but I was in Grayscale mode). this will give you four branches. so duplicate the layer a few times, rotating 30 degrees (360/12 petals=30) each of the new layers. once you are all done with that, layer mask the original star shape onto each of the duplicates.

once you've done that you may want to play around with blending modes. i used lighten. create 1 new layer at the very top for whatever white shape you want in the middle.

ends up taking about 10-15 minutes.

in my sample below, i didn't make the gradients quite big enough, so make them bigger than your original star shape.

psd 7.0 sample ( - right-click + save as

12 December 2003, 11:37 PM
PS only? :blech:
Here are some of my thoughts.

As already mentioned, KPT3's Gradient Designer can do it. Although, you can't exactly get KPT3 anymore. Although, Gradient Designer might come with the KPT bundle that Corel(?) has for sale.

Or you can try the multi-tiered Gaussian Blur. Toss into an Alpha. Load the selection on itself. Run Gauss at 40, 20, 10, 5, and 2. Deselect and Guass one last time at 1. If 40 is too much or too little, then try a different series, like 60, 30, 15, 8, 4, 2, 1. Not the greatest solution, but it can work.

Or you maybe you can hack something together with Polar Coords. Whenever I see something radial, Polar Coords is one of the first things that I try. Sometimes Polar Coords can help with a lateral plan of attack.

Personally, I say use a 3d prog to help. Build the shape, slap a gradient on it, and render straight on.
A lot less headache than a PS only solution.

12 December 2003, 05:54 AM
Maybe I don't get what your saying. Is it not something that a radial gradient can do? Maybe with a marquee?

Or what about making a custom shape to apply a glow effect to? You know, like making 1 pixel lines in the shape of your star, adding a glow effect and masking the lines out?

Maybe I don't understand the problem but it surely can't be too hard. :surprised

12 December 2003, 06:21 AM
Or what about making a custom shape to apply a glow effect to? You know, like making 1 pixel lines in the shape of your star, adding a glow effect and masking the lines out?
Ah! Layer Style.
Plus you get the bonus of being able to control the contour.
Good answer.

12 December 2003, 06:59 AM
i just thought out one way
fisrt create the biggest object for the outer,
then select it using magic wand tool,
then choose Select>Modify>Contract
set it 2 (its all ups 2 u ^^)
then duplicate your selection to another new layer and place it above the bigger one.
set the brightness of the object too.
now back to the first big object again,
select it using magic wand again, then use the same way,
but set the contract to 4 this time.
place the new duplicated object on the top also.
now u may repeat it again and again ^^
this is the result i got by repeating the duplicating n setting brightness contrast for 5 times
hope it works ^^

12 December 2003, 09:30 AM
Originally posted by Leovenous

Or what about making a custom shape to apply a glow effect to?

Bravo! smooth result with the inner glow, how ever it does look a bit different on the fall off of gradient from the edges, it contracts to a hard edge, anyway that how I tried out. check the diamond image, grident falls off in the shape of a cross/star rather than diamond shape.

but this does have good uses too.
its probably a good idea for ps to load a selection as a gradient shape, rather than the standard linear, diamond, circle etc etc.

12 December 2003, 09:34 AM
Originally posted by yinako
I should take cheap layer styles more seriously...

LOL. While you're at it you could take my free tute. It's an overdose of effects usage.

Anywho, glad it works. :thumbsup:

12 December 2003, 04:33 AM
i guest inner glow will do a little help for the gradient, but i prefer using contract selction as i did in the latest image i attach.


CGTalk Moderation
01 January 2006, 10:00 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.