Yeah, I am thinking bizarro maths is the way to go.
There's no "entities" to create and destroy, I just need a list of positions, and then I'll render however many instances of my mesh I need. I'd prefer not to generate any stored data, because the sheer numbers of things to sift through will slow it down.
So the player's xz position, rounded to the nearest pixel of the density map or heightmap, is input as the random seed...
It would be nice to be able to generate a circular shape around the player, instead of generating a square shape and distance-culling and z-ordering the instances. It would also be nice to be able to generate an arbitrary circle for any float position, instead of having to generate the data for all the "nearby" tiles.
hmmmm...
Maybe it would work to start by generating a grid of plant positions with a circle...use sin and cos to generate the grid, starting from the furthest out, and working your way inwards. Then you can add some randomness to the positions (but not enough that you would need to change the z-order).
So the first step would be to write an algorithm to generate points with a circle, in the order of distance from the center:
There's no "entities" to create and destroy, I just need a list of positions, and then I'll render however many instances of my mesh I need. I'd prefer not to generate any stored data, because the sheer numbers of things to sift through will slow it down.
So the player's xz position, rounded to the nearest pixel of the density map or heightmap, is input as the random seed...
It would be nice to be able to generate a circular shape around the player, instead of generating a square shape and distance-culling and z-ordering the instances. It would also be nice to be able to generate an arbitrary circle for any float position, instead of having to generate the data for all the "nearby" tiles.
hmmmm...
Maybe it would work to start by generating a grid of plant positions with a circle...use sin and cos to generate the grid, starting from the furthest out, and working your way inwards. Then you can add some randomness to the positions (but not enough that you would need to change the z-order).
So the first step would be to write an algorithm to generate points with a circle, in the order of distance from the center: