![]() |
|
|
#1 |
|
Архивный участник
Join Date: Aug 2005
Posts: 38
|
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? |
|
|
|
|
#2 |
|
Архивный участник
Join Date: Feb 2005
Posts: 200
|
height is 16 bit as always
but it has format hhhh hhhh hhhh nsew h - height n-north s - south e - east w - west |
|
|
|
|
#3 |
|
Архивный участник
Join Date: Aug 2005
Posts: 38
|
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? |
|
|
|
|
#4 |
|
Архивный участник
Join Date: Feb 2005
Posts: 200
|
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 |
|
|
|
|
#5 |
|
Архивный участник
Join Date: Aug 2005
Posts: 38
|
thanks for explanation Stazis
|
|
|
|
|
#6 |
|
Архивный участник
Join Date: Mar 2005
Posts: 77
|
Two russians can't meet each other on russian forums
)
|
|
|
|
|
#7 |
|
Архивный участник
Join Date: Oct 2005
Posts: 330
|
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 ? |
|
|
|
|
#8 |
|
Архивный участник
Join Date: May 2005
Posts: 85
|
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 |
|
|
|
|
#9 |
|
Архивный участник
Join Date: Aug 2005
Posts: 38
|
E31F maybe? ^^
|
|
|
|
|
#10 |
|
Архивный участник
Join Date: May 2005
Posts: 85
|
hm...... let me think...
|
|
|
|
|
#11 |
|
Архивный участник
Join Date: Oct 2005
Posts: 330
|
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 |
|
|
|
|
#12 |
|
Архивный участник
Join Date: Aug 2005
Posts: 38
|
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) |
|
|
|
|
#13 |
|
Архивный участник
Join Date: Oct 2005
Posts: 330
|
if you want a height of -3000 you will have to make it -6000.
so it's x2 dat.height=real.height * 2 |
|
|
|
|
#14 |
|
Архивный участник
Join Date: May 2005
Posts: 85
|
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 ? |
|
|
|
|
#15 |
|
Архивный участник
Join Date: May 2005
Posts: 85
|
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 ? |
|
|
|
|
#16 | |
|
Архивный участник
Join Date: Feb 2005
Posts: 200
|
Quote:
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) |
|
|
|
|
|
#17 | ||
|
Архивный участник
Join Date: Mar 2005
Posts: 77
|
Quote:
|
||
|
|
|
|
#18 |
|
Архивный участник
Join Date: Feb 2005
Posts: 200
|
Ok then
CSG - where the hell CSG operations sequence can be found in .unr and how to perform CSG operations under non-convex models. |
|
|
|
|
#19 |
|
Архивный участник
Join Date: Apr 2005
Posts: 357
|
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; ? |
|
|
|
|
#20 |
|
Архивный участник
Join Date: Nov 2005
Posts: 146
|
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> |
|
|
|
|
#21 |
|
Архивный участник
Join Date: Mar 2005
Posts: 77
|
This is kind of 41+ block, 0x380 block. Seems it is from TOI
|
|
|
|
|
#22 |
|
Архивный участник
Join Date: Dec 2005
Posts: 83
|
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! |
|
|
|
|
#23 |
|
Архивный участник
Join Date: Nov 2005
Posts: 146
|
Yes, it's from TOI
![]() Thanks a lot!!! |
|
|
| Thread Tools | Search this Thread |
| Display Modes | |
|
|