2011-11-25, 19:02
Hello all,
I discovered rendering glitches in the Linux version of my LDCad are caused by the limited way I correct 'invalid' matrices in part files. The wrong matrices cause all kinds of lighting problems in Ubuntu 11.10 with the open source radeon driver. Yet for some reason the windows driver couldn't care less, how's that even possible?
Anyhow I'm improving the correction code, but not being a part editor or a matrix expert I'm having difficulties with it. For example I can correct these (log fragment):
These all have exactly one row that's all zero's, the position for an automatic '1' can be determined quite easily.
But what about these:
I'm guessing the middle '1.4...' should move one place to the left, but how to automatically detect and correct for this (you could also do this for the 3rd row not?).
And these are even worse I think:
Or could I just put a '1' in the middle row's middle pos?, but yet again how to do a fool proof correction.
Any help would be appreciated.
Or maybe someone could just fix all the part files (just kidding )
I discovered rendering glitches in the Linux version of my LDCad are caused by the limited way I correct 'invalid' matrices in part files. The wrong matrices cause all kinds of lighting problems in Ubuntu 11.10 with the open source radeon driver. Yet for some reason the windows driver couldn't care less, how's that even possible?
Anyhow I'm improving the correction code, but not being a part editor or a matrix expert I'm having difficulties with it. For example I can correct these (log fragment):
Code:
parts\2694.dat | line 164 | Matrix corrected from [10 0 0 0 0 0 0 0 10 ] to [10 0 0 0 1 0 0 0 10 ]
parts\2694.dat | line 165 | Matrix corrected from [-10 0 0 0 0 0 0 0 -10 ] to [-10 0 0 0 1 0 0 0 -10 ]
parts\2695.dat | line 13 | Matrix corrected from [6 0 0 0 0 6 0 0 0 ] to [6 0 0 0 0 6 0 1 0 ]
parts\2695.dat | line 14 | Matrix corrected from [6 0 0 0 0 6 0 0 0 ] to [6 0 0 0 0 6 0 1 0 ]
These all have exactly one row that's all zero's, the position for an automatic '1' can be determined quite easily.
But what about these:
Code:
parts\3039p32.dat | line 40 | Invalid matrix detected [2 0 0 0 0 1.4286 0 0 -1.4286]. It could not be corrected automatically, it might cause rendering glitches.
parts\3039p32.dat | line 41 | Invalid matrix detected [2 0 0 0 0 1.4286 0 0 -1.4286]. It could not be corrected automatically, it might cause rendering glitches.
I'm guessing the middle '1.4...' should move one place to the left, but how to automatically detect and correct for this (you could also do this for the 3rd row not?).
And these are even worse I think:
Code:
parts\6016.dat | line 38 | Invalid matrix detected [2.84 0 2.84 0 0 0 2.84 0 -2.84]. It could not be corrected automatically, it might cause rendering glitches.
parts\6016.dat | line 47 | Invalid matrix detected [-2.84 0 -2.84 0 0 0 2.84 0 -2.84]. It could not be corrected automatically, it might cause rendering glitches.
Or could I just put a '1' in the middle row's middle pos?, but yet again how to do a fool proof correction.
Any help would be appreciated.
Or maybe someone could just fix all the part files (just kidding )