I can tell by your description you know more about programming than me and aren't having to fight to learn the basic commands for every new function you want to add. Hehe.
Looking forward to watching this progress. good stuff.
Hi happy tree friends,
Had some boring time so I coded a little tool that does create random forests. It is called EcoForester (couldn‘t think of a more silly name). You can choose between different tree types (top down views, side view not implemented yet) and define some parameters for the random distribution. At start, the tool does create a random forest based on some default values. In the upper left you can access those values at a simple panel (sorry for the ugly design, just a quick hack). They are categorized into:
Distribution:
1. Threshold: the higher the number, the more trees you get. Default 12, lowest 4, maximum 25. This value defines a threshold against which a bitmap with perlin noise is tested. Therefore, the number does not directly correspond to the total number of trees.
2. Density: the higher the number, the larger the distance between single trees. Default 30, minimum 20, maximum 40.
Shadow:
1. Enables or disables the shadow. Enabled by default.
2. Color: sets the shadow color. Five different colors of grey, default a very dark grey (first color chip). The activated chip is slightly bigger than the other ones.
3. Angle: sets the rotation of the shadow. The arrow points to the direction of the shadow. To change it, click elsewhere on the grey circle (not: click and drag).
4. Distance: sets the distance (in pixels) of the shadow. Default 5, minimum 2, maximum 15.
Type:
1. Tree types to be used for your forest. Default: second from left. Click on a thumbnail to change the type. The activated type is marked by a red halo. If you want to use several types at the same time, just shift-click on another thumb. Again shift-click to deactivate that type. Every time you click on a type, a new forest is created.
Map:
1. Lock: locks the map for the random distribution of the trees. Disabled by default. If you want to use different trees with the same random distribution, you can lock the random positions by using this option.
Logo:
Click to save a transparent png of your forest.
Distribution, Type: every change of a value does create a new forest.
Shadow: changing values does update the actual forest but not generate a new one.
At start the panel is shown at 90 % alpha. After that, it is blended out when rolling off the mouse and blended in when rolling over again. That way it is easier to look at the forest you get.
You need the Flash Player 10 to start the swf. The exe does work without any player, of course. Sorry, Windows only (though the swf should work on a Mac, too).
Tutorial:
1. To get a random forest just start the tool: open the swf with your browser (Flash Player 10 needed) or double click on the exe.
2. Then click on the Logo “EcoForester” at the top right corner of the panel to save a transparent png at your local drive.
3. Now change the default type by clicking on the first tree thumb. The second one will be deactivated while the first one will be marked as active. At the same time, a new forest is calculated. The total number of trees depends on the treshold and density parameters (which you can change) as well as on a bitmap that is generated to get a random distribution (which you can‘t change). That map is not shown up. It is just used to get the positions for the trees. The appearance of every tree is randomized by using different sizes, different rotations and some extremely modest colorizing.
The upper left part of the forest is hidden by the panel.
4. Move the mouse outside of the panel. Now you can see the trees that were created behind the panel.
5. Our forest is not very dense. To change that, move the mouse again over the panel (upper left part of the screen) to show it up. Then click several times on the numerical stepper to the right of the Threshold option. You can also just put a number into the numerical field and press the ENTER key.
6. To get even more trees, lower the number in the Density field. That way the average distance between single trees is lowered which results in a higher total number of trees.
7. At present, the forest does consist of only one tree type which looks not very realistic. Hold the Shift key and click on the 6th and 9th thumb. Now 3 types are highlighted. After every click the forest is calculated anew using the different trees you did choose.
8. Unfortunately, the 6th tree type is much too dark. Deactivate it by shift-clicking it again. It will be unmarked. At the same time, a new forest is generated which does only consist of the two types left (1st and 9th type).
9. You want to add another type. But this time you don’t want to recalculate the positions of the trees. To keep the actual positions, click on the Lock option to lock the existing map.
10. Then shift-click on the 10th type to add another type to the forest.
11. Now save everything by clicking on the logo.
download: http://www.mediafire.com/?10ynyacvmktfx50
Two views of the tool with different parameters used:
eco1_1.jpg eco1_2.jpg
Happy foresting!
I can tell by your description you know more about programming than me and aren't having to fight to learn the basic commands for every new function you want to add. Hehe.
Looking forward to watching this progress. good stuff.
Royal: I'm very sorry for your loss, your mother was a terribly attractive woman.
My Cartographer's Guild maps: Finished Maps
More maps viewable at my DeviantArt page: Ramah-Palmer DeviantArt
I think one of the things that would make this incredibly useful is the ability to mask out areas where forest will not generate, or areas that you want it to generate. Random can be very useful at times, especially if you don't have specific plans, but often times someone might have precise areas marked out as "forest goes here".
that's one of the biggest selling points of the other forest generator we have going on.
My finished maps
"...sometimes the most efficient way to make something look drawn by hand is to simply draw it by hand..."
*memories of gory videos watched in middle school ensue.*Hi happy tree friends,
based on the screenshots, Id say it looks very simple, which is a good thing
looks like a good start - as coyote says - a way to "shape" your forest would be nice - especially if you could use a jpg, png, svg for the mask. And to set the size resolution would be nice too... oh and be able to add your own trees ... great work though - and thanks for sharing
regs tilt
:: My DnD page Encounter Depot free stuff for your game :: My work page Catapult ::
:: Finished Maps :: Competion maps - The Island of Dr. Rorshach ::
:: FREE Tiles - Compasses :: Other Taking a commision - Copyright & Creative Commons ::
Works under CC licence unless mentioned otherwise
Seems pretty simple and has a nice output. Would like to be able to create my own tree shapes for it if possible.
I ran a sample test on this, the result is here.
Last edited by Jaxilon; 09-09-2010 at 04:28 AM.
“When it’s over and you look in the mirror, did you do the best that you were capable of? If so, the score does not matter. But if you find that you did your best you were capable of, you will find it to your liking.” -John Wooden
* Rivengard * My Finished Maps * My Challenge Maps * My deviantArt
Hi happy tree friends,
thanks for your comments. Sorry, I hadn't enough time to implement the features you asked for. However, a simple update is done - you can now load your own map (b/w png) in order to shape the forest. Unfortunately, Flash has an upper limit of approx 2800 px in one dimension and it becomes very slow with large bitmaps. Therefore, one map at one time shouldn't be larger than 2000 x 2000 px.
To get the shape you want to: create a png no larger than 2000 x 2000 px with a white background (no trees) and black areas (trees). More adventureous people can just leave the to-be-forested area transparent and paint everything that must not have trees on it white. At present, there is no preview for the whole map if it is larger than the apps' viewing window. Also, at present you can't drag the forest to get a better view. So you need to trust the tool
Please be patient when saving - you will get a large png that does take some time to compute. The ui has changed a little bit: now at start you won't get a default forest. Instead, you can choose between generating a totally random forest or loading a map. In the first case, everything works as in the previous version with the exception that there is no map locking button anymore. In the second case, the map is active as long as you don't generate or load a new one. This is true even when you change the density param (didn't look at it more closely but I think changing the threshold does only affect a forest based on a random map, not a loaded one).
How to use:
Random Map:
1. Click at the button "Random" at the lower left of the panel. More on that in my first post
Custom map:
1. Click at the button "Load" besides the above mentioned "Random" button. A dialog will pop up where you can choose a png to load.
2. After a short time, a forest based on the black (or transparent) area of the map will be generated. It does consist of just one single tree type (the default one: second from left in the panel).
3. You can do the same with this forest as with a randomly generated one (again, look at the first post).
4. Play around with the different tree types: every time you change the settings, a new forest with the same tree positions but with other types is calculated. Changing types: click on a tree pict in the panel. If that tree was not active (marked with red halo), it will now be activated. To deselect it, shift-click on it (if it is the only active tree, you can't deselect it at all). To select multiple trees, just shift-click on them. If there are several types active and you click on one tree (active or not), it will be activated and all other trees will be deactivated. Whatever that does mean - just try it out.
5. The shadow options are self-explanatory (in a ui, this is almost never true but it saves me time describing the tool)
6. The density button changes the distance between single trees. That way you can get a very dense forest (which will result in a very fat png).
7. Click on the logo in the upper right to save the forest as a transparent png - please be patient, Flash is a little bit slow here (no, in fact I didn't optimize even one single line of code, sorry)
The slightly changed interface:
interface.jpg
A map example (was: 1500 x 1500):
example.gif
The resulting forest with different tree types (in the png, the bgd is transparent; this jpg is just to give an idea of the result):
forest_example.jpg
download: http://www.mediafire.com/?u6z0jlz2b5i8j3j
Happy foresting
Excellent tool easy to use and great output.
Hi,
another minor update.
Changes and bugs:
- ability to set the dimensions of a random map (min 200, max 2000 - the higher the number the terribly slower the app). If you don't set a number when generating a map, the default value of 200 x 200 is used (resulting in a small forest that does shamefully hide behind the panel). If you change the dimensions of the map in the text fields, the map isn't updated automatically. You need to generate a new one by clicking on the "Generate" button. The dimensions of a loaded map can't be set this way. In that case the text fields just show the actual width and height of the map.
- ability to load own tree brushes. Simply put a tile sheet (png with transparency) into the folder where you run the tool. The file name needs to be tree.png. Its dimensions should be 40px wide and up to 480px high. One tree must be 40 x 40px. If your sheet is 480 px high, you should have 12 trees. In fact, the tool doesn't care if the sheet is much higher. All trees will be displayed, even if you use 20 or so. But at present, the panel isn't resized. Therefore, in that case some tiles will be positioned to the right outside of the panel.
- large forests are even slower calculated then ever before. This is a feature, not a bug. Its kind of a protest against an ever faster running world that doesn't give us time to rest and think (sounds much better than the bug thingy).
- if the forest is very large, the density button nicely reflects that faster going world by adding / subtracting more than one number per click
Included in the download are two pngs: trees.png (default trees) and trees2.png. If you want to test custom brushes just save tree.png at a dry, not to dark place and change the name of trees2.png to trees.png. Then run the tool. You will get 7 instead of the usual 12 trees. Go ahead as usual. If you use the swf, you will need Flash Player 10
Download: http://www.mediafire.com/?fa9ha44jqob524h
Happy foresting
Wow, excellent!
Easy to work around size limitations if your map is larger than 2000x2000 and/or you have multiple forests - you can make a separate mask for each section of forest, and run them through the generator separately. Import them into the main file, and place accordingly
Bravo!
My finished maps
"...sometimes the most efficient way to make something look drawn by hand is to simply draw it by hand..."