Author Topic: A question about a variable  (Read 1497 times)

So I was talking to someone
and he showed me something.
if you do $debugOctTree = 1;
A bunch of loving lines come up.
what are these lines?

I mean, it's kinda obvious. The octtree is what holds the bricks' positions and such. That variable turns on debugging of this structure. There's no reason you would ever use it, it's used by kompressor and Badspot to debug their engine code.

I mean, it's kinda obvious. The octtree is what holds the bricks' positions and such. That variable turns on debugging of this structure. There's no reason you would ever use it, it's used by kompressor and Badspot to debug their engine code.
I just want to know what the lines are.
No stuff it's the oct tree.

$debugOctTree
MUST BE THE SHADDERS

You get a bunch of lines similar to this.

octTree::render - batcher (1cls, 1draws)  nodes (214visits, 214rend) occlude (0qrys, 0hid nodes)

I just want to know what the lines are.
What do you mean you want to know what the lines are?

They tell you what the oct tree is doing.

The octtree is the brick rendering system I'm pretty sure.

I mean, if you're asking how the octree works I can try to explain at least what I'm lead to believe it is.

In an oct tree, there are nodes or "branches" from the trunk of the tree, which is the game. Each of these branches have 8 twigs that branch out from them, without exception.

Imagine it like the following:

T| X  Y  Z  D
R|_|__|__|__|_
U| BRICK ONE  |
N| |  |  |  |
K| R  R  R  R


That's my beautiful diagram.

The branches X, Y, and Z would be the position of the brick.
R, R, R, and R are the rotational values of the brick.
D is probably the datablock ID of the brick. I'm not 100% sure that's what this slot is used for, but it would make sense.

Anyway, I'm about 90% sure that's how each branch is formatted on the oct tree. The oct tree itself is just a bunch of these nodes (branches, or bricks in application).

I could be completely wrong though. That's just my best guess.
« Last Edit: February 22, 2012, 08:13:12 PM by Slicksilver »

-snip-
as Chrono said, I'm pretty sure the oct tree is used for rendering bricks. I assume it hides edges of bricks touching other edges of bricks to make rendering bricks easier.

as Chrono said, I'm pretty sure the oct tree is used for rendering bricks. I assume it hides edges of bricks touching other edges of bricks to make rendering bricks easier.
We have had hardware occlusion queries in the game and failed to get a performance win out of it.  We may revisit it in the future.  This is kompressor's territory, though.
Bricks don't do that.
« Last Edit: February 22, 2012, 08:28:44 PM by Slicksilver »

They do do that, but I'm not sure whether or not it's because of the octtree.

They do do that, but I'm not sure whether or not it's because of the octtree.
I literally quoted Badspot saying bricks don't do that.

You're disagreeing with the old you
It occludes players, vehicles, terrain, and pretty much everything but bricks. But I think it only does this if there's an interior in the way. (eg. you're in the bed on the bedroom map)

Damn, figuring out those time strings takes forever
« Last Edit: February 22, 2012, 09:27:57 PM by Slicksilver »

While I have learned so much from you guys, thank you.
I have yet to find the answer to my question
Go into a server and actually do $debugOctTree = 1;
You'll notice thousands of blue lines everywhere.
What do they represent/mean

While I have learned so much from you guys, thank you.
I have yet to find the answer to my question
Go into a server and actually do $debugOctTree = 1;
You'll notice thousands of blue lines everywhere.
What do they represent/mean
OH

I understand now.

If you look at them, they're cubes. It shows how the oct tree is currently understanding the bricks. Imagine it like this:
You have a 8x8 cube, and pretend 1x1 bricks are actually square instead of rectangles. When you place a brick at the corner of it, the oct tree breaks that up into smaller cubes plus the one you built. My guess this is to save memory using a sort of chunk system.

OH

I understand now.

If you look at them, they're cubes. It shows how the oct tree is currently understanding the bricks. Imagine it like this:
You have a 8x8 cube, and pretend 1x1 bricks are actually square instead of rectangles. When you place a brick at the corner of it, the oct tree breaks that up into smaller cubes plus the one you built. My guess this is to save memory using a sort of chunk system.
Oh cool. Thanks :)


Well that was a stupid idea.