OBD talk:OTLF: Difference between revisions
m (arrays, elements and indices) |
No edit summary |
||
Line 1: | Line 1: | ||
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? | 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? | ||
: | : | ||
Line 99: | Line 19: | ||
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). | 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). | ||
[[User:Neo|Neo]] | [[User:Neo|Neo]] | ||
--- | |||
:''"If you look to package 16, the 20-bit is 256 (read from right to left). What does it tell me? | :''"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?" | :''Start with package 256 and read 227 packages or start at position 256 and read 227 packages?" | ||
Line 104: | Line 25: | ||
:Thanks for ignoring my request to resume synchronization of Oni Galore with Oni Stuff, BTW ^^ | :Thanks for ignoring my request to resume synchronization of Oni Galore with Oni Stuff, BTW ^^ | ||
::[[User:Geyser|geyser]] 00:29, 28 April 2007 (CEST) | ::[[User:Geyser|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? | |||
: | |||
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 | |||
: | |||
I don't get it. How do you read these 12 bit part? | |||
: | |||
@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.) | |||
: |
Revision as of 10:53, 2 May 2007
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?
See the red bordered area in the pic below? It means that every bit of the 12 bits is used.
I don't get it. How do you read these 12 bit part?
@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.)