OBD talk:OTLF: Difference between revisions

From OniGalore
Jump to navigation Jump to search
No edit summary
m (marking dead link)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
7F FE FC 39 ==> 7, 127, 127, 127 ==> Is this right? Because:
I don't feel comfortable with that 12/20 bit thing. 12 bit, that means a max of 4096 gunk quads per leaf node. That seems a bit to much to me. The GDC-paper says, that 256 is the limit. Did they increased it?
:
:
level 3 - lab
Maybe we can look at first 4 bytes of the OTLF packages 15 and 16 (IIRC) of level 3:
:
:
'''7FFEFC39'''
package 15: 13000000 ==> 12 bit = 130 (hex) = 304 (dez)<BR>
package 16: 0E300100 ==> 12 bit = 0E3 (hex) = 227 (dez)
:
:
01111111111111101111110000111001
That's what you get, if you read the 12-bit from right to left. If you calculate the sum of all 12-bits you get 2 million and a bit. Plus the highest 12-bit is 4080, which means 4080 gunk quads in a leaf node. If you read the 12-bit from left to right, the sum ist ~ 3 milllion and the highest value 4081.
:
:
01111 - 15 (min 0; max 31)<BR>
Maybe they've used the factor four, because a lot of the packages overlap each other. (Dunno if this is really a reason.)
111111111 - 511 (min 0; max 511)<BR>
101111110 - 382 (min 0; max 511)<BR>
000111001 - 57 (min 3; max 319)
:
:
011111111 - 255 (min 0; max 511)<BR>
If you look to package 16, the 20-bit ist 256 (read from right to left). What does it tell me? Start with package 256 and read 227 packages or start at position 256 and read 227 packages? Or something else?
111111011 - 507 (min 0; max 511)<BR>
111100001 - 481 (min 8; max 505)<BR>
11001 - 25 (min 2; max 31)
:
:
''mirrored''<BR>
[[User:Ssg|Ssg]] 16:07, 27 April 2007 (CEST)
10011100001111110111111111111110
---
:
:
10011 - 19 (min 4; max 31)<BR>
Well, the 12/20 thing comes from the exe so it should be correct. Besides, my environment viewer works fine with 12/20 ^^.
100001111 - 271 (min 16; max 303)<BR>
110111111 - 447 (min 0; max 447)<BR>
111111110 - 510 (min 0; max 511)
:
:
100111000 - 312 (min 64; max 505)<BR>
Anyway, it makes sense to increase the number of quads per leaf rather than decreasing the leaf minimum size. Of course 4095 quads per leaf would be way too much but nobody says that the max value used is 4095. The max value for 12/20 is 426 and this happens in a place where the geometry is a bit complex - level 2, a piece of the deadly brain thingie (and that leaf is 16 in size, the smaller size possibile so it's normal that the max number of quads was bumped up).
011111101 - 253 (min 0; max 511)<BR>
[[User:Neo|Neo]]
111111111 - 511 (min 0; max 511)<BR>
---
11110 - 30 (min 0; max 31)
:''"If you look to package 16, the 20-bit is 256 (read from right to left). What does it tell me?
:
:''Start with package 256 and read 227 packages or start at position 256 and read 227 packages?"
'''39FCFE7F'''
:The former. Read 227 elements ("packages") starting with element number 256. Index, not offset.
:
:Thanks for ignoring my request to resume synchronization of Oni Galore with Oni Stuff, BTW ^^
00111001111111001111111001111111
::[[User:Geyser|geyser]] 00:29, 28 April 2007 (CEST)
:
00111 - 7 (min 0; max 7)<BR>
001111111 - 127 (min 127; max 511)<BR>
001111111 - 127 (min 127; max 511)<BR>
001111111 - 127 (min 63; max 511)
:
001110011 - 115 (min 5; max 127)<BR>
111110011 - 499 (min 7; max 511)<BR>
111110011 - 499 (min 6; max 511)<BR>
11111 - 31 (min 0; max 31)
:
''mirrored''<BR>
11111110011111110011111110011100
:
11111 - 31 (min 0; max )<BR>
110011111 - 415 (min 32; max 511)<BR>
110011111 - 415 (min 32; max 511)<BR>
110011100 - 412 (min 32; max 508)
:
111111100 - 508 (min 1; max 511)<BR>
111111100 - 508 (min 1; max 511)<BR>
111111100 - 508 (min 1; max 511)<BR>
11100 - 28 (min 0; max 28)
:
So, what's the correct one? The last block looks convincing to me.
:
:
---
---
:
:
"Bits 0-11 (12 bits) contain the number of gunk quads that intersect this leaf, bits 12-31 (20 bits) contain the index of the gunk quad list."
@Neo:
:
:OTLF Package 12381 in level 3 is: FF106A14. How to read the first three nibbles (FF1), so that the sum is smaller than 426?
Are you sure? The [http://www6.fh-eberswalde.de/user/dkriesch/oni/gdc_copy/brentgdc2000.html GDC-Paper] says 8/24 bit. *wonder*
::;ssg
:If you unswap the bytes properly you get 0x146A10FF, so the lower 3 nibbles are 0x0FF = 255 < 426.
::[[User:Geyser|geyser]]
:Ooooooohhh... thank you. Now I got it. (Wow, it tooks a long time...)
:[[User:Ssg|Ssg]] 12:18, 3 May 2007 (CEST)
:See the red bordered area in the pic below? It means that every bit of the 12 bits is used.
<nowiki>http://www6.fh-eberswalde.de/user/dkriesch/oni/12bit2_FF106A14_12381.gif</nowiki> (dead link)
:I don't get it. How do you read these 12 bit part?
::;ssg
:level3 only has 18691 leaves. Please tell us what you're looking at.
::[[User:Geyser|geyser]] 18:27, 2 May 2007 (CEST)
:The first column isn't used for the leaves (as you can see) and Excel starts with 1 and not with 0, so 18693 - 2 = 18691 ==> perfect.
:[[User:Ssg|Ssg]] 12:18, 3 May 2007 (CEST)
@geyser:
:
:
[[User:Ssg|Ssg]] 15:31, 20 April 2007 (CEST)
:I've read it, but I don't have so much time yet. (Btw, is there anything to synchronize left over? At the moment I have to take care that I don't left to much behind the wiki.)
::;ssg
:I can't say I fully understand the sentences in brackets.
:As for the syntax and the looks, new-format pages like [[ABNA]] are not perfect, but already much better than older ones, not to mention things like [[ONOA]] (raw HTML...)
:As for the knowledge: yes, there are files for which the documentation is more complete on OS than on OG. I can't systematically synchronize everything by myself...
:In some cases, there are files for which OG is ahead of OS. You shouldn't be too worried about that, since the wiki holds a full history of the pages.
:Just update everything in an "automatic" way, and then we'll compare with previous versions and merge stuff in.
::[[User:Geyser|geyser]] 18:27, 2 May 2007 (CEST)
:Well, if I have some time, I'll try to go on with updating the format + content (if necessary).
[[User:Ssg|Ssg]] 12:18, 3 May 2007 (CEST)


Yes to both questions.
{{OBD}}
:*First one:
::For the size and position you must note that the maximum position of the octree node is stored. This leads to the fact that the maximum values must all be 511 because this is the size of the octtree and no nodes can be missing. This leaves as with just to cases to consider: 7, 127, 127, 127 and 28, 508, 508, 508.
::Now the size of an octtree node is always a power of 2 so 28 or 7 are not sizes but powers and 28 will be a huge size for an octtree node (in fact you need to add 4 to this value to get the power, that means 28 ends up as 32 which is even bigger...).
:*Second one:
::As for 12/20 bits vs. 8/24 bits: well, there must be a reason for "*) You have to devide the offset by 4 to get the correct offset." :). Of course 4 means only a 2 bit difference but there is another 2 bit difference from the fact that it's a index and not an offset. There is no file in Oni where an array offset is used instead of an array index as far as I know.
[[User:Neo|Neo]]

Latest revision as of 12:04, 9 May 2022

I don't feel comfortable with that 12/20 bit thing. 12 bit, that means a max of 4096 gunk quads per leaf node. That seems a bit to much to me. The GDC-paper says, that 256 is the limit. Did they increased it?

Maybe we can look at first 4 bytes of the OTLF packages 15 and 16 (IIRC) of level 3:

package 15: 13000000 ==> 12 bit = 130 (hex) = 304 (dez)
package 16: 0E300100 ==> 12 bit = 0E3 (hex) = 227 (dez)

That's what you get, if you read the 12-bit from right to left. If you calculate the sum of all 12-bits you get 2 million and a bit. Plus the highest 12-bit is 4080, which means 4080 gunk quads in a leaf node. If you read the 12-bit from left to right, the sum ist ~ 3 milllion and the highest value 4081.

Maybe they've used the factor four, because a lot of the packages overlap each other. (Dunno if this is really a reason.)

If you look to package 16, the 20-bit ist 256 (read from right to left). What does it tell me? Start with package 256 and read 227 packages or start at position 256 and read 227 packages? Or something else?

Ssg 16:07, 27 April 2007 (CEST) ---

Well, the 12/20 thing comes from the exe so it should be correct. Besides, my environment viewer works fine with 12/20 ^^.

Anyway, it makes sense to increase the number of quads per leaf rather than decreasing the leaf minimum size. Of course 4095 quads per leaf would be way too much but nobody says that the max value used is 4095. The max value for 12/20 is 426 and this happens in a place where the geometry is a bit complex - level 2, a piece of the deadly brain thingie (and that leaf is 16 in size, the smaller size possibile so it's normal that the max number of quads was bumped up). Neo ---

"If you look to package 16, the 20-bit is 256 (read from right to left). What does it tell me?
Start with package 256 and read 227 packages or start at position 256 and read 227 packages?"
The former. Read 227 elements ("packages") starting with element number 256. Index, not offset.
Thanks for ignoring my request to resume synchronization of Oni Galore with Oni Stuff, BTW ^^
geyser 00:29, 28 April 2007 (CEST)

---

@Neo:

OTLF Package 12381 in level 3 is: FF106A14. How to read the first three nibbles (FF1), so that the sum is smaller than 426?
ssg
If you unswap the bytes properly you get 0x146A10FF, so the lower 3 nibbles are 0x0FF = 255 < 426.
geyser
Ooooooohhh... thank you. Now I got it. (Wow, it tooks a long time...)
Ssg 12:18, 3 May 2007 (CEST)
See the red bordered area in the pic below? It means that every bit of the 12 bits is used.

http://www6.fh-eberswalde.de/user/dkriesch/oni/12bit2_FF106A14_12381.gif (dead link)

I don't get it. How do you read these 12 bit part?
ssg
level3 only has 18691 leaves. Please tell us what you're looking at.
geyser 18:27, 2 May 2007 (CEST)
The first column isn't used for the leaves (as you can see) and Excel starts with 1 and not with 0, so 18693 - 2 = 18691 ==> perfect.
Ssg 12:18, 3 May 2007 (CEST)

@geyser:

I've read it, but I don't have so much time yet. (Btw, is there anything to synchronize left over? At the moment I have to take care that I don't left to much behind the wiki.)
ssg
I can't say I fully understand the sentences in brackets.
As for the syntax and the looks, new-format pages like ABNA are not perfect, but already much better than older ones, not to mention things like ONOA (raw HTML...)
As for the knowledge: yes, there are files for which the documentation is more complete on OS than on OG. I can't systematically synchronize everything by myself...
In some cases, there are files for which OG is ahead of OS. You shouldn't be too worried about that, since the wiki holds a full history of the pages.
Just update everything in an "automatic" way, and then we'll compare with previous versions and merge stuff in.
geyser 18:27, 2 May 2007 (CEST)
Well, if I have some time, I'll try to go on with updating the format + content (if necessary).

Ssg 12:18, 3 May 2007 (CEST)