Model leakage with brushes.

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
User avatar
Hipshot
Posts: 1548
Joined: Sun Jan 20, 2002 8:00 am

Model leakage with brushes.

Post by Hipshot »

Sometimes, not always, I get leaks when a models origin touches the same vertical/horizontal line as a solid structure-brush. However, they are reported like this Entity 79, Brush 0: Entity leaked, but do I need to care about them, is it considered by map2 as a real leak and would it give me the same problems as for say a hole in the hull? I'm using _alot_ of ases these days and I have probably ~70 models that touches structure brushes over the map, lamps etc.
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
zZCastleZz
Posts: 58
Joined: Sat Jun 23, 2007 3:06 am

Post by zZCastleZz »

just to be safe I would fix it.

Too often I find even when you think it doesn't matter it has some oddball effect that might not even seem to be related at all. Like all of a sudden bots OR enemy AI all where sombreros and fart the national anthem. You know, things that only a coder could try to explain.

Even if its a warning try to avoid letting it sit around. If you have to ask the question then the default answer is to just fix it.

good luck!
-The Castle
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

Your model is (should be) detail so it should have zero impact on VIS. I suspect q3map2 complains because it detects intersecting brushes, which are normally bad but not in this case.
Shallow
Posts: 167
Joined: Wed Feb 09, 2005 1:58 pm

Post by Shallow »

I agree with the llama. Entity leak messages on models usually don't mean anything. Unless you are seeing something weird in game, ignore it.
zZCastleZz
Posts: 58
Joined: Sat Jun 23, 2007 3:06 am

Post by zZCastleZz »

Your model is (should be) detail so it should have zero impact on VIS. I suspect q3map2 complains because it detects intersecting brushes, which are normally bad but not in this case.
Zero effect on vis?

Even detail brushes need to be with in a zone or leaf node to know when they can or cannot be seen by the player. If you do showtris the polys on the models do eventually cull when they are blocked by brush geometry right?

wouldn't you think that at least to some extent there is a chance that a ASE model might run into a situation where it doesn't know what leaf node it is within thus making it render even when it shouldn't be?

Maybe I'm misunderstanding the problem too..
-The Castle
Shallow
Posts: 167
Joined: Wed Feb 09, 2005 1:58 pm

Post by Shallow »

IIRC after the inital BSP phase converts the model meshes into drawsurfs, they are placed in leaves based on where the triangles are, just like drawsurfs from any other surface.

Seriously, it's an annoying popup that can be ignored. It's frequently necessary to place some things this way, e.g. unless they're on a perfectly flat surface Wolfenstein tree models need their origin buried to avoid having the bottom edges on the trunk showing.
Kat
Posts: 952
Joined: Tue Nov 14, 2000 8:00 am

Post by Kat »

Which is why when making and using models people should make allowance for the fact that models will be buried ;o).

Personally, I wouldn't blanket ignore the message because they do occasionally do weird things during/after compiling when you do; they don't show up, don't get lit properly, missing collision, missing faces, and that's not even touching on bot aas problems (assuming this is for Q3 that is), try comiling an AAS with a 'broken' entity in a map :icon27:
[url=https://www.katsbits.com/tutorials#q3w]Tutorials, tools and resources[/url]
zZCastleZz
Posts: 58
Joined: Sat Jun 23, 2007 3:06 am

Post by zZCastleZz »

Wolfenstein tree models need their origin buried to avoid having the bottom edges on the trunk showing.
Makes sense. Though in the case of the Wallenstein trees the terrain mesh was made of detail brushes and thus the trees origin was fully within a valid leaf node. Wolfenstein used the Quake terrain stuff IIRC. right?

But yeah if the ase models triangles are individually stored within in leaf nodes then it shouldn't matter one bit at all where the origin of the model is located. That is pretty damn slick design.. Ydnar ftw.. IIRC he is the one who set the tools up to work that way..

Though I wonder what the list of objects looks like with a fairly high poly model in a scene with a lot of leaf nodes lol..

For some reason I'm still thinking in terms of ASE models in doom 3 or quake 4 where the origin of the model is still important for occlusion culling since the portal system works so differently than the older bsp method. Most models aren't ever set to be inlined because a lot of people dont build models that full take advantage of that feature.

I might be one of the only people on the planet who likes the older bsp methods vs the highly limited simple portal culling methodology.
TOO EACH HIS OWN!!!!!
Or just use Unreal engine since its been doing both methods together for years.. lol..
Which is why when making and using models people should make allowance for the fact that models will be buried ;o).
hehe All artists who build tree models with the origin directly at the bottom of the model should be forced to populate a terrain level with nothing but structural brushes with said model LOL.. Also compile time is part of the punishment. lol
-The Castle
^misantropia^
Posts: 4022
Joined: Sat Mar 12, 2005 6:24 pm

