Repository navigation
v4.12.0
cleanmodels v4.12.0
Better robes and cloaks from variants for bodies of a different size, cloaks for bodies that have none, and the mesh lightmapped byte ignored, as the game ignores it.
variants: robes and cloaks
Found making a server's robes and cloaks for its brownies, a custom race less than half a human's size. Checked in game.
- Robes' bone copies (
pelvis_g,torso_g, ...) are now reshaped to the body. They were moved to the body's joints but kept the source body's size. They are not drawn, but most of them cast the robe's shadow. Mean distance per vertex from hand-made brownie robes: 2.0 to 2.2 cm, from 10 to 11 cm. From Bioware's robes and cloaks of every race: 2.65 cm, from 4.85. - Cloaks fit closer. The cloth hanging from the cloak's own bones now takes the torso's width; before, it kept the source body's size, and on a small body the collar stood off the neck. Bioware's cloaks 1 to 7 of every race: 1.8 cm per vertex in phenotype 0 and 4.0 cm in phenotype 2, from 2.9 and 4.7.
- Bones the target's robe lacks come from the target's skeleton. A custom race's robe with no feet left the hem of a robe weighted to the feet human-wide, and the robe-on-body preview put the feet below the ground.
- Cloaks for a body that has none.
variantsused to stop with "no cloak of pmb0 to take the bones from". It now places the cloak's bones on that body's skeleton: under the neck, as wide as its chest, the cloak as long as its neck-to-feet height. A warning says so. Against Bioware's cloaks this gives 4.2 cm per vertex, against 2.7 cm with Bioware's own cloak of that body as the template. Name such a body with--to(--to pmb0,pfb0): without it,variantsonly makes cloaks for bodies that already have some. That includes cleanmodels-qt's Make Variants window, which offers the same bodies. - Supermodel: a body with no skeleton of its own (a custom race's phenotype 2, which uses phenotype 0's) gets its variant's supermodel set to the skeleton it does use, instead of a model that does not exist.
The mesh lightmapped byte is ignored
The game's compiler leaves this byte uninitialised, and its ASCII parser reads no lightmapped keyword (nwn-mdl-spec MDL-BIN-051). cleanmodels decompiled the leftover value as a lightmapped 253 line, compiled it back, and checked tiles for it. It no longer writes the line, and it ignores the keyword. It compiles the byte as 0. Nothing changes in game.
Checking
The Python port carries the lightmapped change. On the game's 32,832 models, decompile, parse and compile give the same output and warnings as the Go build; compared with v4.11.0, decompiled models differ only in the removed lightmapped lines.