In a Big Country-Positioning Plants

I’ve probably created over a dozen different landscape projects (all of them fun and leading quickly to nowhere), but have always been stumped by vegitation. Creating the stuff is difficult in the first place, but designing it to appear only where the player is at is nearly impossible. I’ve used a few different systems… placing large groups of independant trees, placing large groups of spawn points, even trying to use a bullethole script to place the foliage, and each leads to rather extreme lag or doesn’t work at all.
However, I can’t help but wonder if there is a way to design a system that will add pre-made objects randomly within a set area on the elevation of the ground on a landscape. Any idea what I could look into (and yes, I realize that there will probably be python involved)?

That is called Level Of Detail (LOD), there are a lots of setups around! What version of Blender are you running?
The simplest one is a logic brick brick based one… Here’s an example:Simple LOD.blend (1.4 MB)
I just added a few hundred more spawners, for you to see that this is a resource consumption method. The near sensors are very expensive. But that’s a good starting point…
Other methods involving replace mesh, with python are more efficient. Another method (the best for me) is an kd-tree method by ideasman42, but it only works on 2.49b, it’s still to be converted to 2.5X (solarlune converted 1 of the scripts though).
Good luck.

torakunsama: thanks for the response and the tip, but the game didn’t work. I did have a look at the logic bricks, though, and I get where you’re coming from. I’ve used systems like that before. For example, I once created a tropical island around about 3/4 of a square mile in area. I used a hair emitter to create several empties along the landscape’s surface, then moved the empties to another layer. I randomly set them to spawn trees, rocks, plants, etc., and then parented them to other proximity-based ‘master’ empties that would add groups of the plant-spawning empties. The system worked, but even so much as having several thousand objects, even devoid of meshes, materials, or textures, still resulted in some pretty serious lag. The fact is that having the spawning locations of everything laid out and saved prior to playing the game will result in a lot of pressure on the engine to recall each position. Thus, placement in real time is, if possible, prefferable. At least for macro-terrains.
Makers_F: You’re speaking more my language, though you’re speaking it so fluently, my feeble mind can’t keep up. I will have to try poking around some of your files, just to see this in operation myself. I just hope my computer (a not-so-excellent Windows Vista) will be able to run the thing… or even to unzip the files. I look forward to seeing your grand concoctions.