Some parts of models aren't being rendered

Thu Mar 25, 2021 2:34 pm

Title mostly says it all. It doesn't matter which renderer is used; The Softpoly, OpenGL, and Vulkan renderers all have this issue.

Here's a simple example. To run it, just start a game and summon "COD_SSHorch" or "BrokenModelTest". You'll need to use the TNT: Evilution IWAD if you want the BrokenModelTest to look good, however.

The "BrokenModelTest" should look like this, but on builds after March 6 (when the dynamic models per actor pull request was merged), it looks like this. Note the lack of the disc covering the transparent part of the sphere.

Also, if you summon "COD_SSHorch", the seats, doors, steering wheel, and back part of the vehicle will be missing on builds after March 6.

Re: Some parts of models aren't being rendered

Thu Mar 25, 2021 3:15 pm

I have taken a look at the archive's MODELDEF you posted, and the COD_SSHorch and BrokenModelTest definitions both define four models, but have only one FrameIndex line (for model 0). To render all models, you have to have FrameIndex lines for each of the models. This is what the wiki entry for MODELDEF states and how it should, and does, work. Did I misunderstand something :?:

Re: Some parts of models aren't being rendered

Fri Mar 26, 2021 5:48 pm

If that's the case, only the sphere in the "BrokenModelTest" should have been rendered, since the upper and lower panels and the disc are separate models. Nevertheless, there are probably some old mods which depend on the old behavior of rendering all the models, despite the lack of FrameIndex definitions for all the models.

Re: Some parts of models aren't being rendered

Fri Mar 26, 2021 7:45 pm

That could be true, although I have to wonder why those mod creators did this at all. How would the MODELDEF parser know which frame of the non-FrameIndexed model to render?

Re: Some parts of models aren't being rendered

Fri Mar 26, 2021 8:44 pm

I think the other models would use the same frame as the first, if only one FrameIndex definition for the first model is given.