Repository navigation
variants: robes without skin, the robe's own bones and attachments, the body's animation scale; check and repair for robe nodes under torso_g - #112
Merged
Conversation
…chments A robe of bone copies and attachments alone (a backpack) is refitted instead of refused. Bones of the robe's own that neither the template nor the skeleton has (flaps, coat tails, skirt panels), and the nodes of its other meshes the template lacks (a cape on shoulder pads), are placed at their offsets scaled to the body, chest across and hip height up and down, and what hangs from them is scaled the same; before, a human's cape reached below a brownie's feet. Only body bones the template lacks still come from the skeleton or stay out (a wemic's robes have no legs). A bone's axis comes from its child bones only: a child under 2 cm from the joint (the belt_g of Beamdog's HD robe 30), the robe's own bones and meshes that are no bone (a backpack's pieces) no longer set it. Each mesh is read and written through its own node's transform, not the first node of its name (a server's robe 202 has two Cloak_Base). A cloak built from the skeleton takes body bones beside the torso (neck_g) from the skeleton. A robe on the source body's animations (a_ba, a_ba_coat, a_fa_skirt) gets the target body's set at the target's animation scale, as Bioware's race versions of robes 20 and 21 have (pmd0_robe020: a_da_coat at 0.66), or the target's skeleton when there is no such set. Named at scale 1, the human animations floated a brownie's robe over its head (checked in game).
…o_g drawn unturned On a worn robe the game draws a node whose parent is torso_g as if its orientation were the identity (nwn-mdl-spec MDL-NODE-050, found in game: a server's robe 202 has a cape panel on a shoulder pad turned 180 degrees, and it stood up above every wearer's shoulder). The check reports such nodes in robes; the repair, part of --all, puts the turn into the node's vertices, normals and tangents and its children's placement, with the node at the identity, which is drawn as modelled. Body bones (turned by the animations, skins bind to them), dummies with nothing under them, and nodes the robe's own animations turn are left alone.
This was referenced Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Found while making Layonara's missing brownie robes and cloaks: 340 models, robes for both brownie phenotypes and cloaks. They were checked in game against the human versions, front and back.
variants
Robes with no skin (backpacks, pieces hung on bones) are refitted instead of refused.
The robe's own bones and attachments are placed at their offsets scaled to the body:
Across and front to back the scale is the chest's; up and down it is the hip height. What hangs from them is scaled the same way. Before, they kept the human's size, and a cape reached below a brownie's feet.
Only body bones the template lacks still come from the skeleton, or stay out (a wemic's robes have no legs).
A bone's axis now comes from its child bones only. These no longer set it:
Each mesh uses its own node's transform, not the first node of its name. A server's robe 202 has two
Cloak_Base.A cloak built from the skeleton takes body bones beside the torso (
neck_g) from the skeleton.The body's animation set and scale. A robe on the source body's animations (
a_ba,a_ba_coat,a_fa_skirt) gets the target body's set at the target's animation scale, as Bioware's race versions of robes 20 and 21 have (pmd0_robe020:a_da_coatat 0.66). At scale 1, brownie robes floated over their heads in game.Fit accuracy against Bioware's and the hand-made versions is the same as v4.13.0 or better:
check
robe_torso_turn, repair--fix-robe-turnsOn a worn robe, the game draws a node whose parent is
torso_gas if it had no rotation. This was found in game and is written up as plenarius/nwn-mdl-spec#9 (MDL-NODE-050).--all) puts the rotation into the node's geometry and its children's placement, leaving the node unrotated. The model is drawn as it was built.New tests cover each fix; they fail without it. Neither change touches the decompiler, writer, parser or compiler, so the Python port needs nothing.
Not in this PR: cleanmodels-qt doesn't offer
--fix-robe-turnsas a Clean fix of its own yet; it only gets it through All Fixes.