View Full Version : random forest generation
lowfighter
03-30-2006, 06:16 AM
well, I forgot that it was a winter map http://forums.ubi.com/images/smilies/compsmash.gif http://forums.ubi.com/images/smilies/35.gif
http://img.photobucket.com/albums/v231/adonisl/padure.jpg
PBNA-Boosher
03-30-2006, 10:03 AM
Still looks great! How'd you do it?
yeaimcalm
03-30-2006, 03:10 PM
Cool - I need to know how! http://forums.ubi.com/images/smilies/25.gif
lowfighter
03-30-2006, 11:54 PM
I wrote a program to do that. Thee program generates a random polygon and then inserts trees
at random positions and with random orientations inside the polygon. Next step (the easy one) is to generate a no. of random forest locations on a big map area and on each location to spray a little random forest like the one in figure. Of course if not careful, one forest can be generated on top of an airfield, etc. http://forums.ubi.com/images/smilies/35.gif
Perhaps it might be useful if some visual basic or C++ programmer could write something similar (I'm using matlab so I can't convert it into an windows .exe). It's really simple.
Dunkelgrun
03-31-2006, 12:13 AM
How's your framerates near that lot?
Cheers!
lowfighter
03-31-2006, 12:39 AM
Originally posted by Dunkelgrun:
How's your framerates near that lot?
Cheers!
It drops of course, didn't tested really but say 10-20% drop. But it gives the feeling you fly over earth not over moon http://forums.ubi.com/groupee_common/emoticons/icon_wink.gif
The forests I plant are usually half as big as the one in photo. This is just because if the forest is very big, it will draw gradualy as you approach, which kills the whole pleasure.
lowfighter
03-31-2006, 07:06 AM
Here a certain number of small forests are planted simultaneously on the map. Kept the winter map and summer trees for better pic visibility.
http://img.photobucket.com/albums/v231/adonisl/padure2.jpg
lowfighter
04-04-2006, 04:29 AM
LOL a lot to clean, this vegetation creeps everywhere.
http://img.photobucket.com/albums/v231/adonisl/padure3.jpg
AVG_WarHawk
04-05-2006, 04:00 PM
Perhaps it might be useful if some visual basic or C++ programmer could write something similar (I'm using matlab so I can't convert it into an windows .exe). It's really simple.
Perhaps you could PM Uberdemon about this http://forums.ubi.com/images/smilies/typing.gif a very useful tool indeed.
hotspace
04-05-2006, 04:38 PM
That looks cool http://forums.ubi.com/images/smilies/25.gif And it would save so much time if you're use to using FMB http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif
lowfighter
04-06-2006, 07:45 AM
Originally posted by HotSpace:
That looks cool http://forums.ubi.com/images/smilies/25.gif And it would save so much time if you're use to using FMB http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif
Yes it saves time but: the way I do it now is:
I input a position onthe map around which the little forests are created. I input also the area around that position on which the little forests are created say: 20km by 10 km. Now the program is placing these small forests at random positions within the 20 X 10 Km area. So it can happen that it spawns some forests in awkward positions, on the water, over a factory, over an airfield. So then what I have to do is to delete the unwanted trees. That's unpleasant and diminishes the efficiency of the whole thing.
One solution is to place an object for each position I want a forest within the desired area. Then the prog reads those positions and place the random little forests accordingly.
Any other ideas?
PS: this can work also with some other "forests" like:
Suppose action happens over destroied town, or village. If you destroy the village by destruction tool, it looks maddeningly clean and simplified. So to make it better you can put some (I mean a lot of) destroied objects inside the town. If carefully chosen those objects can be placed randomly by the program. I'll try to show you an example perhaps during weekend.
Yeah, hopefuly someone will bring it to you too http://forums.ubi.com/groupee_common/emoticons/icon_smile.gif
lowfighter
04-09-2006, 04:25 AM
A proper winter:
http://img.photobucket.com/albums/v231/adonisl/padure4.jpg
lowfighter
04-09-2006, 07:07 AM
here's an attempt to produce random garbage in destroied town:
http://img.photobucket.com/albums/v231/adonisl/garbage.jpg