CoDEmanX / blender-cod

Blender Add-On for Call of Duty® modding
83 stars 26 forks source link

1 triangle randomly missing from imported .XMODEL_EXPORTs #13

Closed ficool2 closed 6 years ago

ficool2 commented 6 years ago

.XMODEL_EXPORTs imported into Blender will sometimes (though consistently) have 1 triangle missing anywhere on the model. Here is an example on the zombie_vending_revive_on model, ripped with Wraith. A triangle is missing on the logo, a similar triangle is missing in the LODs. image zombie_vending_sleight_on also suffers from this, but on the glass materials. Another example I remember is the viewmodel_pow_arms (?), a triangle is missing on the top of the right sleeve. How to verify for yourself: Rip the zombie_vending_revive_on model with Wraith on any zombie map, and open the resulting .XMODEL_EXPORT in Blender. The missing triangle should occur again in the same place.

SE2Dev commented 6 years ago

~~This appears to be caused by TRI 2039 on LOD0 reusing the same vertex 3 times; but it's like that in the file itself. image Since it seems to be an with Wraith, I've reported it to @dtzxporter.~~

While there does appear to be an issue with Wraith and malformed tris, it doesn't appear to be the cause of this particular missing tri. I have, however, determined that the tri that is missing consists of the following vertices:

Update: I just noticed that the tri immediately following the malformed tri appears to be the one that is missing. I can confirm that this issue is rooted in Blender-CoD as this issue is not present in PyCoD.

TRI 2 2 0 0
VERT 1663
NORMAL -0.102362 -0.653543 0.755906
COLOR 1.000000 1.000000 1.000000 1.000000
UV 1 -0.713379 0.039825
VERT 1663
NORMAL -0.102362 -0.653543 0.755906
COLOR 1.000000 1.000000 1.000000 1.000000
UV 1 -0.713379 0.039825
VERT 1663
NORMAL -0.102362 -0.653543 0.755906
COLOR 1.000000 1.000000 1.000000 1.000000
UV 1 -0.713379 0.039825

TRI 3 3 0 0
VERT 1675
NORMAL 0.000000 -1.000000 0.000000
COLOR 1.000000 1.000000 1.000000 1.000000
UV 1 0.739746 0.748535
VERT 1673
NORMAL 0.000000 -1.000000 0.062992
COLOR 1.000000 1.000000 1.000000 1.000000
UV 1 0.739746 0.553711
VERT 1674
NORMAL 0.023622 -1.000000 0.062992
COLOR 1.000000 1.000000 1.000000 1.000000
UV 1 0.800293 0.562988