Post Pacific  

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

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 22.01.2006, 22:27   #1
zabbix
Архивный участник
 
Join Date: Aug 2005
Posts: 38
Default geodata 40 00+ block format

greetengs
need lil help with geodata format for 40 00+ type blocks

here is the example data:

h: -3657/-7313

-7313 => value in _conv.dat
-3657 => value>>1 (actual height)

but they shift in moving probability
few months ago i saw article here where possible values for moving directions in cell was explaind, bot looks like its del;eted now...
so, can anyone please help to extract 'moving' lfag from this data?
zabbix is offline  
Old 23.01.2006, 23:12   #2
Stazis
Архивный участник
 
Join Date: Feb 2005
Posts: 200
Default

height is 16 bit as always

but it has format

hhhh hhhh hhhh nsew

h - height
n-north
s - south
e - east
w - west
Stazis is offline  
Old 23.01.2006, 23:14   #3
zabbix
Архивный участник
 
Join Date: Aug 2005
Posts: 38
Default

yup i've already explained it myself, thanks
last think what i didnt understand - multifloor data, how to determine heights array length, can u please help me?
zabbix is offline  
Old 23.01.2006, 23:53   #4
Stazis
Архивный участник
 
Join Date: Feb 2005
Posts: 200
Default

it is easy

for example 41 00 block means you will have totally 65 height words in this block

then sub-blocks follows each headed with word 01 00 or 02 00 for our example where header is count of heights in this subblock

so for 41 00 you will have 63 * 01 00 subblocks and 1 * 02 00 subblock
Stazis is offline  
Old 24.01.2006, 00:04   #5
zabbix
Архивный участник
 
Join Date: Aug 2005
Posts: 38
Default

thanks for explanation Stazis
zabbix is offline  
Old 24.01.2006, 07:40   #6
gamedeveloper
Архивный участник
 
Join Date: Mar 2005
Posts: 77
Default

Two russians can't meet each other on russian forums )
gamedeveloper is offline  
Old 24.01.2006, 09:33   #7
Mirror
Архивный участник
 
Join Date: Oct 2005
Posts: 330
Default

so this means that height ( z ) changes every 16 units since 4 last bits are not taken into consideration :

0x0000 = 0
0x0010 = 16
0x0020 = 32
...
( four last bits are one hex digit )
but if this is the case why the stairs change their Z by 8 units ?
Mirror is offline  
Old 24.01.2006, 13:52   #8
Ameron
Архивный участник
 
Join Date: May 2005
Posts: 85
Default

I think we have 2x multiplier for more accuracy....
but the moving probability.... I thought it calculated form subtraction heights of neighbour cells....
so Stazis, if you say that format is hhhh hhhh hhhh nsew
then for hight 1FE3 we have binary data - 1111111100011
real hight is 111111110 - 01FE. smth strange...... it will be -511.
wtf ? :shock: or I smth miss ? :cry:

take value from block
Code:
4000 
1FE3 2FE3 3FE3 4FE3 6FE3 7FE3 8FE3 9FE3 
1FE3 2FE3 3FE3 5FE3 6FE3 7FE3 8FE3 9FE3 
1FE3 2FE3 4FE3 5FE3 6FE3 7FE3 9FE3 AFE3 
1FE3 3FE3 4FE3 5FE3 6FE3 8FE3 9FE3 AFE3 
2FE3 3FE3 4FE3 5FE3 7FE3 8FE3 9FE3 AFE3 
2FE3 3FE3 4FE3 6FE3 7FE3 8FE3 9FE3 BFE3 
2FE3 3FE3 5FE3 6FE3 7FE3 8FE3 AFE3 BFE3 
2FE3 3FE3 5FE3 6FE3 7FE3 9FE3 AFE3 BFE3
Ameron is offline  
Old 24.01.2006, 15:36   #9
zabbix
Архивный участник
 
Join Date: Aug 2005
Posts: 38
Default

E31F maybe? ^^
zabbix is offline  
Old 24.01.2006, 15:56   #10
Ameron
Архивный участник
 
Join Date: May 2005
Posts: 85
Default

hm...... let me think...
Ameron is offline  
Old 24.01.2006, 17:12   #11
Mirror
Архивный участник
 
Join Date: Oct 2005
Posts: 330
Default

ameron dont forget that numbers in .dat are saved as SIGNED short, not unsigned.

we finally managed to sort out most of the things for the mysterious 4000++ layers that the "elite" didn't share :

1.) set height from your source ( bmp etc. ) ( height = greyscale* 76 -9567 )
2.) heights in .dat are x2. so you will have to do a *2 multiplication
3.) set four final bits of height equal to 0
3.) add FLAG to height

flags :

#define NEU 5
#define NWU 6
#define NU 7
#define SEU 9
#define SWU 10
#define SU 11
#define EU 13
#define WU 14
#define ALLW 15

N=North, S=South, etc.
NE=NorthEast
U=Unawlkable
ALLW=All Walkable
Mirror is offline  
Old 24.01.2006, 17:38   #12
zabbix
Архивный участник
 
Join Date: Aug 2005
Posts: 38
Default

abt
2)

