You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: X loader regression introduced with commit f844c33 on 3 Nov 2023 #5332
Loading bundled model test/models-nonbsd/X/dwarf.x exhibits strange artifacts unless aiProcess_PreTransformVertices flag is applied during load (which of course destroys rigging/animation)
Problems observed when loaded without aiProcess_PreTransformVertices flag
Other than (most of) the head, helmet and left shoulder pad, the body mesh is not visible.
Animation for the body mesh seems to be correct
The axe is fully visible, but no longer animates (used to move with the body)
Note that this problem can also be observed in bundled IRR scenes which load the dwarf perserving bones/animation
Screenshots
Notes
Loaded without
aiProcess_PreTransformVertices flag
(bones/animation preserved)
Notes:
The axe is no longer animated
double sided rendering was not
enabled here, but the left shoulder
pad can be viewed from both top
and bottom
Loaded with
aiProcess_PreTransformVertices flag
(bones/animation lost)
Bisect
Bug was introduced on 3 Nov 2023; the X loader .cpp/.h files were touched here.
changed the title [-]Bug: apparent X loader regression[/-][+]Bug: apparent X loader regression introduced between 14 Sep and 3 Nov 2023[/+]on Nov 19, 2023
changed the title [-]Bug: apparent X loader regression introduced between 14 Sep and 3 Nov 2023[/-][+]Bug: X loader regression introduced between 14 Sep and 3 Nov 2023[/+]on Nov 19, 2023
changed the title [-]Bug: X loader regression introduced between 14 Sep and 3 Nov 2023[/-][+]Bug: X loader regression introduced with commit f844c33 on 3 Nov 2023[/+]on Nov 22, 2023
New boneIdx and conditional around line ~367 causes the obvious breakage
const unsigned int boneIdx = obone.mWeights[d].mVertex; // <-- new line
if (boneIdx < obone.mWeights.size()) { // <-- new line
oldWeights[obone.mWeights[d].mVertex] = obone.mWeights[d].mWeight; // <-- original line
} // <-- new line
Additional analysis details
AFAICT there are only 3 non-whitespace changes of note in the offending commit:
Line ~315 changed: checked "Before" vs "After" in isolation, both appear to work OK
Before
if ( newIdx > sourceMesh->mPositions.size() ) {
After
if (newIdx >= sourceMesh->mPositions.size()) {
New conditional block added around line ~330: checked the conditional in isolation, both with and without appear to work OK
if (idx < sourceMesh->mNormals.size()) {
mesh->mNormals[newIndex] = sourceMesh->mNormals[idx]; // <-- original line
}
New boneIdx and conditional around line ~367: checked the conditional in isolation, this causes the obvious breakage
const unsigned int boneIdx = obone.mWeights[d].mVertex;
if (boneIdx < obone.mWeights.size()) {
oldWeights[obone.mWeights[d].mVertex] = obone.mWeights[d].mWeight; // <-- original line
}
Activity
[-]Bug: apparent X loader regression[/-][+]Bug: apparent X loader regression introduced between 14 Sep and 3 Nov 2023[/+][-]Bug: apparent X loader regression introduced between 14 Sep and 3 Nov 2023[/-][+]Bug: X loader regression introduced between 14 Sep and 3 Nov 2023[/+][-]Bug: X loader regression introduced between 14 Sep and 3 Nov 2023[/-][+]Bug: X loader regression introduced with commit f844c33 on 3 Nov 2023[/+]tellypresence commentedon Dec 9, 2023
TL;DR
New
boneIdxand conditional around line ~367 causes the obvious breakageAdditional analysis details
AFAICT there are only 3 non-whitespace changes of note in the offending commit:
Line ~315 changed: checked "Before" vs "After" in isolation, both appear to work OK
New conditional block added around line ~330: checked the conditional in isolation, both with and without appear to work OK
New
boneIdxand conditional around line ~367: checked the conditional in isolation, this causes the obvious breakagetellypresence commentedon Dec 9, 2023
PR #5372 will fix this bug once merged
tellypresence commentedon Feb 4, 2024
#5372 merged,
should befixed