Skip to content

Instantly share code, notes, and snippets.

@ulrikdamm
ulrikdamm / gist:8274171
Last active October 13, 2023 07:25
PMX 2.0 file format
# PMX 2.0 file format #
This is a description of the PMX file format. This is used for 3D models in Miku Miku Dance (MMD).
Since I couldn't find any English descriptions of the PMX file format, I've made this, which is translated from http://gulshan-i-raz.geo.jp/labs/2012/10/17/pmx-format1/. I haven't used this file format yet, so please don't ask me what everything means.
An English guide to the PMD file format, which preceeded PMX, can be found here: http://mikumikudance.wikia.com/wiki/MMD:Polygon_Model_Data.
If you want to learn more, there are some open source projects on GitHub which can read this format, so go take a look at them.
Note: fields with type text begins with an int (32 bit) with how many bytes of text the section is.
@rygorous
rygorous / gist:4172889
Created November 30, 2012 00:28
SSE/AVX matrix multiply
#include <immintrin.h>
#include <intrin.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
union Mat44 {
float m[4][4];
__m128 row[4];
};