I have a shape i created with the bezier tool. Its kinda like an engine turbine, its all i can think of. Ive attached it.
The thing is the linear gradient doesn't. do it justice. I want the gradient to curve along the outer edge of the engine, like shown by a black arrow i drew alongside.
How do I achieve this effect?
Curved Gradients
-
- Posts: 14
- Joined: Wed Jan 11, 2012 7:35 am
Curved Gradients
- Attachments
-
- Screen Shot 2012-01-12 at 10.37.14 AM.png (13.15 KiB) Viewed 14708 times
Re: Curved Gradients
Well, sorry to say this, but it can't be done.
The reason is that the SVG standard (the one Inkscape follows) doesn't support such a thing. There are plans to add these capabilities to SVG, but don't expect them to be available in the near future.
For simple thing, I've used shapes, blur and clipping. You draw your shape, and then another one with the "gradient", blur it ... something like this:

So, you draw the two shapes, duplicate the bottom one for clipping purposes, then add some (50%) blur and clip it with the duplicate... Ugly as hell, I know.
Another method could be this one: http://simarilius.wordpress.com/2006/10/21/faking-irregular-gradients-in-inkscape/.
Let's wait until a more knowledgeable fella comes with better ideas.

For simple thing, I've used shapes, blur and clipping. You draw your shape, and then another one with the "gradient", blur it ... something like this:

So, you draw the two shapes, duplicate the bottom one for clipping purposes, then add some (50%) blur and clip it with the duplicate... Ugly as hell, I know.
Another method could be this one: http://simarilius.wordpress.com/2006/10/21/faking-irregular-gradients-in-inkscape/.
Let's wait until a more knowledgeable fella comes with better ideas.

Re: Curved Gradients
Hi.
I have one method that works for me:
I have one method that works for me:
- Draw a filled shape with a solid background color.
- Draw an ellipse. Place and resize the elipse so that it's edge touches the outer limit of where you want your "gradient" to be.
- Make the ellipse's edge transparent and set fill to radial gradient.
- Insert a couple of gradient nodes (one may be enough).
- Make the innermost and the outermost gradient handle transparent. Now it will look like a blurry circle.
- Make any neccesary adjustments so it looks right.
- Select the object below and duplicate it. The duplicated version wil now be the uppermost object.
- Select this duplicated object AND the blurry ellipse.
- Click Object --> Clip --> Set
- Done.
- Attachments
-
- BendGradient2.svg
- (3.85 KiB) Downloaded 384 times
-
- bitmap.png (36.97 KiB) Viewed 14695 times

Re: Curved Gradients
Thank you for the tutorials here. I think curved gradients are very requested for advanced drawing. I have the problem that shaping a curved gradient with linear pieces, the PDF output was oddly different - see screens:

Can anybody tell something about that PDF export behaviour (possible bugs: 168610, 511791) and how you suppress or optimize it?
I will now try the methods and it looks like "faking-irregular-gradients-in-inkscape" is the most interesting for "tubes" that should outputted also to PDF format (without rasterization).

EDIT: much better solution now (32 interpolation steps)



Can anybody tell something about that PDF export behaviour (possible bugs: 168610, 511791) and how you suppress or optimize it?
I will now try the methods and it looks like "faking-irregular-gradients-in-inkscape" is the most interesting for "tubes" that should outputted also to PDF format (without rasterization).

EDIT: much better solution now (32 interpolation steps)

- flamingolady
- Posts: 687
- Joined: Wed Jun 10, 2009 1:40 pm
Re: Curved Gradients
Grobe - wow, great idea to use the eclipse! you're a genious! I learn something new here everyday (just luv this forum).
dee
dee
Re: Curved Gradients
I always forget about that interpolation trick, and it's really a great way to achieve this effect. Glad you figured it out.
Re: Curved Gradients
I used a curved line, stroke with colour and increase blur. It works great.
Re: Curved Gradients
1. Draw (pink) rectangle.
2. Draw (red) shape on top of (pink) rectangle. This will be the shape of the gradient. (Tip: use nodes).
3. Blur (red) shape.
4. Draw desired shape (blue) on top of first two shapes, leaving their edges sticking out to be cut away in the next step.
5. Select everything and choose Object>Clip>Set. You might have to delete topmost (blue) shape.
Voila! You are left with the shape from the top and the colouring from underneath.
2. Draw (red) shape on top of (pink) rectangle. This will be the shape of the gradient. (Tip: use nodes).
3. Blur (red) shape.
4. Draw desired shape (blue) on top of first two shapes, leaving their edges sticking out to be cut away in the next step.
5. Select everything and choose Object>Clip>Set. You might have to delete topmost (blue) shape.
Voila! You are left with the shape from the top and the colouring from underneath.
Re: Curved Gradients
Level 10 thread necromancy at the very least! But since you've gone to this much trouble, check out the WIP gradient mesh tool which is more scaleable than using masked/clipped blur.
Your mind is what you think it is.
Re: Curved Gradients
druban wrote:Level 10 thread necromancy at the very least! But since you've gone to this much trouble, check out the WIP gradient mesh tool which is more scaleable than using masked/clipped blur.
Just be aware that it uses features from an in-progress version of the SVG spec. We've been here before - Inkscape's flowed text implementation is based on an earlier spec that never got ratified, leaving the rest of us forever trying to explain to people why they shouldn't use it for files they want to use outside of Inkscape. Gradient mesh is in a similar situation at the moment, and there's no guarantee that files saved in one version of Inkscape will open in a later one if you use it, as the spec is still in a state of flux.
I don't want to put you off using it, but I think it should be an informed decision, given the history of SVG specs.
Re: Curved Gradients
May worth mentioning as an alternative that linear gradients and displacement map filter primitive can also be used for some effects.
-
- Posts: 138
- Joined: Mon Apr 07, 2008 6:01 am
Re: Curved Gradients
^^ I don't know what that is but it's gorgeous!
I also came here looking for a way to make a curved gradient line.
I also came here looking for a way to make a curved gradient line.
Win 7/10, Inkscape 0.92.2
We don't inherit the Earth from our parents; we borrow it from our children.
We don't inherit the Earth from our parents; we borrow it from our children.
Re: Curved Gradients
Thank you!
If on 0.92, give gradient meshes a try.
For example check this svg
Mesh tool is available by Alt+M.
If on 0.92, give gradient meshes a try.
For example check this svg
Mesh tool is available by Alt+M.