[73] Dynamic Pigeonholing
- Conlan Walker

- Mar 10, 2023
- 2 min read
Oh boy.
The TTL loader, TTM loader, and the BTS parser the two rely upon are mostly done, save for some bugs and edge cases.
(Disambiguation to make things less confusing: I will sometimes refer to TTM, TTL, and BTS almost interchangeably, but just know they are different things. "BTS" is the type of file, like a format for formats. "TTM" is the name of the 3D model's mesh; equivalent to a .obj. "TTL" is the name of a material library that a TTM can reference; equivalent to a .mtl. Both TTM and TTL are stored in BTS form, which is why a BTS parser can load the raw data of both.)
Here's an example of what printing a loaded mesh in BTS format looks like.
This is what this test mesh actually looks like in blender:

Here's what the loaded TTM's geometry looks like in human-readable form:

And this is the material library (TTL) it references in its "_ttllib_" block:

Now, that TTL only contains 1 actual material, which doesn't reference and use any sort of texture map. So, here's a TTL that contains a texture reference, and contains 3 materials:

Here are the two functions that handle printing and loading of BTS files respectively.

These are the structs used to store a loaded TTM:

And these are used to store material libraries, as well as the materials themselves:

These are some inline functions I made that handle vector math and whatnot:

These functions are used to interpret raw BTS data into TTL and TTM structs respectively:

And the last thing I was working on was this currently half-finished function that is supposed to offset, rotate, and translate TTM geometry:

Finally, here's the size of everything at this point in time:

I really wanted to put a textured TTM on-screen this week, I guess I'll have to wait.

![[158] Most Important Brick in the Least Important Wall](https://static.wixstatic.com/media/df100d_f70be6ae4318455fbbc605cd1069c6ee~mv2.jpg/v1/fill/w_980,h_410,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/df100d_f70be6ae4318455fbbc605cd1069c6ee~mv2.jpg)
![[157] Mail Order Sacrifice](https://static.wixstatic.com/media/df100d_e284fa6c51b04524bab9d3cf9f1f6441~mv2.png/v1/fill/w_980,h_382,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/df100d_e284fa6c51b04524bab9d3cf9f1f6441~mv2.png)
![[156] Moat of Babble](https://static.wixstatic.com/media/df100d_091e451794b14aecb494a16c15c966c3~mv2.png/v1/fill/w_980,h_705,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/df100d_091e451794b14aecb494a16c15c966c3~mv2.png)
Comments