(GZDoom) 3D models disappearing at close angles

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Sicamore
Posts: 75
Joined: Wed Apr 17, 2013 4:33 pm
Location: Toronto.

(GZDoom) 3D models disappearing at close angles

Post by Sicamore »

Hello. I have been working with 3D models recently but discovered weird behavior that is haulting my project (sadly).

The problem seems to be that the model in question is disappearing when I get too close to it and then slowly change my angle of view. The innocent bus I am using (huge images ahead):
Spoiler:
Getting closer and just looking at the engine part, everything seems to be fine:
Spoiler:
And then, shifting a little bit to the left, it suddenly disappears:
Spoiler:
Just for your information, I will also state the factual things:

-The bus is a standard .MD2 model.
-It is properly defined in modeldefs and decorate.
-It shows up in game (obviously) and in GZDoom builder.
-It is -solid.
-The other models are standard and don't interact with the bus in any way.
-The bus has a radius of 50.

GZDoom Builder shot:
Spoiler:
Another thing worth mentioning is that this bus is not a unique case - this problem can happen with any 3D model AND even regular sprites (I have witnessed this before and sprite disappearing doesn't happen in software). I think it has something to do with the actor being too close to a wall, because when I move the bus into an open area it doesn't seem to disappear. However, this isn't right and I shouldn't have to move it every time I want proper rendering. I have heard recommendations from others to increase/decrease the radius but that does nothing.

Anyone have any idea?

Thanks.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: (GZDoom) 3D models disappearing at close angles

Post by Enjay »

I'm afraid this is a well known limitation of using models in GZDoom. In fact. it's also a limitation of sprites in most Doom games too. Basically, if the sector that the actor is placed in is not visible, any actors in the sector will not be drawn. Looking at your GZDoom Builder screenshot, it looks as if the bus actor is sitting a thin strip of a sector and the front and back of the bus are hanging out into the sectors either side. With a setup like that, it's fairly easy to get yourself into a position where you should still have the model in your field of view but the thin sector won't be so the model vanishes.

Like I said, this also happens with sprites but it gets noticed far less often because most sprites are quite a bit smaller than some of the models constructs used in maps.

FWiW, Risen3D does things differently (and perhaps Doomsday does too) and so this is not an issue in Riden3D.
User avatar
Nash
 
 
Posts: 17433
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: (GZDoom) 3D models disappearing at close angles

Post by Nash »

Oh man the bus' diffuse is in dire need of some AO bakin'... :P
User avatar
Tormentor667
Posts: 13530
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: (GZDoom) 3D models disappearing at close angles

Post by Tormentor667 »

I noticed this as well and it's a big problem with larger models... can't there anything done about it?
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: (GZDoom) 3D models disappearing at close angles

Post by Enjay »

Tormentor667 wrote:can't there anything done about it?
Not from an end user perspective*. If Risen3D does it then it must be possible but IIRC, the change isn't a minor one and with no one working on additions to GZDoom rendering features...



*Other than making your map so that you ensure that the sector can always be seen when the model can, of course. Sometimes a sector the same size and shape as the model works. Sometimes using split sectors works (eg making a small, unnoticeable hole right in the middle, merging that with a much bigger surrounding sector and then placing the model in it). However, there are many times when the place where you want to put the model simply can't be set up like one of these options.
User avatar
Sicamore
Posts: 75
Joined: Wed Apr 17, 2013 4:33 pm
Location: Toronto.

Re: (GZDoom) 3D models disappearing at close angles

Post by Sicamore »

Oh damn, that really sucks. I wonder how mods like total chaos would look since it basically relies on models. :(
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: (GZDoom) 3D models disappearing at close angles

Post by Enjay »

Mods can be made to look totally fine with lots of models. It's "just" that care has to be taken with model placement, especially when there are small sectors involved. "Paranoid" used lots of models and this issue certainly caused a few headaches along the way but, for the most part, the problems were resolved with some level editing.
User avatar
Sicamore
Posts: 75
Joined: Wed Apr 17, 2013 4:33 pm
Location: Toronto.

Re: (GZDoom) 3D models disappearing at close angles

Post by Sicamore »

That doesn't seem like a severely harsh workaround. I think I'll manage. Thanks for the help!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: (GZDoom) 3D models disappearing at close angles

Post by Graf Zahl »

The change is not that hard. Instead of just processing the actors with the center in the sector, process all actors in the sector and mark them as processed.
There's just one major problem with this: It can really slow things down, if there's a lot of stuff going on in a map. Especially with extensive use of large bridge things this could cause some serious issues.

Let's face it: The Doom engine wasn't designed to handle larger actors.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: (GZDoom) 3D models disappearing at close angles

Post by Enjay »

It take it that it's not possible to add an actor flag or modeldef flag that tells the engine to do the more expensive check for it but do the quicker "centre only" check for everything else?
User avatar
Sicamore
Posts: 75
Joined: Wed Apr 17, 2013 4:33 pm
Location: Toronto.

Re: (GZDoom) 3D models disappearing at close angles

Post by Sicamore »

That would be great in my opinion.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: (GZDoom) 3D models disappearing at close angles

Post by Graf Zahl »

Enjay wrote:It take it that it's not possible to add an actor flag or modeldef flag that tells the engine to do the more expensive check for it but do the quicker "centre only" check for everything else?
It can't be done by actor, it has to be done per map. Even if there's only a single actor using this, the renderer would have to check the actor chains of all sectors.
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: (GZDoom) 3D models disappearing at close angles

Post by Enjay »

I guessed that if it was as simple as that, you'd have probably done it already anyway.
Locked

Return to “Editing (Archive)”