Author Topic: BLB Brick Format Reference  (Read 77275 times)

You sent me a link to a empty zip file :c

Also, I have some questions about this, here is the coverage code for the 2x2 ramp:
Code: [Select]
0
COVERAGE: //TBNESW
1 : 2
1 : 4
0 : 6
0 : 6
1 : 6
0 : 6

And here's the same area from the 2x2x3 corner:
Code: [Select]
2

0 -0.5 0
2 1 9

-0.5 0.5 0
1 1 9
COVERAGE: //TBNESW
0 : 999
0 : 999
0 : 999
0 : 999
0 : 999
0 : 999
What's that stuff BEFORE the coverage section?

Collision. You can use a .dts, or, you can define it in the .blb, like the 2x2x3 corner does. The first three coordinates define the offset relative to the origin and the second defines the size of the collision box - you can only use cuboid collision if you choose to define it in the .blb. The 2x2x3 corner uses two collision boxes, hence the "2" and there being two sets of coordinates.

I should get off my ass one day and make a full-on remake of this topic

I should get off my ass one day and make a full-on remake of this topic
Dear gosh please yes

Collision. You can use a .dts, or, you can define it in the .blb, like the 2x2x3 corner does. The first three coordinates define the offset relative to the origin and the second defines the size of the collision box - you can only use cuboid collision if you choose to define it in the .blb. The 2x2x3 corner uses two collision boxes, hence the "2" and there being two sets of coordinates.

That explains why my brick was missing collision.

Space Guy never mentioned anything about collision in the first post.

EDIT: Finally got the bricks to work properly, huzzah!
« Last Edit: July 24, 2012, 12:05:23 AM by WhoooMan »

So Blockland scales vertices on bricks to overlap seams.
Does anybody know the properties of this?
How does it decide which vertices need scaled?
By how much do they scale?

Sorry if it's been asked. I'm not sure how I should search for it.

How do I find all the different properties (like normals, uv coords, etc.) of any regular brick? Is there some sort of formula?

What about .dts files for rounds and such?
What software should we use?

What would the coordinates be for a BLB based collision of a 32x32 triangle (split diagonally)? 1 brick tall.

So Blockland scales vertices on bricks to overlap seams.
Does anybody know the properties of this?
How does it decide which vertices need scaled?
By how much do they scale?

Sorry if it's been asked. I'm not sure how I should search for it.

I don't think it's been looked into before, but it sounded like fun to work out so I messed around a little:
http://i.imgur.com/ADB6S.png
This is the default music brick, stacked on top of another. On the left, the brick contains its default values. On the right, I moved the bottom vertices up along the z-axis by 0.012, so this tells us that the edges are ~0.006 units further out than they should be. (These values are very rough approximations).

Vertically, the values are different, as increments along the x and y axes are larger than those along the z:
http://i.imgur.com/KAPy6.png
This time I had to move the vertices on the edge by ~0.004 before there was no visible overlap. So this time the edges are ~0.002 units further out. (Again, roughly).

The size of the brick doesn't seem to affect the size of the overlap, so I assume this is the same for all bricks. It might be worth considering that the actual brick models are not really affected at all, it's just that the virtual "brick-grid" is a teensy weensy bit smaller than the actual bricks themselves. Probably the more likely case, in my opinion. Nevermind, I don't think this makes much sense, I'm a dolt, move along.

I'm not sure what worth any of this information is, as it's probably easier to just disregard what looks to be a minor aesthetic occurence, but hey, there you have it.

How do I find all the different properties (like normals, uv coords, etc.) of any regular brick? Is there some sort of formula?

For normals:
http://www.lighthouse3d.com/opengl/terrain/index.php3?normals
Easy enough to follow, and also tells you how you can smooth your faces.

And yes, there should be ways to calculate uv coordinates for simple cuboid brick shapes, I remember figuring out one method for bottom quads (not sure where I saved it, if at all). As for more complex shapes, I'm no math whiz, so I don't know enough to properly comment on that.

What about .dts files for rounds and such?
What software should we use?

Most people use MilkShape or Blender to export .dts files. There's lots of resources on the internet and in the forum to learn how to use those programs.

What would the coordinates be for a BLB based collision of a 32x32 triangle (split diagonally)? 1 brick tall.

Without using a .dts your collision can only be built out of boxes within the .blb, for a brick like that you should use .dts.
« Last Edit: August 13, 2012, 04:16:17 PM by Tophius »


POSITION

2x2ramp.blb
Code: [Select]
POSITION:
-1 -1 1.5
-1 0 1.5
1 0 1.5
1 -1 1.5

This section defines the four corners of the 'quad' face. If only a triangle shape is needed, set two to be at the same position. The points are connected in clockwise order, determining which side of the face it is visible from. (eg you can't see a brick while inside it)

Which face was Space Guy referring to- bottom or the ramp part? I'm trying to map out the default positions for a 1x1 brick and 1x1 plate.  
« Last Edit: August 19, 2012, 09:17:44 PM by WhoooMan »

So, side texture doesn't repeat, only top texture?

So, side texture doesn't repeat, only top texture?

Did you use negative numbers for the UV Coords of the side texture?

nope

TEX:SIDE
POSITION:
1 1.5 -2.5
1 1.5 2.5
-1 1.5 2.5
-1 1.5 -2.5
UV COORDS:
3 1
0 1
0 0
3 0

Negative numbers will make the texture repeat, according to the OP.

So if it were like this:

Code: [Select]
TEX:SIDE
POSITION:
1 1.5 -2.5
1 1.5 2.5
-1 1.5 2.5
-1 1.5 -2.5
UV COORDS:
-3 1
0 1
0 0
-3 0

The texture should repeat.

Negative numbers will make the texture repeat, according to the OP.

So if it were like this:

Code: [Select]
TEX:SIDE
POSITION:
1 1.5 -2.5
1 1.5 2.5
-1 1.5 2.5
-1 1.5 -2.5
UV COORDS:
-3 1
0 1
0 0
-3 0

The texture should repeat.

I get this: