Native authoring profiles
Studio writes new game data only for layouts it has verified. Each verified layout is a profile. An input that does not fit a profile is refused instead of guessed.
Static mesh profiles
New static models use three vertex profiles. Each is a stock input declaration, and its material’s vertex shader must match one exact bytecode hash.
| profile | declaration | position stream | attribute stream |
|---|---|---|---|
| opaque | 123 | 8 bytes: XYZ | 20 bytes: UV, normal, tangent |
| vertex color | 125 | 8 bytes: XYZ | 24 bytes: UV, normal, tangent, RGBA8 color |
| alpha test | 127 | 12 bytes: XYZ, UV | 16 bytes: normal, tangent |
Positions, UVs, normals and tangents are signed normalized shorts. Indices are a 32-bit triangle list. The opaque shader reads XYZ positions, XY UVs, XYZ normals and XYZW tangents, and builds the bitangent from the normal, the tangent and the tangent’s W sign.
| property | value |
|---|---|
| model class | 0x808071A7 |
| resource class | 0x80807194 |
| parts | one per imported primitive |
| buffer groups | one per profile; each group’s first vertex in the model rounds up to a multiple of 4 |
| stage rows | the color row at stage 0, a shadow row at stage 3, and for opaque and vertex color parts a depth row at stage 12 |
| shadow and depth techniques | 815B86E7 and 815B86EA, which every stock opaque part uses; an alpha-test part uses its material’s own shadow technique |
| material | one per part: the given material, or the template’s for an opaque part |
Rows are ordered from the highest stage down, and within a stage from the last part down, as stock rows are. All parts of one model share one position scale and one UV scale.
Levels of detail
| field | written |
|---|---|
| part LOD category, row byte +10 | 2 for one level: levels 0 to 2. With two levels, 1 and 7: near, and far from level 2. With three, 10, 4 and 7 |
| switch sizes, header +0x38 to +0x40 | the bounding sphere radius, as stock models use, or a size that puts an authored switch distance at the default view |
| bounding sphere, header +0x50 | the centre of the bounds and the largest vertex distance from it |
At the default view, level 1 takes over at 16 times the first size, level 2 at 30 times the second, and nothing draws past about 200 times the third.
Map-scale statics
A snorm16 position is exact to its model’s half extent divided by 65,534. A static of a World Import Bundle is cut into chunks whose rounding stays within one millimetre: about 131 m across. Triangles go to a chunk by their centre, so a chunk can reach a little past its share. Each chunk is its own model with its own placement at the static’s transform. Its materials are shared.
Stored entries
| entry | stored as |
|---|---|
| model header, mesh resource, buffer headers | deltas of the installed template |
| position, attribute and index payloads | the imported data, owned by the project |
Unknown template bytes stay tied to the original package through the delta. No original geometry is copied into the project. Studio picks the checked installed template by default, then searches other supported static models.
With Skip unsupported surfaces, the original asset importer imports a skinned mesh as static geometry at its node transform. Whether this matches the Blender rest pose is unverified.
Original asset materials
The original asset importer clones one of three checked game materials, after verifying the installed material and shader hashes.
| material | profile | textures | constants |
|---|---|---|---|
815B8158 opaque | opaque | color, surface, normal | constant buffer: emission color, mask exponent 1, normal decode |
815AFA16 vertex color | vertex color | color, normal | constant buffer: tint 1, normal decode |
815B1718 alpha test | alpha test | color, mask, normal | the TFX template rows; row 0 X is the cutoff |
| glTF input | game input |
|---|---|
| base color texture and factor | color texture RGB, sRGB; factors baked in linear color |
| base color alpha and factor | mask texture, BC4 |
| metallic texture blue channel and factor | surface texture red |
| roughness texture green channel and factor | surface texture green, as one minus roughness |
| emissive texture | surface texture alpha: the largest linear channel |
| emissive factor | emission color; with no emissive texture the mask is full |
| normal texture and scale | normal texture red and green, with reversed green |
| no normal texture | a flat tangent normal |
The alpha-test material’s shadow technique, 815B1715, samples the same mask with the same cutoff.
Normal blue is one, so it does not cap smoothness. Texture coordinates keep the glTF image
orientation. The game shaders keep their own samplers and bytecode.
Normal maps follow the glTF normal texture rules: decode RGB to XYZ, scale X and Y, then normalize. The game shader rebuilds Z as positive, so a normal facing negative Z imports as its mirror.
No stock static draws in the transparents stage, and no stock static pixel shader samples a second UV set. So alpha blending and extra UV sets have no material to clone, and are refused.
The importer refuses these unless Skip unsupported surfaces omits them: alpha blending, emission on an alpha-masked material, occlusion textures, double-sided shading, material and texture extensions, texture transforms, UV sets other than UV0, wrapping other than repeat, and nearest filtering. Material textures must be PNG images.
Textures
New material textures are 2D, with every mip down to 1 by 1 in one resident payload, largest first.
| texture | format |
|---|---|
| color | BC7 sRGB, DXGI 99 |
| surface and normal | BC7, DXGI 98 |
| mask | BC4, DXGI 80 |
Each header is a copy of an installed header of the same format with no streamed mips. Its byte at +0x21 is 5 for an sRGB format and 3 for any other, as on every installed header. Mips are box filtered in linear light for sRGB textures. Studio encodes with BCnEncoder.NET.
Sky ring
A World Import Bundle sky clones the one-row stock sky 80BEBE62: its sky objects, model wrapper,
entity model and technique 80C44C62, all as deltas. The model’s parts draw the new technique. A
copied sky placement list names the new sky objects, in the first bubble’s first container.
The stock row only blocks light shafts and is never seen. A sky row has three flag bytes:
struct sky_row { /* 128 bytes */
float transform[16]; /* +0x00 */
float bounds[8]; /* +0x40 */
uint32_t model_wrapper; /* +0x60 */
...
uint8_t light_shaft_pass; /* +0x6C: drawn in the light-shaft occlusion pass */
uint8_t light_shaft_pass_alt; /* +0x6D: the same pass, a second form */
uint8_t hidden_in_transparents; /* +0x6E: not drawn in the transparents stage */
...
};
The copy clears all three, so it draws only in the transparents stage, where it adds its colour to the sky. Black adds nothing.
The model is a ring around the horizon, not a full dome. Seen from the ground it covers 3.5 degrees below the horizon to about 28 degrees above it. The stock sky shows above it, so a panorama whose top fades to black has no visible edge.
The one texture is the panorama, BC7 sRGB with full mips. It wraps once around the horizon. Its top row is the ring’s top edge and its bottom row is just below the horizon. The new constants set:
| Register | Stock | Copy | Use |
|---|---|---|---|
| 0 | 1.6, 1, 0.596, 0.112 | 0.25, 1, 0, 0 | UV scale and offset; the ring’s U grows by 4 per turn |
| 1 | 122 | 4 | colour gain |
| 2 X | 0 | 1 | opacity |
Local lights
A bundle light copies one stock local-light row: the first row of the first stock light table that has no volumetric material. Every stock light is also a probe row, so the copy is too: it draws in the light stage and the probe stage. Its technique and parameters stay; its transform moves, and its bounds box moves with it. It gets a one-row bounds table, and its table’s header box is that row, as a stock table’s header box is the union of its rows. Light colour and range stay the stock row’s.
Far layer
A far tile is a container that every candidate bubble loads unless its cell mask holds a cell of the covered bubbles. Its mask is the union of the loading bubbles’ own cells, and each loading bubble’s definition lists it. A bubble loads every container whose mask meets its cell mask, so the far tile loads in those bubbles only. The tile keeps the triangles whose centre lies in the covered bubbles' bounds plus the margin, and drops by the sink. Whether the swap to the near geometry shows no seam is unverified in game.
Skinned model profile
Skinned model replacement accepts one vertex profile.
| property | value |
|---|---|
| input declaration | 16 |
| streams | 16 bytes of position, weights and joints; 20 bytes of UV, normal and tangent |
| weights | four byte weights per vertex |
| joint indices | bytes |
| vertex shader | a matrix-palette shader pinned by bytecode hash |
| shadow pass | its own pinned four-weight matrix shader |
Dual-quaternion, cloth and other profiles are refused. Every material alternative of the part must use the pinned shader. The template must be visible in its initial state.
The reader follows the glTF skin rules. It ignores the mesh node transform and builds the bind shape from the joint transforms and inverse bind matrices. Geometry converts to package Z-up space once. Joint properties, or unique template names, map the file’s joint order to the package’s. Tangents are rebuilt from UV0.
The compiler refuses a replacement unless these hold:
- The bone count, bone name hashes and parent order match the installed rig.
- Both bind matrices of every bone match the rig within 0.0002.
- Every vertex has four weights that sum to one. They are stored as bytes that sum to 255.
- Every weighted joint is inside the bone range the model uses, at most 256 bones.
- Every vertex lies inside the bind bounds of the source model.
| mode | stored as |
|---|---|
| replace | the model and its six buffers, as deltas of the installed originals |
| create | nine added entries, as deltas of the originals; the installed root is untouched |
The working glTF is never copied into the project. Each replacement allocates new buffer entries. The earlier ones stay in the project. Source hashes are checked again before the one transaction publishes.
The create mode supports the Hob root 80B82FE3, component 80C443F8 and model 80C4424F. The root
and its 62 component configs must match the installed profile.
Animation control profile
The control importer edits existing control channels of a clip.
| supported | value |
|---|---|
| channel codecs | 2 and 3 |
| channels | translation, rotation, uniform scale |
| keys | linear or step, sampled at 30 Hz |
| layout | the original duration, control groups, component maps and value ranges |
Sparse codec-1 channels are left out of the export and stay unchanged. The writer changes sample words only and keeps the rest of the clip. Every result is decoded again before it is saved. Node custom properties carry identity, in case an editor drops file-level extras. External buffer paths must stay inside the imported file’s folder.