@Rakscha:

Having thousands of entities for trees in a level consumes much processing power. Since in the game for which I am writing the editor for, has much vegetation on 5x5 km maps, I suggested that we could take the x/y points for each tree on the map and bake, e.g. several dozen trees together as one single model. If the trees share textures and use e.g. texture atlasses for the leaf-parts, a huge performance gain can be reached. I'll keep you updated, because that is what I am going to do after I finished the clustering stage. I implemented k-means clustering for vectors (xyz), finished a balancing postprocess, for minimal mean distance to center -or- approximate equal size of all clusters (size = number of datapoints per cluster) and will now design a hierarchical clustering that tries to 1.) create as less clusters as possible and 2.) don't overcome a limit of datapoints per cluster (this is important, because if my tree with highest polycount has e.g. 1000 faces and since I can only have models with 2^16 = 65536 faces, in this case the limit would be 2^16 / 1000 ~= 65 trees per model == 65 datapoints per cluster. A lower bound will also be introduced to avoid, that if a clusters molders back into a 1-datapoint cluster (when k, the number of generated clusters gets to high). In that case, I use the k-1 clustering and apply the same algorithm to those clusters, that exceed my upper bound and do everything until the upper- and lower-bound condition holds ultimately.

@Joozey: I just draw a greyscale bitmap with gradients and soft-brushes and used a Floyd-Steinberg algorithm to dither it; with an eraser I deleted some parts. I wrote a function that creates an array of VECTOR's for each white pixel in a bitmap, with each VECTOR representing the coordinates.

Last edited by HeelX; 01/29/12 19:26.