How does GZdoom decide when to render a model?

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

How does GZdoom decide when to render a model?

Post 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?
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

I thought this was a bug introduced (and fixed) in a very early release of GZDoom... care to post the model
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post 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.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post 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
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

This limitation also exists in ZDoom. It's a pity, really.
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

This limitation has been in Doom since 1993, actually.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post 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. :)
Locked

Return to “GZDoom”