as far as i know its not x2, its just shifted left by 1
so just height>>1 (which equals to h/2 lol)
zabbix is offline  
Old 24.01.2006, 18:32   #13
Mirror
Архивный участник
 
Join Date: Oct 2005
Posts: 330
Default

if you want a height of -3000 you will have to make it -6000.
so it's x2
dat.height=real.height * 2
Mirror is offline  
Old 25.01.2006, 11:19   #14
Ameron
Архивный участник
 
Join Date: May 2005
Posts: 85
Default

nope.... the 1 layer block are 1x multiplier. so it calculated with height = greyscale* 76 -9567 fourmula.... and no multiplier !
I have generate 1layer map and turn on ///geodata in game.
the 1 layer block lokate on gorund. seems to be right generated.
but 4000+ blocks are seems to multiply by 2.
Another way you can comapre your geodata height with client by turn on ///stat l2 and use /loc command. so comapre what do you see on screen with /loc. And see.... there will be no multiplier.

2 Mirror. I know it. Use winhex that allow to see signed format...

Another question is how many blocks there have 4000 block ?
I figured that 64. Do you have the same ?
Ameron is offline  
Old 25.01.2006, 11:42   #15
Ameron
Архивный участник
 
Join Date: May 2005
Posts: 85
Default

Seems Mirror was wright.
For example take from 4000 block value 1FE3=>-7393
So convert to binarey - 1110001100011111. Last 4 bits indicates that block are walkable in all directions. So to evaluate the real hight have to set this 4 bits to 0. Get value 1110001100010000. It will be 10E3. So we have value -7408. Real height will be -7408/2 => -3704 => 88F1. It's the value of last 1layer cell. So it can be true. (not always it will be equal to last cell of 1 layer).
Another question. How we can know the condition where have to put 4000 blocks ?
Just guess, that when we have Z changed on a big value - have to put 4000 block.
Have someone another way ?
Ameron is offline  
Old 25.01.2006, 15:02   #16
Stazis
Архивный участник
 
Join Date: Feb 2005
Posts: 200
Default

Quote:
Originally Posted by gamedeveloper
Two russians can't meet each other on russian forums )
wow wow wow who's there?
big thanks for being before me.
hope if you see any whole on the way - tell me to stop.


sorry for offtopic.(btw thats my first offtopic post)
Stazis is offline  
Old 26.01.2006, 02:56   #17
gamedeveloper
Архивный участник
 
Join Date: Mar 2005
Posts: 77
Default

Quote:
Originally Posted by Stazis
Quote:
Originally Posted by gamedeveloper
Two russians can't meet each other on russian forums )
wow wow wow who's there?
big thanks for being before me.
hope if you see any whole on the way - tell me to stop.
sorry for offtopic.(btw thats my first offtopic post)
You are on the right way, you know Stazis
gamedeveloper is offline  
Old 01.02.2006, 04:23   #18
Stazis
Архивный участник
 
Join Date: Feb 2005
Posts: 200
Default

Ok then

CSG - where the hell CSG operations sequence can be found in .unr

and how to perform CSG operations under non-convex models.
Stazis is offline  
Old 01.02.2006, 06:33   #19
RmzVoid
Архивный участник
 
Join Date: Apr 2005
Posts: 357
Default

short dat_height_value;
short real_height_value;
bool e,w,n,s;
bool sign;

sign = dat_height_value & 0x8000;
real_height_value = dat_height_value>>4;
if ( sign ) real_height_vlue |= 0x8000;

n = dat_height_value & 8;
s = dat_height_value & 4;
e = dat_height_value & 2;
w = dat_height_value & 1;

?
RmzVoid is offline  
Old 14.02.2006, 18:59   #20
zcold
Архивный участник
 
Join Date: Nov 2005
Posts: 146
Default

While decoding _conv.dat files, after a lot of standart "00 00" and "40 00+" blocks, i see such block: "80 03 0E 00 AF 4E", and a lot of digits with no block limiters... Anybody can tell what is this?

The full string from file looks like: "00 00 F0 F0 E8 F0 80 03 0E 00 AF 4E 4F 46 6F 3E 9F 36 BF 2E..."

Please, any information
Thanks a lot

<rus>
Во время "разбора" .dat-файлов после обычных 00 00 и 40 00+ блоков был замечен такой блок: "80 03 0E 00 AF 4E", и куча символов дальше, без каких-либо разделителей блоков...
Может кто-нибудь подсказать что это?
Буду весьма благодарен за любую информацию.
Спасибо
</rus>
zcold is offline  
Old 15.02.2006, 02:30   #21
gamedeveloper
Архивный участник
 
Join Date: Mar 2005
Posts: 77
Default

This is kind of 41+ block, 0x380 block. Seems it is from TOI
gamedeveloper is offline  
Old 15.02.2006, 12:06   #22
vex
Архивный участник
 
Join Date: Dec 2005
Posts: 83
Default

Yes, this is many many floors block , for example the first one is 14 (0E00) floors have - this is really may be only TOI geo

dont confuse man!
vex is offline  
Old 15.02.2006, 12:45   #23
zcold
Архивный участник
 
Join Date: Nov 2005
Posts: 146
Default

Yes, it's from TOI
Thanks a lot!!!
zcold 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 19:15.