View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005383 | DarkRadiant | Models | public | 08.11.2020 05:30 | 05.02.2021 11:29 |
Reporter | greebo | Assigned To | greebo | ||
Priority | normal | Severity | normal | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 2.8.0 | ||||
Fixed in Version | 2.9.0 | ||||
Summary | 0005383: Reported Polycount for LWO models is one too high | ||||
Description | The LWO PicoModel importer generates too many indices in the index array, it looks like this: 0 0 0 0 1 2 ... The first three indices are all 0, forming a degenerate face, but it also misleads the RenderablePicoModelSurface::getNumTriangles() which is calculating the number of tris by dividing the length of the index array by 3. | ||||
Steps To Reproduce | Model: tdm_models01.pk4\models\darkmod\mechanical\receiver_antenna.lwo is reported to have 61 polys, but it only has 60 (check it out in Blender) | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
The problem is that in pm_lwo.c:300 the polycount is upped a tad too early /* We haven't discarded this polygon, so bump the surface polycount */ surfacePolyCount++; Since this variable is used to calculate the array offset when storing the indices later. The array will auto-adjust, so no buffer overrun will occur, but the first three indices will remain at their initialised values: 0 0 0 |
|
DarkRadiant: 2.9.0 2034a9de 08.11.2020 16:26 Details Diff |
0005383: Add unit test asserting the LWO and ASE poly count after loading |
Affected Issues 0005383 |
|
mod - test/Makefile.am | Diff File | ||
add - test/Models.cpp | Diff File | ||
mod - tools/msvc/Tests/Tests.vcxproj | Diff File | ||
mod - tools/msvc/Tests/Tests.vcxproj.filters | Diff File | ||
DarkRadiant: 2.9.0 7f3d9aff 08.11.2020 16:27 Details Diff |
0005383: Fix polygon counting in LWO loading code |
Affected Issues 0005383 |
|
mod - radiantcore/model/picomodel/lib/pm_lwo.c | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
08.11.2020 05:30 | greebo | New Issue | |
08.11.2020 05:30 | greebo | File Added: receiver_antenna_lwo.png | |
08.11.2020 05:32 | greebo | Status | new => confirmed |
08.11.2020 05:56 | greebo | Note Added: 0012868 | |
08.11.2020 16:26 | greebo | Assigned To | => greebo |
08.11.2020 16:26 | greebo | Status | confirmed => assigned |
08.11.2020 16:28 | greebo | Changeset attached | => DarkRadiant 2.9.0 2034a9de |
08.11.2020 16:28 | greebo | Changeset attached | => DarkRadiant 2.9.0 7f3d9aff |
08.11.2020 16:29 | greebo | Status | assigned => resolved |
08.11.2020 16:29 | greebo | Resolution | open => fixed |
08.11.2020 16:29 | greebo | Fixed in Version | => 2.9.0 |
05.02.2021 11:29 | greebo | Status | resolved => closed |