.map build process

Discuss the construction of maps and the tools to create maps for 3D games.
dreadlorde
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am
Contact:

.map build process

Post by dreadlorde »

Is there any documentation that goes into detail on the .map build process, other than the source to the tools (I already searched google)? More specifically, what treeqbsp, light, and vis do when they are running. I made a small two room map and it took vis (bjptools for linux) eleven hours to... do whatever it does. It would be nice to know what is happening during the stages of the .map building process.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
Get off my lawn!
Spirit
Posts: 1065
Joined: Sat Nov 20, 2004 9:00 pm
Contact:

Post by Spirit »

Wow, could you share that .map file? :shock:

My stupid understanding:

BSP creates triangular faces, the mesh the whole map consists of.

LIGHT creates the lightmap.

VIS calculates what faces can be seen from which portals (polyhedrons that are formed by the faces, darkplaces r_showportals 1).
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

qbsp builds a basic bsp. This is the stage that reads the wad and map.
light generate the lightmaps for your map. Without this it'll be fullbright.
vis generates the visibility information (the pvs) so that you don't have to redraw the entire world unconditionally.

vis and light utils can and generally should be threaded. Their output quality can also vary without significantly affecting play (useful for development). When vising for development you should use -fast.

with vis, its not the size of your map that increases times, its the complexity. Lots of tiny details = greater complexity = exponentially longer. Back in the day it was not entirely unexpected to see vis times of 4 days. Quite a few maps were released with only fast vis.
dreadlorde
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am
Contact:

Post by dreadlorde »

Thanks for the info, Spirit and Spike. I also remembered to check the quake wiki at quakedev about 5 minutes after posting my original post.

Spirit: the map can be found at http://omploader.org/vNWJlZg.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
Get off my lawn!
Spirit
Posts: 1065
Joined: Sat Nov 20, 2004 9:00 pm
Contact:

Post by Spirit »

That is a spiral stair case of doom. Try to stay on a bigger grid, do not use some rotate function in your editor but place clean brushes manually. Also the big open space around it makes it worse.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
dreadlorde
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am
Contact:

Post by dreadlorde »

Spirit wrote:That is a spiral stair case of doom. Try to stay on a bigger grid, do not use some rotate function in your editor but place clean brushes manually. Also the big open space around it makes it worse.
I figured it was something I did. :lol: I used grid64 for most things, but in the case of the starcase I used grid16 (iirc) so the stairs would be thin enough to walk up (ironically, you have to jump on the first stair).
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
Get off my lawn!
Spirit
Posts: 1065
Joined: Sat Nov 20, 2004 9:00 pm
Contact:

Post by Spirit »

Hm, that should be fine. I only took a quick look and assumed you had rotated one shape off grid. I guess it is the big empty space then. Still hardcore. :-)
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
negke
Posts: 150
Joined: Wed Apr 16, 2008 5:53 pm
Contact:

Post by negke »

Indeed, spiral staircases are evil, they crate a shitload of portals. Especially if they are done sloppily like here. Still, 11 hours sounds extreme, old computer? Make the thing a func_wall and vis will run like a breeze.
dreadlorde
Posts: 268
Joined: Tue Nov 24, 2009 2:20 am
Contact:

Post by dreadlorde »

negke wrote:Indeed, spiral staircases are evil, they crate a shitload of portals. Especially if they are done sloppily like here. Still, 11 hours sounds extreme, old computer? Make the thing a func_wall and vis will run like a breeze.
It's a pretty old laptop, about eight years old, 2.2ghz pentium pro.
Ken Thompson wrote:One of my most productive days was throwing away 1000 lines of code.
Get off my lawn!
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

still has a higher clockspeed than my laptop which is only a year old...
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Spike wrote:still has a higher clockspeed than my laptop which is only a year old...
LOL. My 2002 desktop is 2.0 Ghz and I am left wondering what has happened to the world when my relatively ancient Win XP SP1 machine blows away Vista/Win 7 machines and why the clock speed hasn't advanced much over the years.

And most software isn't designed to take much advantage of multiple cores.

Or why a Visual Studio .NET compiled exe is a big phatty 1.3 MB when it is 500 Kb in Visual Studio 6.0. Or even why Visual Studio .NET freebie version is 1 GB download.

The world is strange :?: I have my thoughts. Old skool is where it is at! :D New school is DRM, sloth machines, phatty builds, style over substance.

Oh well ...
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 ..
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

pentium 4s with their 3.8ghz clocks suck, what can I say? :P
instructions per second are more useful than clock speeds (especially when those clocks are used waiting for ram!).
mh
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Post by mh »

I wouldn't worry too much about big executables - anyone who frets over 1.3MB vs 500KB mustn't have any real problems in their life I say :lol: - but the underuse of multicore capabilities in the majority of apps is an unfortunate but inevitable consequence of the fact that current multithread APIs are crap.

I predict that whichever OS wins the next round of the war will be the one that gets a really good multithread API first (i.e. one usable by mere mortals without having to worry about arcane terminology, deadlocks, race conditions, etc).

Of course Intel or AMD could surprise us nicely by coming up with a CPU architecture that distributes workload among multiple cores automatically for you, but I wouldn't hold my breath for it.
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
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

mh wrote:I predict that whichever OS wins the next round of the war will be the one that gets a really good multithread API first (i.e. one usable by mere mortals without having to worry about arcane terminology, deadlocks, race conditions, etc).

Of course Intel or AMD could surprise us nicely by coming up with a CPU architecture that distributes workload among multiple cores automatically for you, but I wouldn't hold my breath for it.
Well, I'm not claiming to have answers.

But I do have questions ...
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 ..
metlslime
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Post by metlslime »

mh wrote:I predict that whichever OS wins the next round of the war will be the one that gets a really good multithread API first (i.e. one usable by mere mortals without having to worry about arcane terminology, deadlocks, race conditions, etc).
OSX 10.6 has an API called "Grand Central Dispatch" which looks pretty nice, at least for some classes of parallelism. They also added "blocks" (closures) to Objective-C to make this a more inherent part of the language.
Post Reply