Good news everybody! I did some work this weekend. The bad news (isn't there always) is that I have nothing to show for it. Mostly I'm just more confused than when I began.
The screen shot below shows the model from a previous post skinned. Um... as you can see something is wrong. She wasn't supposed to turn into a polygon soup!
Without getting intimate with the matrices involved I can't tell whats wrong - and I really, really didn't feel like doing that yet. I'm guessing it has something to do with matrices that are rotated in their rest position, but speculation isn't useful at this point.
More interestingly I came across some strange behaviour when using software vertex blending on an nVidia graphics card. Verticies with only one matrix affecting them are always using the zero'th world matrix regardless of what the index in the vertex stream is set too.
It works fine in both DirectX's reference mode and on an ATI graphics card. A work around was to always use at least two matrices for blending and just set the second matrices weight to zero.
Another upshot of the two matrix method is that the entire cylinder is drawn in one call. Previously it was two, one for the single matrix blending and the other for two.
And with this very grey looking post I bid you good night.
Later!
The screen shot below shows the model from a previous post skinned. Um... as you can see something is wrong. She wasn't supposed to turn into a polygon soup!
Without getting intimate with the matrices involved I can't tell whats wrong - and I really, really didn't feel like doing that yet. I'm guessing it has something to do with matrices that are rotated in their rest position, but speculation isn't useful at this point.
More interestingly I came across some strange behaviour when using software vertex blending on an nVidia graphics card. Verticies with only one matrix affecting them are always using the zero'th world matrix regardless of what the index in the vertex stream is set too.
It works fine in both DirectX's reference mode and on an ATI graphics card. A work around was to always use at least two matrices for blending and just set the second matrices weight to zero.
Another upshot of the two matrix method is that the entire cylinder is drawn in one call. Previously it was two, one for the single matrix blending and the other for two.
And with this very grey looking post I bid you good night.
Later!
2 Comments:
Just out of interest: why are you using software to do the vertex blending?
BTW. Haven't had a chance to look at your test app in any detail yet.
By Justin Paver, at 8:11 am
Hardware indexed blending isn't supported which is annoying because my crappy old ATI card managed to do it!
ie: d3dCaps.MaxVertexBlendMatrixIndex == 0 (refrast == 255, X300 == 37)
Not a prob, I have a workaround for the single matrix case.
Out of interest, if my matrix weight is zero does the driver ignore it or does it still transform the vert by the matrix and then scale it by zero?
By Andrew, at 9:32 am
Post a Comment
<< Home