Multiple patterns along same path?
Multiple patterns along same path?
Hi,
Is it possible to have multiple patterns along the same path?
If I combine the patterns before applying, the patterns will assume the same fill/stroke styles, and will be the same colour.
I have multiple patterns, all different colours, and I want them applied to a single path using the LPE "pattern along path".
I could copy the path a few times, and then apply each pattern on its own copy.
However, this makes editing the path cumbersome, as you have to move each control pt multiple times.
I also tried adding the 'pattern along path' effect twice to the same path.
However, the end result is a single colour, and also the geometry does not look 100% like I expected.
Thanks,
Bram
Is it possible to have multiple patterns along the same path?
If I combine the patterns before applying, the patterns will assume the same fill/stroke styles, and will be the same colour.
I have multiple patterns, all different colours, and I want them applied to a single path using the LPE "pattern along path".
I could copy the path a few times, and then apply each pattern on its own copy.
However, this makes editing the path cumbersome, as you have to move each control pt multiple times.
I also tried adding the 'pattern along path' effect twice to the same path.
However, the end result is a single colour, and also the geometry does not look 100% like I expected.
Thanks,
Bram
Re: Multiple patterns along same path?
Like this? Quick test with 'Link to path' option (instead of 'Edit on-canvas') in the Path Effect Editor.
oops - I used the LPE 'Bend' - should I delete it? Will post follow-up about 'Pattern-along-Path' later)
no, looks like there's no option within the path effect editor, and clones can't be colored differently either, even when the color of the original pattern is 'unset'.
oops - I used the LPE 'Bend' - should I delete it? Will post follow-up about 'Pattern-along-Path' later)
no, looks like there's no option within the path effect editor, and clones can't be colored differently either, even when the color of the original pattern is 'unset'.
Re: Multiple patterns along same path?
The Blend and Pattern Along Path LPEs are very confusing.
The manual is not clear about these LPEs.
The main problem is the following:
For Blend, you apply the effect to the 'pattern' (which is not really a pattern in the inkscape-fill-property sense). Just a path.
For Pattern-Along-Path, you apply the effect to the 'skeleton'. (and again, the pattern is in this case a single path).
Because the Blend is applied to pattern, not skeleton, you can associate a single skeleton with multiple 'patterns'.
When using Pattern-Along-Path: Multiple 'patterns' cannot share a skeleton.
Bram
The manual is not clear about these LPEs.
The main problem is the following:
For Blend, you apply the effect to the 'pattern' (which is not really a pattern in the inkscape-fill-property sense). Just a path.
For Pattern-Along-Path, you apply the effect to the 'skeleton'. (and again, the pattern is in this case a single path).
Because the Blend is applied to pattern, not skeleton, you can associate a single skeleton with multiple 'patterns'.
When using Pattern-Along-Path: Multiple 'patterns' cannot share a skeleton.
Bram
Re: Multiple patterns along same path?
Maybe I should take a few steps back, and actually show what I am trying to accomplish.
I've attached a SVG that kinda shows my intentions.
I want to have an undulating terrain with hills and such, that follows the curve on the right, but looks like the pattern on the left.
The grass is always at the top, with the white rocks just beneath it.
I need it in such a way, that I can easily change the terrain curve, and have it automatically look pretty like the terrain pattern.
Bram
I've attached a SVG that kinda shows my intentions.
I want to have an undulating terrain with hills and such, that follows the curve on the right, but looks like the pattern on the left.
The grass is always at the top, with the white rocks just beneath it.
I need it in such a way, that I can easily change the terrain curve, and have it automatically look pretty like the terrain pattern.
Bram
- Attachments
-
- testje.svg
- (40.63 KiB) Downloaded 217 times
Re: Multiple patterns along same path?
I've had a play with your sample.
First, and confusingly, there are two ways of getting a "Pattern Along Path". The "Path Effects" version only works with paths, and not groups. So, I used Effects->Generate From Path->Pattern Along Path, and got something much like I was expecting.
Here's what I did, from the file as posted:
Ungrouped everything, twice.
Grouped the terrain blocks (grass, stones, soil). This has some borders you'll want to get rid of.
Selected the path, sent it to the bottom.
Selected the path and terrain group.
Did Effects->Generate From Path->Pattern Along Path. (Many times, with ctrl-Z, changing parameters). What's good is Repeated, Snake, Normal offset of -5 (Which puts the grass on the original line).
First, and confusingly, there are two ways of getting a "Pattern Along Path". The "Path Effects" version only works with paths, and not groups. So, I used Effects->Generate From Path->Pattern Along Path, and got something much like I was expecting.
Here's what I did, from the file as posted:
Ungrouped everything, twice.
Grouped the terrain blocks (grass, stones, soil). This has some borders you'll want to get rid of.
Selected the path, sent it to the bottom.
Selected the path and terrain group.
Did Effects->Generate From Path->Pattern Along Path. (Many times, with ctrl-Z, changing parameters). What's good is Repeated, Snake, Normal offset of -5 (Which puts the grass on the original line).
Re: Multiple patterns along same path?
@Slow Dog - the main draw-back of the 'effect/python-extension' version: it's not live (as in LivePathEffect) i.e. the skeleton path doesn't exist anymore once the effect is applied - the result is a static not parametrized path.
Opposite solution would be a vectorized brush kind of tool (or "skeletal strokes") that gets style (stroke, fill) and content (path or pattern) from a group of vector objects and applies it to a (linked) skeleton path.
@Bram - searching the mailing list archives reveals 'Bend' used to be called 'Path along path' and is - with regard to LPE - just the opposite of 'Pattern along path'. 'Bend' can be applied to a (nested) group of paths (patterns), whereas 'Pattern along path' is applied to a single skeleton.
I found a RFE bug report 'Paths effects to multiple objects' and the Blueprint 'LPE for groups' which is already implemented for 'bend' (and other LPEs ?).
Opposite solution would be a vectorized brush kind of tool (or "skeletal strokes") that gets style (stroke, fill) and content (path or pattern) from a group of vector objects and applies it to a (linked) skeleton path.
@Bram - searching the mailing list archives reveals 'Bend' used to be called 'Path along path' and is - with regard to LPE - just the opposite of 'Pattern along path'. 'Bend' can be applied to a (nested) group of paths (patterns), whereas 'Pattern along path' is applied to a single skeleton.
I found a RFE bug report 'Paths effects to multiple objects' and the Blueprint 'LPE for groups' which is already implemented for 'bend' (and other LPEs ?).
Re: Multiple patterns along same path?
~suv wrote:@Slow Dog - the main draw-back of the 'effect/python-extension' version: it's not live
But has the huge advantage of actually working for this purpose, whereas the live version doesn't.
'Bend' can be applied to a (nested) group of paths (patterns), whereas 'Pattern along path' is applied to a single skeleton.
Bend doesn't have any equivalent of "Normal Offset", so bends the group into a twisted mess.
Re: Multiple patterns along same path?
You are right.Slow Dog wrote:But has the huge advantage of actually working for this purpose, whereas the live version doesn't.
The old LPE version of 'Path along path' seems to have had the pattern copies and offset options (the same as todays 'Pattern along Path' LPE) - it might have served Brams goals better. I know the 'Bend' LPE has limited use here, but it's a showcase what LPEs can to when groups can be used as input 'original' path:
Code: Select all
original ---> Path along Path ---> output
^
|
path parameter ('bend path')
'Pattern along Path' LPE will never have differently styled output paths, because the skeleton is the single 'original' input path, the patterns are parameters whose style attributes are discarded:
Code: Select all
original ---> Pattern along Path ---> output
^
|
path parameter (can be paths, numbers, points, text, in principle anything)
Re: Multiple patterns along same path?
Slow Dog wrote:~suv wrote:@Slow Dog - the main draw-back of the 'effect/python-extension' version: it's not live
But has the huge advantage of actually working for this purpose, whereas the live version doesn't.'Bend' can be applied to a (nested) group of paths (patterns), whereas 'Pattern along path' is applied to a single skeleton.
Bend doesn't have any equivalent of "Normal Offset", so bends the group into a twisted mess.
Err... the effect disappeared from the 0.47 version of inkscape.
And I am having trouble running 0.46 again (even after removing the fontconfig tag).
Also, like suv said: I need the 'live update'.
I use it to model my game levels and if I move a control pt, I want the art to move with it.
In case you're interested: this is my game:
http://www.steenriver.com/thelittletankthatcould/
If I change a level, I want the artwork to automatically update to the new contours.
Bram
Re: Multiple patterns along same path?
It is under menu 'Extensions > Generate from Path > Pattern along Path…'bram wrote:the effect disappeared from the 0.47 version of inkscape
hmm... any interesting console message or crash log? You can't run both versions at the same time, because both write to '~/.inkscape-etc/'... The preferences are separate though (0.46: in '~/.inkscape/', 0.47pre in '~/.config/inkscape/'). Tried to clean the fontcache?bram wrote:And I am having trouble running 0.46 again (even after removing the fontconfig tag).
Code: Select all
rm ~/.fontconfig/*
Re: Multiple patterns along same path?
When Inkscape 0.46 crashes, try this: before clicking 'ok' in the information dialog box about internal error or emergency save, open the Activity Monitor, select 'inkscape-bin' and inspect the process (Cmd + I), switch to the tab 'Open Files and Ports' and look for anything suspicious (e.g. open files in the MacPorts tree - should not happen).bram wrote:And I am having trouble running 0.46 again (even after removing the fontconfig tag).
Re: Multiple patterns along same path?
~suv wrote:When Inkscape 0.46 crashes, try this: before clicking 'ok' in the information dialog box about internal error or emergency save, open the Activity Monitor, select 'inkscape-bin' and inspect the process (Cmd + I), switch to the tab 'Open Files and Ports' and look for anything suspicious (e.g. open files in the MacPorts tree - should not happen).bram wrote:And I am having trouble running 0.46 again (even after removing the fontconfig tag).
There is no error dialog. When I start 0.46, The little bullet next to the icon in the task bar lights up, but no inkscape window gets opened.
It just sits there, with 0% cpu, and no window opening.
These are the open files:
/
/Applications/Inkscape.app/Contents/MacOS/Inkscape
/System/Library/Fonts/LucidaGrande.dfont
/System/Library/Components/AppleScript.component/Contents/MacOS/AppleScript
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/HIToolbox.rsrc
/private/var/folders/A3/A3MQTGr3H9ePlfgf+JEKYk+++TI/-Caches-/com.apple.IntlDataCache.le.sbdl
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras2.rsrc
/System/Library/PrivateFrameworks/AppleScript.framework/Versions/A/AppleScript
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/English.lproj/Localized.rsrc
/System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle/Contents/Resources/AppleKeyboardLayouts-L.dat
/System/Library/Caches/com.apple.IntlDataCache.le.kbdx
/Library/Caches/com.apple.LaunchServices-023501.csstore
/usr/share/icu/icudt36l.dat
/usr/lib/dyld
/private/var/db/dyld/dyld_shared_cache_i386
/dev/null
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/Extras2.rsrc
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/HIToolbox.rsrc
/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Resources/English.lproj/Localized.rsrc
Re: Multiple patterns along same path?
Tried to clean the fontcache?Code: Select all
rm ~/.fontconfig/*
This helped. I can now run 0.46 again.
BTW: At first I removed the .fontconfig directory entirely, causing both inkscape versions to silently fail.
When I created an empty .fontconfig directory, I could run 0.46 again.
Thanks,
bram
Re: Multiple patterns along same path?
The missing fontconfig bug is old (and forgotten?), see Bug #205542: “Inkscape 0.46-1 for OS X won't start”.
Could you solve the missing extension problem? Might be that your own build of Inkscape 0.46+devel either misses the python site-packages (pre-built package on inkscape.modevia.com) or - if you want to use another Python version (MacPorts or MacPython 2.6) - you need to change $PYTHONPATH and probably add $PYTHONHOME too in 'Contents/Resources/bin/inkscape', the shell launcher script for inkscape-bin.
Could you solve the missing extension problem? Might be that your own build of Inkscape 0.46+devel either misses the python site-packages (pre-built package on inkscape.modevia.com) or - if you want to use another Python version (MacPorts or MacPython 2.6) - you need to change $PYTHONPATH and probably add $PYTHONHOME too in 'Contents/Resources/bin/inkscape', the shell launcher script for inkscape-bin.
Re: Multiple patterns along same path?
Back to the original problem
Another thing I tried was:
Split your terrain into horizontal bands - grass, rocks+soil background, two or three deeper soil levels.
Clone your guideline, so there's one line per band.
Offset the clones downward, with gaps relating to band depth.
Apply grass as a "Pattern-to-Path" LPE to the base guideline (repeated, snake); apply other bands to the clones in depth order.
You'll need to sort out draw-order. Perhaps add blur to soil level to help the levels merge in.
As you adjust the base guideline, the clones, and hence the LPEs on each, will update in sync.
bram wrote:I need the 'live update'.
I use it to model my game levels and if I move a control pt, I want the art to move with it.
Another thing I tried was:
Split your terrain into horizontal bands - grass, rocks+soil background, two or three deeper soil levels.
Clone your guideline, so there's one line per band.
Offset the clones downward, with gaps relating to band depth.
Apply grass as a "Pattern-to-Path" LPE to the base guideline (repeated, snake); apply other bands to the clones in depth order.
You'll need to sort out draw-order. Perhaps add blur to soil level to help the levels merge in.
As you adjust the base guideline, the clones, and hence the LPEs on each, will update in sync.
Re: Multiple patterns along same path?
I failed to follow these steps - how do you choose a clone in the path effect editor? If I apply a path effect to the original, all clones replicate that path effect (using 0.47pre). Unlinking the clones again looses the live effect when changing the terrain... ?Slow Dog wrote:apply other bands to the clones
Re: Multiple patterns along same path?
~suv wrote:I failed to follow these steps
Sorry, you're right, it doesn't work. I misremembered something I tried with the "Pattern Along Path" extension which "Normal Offset" did better.