Detail Brush Support for Q1

Discuss the construction of maps and the tools to create maps for 3D games.
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Detail Brush Support for Q1

Post by mh »

Trying to figure out detail brush support for Q1, but not being a tools person it's quite a pain. Now, I know that the stock reply here is "the QuakeForge tools support detail brushes", BUT:

QuakeForge detail brush support was never actually tested. Otherwise how in the hell did this get through?

Code: Select all

		face_t     *f;

		for (f = brush_faces; f; f = f->next);

		f->detail = 1;
... AND ...

The QuakeForge tools use a different .prt file format.

So in other words they can't be trusted for this purpose and even if they could be they're useless anyway. Not portable to other QBSP tools and/or not usable by other Vis tools, you see.

Anyone with tools experience willing to chip in?
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
andrewj
Posts: 133
Joined: Mon Aug 30, 2010 3:29 pm
Location: Australia

Post by andrewj »

Detail brushes are brushes which are like normal brushes but simply don't take part in vising, is that right?

I think that means that a separate BSP step has to run in order to have a BSP (leafs etc) that corresponds to the detail-less version of the map.

But Q1 visibility info uses the leafs of the rendering hull (hull 0), so you would need to make a corresponding map between the hull 0 leafs and your detail-less BSP leafs, supply this mapping to the vis step, and use it after doing the vis.

So I'm thinking without the Q2 cluster system, detail brushes won't make much sense for Q1.
Downsider
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Post by Downsider »

What's the difference between a detail brush and a brush entity, then..?
negke
Posts: 150
Joined: Wed Apr 16, 2008 5:53 pm
Contact:

Post by negke »

What about the Quest tools? Or did the QF ones took the code from them?
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

Downsider wrote:What's the difference between a detail brush and a brush entity, then..?
A detail brush can cast shadows, a brush entity can't. A detail brush doesn't count against MAX_MODELS.
andrewj wrote:Detail brushes are brushes which are like normal brushes but simply don't take part in vising, is that right?

I think that means that a separate BSP step has to run in order to have a BSP (leafs etc) that corresponds to the detail-less version of the map.

But Q1 visibility info uses the leafs of the rendering hull (hull 0), so you would need to make a corresponding map between the hull 0 leafs and your detail-less BSP leafs, supply this mapping to the vis step, and use it after doing the vis.

So I'm thinking without the Q2 cluster system, detail brushes won't make much sense for Q1.
My thinking is that since most Q1 BSP tools already support a form of detail brush - translucent water - this should be just a logical step forward from that, although like I said, my tools knowledge is limited.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
andrewj
Posts: 133
Joined: Mon Aug 30, 2010 3:29 pm
Location: Australia

Post by andrewj »

I don't know if it is possible to have a leaf which is actually solid but pretends not to be for vising. It is no problem for the collision hulls, but it may be a problem for the rendering hull, which is used for hitscan and missile collisions.

There is a single "solid leaf" in a Q1 BSP used by every solid face in the rendering hull, and I think lots of pieces of code (in engine and tools) will assume there is never a real leaf behind a solid face, and fail in minor or major ways when encountering a real leaf behind the solid surface.

BTW it would not be hard to modify a lighting tool to allow brush models to cast shadows, although it would slow down the lighting process a lot.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

I guess making func_walls with a certain spawnflag (or func_details) able to cast shadows would be an acceptable compromise...

they would still count against max_models, but that's OK since protocols like 999 allow a large number of them.

I think e1m6rq has like 600 models, so a really large map would need four times that or something. 4096 as a limit maybe.
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

I think that the wise person would probably wish to makestatic them too otherwise they'll be running thinks on the server and going across the network.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
qbism
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am
Contact:

Post by qbism »

Anyone tried the Quest tools? Claim to support detail brush
http://quest-ed.sourceforge.net/dl/index.html
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

I've looked at the source code and it's quite obvious that QF was ported from Quest (although Quest is missing the crash bug in LoadBrush). Same incompatible changes.

I'm reckoing right now that andrewj's suggestion of modding the light tool, together with a makestatic, is probably the sanest way to go.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
metlslime
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Post by metlslime »

goldenboy wrote:I guess making func_walls with a certain spawnflag (or func_details) able to cast shadows would be an acceptable compromise...
Spawnflag would be bad, there are a limited number of them and this could interfere with some mods.

Better to add a new key; perhaps call it "_castshadow" (by convention the quake engine ignores anything starting with an underscore.)

I would actually want two keys, "_worldshadow" to cast shadows on the world, and "_selfshadow" to cast shadows on itself (a moving object shouldn't cast shadows on the world, for example, but would still benefit from self-shadowing if the geometry is complex.)

BTW this has been on my tools wishlist for a long time.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

[Just reading thread enjoying the deep thinking discussion going on here.]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

I like the idea of adding two keys but - in common with the spawnflags idea - it works on the assumption that the default behaviour is the way things currently are. Nothing wrong with that in principle, but it does defeat the purpose of "detail brushes" a little, which is to create a class of object which is to all intents treated as if it were part of the world by default, but is ommitted from vis testing.

So here's how I'd propose it working:
  • Have a func_detail entity which is by default makestatic and which casts shadows on both itself and on the world.
  • Add the keys as options for other object types and let the mapper decide.
That way we get the best of both. In cases where the mapper knows that an object will never move it can be made a func_detail and everything will be looked after automatically; no need to sweat over whether or not you remembered or forgot to add the appropriate keys. In cases where the mapper wants a moving object that can be done too, and the mapper has flexibility in deciding how it's lit. In both cases we get to accelerate vis times and the worst case for light times should be no worse than if the objects were part of the world anyway.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

99.9% of "detail brushes" are going to be static geometry. Ignore case of moving detail brushes?
metlslime
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Post by metlslime »

goldenboy wrote:99.9% of "detail brushes" are going to be static geometry. Ignore case of moving detail brushes?
I thought we gave up on detail brushes and started talking about brush models casting shadows as an alternative.
Post Reply