M2ParticleRecord
struct · models · 504 bytes
- Meaning
- Holds a particle emitter record of an MD20 file: flags, bone, tracks, gradients and motion terms
- Confidence
- verified, proof one
- Finding
- models/emission#particle-record
Finding: Particle record in models: emission
A particle record is 0x1f8 bytes. The ten float tracks follow the element track layout and give each parameter its first value at creation and its animated value each frame.
| offset | holds |
|---|---|
+0x004 | flags (Record flags) |
+0x008 | position relative to the bone |
+0x014, +0x016 | bone, texture index (16-bit) |
+0x018, +0x020 | model name and child emitter model name, count and pointer each |
+0x028, +0x02a, +0x02c | blend; emitter type 1 plane, 2 sphere, 3 spline; 0 head, 1 tail, 2 both |
+0x030, +0x032 | texture grid rows, columns |
+0x034 to +0x130 | speed, variation, vertical range, horizontal range, gravity, lifespan, rate, area length, area width, z source |
+0x14c to +0x164 | gradient midpoint, three colours, three scales |
+0x168 to +0x17a | head and tail cell ramps and repeats (particles#gradients) |
+0x17c | tail length |
+0x180 to +0x1d8 | twinkle, spin, drag, model ranges, wind, follow mapping, spline points |
+0x1dc | enabled, a byte track |
The derivation is in the doc.
Fields 15
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0004 | 4 | uint32_t | m_flags | Holds the record flags | verified, proof one | models/emission#record-flags |
0x0008 | 12 | float[3] | m_position | Holds the emitter position relative to its bone | verified, proof one | models/emission#particle-record |
0x0014 | 2 | uint16_t | m_bone | Holds the bone the emitter rides | verified, proof one | models/emission#particle-record |
0x0016 | 2 | uint16_t | m_texture | Holds the texture index | verified, proof one | models/emission#particle-record |
0x0028 | 2 | uint16_t | m_blend | Holds the blend | verified, proof one | models/emission#record-flags |
0x002a | 2 | uint16_t | m_emitterType | Holds the emitter type: 1 plane, 2 sphere, 3 spline | verified, proof one | models/emission#particle-record |
0x002c | 2 | uint16_t | m_particleType | Holds 0 head, 1 tail, 2 both | verified, proof one | models/emission#particle-record |
0x0030 | 4 | uint16_t[2] | m_grid | Holds the texture grid rows and columns | verified, proof one | models/emission#particle-record |
0x0034 | 280 | uint8_t[280] | m_tracks | Holds the ten float tracks, speed through z source | verified, proof one | models/emission#particle-record |
0x014c | 4 | float | m_midpoint | Holds the gradient midpoint | verified, proof one | models/particles#gradients |
0x0150 | 12 | uint32_t[3] | m_colors | Holds the three gradient colours | verified, proof one | models/particles#gradients |
0x015c | 12 | float[3] | m_scales | Holds the three gradient sizes | verified, proof one | models/particles#gradients |
0x0168 | 20 | uint16_t[10] | m_cells | Holds the head and tail cell ranges and repeats of both gradients | verified, proof one | models/particles#gradients |
0x017c | 4 | float | m_tailLength | Holds the tail length factor | verified, proof one | models/emission#record-flags |
0x01dc | 28 | uint8_t[28] | m_enabledTrack | Holds the enabled byte track | verified, proof one | models/emission#particle-record |