Hi guys, wonder if anyone can help with this. I've tried to google around and I have a feeling what I want may not be possible, but no harm in asking, right?
Basically, what I'm trying to do is create rivers for a map. I can draw a simple river system with a few tributaries and the fractalise tool will give me a nice random effect that works beautifully.
But, since I'm a lazy sod, I like to save time if it's at all possible. The 'Random Tree' tool creates a structure that's absolutely perfect for a river system, and I'd love to be able to use that. My problem is that what it generates isn't the one line it appears to be. Although it is one path overall, there are lines sitting on top of each other and, if you grab a node and drag, there's another path underneath. I guess it's just the way the tool works to generate the tree, but it causes havoc with the Fractalise tool.
My question is: is there any way to convert the result of Random Tree into only one simple line (or a series of segments), so that I can use the Fractalise extension on it? I'm hoping for some simple way to delete all overlapping lines, rather than having to manually break paths and delete segments. There's no point in doing it manually, as I'd be quicker creating the river system from scratch with the bezier tool. Or am I missing something perhaps, and there's a better way to do the whole thing?
I've uploaded a little png that explains exactly what's going on.
Thanks in advance for any insights!
Random Tree/Fractalise question
Random Tree/Fractalise question
- Attachments
-
- rivers.png (48.87 KiB) Viewed 4425 times
Re: Random Tree/Fractalise question
I understand exactly what you're talking about. Even using the Random Tree extension to make trees, if you want more than just stick trees, you have a lot of editing to do, with those overlapping paths and nodes.
One step you can take, to shorten the process, would be to select all the nodes of a tree and break them all at once. But then you still have to delete segments and join nodes individually.
At the moment, I can't think of a good solution. Probably just clicking out a path with the Pen tool would be the best. But I'll ponder on it, maybe I'll have an idea....
One step you can take, to shorten the process, would be to select all the nodes of a tree and break them all at once. But then you still have to delete segments and join nodes individually.
At the moment, I can't think of a good solution. Probably just clicking out a path with the Pen tool would be the best. But I'll ponder on it, maybe I'll have an idea....
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: Random Tree/Fractalise question
You can convert stroke to path (Ctrl+Alt+C), press Ctrl++ and have a quite good filled path.
Then use fractalise? Would look a bit different -not exactly as on the example on the right.
The L-system, with some manual editing was handy in a similar problem.
Then use fractalise? Would look a bit different -not exactly as on the example on the right.
The L-system, with some manual editing was handy in a similar problem.
Re: Random Tree/Fractalise question
Thanks for your comments, Brynn & Lazur.
Brynn, I did think it was probably a long shot and I'm not sure there's any easy solution. I tried breaking apart the nodes all at once, but it's a pain having to delete all the individual segments and, of course, you always miss one. It ends up a mess and it's generally simpler just to do it manually. I wasn't sure if maybe there was some sort of uber union-type tool that would do it all for me, but still leave the object as a stroke so that Fractalise works the way I want.
Lazur, I tried converting stroke to path, then fractalising, but it's not the result I want. (Not sure if you got mixed up in your comment, but it's actually the result at the bottom left of my original pic that I want, not the one on the right.) The L-System looks incredibly complicated! I can sorta see from the pic you posted how you could get a river effect, but again that's not exactly what I'm looking for. I think in the time it would take to figure out how to create the look I want in L-System, I could create the river system manually (probably a dozen times LOL!) Thanks anyway.
Brynn, I did think it was probably a long shot and I'm not sure there's any easy solution. I tried breaking apart the nodes all at once, but it's a pain having to delete all the individual segments and, of course, you always miss one. It ends up a mess and it's generally simpler just to do it manually. I wasn't sure if maybe there was some sort of uber union-type tool that would do it all for me, but still leave the object as a stroke so that Fractalise works the way I want.
Lazur, I tried converting stroke to path, then fractalising, but it's not the result I want. (Not sure if you got mixed up in your comment, but it's actually the result at the bottom left of my original pic that I want, not the one on the right.) The L-System looks incredibly complicated! I can sorta see from the pic you posted how you could get a river effect, but again that's not exactly what I'm looking for. I think in the time it would take to figure out how to create the look I want in L-System, I could create the river system manually (probably a dozen times LOL!) Thanks anyway.
Re: Random Tree/Fractalise question
Although I don't know exactly what variables you're using in Fractalize dialog, I got a pretty close result with: create tree > stroke to path > Fractalize.
Of course, you end up with a different kind of object. Instead of an open, stroked path, you'll have a filled, closed path. Maybe you can adjust the variables in the dialog, and make it work? Or maybe adjust the stroke width on the tree, before you do stroke to path -- maybe starting with a thinner stroke would help??
Yes, my experience with L-System, is that you need to understand the math behind it, to be able to use it effectively. Sometimes with extensions I don't understand, I can figure it out by trial and error. But there's nothing very logical...at least not my simple logic....about that one.
Of course, you end up with a different kind of object. Instead of an open, stroked path, you'll have a filled, closed path. Maybe you can adjust the variables in the dialog, and make it work? Or maybe adjust the stroke width on the tree, before you do stroke to path -- maybe starting with a thinner stroke would help??
Yes, my experience with L-System, is that you need to understand the math behind it, to be able to use it effectively. Sometimes with extensions I don't understand, I can figure it out by trial and error. But there's nothing very logical...at least not my simple logic....about that one.
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: Random Tree/Fractalise question
Worth a try (IMvHO):
[1] The custom extension is from Bug #521988 “Patch: Eliminate duplicate path segments” - it might not be "the" perfect solution (miss some segments, or create single-node sub-paths in some cases) and has not seen an updates for quite a while. A quick test run on a random tree created with Inkscape 0.91 seemed to work though.
- Prerequisite: Install the custom extension described in this earlier forum topic:
Subject: Re: How to remove double lines? [1] - Relaunch Inkscape
- Create path with 'Extensions > Render > Random Tree'
- Apply 'Extensions > Modify Path > Remove redundant edges'
- Apply 'Path > Break apart'
- Apply 'Extensions > Modify Path > Fractalize'
[1] The custom extension is from Bug #521988 “Patch: Eliminate duplicate path segments” - it might not be "the" perfect solution (miss some segments, or create single-node sub-paths in some cases) and has not seen an updates for quite a while. A quick test run on a random tree created with Inkscape 0.91 seemed to work though.
Re: Random Tree/Fractalise question
~suv wrote:Worth a try (IMvHO):
- Prerequisite: Install the custom extension described in this earlier forum topic:
Subject: Re: How to remove double lines? [1]- Relaunch Inkscape
- Create path with 'Extensions > Render > Random Tree'
I seem to get consistently best results if 'Remove redundant edges' is applied immediately after creating the random tree (i.e. at its original location - without any in-between modifications like moving the path to a different position, or resizing it).
- Apply 'Extensions > Modify Path > Remove redundant edges'
To get rid of the (invisible) 1-node sub-paths created by 'Remove redundant edges', use these steps in the node tool:
- Select path and switch to the node tool (N)
- Select all nodes (Ctrl+A)
- Break path at selected nodes (Shift+B)
- Proceed with ... (see below)
- Apply 'Path > Break apart' (Shift+Ctrl+K)
- Apply 'Extensions > Modify Path > Fractalize'
Re: Random Tree/Fractalise question
Oh wow, this is fantastic! Thank you, suv!
Almost every time I tried it, it did a perfect job and gave me exactly what I needed. There were one or two occasions where there was an extra path, but it was trivially easy to clean up, or I could simply delete it and generate a new random tree and start again. It only takes seconds. You've given me exactly what I was looking for with just a few clicks.
Here's a small version of something that I knocked up really quickly, just to show you all what I was aiming for. The smallest tributaries have a thinner stroke, and the stroke gets thicker as they get towards the central 'trunk'. It gives a really natural effect and it can all be created in a few minutes.
Thank you so much. I am thrilled!
Almost every time I tried it, it did a perfect job and gave me exactly what I needed. There were one or two occasions where there was an extra path, but it was trivially easy to clean up, or I could simply delete it and generate a new random tree and start again. It only takes seconds. You've given me exactly what I was looking for with just a few clicks.
Here's a small version of something that I knocked up really quickly, just to show you all what I was aiming for. The smallest tributaries have a thinner stroke, and the stroke gets thicker as they get towards the central 'trunk'. It gives a really natural effect and it can all be created in a few minutes.
Thank you so much. I am thrilled!
Re: Random Tree/Fractalise question
Nice!
(And that could be used to illustrate blood vessels too.)
(And that could be used to illustrate blood vessels too.)
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: Random Tree/Fractalise question
Thanks! And yeah, it does look a lot like blood vessels, now you mention it. I hope that might be useful to someone else.
Now if I can just figure out a one-click solution to drawing realistic mountains, I'll be sorted!
Now if I can just figure out a one-click solution to drawing realistic mountains, I'll be sorted!
Re: Random Tree/Fractalise question
An alternative solution (not for mountains, this is still about the rivers): download a modified version of the 'Random Tree' extension from here (filename: rtree-debug.zip) - it has a new option to 'Lift pen for backward steps' (an attempt to prevent that the redundant segments are drawn at all). Break the resulting tree apart (Shift+Ctrl+K), and apply 'Modify Path > Fractalize' directly (without intermediary steps).
The modified version installs as 'Extensions > Render (Debug) > Random Tree (Debug)'. If feedback about the minor change is positive, the additional option might get added to the version shipped with Inkscape (for 0.92).
The modified version installs as 'Extensions > Render (Debug) > Random Tree (Debug)'. If feedback about the minor change is positive, the additional option might get added to the version shipped with Inkscape (for 0.92).
Re: Random Tree/Fractalise question
Hi ~suv, sorry for the late response to this, but I was stymied by the site's login problem.
I've been using the newer version of Random Tree that you linked to above for a couple of weeks now. I've ran it numerous times with the 'lift pen for backward steps' enabled and it works beautifully. I haven't had any overlapping paths, and it's been so easy to break the tree shape apart to do what I want with it. It would be fantastic if this update were added to the new version of Inkscape!
Thanks for suggesting this!
I've been using the newer version of Random Tree that you linked to above for a couple of weeks now. I've ran it numerous times with the 'lift pen for backward steps' enabled and it works beautifully. I haven't had any overlapping paths, and it's been so easy to break the tree shape apart to do what I want with it. It would be fantastic if this update were added to the new version of Inkscape!
Thanks for suggesting this!
Re: Random Tree/Fractalise question
@z3z - the new option will be available in the next major release:
- Bug #1500124 “Random Tree: optionally omit redundant segments”
Re: Random Tree/Fractalise question
This is fantastic! Thank you so much.
Inkscape has the best devs!!
Inkscape has the best devs!!
Re: Random Tree/Fractalise question
"woo-hoo" as they say
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