Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 27.08.2006, 22:58   #1
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default -- Deleted --

-- Deleted --
FidoW is offline  
Old 28.08.2006, 07:00   #2
Drag
Архивный участник
 
Join Date: Mar 2006
Posts: 241
Default

FidoW i didnt check but i only add +30 to z coords and seems to be alright ^^

Thx Masta

Anyway giving 'ready' data is not good as make short tutorial so people get learn it and at last we get leechers off x] xDDDD
Drag is offline  
Old 28.08.2006, 11:30   #3
Mirror
Архивный участник
 
Join Date: Oct 2005
Posts: 330
Default

the ziggurats' teleport PosZ is NOT wrong. the geodata shared aka 'fake geo' made by client generation with good meshes and awful terrain causes the problem. The tombs have 2 layers very close one to the other and the PosZ is between them so you get teleported to the lower one with the result of not being able to move from the first chamber. So one solution for this is to make the PosZ about 50 units higher in npcdata for each of enter_necro/catacomb.
Mirror is offline  
Old 06.09.2006, 11:00   #4
Stazis
Архивный участник
 
Join Date: Feb 2005
Posts: 200
Default

Mirror - can you give some tips what should be corrected with terrain
do so i'll fix a convertor and release a new pack.

i already know that should use 8*8 blocks and calculate walkability flags for terrain too
only thing bothering me is an technique how client forms an triangles from heights - it is not formed regularly from left top to right buttom corner or vice versa - there is someth like diamond triangulation used to define ... if i find it - terrain will be perfect.
Stazis is offline  
Old 06.09.2006, 11:58   #5
Domzelan
Архивный участник
 
Join Date: Apr 2005
Posts: 599
Default

Strazis if u fix your convector - it will be the best geo convector i think
Domzelan is offline  
Old 06.09.2006, 12:26   #6
MuNLoK
Архивный участник
 
Join Date: Sep 2005
Posts: 255
Default

Yes, I think it too
MuNLoK is offline  
Old 12.09.2006, 19:26   #7
nish
Архивный участник
 
Join Date: May 2006
Posts: 237
Default

thanks fidow works perfect
nish is offline  
Old 12.09.2006, 20:07   #8
Mirror
Архивный участник
 
Join Date: Oct 2005
Posts: 330
Default

Quote:
Originally Posted by Stazis View Post
Mirror - can you give some tips what should be corrected with terrain
do so i'll fix a convertor and release a new pack.

i already know that should use 8*8 blocks and calculate walkability flags for terrain too
only thing bothering me is an technique how client forms an triangles from heights - it is not formed regularly from left top to right buttom corner or vice versa - there is someth like diamond triangulation used to define ... if i find it - terrain will be perfect.
about terrain if you open utx with UTPT you will see the BMP size is a bit more than 131072 bytes ( 16 bit accuracy ) and has also an offset. the corect size is 131072 bytes. the more bytes are useless header you just need to read 131072 bytes, calculate from the end and remove the difference. you will have a one channel 16but accuracy .raw ( or .bmp if you wish but reading a .raw is much easier ). you can make this 256*256 .raw into 2048*2048 via photoshop and then just read and write heights to a terrain only geo and voila you have PERFECT TERRAIN, we also used to add 32 units height to geo and then shift the terrain two small ( 2048 ) blocks in x and y. we use zdiff 24 for flags but you in some cases even 16 is good

so it's not true you cant make perfect terrain from .bmp you just need not to open it with UTPT cuz it discards 8bit info

p.s. catacomb of branded for some reason has serious problems and also terrain over tombs when it is 4100 layer has no flags ( devastated castle front of it, EG tomb ). i also think in some geos you frame it with flags

utxreader.c

#include <stdio.h>
#include <stdlib.h>

int main (int argc, char *argv[]) {


FILE *fi, *fo;
unsigned long int counter = 0;
unsigned char dummy,height;
unsigned int offset,size,realoffset;
unsigned int x,y;

if (argc != 5) {
printf("Usage : utxreader 'UTX file' 'RAW file' 'OFFSET' 'SIZE'\n");
exit(0);
}


offset = atoi(argv[3]);
size = atoi(argv[4]);
realoffset = offset + size - 10 - 131072;

if ((fi=fopen(argv[1],"rb"))!=NULL) {
for (y=0;y<=realoffset-1;y++) fread(&dummy, sizeof(dummy), 1, fi);
if ((fo=fopen(argv[2],"wb"))!=NULL) {
for (x=0;x<=131071;x++) {
fread(&height, sizeof(height), 1, fi);
fwrite(&height, sizeof(height), 1, fo);
counter++;
}
}
fclose(fo);
}
fclose(fi);


printf("%lu heights were written\n",counter);

return 0;
}
Mirror is offline  
Old 12.09.2006, 20:43   #9
Sakumi
Архивный участник
 
