4
« on: April 01, 2007, 11:08:15 PM »
Most of you know by now that BLB's are in text. Most of you also know that if you want to generate a standard brick or plate, its as easy as:
1 2 3
brick
But how does Blockland make those ramps and such. Well I think I know. Sort of... Lets look at an example: the 1X2 ramp(not sure what degree)
When making a "special" brick, instead of putting "brick" at the end of the size, you put "special." That's the easy part. Now how to render shape: I believe that you have to specify where each face's vertexes are. for example:
----------------top quads:
1
TEX:TOP
POSITION:
-0.5 -1 1.5
-0.5 0 1.5
0.5 0 1.5
0.5 -1 1.5
UV COORDS:
0 0
0 1
-1 1
-1 0
NORMALS:
0 0 1
0 0 1
0 0 1
0 0 1
In position, you specify the position of each vertex reletave to the center of mass of the shape. Im not sure if its reletive to the center of mass, but Im guessing that would be the way to go.
Also this sets the boundries for the collision mesh. Thing is that DIF's work kinda the same, collision mesh wise. When you make a shape into a DIF, each face gets it's own collision to it, and it's laser accurate (within 0.2 Torque Units)
Also for the textures, Im assuming, are premapped in the code that compiles BLB's and makes them into shapes.
I think it's possible to use this to make more elaborate shapes, like arches and LEGO specific shapes, like ones coming in sets (i.e. plane set comes with special jet engines).
But this one fact perplexes me. Ever notice the 1X4X5 window? It looks exactly the same as the DTS version on Vanilla. This means one of two things:
1. Badspot has 1337 modeling skills and can pinpoint each vertex perfectly and code it to a text only shape.
Or the more logical 2. He mannaged to find/create an exporter that exports shapes into text. I know Milkshape can do this, but its written in weird code.
Post your comments/arguements/horrays/boos/omfg you stole my ideas/anything else I left out here.