News | Forum | People | FAQ | Links | Search | Register | Log in
Multithreaded VIS For Windows
WVis is a modified version of Bengt Jardrup�s VIS tool. It�s the exact same program as the one you can get here�

http://user.tninet.se/~xir870k/

�except that it has multithreading turned on. Basically, you get 1 thread for every core/processor you have on your machine. This will speed up VIS compile times dramatically if you have a machine with multiple cores/processors.

Usage and syntax are exactly the same.

Enjoy!

WVis
http://www.quaketastic.com/upload/files/tools/windows/misc/WVis.zip
First | Previous | Next | Last
 
So I'm right then? It's a major undertaking? 
MPI 
I don't know. It's worth exploring. As I said, if you can restructure it to use MPI, you can make the leap to making it work over the internet.

Or go the whole hog and figure out how to separate the map into mutually-independent parts for vis. 
Or 
Black-Dog or Moaltz or Bambuz can port the thing to Haskell! 
 
It's something to think about but I wouldn't hold your breath. :) 
 
The source code is available if someone wants to get THAT ambitious, BTW:

http://www.quaketastic.com/upload/files/tools/windows/misc/WVis_Src.zip 
 
actually it would be nice to see a completely modern rethinking of vis and light. For example it should be possible to use your GPU to render lightmaps for you. As for vis, i'd like to see alternate implementations, maybe even tradeoffs such as 90% faster for 10% higher polycount.

The problem with this super long vis times is that the result is nobody vises their maps during development; they only do it once at the end, and if there's a problem, they're not willing to fix it and waste another 2 months for another vis.

I don't have any fully-developed ideas for vis, but i could imagine some sort of raycasting approach that sends rays out in a coarse grid, then subdivides that grid as needed. Or some sort of CSG method that starts with the half-space on the far side of a portal, then flows recursively through portals clipping that half-space as you recurse through each next portal. Or maybe a system where you use the standard algorithm but have a much smaller set of portals to work with, either though automatic selection of "important" portals (which would be awesome but i can't quite see how to do it), or through mapper-defined "portal brushes". 
 
Wait, this is the VIS for Quake(1), right? This thing was initially developed more than 13 years ago and it is still _this_ slow? I've never done anything for Q1, but a VIS compile of a (cleanly build) Q3 map typically took less than 2 minutes.

The Q3 VIS, as I understand it, recursively subdivides a map into a tree of convex shapes and then calculates which leafs can "see" each other. Does the Q1 VIS do any more than that, or why exactly does it take this long to compile a map? Maybe the algorithm of the Q1 VIS is just very naive (in which case one could probably adopt some code of the Q3 VIS)? 
 
I recall reading back in the day something Tokay or Romero said I think, that id's tools allowed you to build the maps incrementally. Implying that you could create one section, vis it, test it, build another part, vis that then add it to the already vised part. 
Chaos: 
If you made a q3 map with 7000 structural brushes, it might take a while. Detail brushes help a lot. 
How About An Editor With On-the-fly Compile In Other Thread(s)? 
Should be lots of idle cpu-time while mapping although the problem is of course working with a changing data set and figuring out how to recompute as little as possible when the geometry changes... 
Necros, Ricky, William 
That's what I do basically. Kept a copy of the bjp state file and resumed the process with Wvis. Both tools can be used interchangably. We'll see how it turns out in the end, though. I hope that c_chains discrepancy doesn't have any severe consequences. 
 
metlslime

I think having level designers place hand created portal sheets would be interesting. Have a texture called "PORTAL" or something that gets ignored during QBSP and LIGHT but is used to define the portal planes during VIS? I dunno. I don't know nearly enough about the internals of VIS to do this but it IS interesting. 
 
Not to make anyone cry, but I just got a new machine at work. 24GB of RAM and 16 cores. Good god... 
But Does The New Eight Cores Make Any Difference? 
I guess you can always make everyone jealous by compiling three maps at the same time. 
 
Well, it's for work, so yeah it'll make a difference. For Quake VIS'ing, probably not. 
16 Cores? 
you should sell your vising capabilities. :P 
What Is It Clocked At? 
I mean 4.5Ghz isnt uncommon AFAIK, for your Core 2's and i7's and the new phenoms. I wonder how long it would take to compile CDA, probably like a day or something......... 
 
Intel Xeon
X5560 @ 2.80GHz
2 Processors

So 8 cores per processor... 
Hyperthreading 
The intercoils indicate that your CPU has 4 real cores per processor, which with hyperthreading gives you a perceived 4 more. So, it's not quite 16 cores, maybe approximately 12, if you want to talk about it like that. I'm still jealous, though. 
 
going further off topic, but there will be 6-core Xeons soon (so 12 threads per core).

And about the hand-placed portals, isn't that what hint brushes do?

Relatedly, as I like to point out every time these topics come up, the codebase exists for adding hint, skip, and detail in Q1:

http://quake.chaoticbox.com/downloads/equakeutils.sit 
Grahf: 
i think i've seen you mention it before, but i simply don't believe that detail is possible in the quake1 bsp format. Maybe i should actually follow your link this time and see for myself :) 
Also... 
hint brushes supposedly indicate preferred planes to do major cuts in the BSP tree, from what i understand. And "skip" in quake2 is used on the other faces of a hint brush so all 6 sides don't have to be "hint".

"Skip" in quake1 has come to mean the equivalent of "nodraw but structural and casts shadows" in quake3 terminology.

Also: how do i open a .sit file in windows? 
Well... 
let me back up and say that perhaps detail brushes would be possible if you were willing to totally break software engines. 
Stuff 
.sit is Stuffit, a totally lame and outdated mac-only compression format. Here, this should be easier:
http://www.quaketastic.com/upload/files/tools/mac/misc/eUtils_r10.zip

The codebase is basically the Quest compilers, but enhanced and fixed up. Like, the original Quest utils had their own pointfile format, but pOx reverted it to standard quake style. Some higher limits too (but nowhere near bjp-tools' level), better handling of complex geometry, and probably some other features I am forgetting right now.

Truth time: the detail brushes in the eUtils don't work exactly like Q3 engine detail. I have done tests and they split the BSP tree exactly the same as regular brushes. However, and this is the important part for this discussion, they are ignored by VIS.

Both qbsp and vis have to be aware of the detail brushes, but they definitely work in all engines. I'm no programmer, but I had a look at the relevant parts of the source, and it looked to me like the main change was a new contents type (sky, lava, water, slime...and detail), and all brushes in am_detail entities were given that type. Then vis knows to ignore them, I guess. 
John Carmack On Parallelization 
There are opportunities for network level parallelization with some recoding. Qbsp uses fork level parallelization to utilize up to three processors, and it would be trivial to change to allow it to be run on three computers. Light is embarrassingly parallel, and can be divided arbitrarily. Vis is highly parallel, but it takes some advantage of order of completion in
the serial case, so scaling is not quite linear.


http://www.gamers.org/dEngine/quake/Qbsp/

I had to correct his maddening spelling mistakes. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.