(GZDoom) 3D models disappearing at close angles

Discuss all aspects of editing for ZDoom.
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

(GZDoom) 3D models disappearing at close angles

Postby Sicamore » Sat Jun 22, 2013 8:53 pm

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
Sicamore
Asks Stupid and Rhetorical Questions on #ZDoom
 
Joined: 17 Apr 2013
Location: Toronto.

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

Postby Enjay » Sun Jun 23, 2013 1:47 am

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby Nash » Sun Jun 23, 2013 3:45 am

Oh man the bus' diffuse is in dire need of some AO bakin'... :P
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

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

Postby Tormentor667 » Sun Jun 23, 2013 5:42 am

I noticed this as well and it's a big problem with larger models... can't there anything done about it?
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

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

Postby Enjay » Sun Jun 23, 2013 6:12 am

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby Sicamore » Sun Jun 23, 2013 7:58 am

Oh damn, that really sucks. I wonder how mods like total chaos would look since it basically relies on models. :(
User avatar
Sicamore
Asks Stupid and Rhetorical Questions on #ZDoom
 
Joined: 17 Apr 2013
Location: Toronto.

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

Postby Enjay » Sun Jun 23, 2013 8:38 am

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby Sicamore » Sun Jun 23, 2013 9:01 am

That doesn't seem like a severely harsh workaround. I think I'll manage. Thanks for the help!
User avatar
Sicamore
Asks Stupid and Rhetorical Questions on #ZDoom
 
Joined: 17 Apr 2013
Location: Toronto.

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

Postby Graf Zahl » Sun Jun 23, 2013 11:13 am

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Enjay » Sun Jun 23, 2013 11:17 am

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
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby Sicamore » Sun Jun 23, 2013 2:29 pm

That would be great in my opinion.
User avatar
Sicamore
Asks Stupid and Rhetorical Questions on #ZDoom
 
Joined: 17 Apr 2013
Location: Toronto.

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

Postby Graf Zahl » Sun Jun 23, 2013 2:40 pm

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
Graf Zahl
Lead GZDoom Developer
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

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

Postby Enjay » Sun Jun 23, 2013 3:08 pm

I guessed that if it was as simple as that, you'd have probably done it already anyway.
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland


Return to Editing (Archive)

Who is online

Users browsing this forum: BathySalts and 1 guest