|
|
SGT_FW
by Aku_Aku. 06/17/25 15:37
|
|
|
|
|
|
|
|
Re: What are you working on?
[Re: Pappenheimer]
#392212
01/20/12 10:43
01/20/12 10:43
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Working on a seeding function for terrains, which overcomes some disadvantages of the ent_seed function (level.c):
void hmp_seed (Hmp* hmp, BMAP* prMap, float avgDist, float minDist, BOOL relax, EVENT ev);
It takes a heightfield, a probability map, an average distance, a minimal distance and generates a distribution (1st pass). If relax is = true, all generated positions will be iterated in descending order of field probability (so that items with high field probability have more influence over lower probability items in terms of position stability) and too near items are pushed away, if the minimum distance is violated (2nd pass). If the previously generated random item probabilty then violates the (predefined) field probability, the item will be deleted; otherwise it gets updated (height and field probability). Then, in the 3rd pass, pairs are searched for, that still violate the minimum distance, and are deleted as well. After finishing this, for each item a callback will be called and the heightfield, the XYZ coordinates (in heightfield space) and the field probability at that location are passed. This gives me the opportunity to decide by myself what to do for each generated item:
void myFunc (Hmp* hmp, VECTOR* hXYZ, float pr)
{
VECTOR* pos = hmp_vectoent(hmp, hXYZ, terrain, NULL, true);
if (pos != NULL)
{
ENTITY* e = ent_create(CUBE_MDL, pos, NULL);
e->scale_x = e->scale_y = e->scale_z = pr;
}
}
In the function above I generate a cube on the terrain, whereas the scale of the cube represents the field probability at that very location. It looks like this; the picture in the upper left corner shows the probability (black = 0%, white = 100%); parameters were average distance = 24 and minimum distance = 12: (click to enlarge)
Last edited by HeelX; 01/20/12 10:47.
|
|
|
Re: What are you working on?
[Re: HeelX]
#392218
01/20/12 12:27
01/20/12 12:27
|
chris_oat
Unregistered
|
chris_oat
Unregistered
|
very cool HeelX, are you gonna share this one with us once its finished? will it be also work on A7?
Last edited by chris_oat; 01/20/12 12:27.
|
|
|
Re: What are you working on?
[Re: ]
#392221
01/20/12 12:38
01/20/12 12:38
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
very cool HeelX, are you gonna share this one with us once its finished? will it be also work on A7? Thanks! - Maybe, but that decision has to be made in the future and although I own the rights for the code (it is part of a client's project), I don't know what happens afterwards.
|
|
|
Re: What are you working on?
[Re: HeelX]
#392259
01/20/12 19:31
01/20/12 19:31
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
@Pappenheimer : Yes the reduce Brush will help a lot specially on surface with no details : surface details can be painted on normal map after the baking. The point is that he needs to make lot more regular surfaces, less disturbed, it looks very like some Clay trying on curves. I made some torso in the same style :  Perhaps it's better to have basi surface good and regular before painting details on the normal map. So i started making some lizard monster also ! 
Last edited by ratchet; 01/20/12 20:32.
|
|
|
Re: What are you working on?
[Re: Realspawn]
#392342
01/21/12 19:28
01/21/12 19:28
|
Joined: Apr 2008
Posts: 2,488
ratchet
OP
Expert
|
OP
Expert
Joined: Apr 2008
Posts: 2,488
|
Iphone commando remake : Iphone commando Perhaps it's beta ,the contrast and luminosity between palm trees and grass is too much (grass is too much blokc color dark and palm tree is too much lightened). You can take this picture as example of good textures color and luminosity : For cartoon here is another style : But the gameplay is here and great already 
Last edited by ratchet; 01/21/12 19:35.
|
|
|
|