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!