Trouble with disappearing models.

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.

Trouble with disappearing models.

Postby Nash » Sat Sep 01, 2012 1:25 pm

https://dl.dropbox.com/u/47355875/New%20Folder.zip

1) Just drag this .zip on to gzdoom.exe
2) From the start position, without moving the player, turn your view around.

You will see the roof mesh suddenly appear. Move the view far away enough and the mesh will disappear. This is because the sector that houses the thing is not visible anymore; therefore the thing is not drawn.

Can anyone think of any solutions around this? Using 3-d floors for roof work is not acceptable, due to the way the control sectors have to be precisely aligned, mass producing these houses for a small town (which no doubt, the houses will be all over the place and in different angles too) is out of the question. Using models is the easiest way.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Trouble with disappearing models.

Postby Enjay » Sat Sep 01, 2012 2:39 pm

I realise that this is far from a universal solution but if the structures you want are exactly like the ones in your test map, I'd do it like the attached example (load it on top of your example zip).
Attachments
roof.zip
(1.77 KiB) Downloaded 29 times
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: Trouble with disappearing models.

Postby Nash » Sat Sep 01, 2012 10:44 pm

Ah, so make the sector that houses the roof the same sector as the outside sectors. To improve performance, I guess what I can do is enclose the perimeter of each house to a large containing sector, so that the engine does still have a chance to occlude the thing... I mean, Sector 1 is going to be huge, and having all of the roofs in the map not culled at all would be a bad thing...

Thanks for the simple solution. :)
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Trouble with disappearing models.

Postby Enjay » Sun Sep 02, 2012 5:30 am

What I did there is pretty much the principle that I use for most large-ish sized static models. ie make sure that the actor is in a sector that you can always see whenever you should be able to see the model. There are some obvious limitations but it works in many cases.

Creating a containing sector that is just big enough to contain the model (and thereby will always be seen when the model is visible) like you suggest is also very useful. Again there are limitations but it often works.

Here is one of the limitations I have come across when messing with models and trying to ensure that they are always visible:

Spoiler:


As I mentioned with the above example, creating a "containing sector" can allow you to use invisible 3D floors or other tricks to give the model some fake collision properties. When I'm setting something like that up, I find that it helps to put translucent mid textures on the lines that form the edges of the containing sector so that when I check it in game, I can see how close my sector comes to matching the shape of the model. This can help out quite a bit if the model has a complicated shape. Once it's all done, the mid textures get removed.


Another example that you might find useful:
Spoiler:
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: Trouble with disappearing models.

Postby Nash » Sun Sep 02, 2012 5:51 am

... :O

Argh Enjay, you and your mysterious unreleasable mods! :'( :P

But yes, very useful tips, thank you. Will keep these in mind.

Spoiler:
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Trouble with disappearing models.

Postby NeuralStunner » Sun Sep 02, 2012 3:57 pm

Enjay wrote:However, if you try, you can see the hole in the middle that is actually the same sector as the normally lit surrounding area.
If you used UDMF, there's a sector property perfect for concealing such things. ;)
User avatar
NeuralStunner
An Exercise in Self-Indulgence
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293
Operating System: Windows Vista/7 64-bit

Re: Trouble with disappearing models.

Postby Enjay » Sun Sep 02, 2012 4:04 pm

Nash wrote:Argh Enjay, you and your mysterious unreleasable mods! :'( :P

These aren't so much unreleasable as not worth releasing. The first one (with the cars) is a horrible, blocky, simplistic map with not much to do in it and the second is only a tiny area with no real gameplay to speak of - sort of a mapping doodle I suppose.

NeuralStunner wrote:If you used UDMF, there's a sector property perfect for concealing such things. ;)

There is? I'm intrigued. Given that the little square is the same sector as the rest of the surrounding area, would the sector property not affect the entire area as well as the little square?

I used UDMF to modify Nash's example (though it took me about three times as long as it would have in an editor that I know properly). :P
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: Trouble with disappearing models.

Postby NeuralStunner » Sun Sep 02, 2012 4:33 pm

Enjay wrote:Given that the little square is the same sector as the rest of the surrounding area, would the sector property not affect the entire area as well as the little square?
Heh, that would be a bit of a problem, yes. Image
User avatar
NeuralStunner
An Exercise in Self-Indulgence
 
 
 
Joined: 21 Jul 2009
Location: Indiana, USA
Discord: NeuralStunner#1293
Operating System: Windows Vista/7 64-bit

Re: Trouble with disappearing models.

Postby Jitan » Mon Sep 03, 2012 12:41 am

I got this problem too, I make a huge house and can only see it if I look at the actor directly. So it seem there are solution
Jitan
 
Joined: 04 Oct 2011

Re: Trouble with disappearing models.

Postby Tormentor667 » Mon Sep 03, 2012 1:36 am

Nash wrote:Argh Enjay, you and your mysterious unreleasable mods! :'( :P
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Trouble with disappearing models.

Postby ReX » Mon Sep 03, 2012 9:33 pm

Enjay wrote:.... make sure that the actor is in a sector that you can always see whenever you should be able to see the model. There are some obvious limitations but it works in many cases.

Is there an explanation for why GZDooM has such a limitation with models? And are there any indications that Graf may be working towards a permanent solution? I am constantly finding that I can't use the work-around when very long models are involved.
User avatar
ReX
Title? I don't need no steenkin' title!
 
Joined: 05 Aug 2003
Location: Quatto's Palace

Re: Trouble with disappearing models.

Postby Nash » Mon Sep 03, 2012 11:40 pm

It has nothing to do with models. Actor Things are like that in the Doom engine: if the sector is out of view, all Things in that sector are not drawn. The same thing will happen with the corpse of a Spider Mastermind in sprite form (which is very wide) .

In most cases, this doesn't manifest in "normal" circumstances, but because we are using huge objects whose geometry perimeter is larger than the sector... it becomes really evident.

This is probably done for performance reasons. Disabling this behaviour in the Doom engine is probably an easy fix (probably just have to comment out the line responsible for doing this) but I guess performance will be really slow because Things wouldn't be occluded anymore...
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Trouble with disappearing models.

Postby Nash » Tue Sep 04, 2012 12:57 am

Double post. Is there possibly another way to build the construct as demonstrated in my first post, but without the flat middle sector to do the sloping? Besides slope tilt Things. So basically what I'm looking for is a sharp triangle silhouette for the house (if viewed from the side).
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Trouble with disappearing models.

Postby Enjay » Tue Sep 04, 2012 6:02 am

Can't check - at work, but could you make the roof out of 4 triangles (each slope being a rectangle made from 2 triangles like you would if making a model) and use vertex hights? (I *think* they only work on triangles - right?)
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: Trouble with disappearing models.

Postby Sgt Dopey » Tue Sep 04, 2012 7:05 am

Enjay wrote: (I *think* they only work on triangles - right?)


They're best used on triangles
User avatar
Sgt Dopey
:O
 
Joined: 13 Jan 2011
Location: Australia

Next

Return to Editing (Archive)

Who is online

Users browsing this forum: ABigBucketOfAids, Ahrefs [Bot] and 5 guests