New gradient mesh tool usage
-
- Posts: 59
- Joined: Tue Aug 02, 2011 6:50 am
New gradient mesh tool usage
Hello,
Is it possible to create a gradient mesh from an irregular shape with respect to the shape's boundaries?
For example, I start from this stroke:
I convert it to path:
I wish to get a mesh like this:
I have drawn a white dotted line for mesh'es middle column "separator" and, ideally, row "separators" should connect the other path nodes.
Would this be possible in the future?
For example, in Illustrator is very frustrating the control of the mesh rows and columns positioning when the mesh is created and further work if more or less are needed. Could Inkscape beat it in this regard?
Is it possible to create a gradient mesh from an irregular shape with respect to the shape's boundaries?
For example, I start from this stroke:
I convert it to path:
I wish to get a mesh like this:
I have drawn a white dotted line for mesh'es middle column "separator" and, ideally, row "separators" should connect the other path nodes.
Would this be possible in the future?
For example, in Illustrator is very frustrating the control of the mesh rows and columns positioning when the mesh is created and further work if more or less are needed. Could Inkscape beat it in this regard?
Re: New gradient mesh tool usage
Hi.
Made a similar feature request before -click the "this bug affects you" button, maybe it can get more attention.
As far as the second commend goes it looks off from the current working structure and probably there would be other difficulties as well.
For example when you bend a pattern, new nodes are added to fit the geometry but with gradient meshes that wouldn't be an option?
Here is a trick described to "emulate" a bent gradient.
My guess would be multistroke attributes -strokes stacked with different widths atop eachother- will be implemented before bending gradient meshes but who knows. That could also simulate a bent gradient effect.
Interpolation and interpolate within a group is available at the present, as well as gradient mapping filters so sort of the look can already be achieved.
Made a similar feature request before -click the "this bug affects you" button, maybe it can get more attention.
As far as the second commend goes it looks off from the current working structure and probably there would be other difficulties as well.
For example when you bend a pattern, new nodes are added to fit the geometry but with gradient meshes that wouldn't be an option?
Here is a trick described to "emulate" a bent gradient.
My guess would be multistroke attributes -strokes stacked with different widths atop eachother- will be implemented before bending gradient meshes but who knows. That could also simulate a bent gradient effect.
Interpolation and interpolate within a group is available at the present, as well as gradient mapping filters so sort of the look can already be achieved.
-
- Posts: 59
- Joined: Tue Aug 02, 2011 6:50 am
Re: New gradient mesh tool usage
Bending is a solution, but not the only one.
I took a segment and created a mesh over and worked on it to bend it approximately:
In this case, I see probably more steps to have a gradient between the outer and longer arch than on the inner arch, which is shorter.
IMHO, this would be a solution for bending algorithm you discussed in the feature request.
It is a natural approach.
I see a bug, probably, in the middle of the mesh, the blue arch is not covered, surprisingly on the short transition between the arches of the mesh.
I took a segment and created a mesh over and worked on it to bend it approximately:
In this case, I see probably more steps to have a gradient between the outer and longer arch than on the inner arch, which is shorter.
IMHO, this would be a solution for bending algorithm you discussed in the feature request.
It is a natural approach.
I see a bug, probably, in the middle of the mesh, the blue arch is not covered, surprisingly on the short transition between the arches of the mesh.
- Attachments
-
- s2.svg
- (9.8 KiB) Downloaded 218 times
Re: New gradient mesh tool usage
By using the render stroke handles extension and snapping you can draw it exactly.
The blue part is because you added the mesh to the stroke and not to the blue fill instead (without strokes).
The blue part is because you added the mesh to the stroke and not to the blue fill instead (without strokes).
-
- Posts: 59
- Joined: Tue Aug 02, 2011 6:50 am
Re: New gradient mesh tool usage
There was not a bug... I think, increasing the stroke weight solved the issue.
-
- Posts: 59
- Joined: Tue Aug 02, 2011 6:50 am
Re: New gradient mesh tool usage
Imagine doing it with a couple of clicks, one for selecting the path to create the mesh, other to specify a corner...
Probably some extension could be written to do that.
Probably some extension could be written to do that.
Re: New gradient mesh tool usage
Oh yes, I find dragging those node/stops around to fit whatever kind of object it is, is one of the most time consuming parts of using the gradient mesh tool. A one or 2 click solution would be awesome.
But really, how could Inkscape make any kind of guess about the object? Because in your example of an S shaped, stroked path, well the existing option to fit to the bounding box would do the same job as your 2 click idea. Unless I'm not understanding it.
Maybe somehow using whatever it is in the Paint Bucket tool that can "see" an enclosed space, would work? The object would first have to be either filled with a solid color, or stroked with no fill. But that doesn't seem like too much work.
But really, how could Inkscape make any kind of guess about the object? Because in your example of an S shaped, stroked path, well the existing option to fit to the bounding box would do the same job as your 2 click idea. Unless I'm not understanding it.
Maybe somehow using whatever it is in the Paint Bucket tool that can "see" an enclosed space, would work? The object would first have to be either filled with a solid color, or stroked with no fill. But that doesn't seem like too much work.
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
- Posts: 59
- Joined: Tue Aug 02, 2011 6:50 am
Re: New gradient mesh tool usage
I have experience with Illustrator and I must say it is pretty hard to fit a shape sometimes.
Anyway, if the possibility to decide by one click where the corners of the mesh are would help for a rectangular mesh.
For circular mesh, no corners are needed, just a center point, probably.
Lazur's technique would be great for the initial fit, adding mesh points snapped to the handles would perform a very good job.
Think what as there is no mesh concept separated from path in the first step, using the path nodes initially.
Then the user could add mesh points and rows and columns.
Anyway, if the possibility to decide by one click where the corners of the mesh are would help for a rectangular mesh.
For circular mesh, no corners are needed, just a center point, probably.
Lazur's technique would be great for the initial fit, adding mesh points snapped to the handles would perform a very good job.
Think what as there is no mesh concept separated from path in the first step, using the path nodes initially.
Then the user could add mesh points and rows and columns.
Re: New gradient mesh tool usage
Anyway, if the possibility to decide by one click where the corners of the mesh are would help for a rectangular mesh.
I might not be understanding what you're asking. But doesn't that already exist? There's a button on the control bar to fit the mesh to the bounding box.
Unless you mean for rectangles that are not aligned along horizontal or vertical axis? Do you mean, align the corner mesh nodes to the corner path nodes of the rectangle?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: New gradient mesh tool usage
Feature requested is to automagically snap mesh edges&nodes on a preexisting path by one click.
Unlike this case, a match is never self explanatory. How would you match a mesh to an "X" or # shaped path? What if its a compound path like an "Ő"?
There is no trivial solution nor is there an indication on the shape's structure once the "S"'s outer edges/strokes got converted to path in the original example.
By bending a shape with a mesh fill thereis probably can be at least an indication of which node to be placed at which position.
Unlike this case, a match is never self explanatory. How would you match a mesh to an "X" or # shaped path? What if its a compound path like an "Ő"?
There is no trivial solution nor is there an indication on the shape's structure once the "S"'s outer edges/strokes got converted to path in the original example.
By bending a shape with a mesh fill there
-
- Posts: 59
- Joined: Tue Aug 02, 2011 6:50 am
Re: New gradient mesh tool usage
Why not starting from the path nodes (with their handles)? At least as an option? This would simplify the process, starting from a further step.
Why creating a squared or round mask and struggle to match it to a shape (when a match is needed)? All the data is already there.
You have some arbitrary shape, go to the mesh tool and select it, check on its options to match the chosen shape and try to create a squared or round mesh. Inkscape would ask for two adjacent corners for squared mesh or center for the round mesh. Then have fun by adding mesh nodes. Some options could be added as in Illustrator's Mesh Tormentor addin - double mesh nodes, half them, divide it by some nodes (even from the inner) etc..
This would increase productivity and let the fun of designing instead of struggling matching the mesh.
You've already, Lazur, used somehow a shortcut by using the handles effect and snapping to them, isn't it?
If there are problems, we could find solutions to them.
Why creating a squared or round mask and struggle to match it to a shape (when a match is needed)? All the data is already there.
You have some arbitrary shape, go to the mesh tool and select it, check on its options to match the chosen shape and try to create a squared or round mesh. Inkscape would ask for two adjacent corners for squared mesh or center for the round mesh. Then have fun by adding mesh nodes. Some options could be added as in Illustrator's Mesh Tormentor addin - double mesh nodes, half them, divide it by some nodes (even from the inner) etc..
This would increase productivity and let the fun of designing instead of struggling matching the mesh.
You've already, Lazur, used somehow a shortcut by using the handles effect and snapping to them, isn't it?
If there are problems, we could find solutions to them.
Re: New gradient mesh tool usage
Lazur wrote:Feature requested is to automagically snap mesh edges&nodes on a preexisting path by one click.
Unlike this case, a match is never self explanatory. How would you match a mesh to an "X" or # shaped path? What if its a compound path like an "Ő"?
There is no trivial solution nor is there an indication on the shape's structure once the "S"'s outer edges/strokes got converted to path in the original example.
By bending a shape with a mesh fill thereisprobably can be at least an indication of which node to be placed at which position.
Oh, I understand better now. I was confused about msdobrescu saying click on a corner, and it made me think of the bounding box.
To my simple way of thinking, the Paint Bucket tool can "see" or detect either solid spaces or enclosed spaces. I was wondering (earlier) if there would be any way to use that functionality. Inkscape could "see" the object, and when you click on the canvas, somehow align the nodes and handles to the shape. Instead of creating a new path, it would create the mesh nodes and handles.
msdobrescu wrote:Why not starting from the path nodes (with their handles)? At least as an option? This would simplify the process, starting from a further step.
Why creating a squared or round mask and struggle to match it to a shape (when a match is needed)? All the data is already there.
You have some arbitrary shape, go to the mesh tool and select it, check on its options to match the chosen shape and try to create a squared or round mesh. Inkscape would ask for two adjacent corners for squared mesh or center for the round mesh. Then have fun by adding mesh nodes. Some options could be added as in Illustrator's Mesh Tormentor addin - double mesh nodes, half them, divide it by some nodes (even from the inner) etc..
This would increase productivity and let the fun of designing instead of struggling matching the mesh.
You've already, Lazur, used somehow a shortcut by using the handles effect and snapping to them, isn't it?
If there are problems, we could find solutions to them.
That sounds reasonable to me. It would be sort of like duplicating the path, except instead of new paths, it creates the mesh nodes and handles. It does make sense that the information is already available, at least in XML code (if not some other internal data).
Are you going to make a feature request?
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: New gradient mesh tool usage
brynn wrote:To my simple way of thinking, the Paint Bucket tool can "see" or detect either solid spaces or enclosed spaces.
Bucket tool can't see anything. It uses the rendered screen pixels as a visual reference, creates a "raster fill", sort of a raster editor would do, then traces it for a vector output. It doesn't even fill in all the area you would need when you zoom in.
Instead of the bucket tool functionality think in the terms of "trace bitmap" with a gradient mesh.
Sounds rather different, although theoretically you could assign mesh nodes to every pixel corners. Result would be enermous to handle and would be so handy with the existing manipulating options.
A bend lpe or envelope-perspective would be nice to pair up with such a trace as well.
But assigning mesh nodes over a plain vector object?
Thinking of a "#" shape, where would you place the mesh nodes manually?
-
- Posts: 59
- Joined: Tue Aug 02, 2011 6:50 am
Re: New gradient mesh tool usage
To clarify things, when I say "click on a corner", I want to say "click on a node to set a mesh corner there, meaning that node to become a mesh corner".
I name "mesh corner" one of the four nodes defining the rectangle boundaries of the squared mesh.
Sorry for my fuzziness.
I name "mesh corner" one of the four nodes defining the rectangle boundaries of the squared mesh.
Sorry for my fuzziness.
Re: New gradient mesh tool usage
I did put "see" in quotes. I know it really doesn't see anything. But I was thinking that detecting rendered screen pixels would be one way for Inkscape to know where to put the mesh. I would be happy with approximation here. Another way might be to use the XML code which defines the path nodes.
Oh, now I understand!
msdobrescu wrote:To clarify things, when I say "click on a corner", I want to say "click on a node to set a mesh corner there, meaning that node to become a mesh corner".
I name "mesh corner" one of the four nodes defining the rectangle boundaries of the squared mesh.
Sorry for my fuzziness.
Oh, now I understand!
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Re: New gradient mesh tool usage
Happened to stumble on this. Less details than you've discussed, but isn't this what you mean? Or do I still not understand?
https://bugs.launchpad.net/inkscape/+bug/1659977
https://bugs.launchpad.net/inkscape/+bug/1659977
Basics - Help menu > Tutorials
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
Manual - Inkscape: Guide to a Vector Drawing Program
Inkscape Community - Inkscape FAQ - Gallery
Inkscape for Cutting Design
-
- Posts: 59
- Joined: Tue Aug 02, 2011 6:50 am
Re: New gradient mesh tool usage
Yes and no.
My idea was to create a gradient mesh starting from the path definition and how to do this in the first place, as a UI process too.
The feature request above is related to what happens after, which is a fine idea.
My idea was to create a gradient mesh starting from the path definition and how to do this in the first place, as a UI process too.
The feature request above is related to what happens after, which is a fine idea.