Post by ^misantropia^ »

zZCastleZz wrote:Zero effect on vis?
Yep. VIS data is calculated by taking all the structural brushes, extracting the volumes they enclose and determining which volumes are visible to each other. Anything detail doesn't come into play in this stage of the compilation.
zZCastleZz wrote:wouldn't you think that at least to some extent there is a chance that a ASE model might run into a situation where it doesn't know what leaf node it is within thus making it render even when it shouldn't be?
No. A model or a brush always has only one origin[1] and that origin is always within a volume (unless your map is leaking, but that's a corner case obviously).

[1] For a brush, that's not entirely true. But it does hold for the vertexes it is made of.
User avatar
Foo
Posts: 13840
Joined: Thu Aug 03, 2000 7:00 am
Location: New Zealand

Post by Foo »

zZCastleZz wrote:wouldn't you think that at least to some extent there is a chance that a ASE model might run into a situation where it doesn't know what leaf node it is within thus making it render even when it shouldn't be?
I was thinking something similar. The warning could be due to potential problems with placement and visibility of the model itself, rather than it causing a problem with the vis process itself.

If models are culled if they lie outside the boundary of the world hull, then a model with its origin resting directly on the edge of the hull is perhaps at risk of being culled in some situations?

Not sure if you could fix this by tweaking the origin point for the models, or sinking the hull behind the model.... If you really can't see any unexpected behaviour from any of the models then I guess leave it...[/quote]
zZCastleZz
Posts: 58
Joined: Sat Jun 23, 2007 3:06 am

Post by zZCastleZz »

Yep. VIS data is calculated by taking all the structural brushes, extracting the volumes they enclose and determining which volumes are visible to each other. Anything detail doesn't come into play in this stage of the compilation.
Yes
I was referring more or less to the entire process from compile to in engine running the level though. They might not change leaf volumes or portals since they are detail brushes but they do need to be told where and when to be drawn. like "what leaf node am I inside of right now?"

for example around the same time that the compile tools determine which volumes are visible to each other they are also figuring out what brush surfaces and models are stored with in the leafs.. lol my point is rather silly because I IMO it isn't zero effect because I feel more like it is 0.1% effect on the compile process itself.

You are correct detail brushes and ASE models dont change leaf nodes, portals or anything of that nature.
Last edited by zZCastleZz on Mon Jun 25, 2007 12:45 am, edited 2 times in total.
-The Castle
zZCastleZz
Posts: 58
Joined: Sat Jun 23, 2007 3:06 am

Post by zZCastleZz »

I was thinking something similar. The warning could be due to potential problems with placement and visibility of the model itself, rather than it causing a problem with the vis process itself.

If models are culled if they lie outside the boundary of the world hull, then a model with its origin resting directly on the edge of the hull is perhaps at risk of being culled in some situations?
Hey Foo I have two kittens that look exactly like your avatar LOL.

From the above description to answer your question or point, the way quake 3 is being told to handle the ASE models in the above example is literally to break up the models polys and store them individually(or grouped) and place them with in leaf nodes in the level. If this is true then the origin of the ASE could possible not be important at all for the engine itself come rendering time.

Only catch I can see for this method is that your tri-stripping would suffer depending on BSP complexity????
-The Castle
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

Post by obsidian »

Q3Map2 complains because you have an entity intersecting structural brushes, so it considers the entity to be floating out in the void - thus the leak error.
Kat wrote:Which is why when making and using models people should make allowance for the fact that models will be buried.
Best case scenario, yes. If possible you should allow for this.

I'm not sure if this will cause any problems down the road, but personally, I would just spend the 10 seconds per model and just move the origin a few units and re-save. Really, it's not that much work.
Post Reply