Front Warrior Grass Generator
Front Warrior Grass Generator
UPDATE - FINAL VERSION WITH HALF COMPLETE USER GUIDE
Here you go : http://www.mediafire.com/?ucbm8aaromr36bv
ALL OTHER DOWNLOADS ARE OUT OF DATE
UPDATE - BUGS FIXED
New zip
http://frontwarrior.googlecode.com/file ... evised.zip
Hi all, this is a special program (source included+example)
one runs through a terrain and outputs a file with the foilage
another is a demo of how to use this
http://frontwarrior.googlecode.com/files/FWGrass.zip
The generator program takes one argument, the path to xml input file. You feed the terrain model, a vegetation map in the input file. Alpha channel represents how many plants are there (more opaque more plants), In the input file you specify density (the bigger the farther apart the plants are, so smaller means more plants) and many vegetation types (plants, up to 32), their textures, scales, position and scale variations, ratios(to each other), and a colour channel of the vegetation map they are assigned to. Each channel hightens the probablility of planting a plant with that channel flag in the input file.
The generator outputs 3 million plants, weighing 1.2 GB in memory (300mb compressed) in 27 minutes on a singe core 2.16ghz. On my school's hyperthreaded 3ghz it takes 7 mins.
The example uses a file with 40 thousand plants. It takes the path to the grs file as the argument. Please extract the two directories next to each other.
The output file is zip compressed, and the generation of plants is multithreaded (4 threads, should run nice on i7). The plants are in quads, but quadtree is not supported yet. Nor is streaming for huge vegetation coverage.
NOTE: The windows EXE is out of date, please recompile. Linux should be fine.
this is my best piece of programming in C++ yet...
Here you go : http://www.mediafire.com/?ucbm8aaromr36bv
ALL OTHER DOWNLOADS ARE OUT OF DATE
UPDATE - BUGS FIXED
New zip
http://frontwarrior.googlecode.com/file ... evised.zip
Hi all, this is a special program (source included+example)
one runs through a terrain and outputs a file with the foilage
another is a demo of how to use this
http://frontwarrior.googlecode.com/files/FWGrass.zip
The generator program takes one argument, the path to xml input file. You feed the terrain model, a vegetation map in the input file. Alpha channel represents how many plants are there (more opaque more plants), In the input file you specify density (the bigger the farther apart the plants are, so smaller means more plants) and many vegetation types (plants, up to 32), their textures, scales, position and scale variations, ratios(to each other), and a colour channel of the vegetation map they are assigned to. Each channel hightens the probablility of planting a plant with that channel flag in the input file.
The generator outputs 3 million plants, weighing 1.2 GB in memory (300mb compressed) in 27 minutes on a singe core 2.16ghz. On my school's hyperthreaded 3ghz it takes 7 mins.
The example uses a file with 40 thousand plants. It takes the path to the grs file as the argument. Please extract the two directories next to each other.
The output file is zip compressed, and the generation of plants is multithreaded (4 threads, should run nice on i7). The plants are in quads, but quadtree is not supported yet. Nor is streaming for huge vegetation coverage.
NOTE: The windows EXE is out of date, please recompile. Linux should be fine.
this is my best piece of programming in C++ yet...
Last edited by devsh on Tue May 10, 2011 3:22 pm, edited 3 times in total.
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
-
- Posts: 288
- Joined: Wed Apr 16, 2008 1:45 am
- Contact:
I had a similar idea in the works for my world generator. I wouldn't use an image approach as I feel rgba is limiting in the ability to vary planting. I am also simulating weather so I would need tropical plants, plains, deserts and things like that based on the geography and weather patterns. I will definitely take a look at your code and see how you chose to implement things though.
-
- Competition winner
- Posts: 1123
- Joined: Sun Jun 10, 2007 11:14 pm
I fixed some bugs, etc so its fully functional and nice now. Have fun with the new zip
http://frontwarrior.googlecode.com/file ... evised.zip
http://frontwarrior.googlecode.com/file ... evised.zip
Last edited by devsh on Sun Mar 27, 2011 7:50 pm, edited 1 time in total.
-
- Posts: 363
- Joined: Thu Dec 16, 2010 8:50 pm
- Location: Somewhere in the clouds.. drinking pink lemonade and sunshine..
i wish i had that freedom... i have to do school work... help bàba and stuff...devsh wrote:sorry, fixed
I've been up for 32 hours
i have so much work to do on my project but so little time...
ent1ty wrote: success is a matter of concentration and desire
at a cost measure in computer resourcesButler Lampson wrote: all problems in Computer Science can be solved by another level of indirection