|
Re: What are you working on?
[Re: Joozey]
#392937
01/29/12 19:19
01/29/12 19:19
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
@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.
|
|
|
Re: What are you working on?
[Re: Joozey]
#392939
01/29/12 19:23
01/29/12 19:23
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Ah, so not completely procedural During tests - no. Later I will create a probability map from topographic maps and use the seeding function I showed earlier to generate the datapoints. This way, you can throw in an arbitrary map and matching forests are generated.
Last edited by HeelX; 01/29/12 19:23.
|
|
|
Re: What are you working on?
[Re: sivan]
#392951
01/29/12 20:21
01/29/12 20:21
|
Joined: Apr 2005
Posts: 4,506 Germany
fogman
Expert
|
Expert
Joined: Apr 2005
Posts: 4,506
Germany
|
@HeelX: Do you use the mdl7 sdk to bake the models?
no science involved
|
|
|
Re: What are you working on?
[Re: fogman]
#392952
01/29/12 20:30
01/29/12 20:30
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
@HeelX: Do you use the mdl7 sdk to bake the models? Yes, I will hmm... 5x5 km with extensive vegetation really needs tricks. probably this game won't be a flame thrower simulation I mean if vegetation is static, it is a really fine solution! It's not a rainforest game either maybe I am also totally wrong about the tradeoff, but I have a strong feeling about this.
Last edited by HeelX; 01/29/12 20:34.
|
|
|
Re: What are you working on?
[Re: nacrug]
#393048
01/30/12 21:12
01/30/12 21:12
|
Joined: Dec 2003
Posts: 988 Germany, Magdeburg
JoGa
User
|
User
Joined: Dec 2003
Posts: 988
Germany, Magdeburg
|
i'm just working on my little game and got some empty brain, no idea, maby somebody can help me, if he has a idea... I need two icons in a kind of "bubble" or something like that over the head of NPCs, where the player can buy things or can talk with them (should be just in general "buy" and "talk"). (click to enlarge). On the left you see my pictures for this in gimp, but it doesn't fit in a medival world. I dont like my actual version and maybe somebody has got a better idea or some food for thoughts?
|
|
|
|