Join Date: Apr 2005
Posts: 555
Default

Quote:
Originally Posted by Mirror View Post
about terrain if you open utx with UTPT you will see the BMP size is a bit more than 131072 bytes ( 16 bit accuracy ) and has also an offset. the corect size is 131072 bytes. the more bytes are useless header you just need to read 131072 bytes, calculate from the end and remove the difference. you will have a one channel 16but accuracy .raw ( or .bmp if you wish but reading a .raw is much easier ). you can make this 256*256 .raw into 2048*2048 via photoshop and then just read and write heights to a terrain only geo and voila you have PERFECT TERRAIN, we also used to add 32 units height to geo and then shift the terrain two small ( 2048 ) blocks in x and y. we use zdiff 24 for flags but you in some cases even 16 is good

so it's not true you cant make perfect terrain from .bmp you just need not to open it with UTPT cuz it discards 8bit info

p.s. catacomb of branded for some reason has serious problems and also terrain over tombs when it is 4100 layer has no flags ( devastated castle front of it, EG tomb ). i also think in some geos you frame it with flags

utxreader.c

#include <stdio.h>
#include <stdlib.h>

int main (int argc, char *argv[]) {


FILE *fi, *fo;
unsigned long int counter = 0;
unsigned char dummy,height;
unsigned int offset,size,realoffset;
unsigned int x,y;

if (argc != 5) {
printf("Usage : utxreader 'UTX file' 'RAW file' 'OFFSET' 'SIZE'\n");
exit(0);
}


offset = atoi(argv[3]);
size = atoi(argv[4]);
realoffset = offset + size - 10 - 131072;

if ((fi=fopen(argv[1],"rb"))!=NULL) {
for (y=0;y<=realoffset-1;y++) fread(&dummy, sizeof(dummy), 1, fi);
if ((fo=fopen(argv[2],"wb"))!=NULL) {
for (x=0;x<=131071;x++) {
fread(&height, sizeof(height), 1, fi);
fwrite(&height, sizeof(height), 1, fo);
counter++;
}
}
fclose(fo);
}
fclose(fi);


printf("%lu heights were written\n",counter);

return 0;
}

Just to note, I can verify the issues around CoB. It looks ok in the geoviewers, but occasionaly a player running to CoB will just fall through the ground and land in the catacomb lol. I attempted to regenerate it but of course, since it was the same tool, same problem
Sakumi is offline  
Old 13.09.2006, 12:36   #10
Stazis
Архивный участник
 
Join Date: Feb 2005
Posts: 200
Default

Mirror looks like we are talking on different languages.
i know how it is stored and how to read it. i'm using 16-bit values directly from G16 texture.
the mess with a terrain you see is not couse of mispropreate reading or calculation of heights.

1. using high density blocks for any ground 128*128 points square is space-expencive a lot - blocks of geodata starting with 00 00 is not maden for nothing. just must define wich square of ground to represent as 00 00 block and wich should be more exactly presented with 40 00 blocks

2. i did not used terrain in walkability calculation - this is a main trouble all you see - couse square that have even single block-walkability flag would be automatically represented as 40 00 block ( changing this probably will fix first problem too)

3. as i sayd - same heights can give you totaly different relief - couse it depends on how you create triangles from it. (see images)
if you tace a look on ground in ///c_rmode 1 you will notice that method of triangulation of terrain is not constant (i mean not from north-west corner to south-east corner) - and the heights of terrain depends on it

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
var_a.jpg — 1918 байт
var_b.jpg — 1850 байт
Stazis is offline  
Old 13.09.2006, 19:41   #11
Mirror
Архивный участник
 
Join Date: Oct 2005
Posts: 330
Default

yes you use more space but i never bothered to make a optimization algo for flat terrain replacing 4000 with 0000 cuz i had 6gig ram in 2 boxes so i didn't consider necessary to bother with optimization and i always liked it 2048x2048.

about the triangulation of terrain when in ///c_rmode is just a matter of the engine since all 3d engines basic unit is not square but triangle it has not to do with geodata or flags

what we did to fix the geos was by making a terrain only 2048*2048 with flags and replace all the geos 0000 blocks with our terrain 2048*2048 blocks

edit :. im speaking about the pack where the meshes were good but all terrain was 0000 layers only ( except terrain over tombs or other underground buildings )

edit2 : as john karmack said 'it's all about triangles'
Mirror is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:10.