View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006610 | The Dark Mod | Coding | public | 15.03.2025 14:51 | 30.03.2025 18:18 |
Reporter | stgatilov | Assigned To | stgatilov | ||
Priority | normal | Severity | normal | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Product Version | TDM 2.12 | ||||
Target Version | TDM 2.14 | Fixed in Version | TDM 2.14 | ||
Summary | 0006610: OBJ model import issues | ||||
Description | The issues are: 1) Line starting with '#' must be treated as full-line comments, but parser only skips the '#' token. 2) As seen in idCollisionModelManagerLocal::LoadRenderModel, OBJ model can't be used to auto-generate collision model. | ||||
Additional Information | https://forums.thedarkmod.com/index.php?/topic/21628-211-obj-model-format/#findComment-500694 | ||||
Tags | No tags attached. | ||||
Speaking of point 1. It turns out that idLexer::SkipRestOfLine does not simply fast-forward to the end of the line. It still parses all the tokens on the line! So if some token inside comment is malformed according to its rules, it becomes a parsing error. Also right now only a/b/c faces are supported, i.e. with normals an texcoords specified explicitly. I guess I can support implicit normals by computing them the standard way. |
|
The issues are fixed: r10970 Properly skip commented lines in OBJ, don't stop on syntax error in comments. r10971 Automatically generate collision models for OBJ models, just like for LWO/ASE. Also I added test map to internal assets (not packaged into releases): r17327 Added test model in OBJ format and test map which showcases it. As for implicit normals, I'm not sure I really want to support it. The main idea of OBJ support was making it very explicit, i.e. you get in the engine exactly what your exporter wrote to the file. Implementing implicit computations of normals somewhat breaks this paradigm. Also, I guess some confusion can happen if OBJ file partially has normals and partially does not... |
|
Date Modified | Username | Field | Change |
---|---|---|---|
15.03.2025 14:51 | stgatilov | New Issue | |
15.03.2025 14:51 | stgatilov | Status | new => assigned |
15.03.2025 14:51 | stgatilov | Assigned To | => stgatilov |
30.03.2025 10:12 | stgatilov | Note Added: 0016999 | |
30.03.2025 18:06 | stgatilov | Note Added: 0017000 | |
30.03.2025 18:18 | stgatilov | Status | assigned => resolved |
30.03.2025 18:18 | stgatilov | Resolution | open => fixed |
30.03.2025 18:18 | stgatilov | Fixed in Version | => TDM 2.14 |