Page 1 of 1

How does GZdoom decide when to render a model?

Posted: Thu Nov 22, 2007 1:09
by Enjay
Recently I've been messing with some quite large models. It is possible to look directly at the model and see it, but as you rotate yourself on the spot until the edge of the model is almost out of view, the model stops getting rendered before it is totally out of your FOV - so it suddenly disappears (and reappears if you reverse your rotation) at the periphery of your vision.

So, I'm wondering if there is a way to minimise/eliminate this problem. I've tried messing around with the size of the actor the model is being used for, and the size of the sprites that are being replaced by the model but my tests are inconclusive. So, some clues would be useful, or is it just a limitation that I can't do anything about?

Posted: Thu Nov 22, 2007 4:46
by Nash
I thought this was a bug introduced (and fixed) in a very early release of GZDoom... care to post the model

Posted: Thu Nov 22, 2007 9:20
by Graf Zahl
A model will not be rendered when the sector it is in is not visible, like for any sprite. Large actors will inevitably cause some problems with the way they are handled in Doom.

I once tried to rewrite the code to be more precise but that was too performance intensive on maps with a large number of actors and/or subsectors.

Posted: Thu Nov 22, 2007 10:47
by Enjay
Graf Zahl wrote:A model will not be rendered when the sector it is in is not visible, like for any sprite.
Aha! That would certainly make sense with an actor that was one of the worst offenders. It wasn't a particularly big model but I had it sitting on a very small sector which it overlapped considerably. The model was always flashing in and out of view. I can easily change things around so that it no longer happens. Thanks. :D

Posted: Sat Nov 24, 2007 20:02
by Nash
This limitation also exists in ZDoom. It's a pity, really.

Posted: Sat Nov 24, 2007 21:17
by Graf Zahl
This limitation has been in Doom since 1993, actually.

Posted: Mon Nov 26, 2007 13:17
by Enjay
I guess I simply haven't played with many large sprites standing on small sectors before because I didn't actually know about this limitation. Funny how you still keep finding out stuff after all this time.

I managed to fix my problem though and I'll know how to avoid it in future too. :)