Author Topic: Guide: General BSP stuff II  (Read 32954 times)

IronFist

  • Autococker
  • Posts: 1304
Guide: General BSP stuff II
« on: July 25, 2005, 03:11:53 PM »
See post below for the tutorial.

This probably needs to be de-stickified once the main tutorials assimilate the random stuff in here.
« Last Edit: July 09, 2012, 09:45:38 AM by Chef-Killer »

IronFist

  • Autococker
  • Posts: 1304
Re: An "extra" BSP tutorial
« Reply #1 on: July 25, 2005, 03:12:13 PM »
    EDIT: Just to make sure it is fully clarified, this tutorial covers things most of the others don't, and goes over some of the BSP editor's behaviors that may be odd.

    Edited July 1st 2007 to make a bit more readable.

    This is something to read after you take a look at Jitspoe's basic mapping tutorials. If you are really intent on finding me, I'm usually on irc.gamesurge.net #gamesurge/#java as "ironfist" or a similar nickname.


    -------------------------------------------------------------


    BSP is an aging, yet still-capable map editor that was abruptly closed development-wise when the author found himself too busy a few years ago. Due to relative simplicity, and focus on Quake 2, it was chosen specifically to be configured for Digital Paint mapping, as DP is based on the Q2 engine. By following the included instructions and ensuring correct directory placement of BSP & DP, you can be up and ready to map in a few minutes. This article assumes you are now somewhat familiar with BSP, but includes a short introduction to various terms. If you need a dead-start tutorial check DP's forums/FAQ (wiki) to find one of Jitspoe's tutorials. Since DP is built on the Quake2 engine, more specific information (Q2 entities, brush flags, etc.) can be found on old Q2 mapping sites. One great resource is Rust, just plug in "Rust Quake 2 tutorial" in google!

    To begin mapping, you need to first be aware of the following:
    You need to come up with a plan for you map as a whole. This generally involves drawing the basic layout to get a good idea of how you want it to look. Also, specifically limit the design-time to what you've created. If you are like me, you will make two fatal mistakes. First, you will begin with no idea of how you want to map to look like. Secondly, the resulting "on-the-fly" creation will lead to a map with unfinished areas that require more filling in. Even then you are faced with the problem of not knowing when to stop - since you don't have a clear idea of how you want the map to be like, you continually add things until you "burn out," losing all interest in what you dumped a lot of creative effort in to. Remember: it's important to finish a map as soon as possible. HOWEVER, do not take this to mean you should sacrifice quality. What I mean is that you'll need your clear plan ahead of time so you can build the map with little difficulty, since you shouldn't be confronted with developmental "dead brain" situations, or simply losing interest.

    Important mapping terms:

    BSP/.BSP - You shouldn't confuse BSP the map editor and .BSP, the file format. A .BSP file (such as mymap.bsp) is generated by the compilers that will soon be mentioned. It contains all your lighting, entities, and brushes in a slightly compressed and binary-based manner.

    .MAP - This is a file that can be edited in a text editor if you wish, but that would be quite hard. A .MAP file can be loaded in your map editor and modified as you wish, then you "compile" this map file into the final product for testing or distribution - the BSP file.

    Polygon(s) - Since I will be talking about "polygons" a lot, you may want to be familiar with it. A polygon is simply a multi-sided figure! A polygon would obviously then consist of "faces." Take for example a box, with 6 faces (or sides). When we speak of how much processing power your map takes, we talk in terms of polygons being rendered. The more polygons (or specifically, faces) being rendered, the slower it is!

    Brush - A multi-sided polygonal structure that is used to create your map. In most cases, it is simply "drawn" as a box into your map, allowing quick creation of walls, ceilings, floors, and outdoor areas. A brush can have one texture, or several different textures, one to each side. A common example is a rock structure with grass on the top of it. If you're curious as to how a brush is formed, it is done using intersecting planes (this is why some weird stuff happens as you drag vertices around by themselves to far extremes).

    Brush Contents/Flags - Brushes can have several content types - or "flags" - these can be combined or used alone. These are used to create a "water" brush or a invisible barrier like the monsterclip/playerclip, and even allows you to emit light from different surfaces (faces) of the brush. See RUST tutorials for more information.

    Entities - Entities could be considered a relative of the brush, but they serve an entirely different purpose. Rather than creating static scenery like a brush does, they set a location for special things to happen. This includes spawning ammo, paintball guns, or even creating a door from an existing brush.

    VIS - qVIS, one of the three important compilers which assists in creating your map, makes judgements on how to divide up your map. What it divides is the areas you can see things from. Let's say you've got two rooms. A hall connects them, but it is formed like an L, so you can't see directly into the other room. VIS has already included information in your .BSP map file that says that the Q2 (DP) engine should not render room #1 when you are in room #2, because doing so is a waste of resources! One of the more tedious parts of mapping is getting qVIS to correctly divide a map up - it has a habit of dividing the map in ways a human would find lacking. To check how much of a map that DP is rendering in terms of the brushes (or specifically, polygons) at any one time, you can use the following...

    R_SPEEDS 1 - Most often referred to as the "rspeeds" of a map, this command once entered in the DP console shows two statistics at the bottom-left of the screen. The first ("WPoly") is the number of polygons generated by all the brushes that are currently being shown in the direction you are looking. In any one place, this number shouldn't exceed 1000. While you can hit up at 1500, it's not a good practice. Sure, your monster gaming machine may laugh at 6000 rspeeds, but many people playing DP still use 8MB cards and 400MHz CPUs, not to mention Quake 2 eats up more CPU rendering polygons than the video card in most cases, so even these high numbers can slow your fast system as the Q2 engine struggles to send the commands to the video drivers. The second statistic is "EPoly." This is the number of polygons that are currently in view that are from the models in the game. A model is pretty much anything not related to your map structure that consists of brushes. This includes players, paintball guns, paintballs in the air, grenades, plants, etc. This number isn't near as deadly as "WPoly" since Q2 is more effecient at rendering these models. However, it isn't a good idea to copy and paste a gajillion plant entities to create a realistic weed farm and wonder why your map is slow!

    qBSP - This is the first step of the compiling process, it searches out your map for "leaks." A leak is what occurs when a path taken from ANY entity in your map can reach the "outside" of the map at any time. You may have noticed the "hall of mirrors" effect when you look at areas of your first maps that don't have brushes, DP renders nothing there. This outside of the map leads to compartmentalization problems for the compiler, so it is important that you have no leaks, otherwise the important VIS process will be skipped. Luckily, when it fails, it generates a .PRT file that contains a line that goes from the entity to the outside of the map, so you can trace it and close the "hole." In BSP, to load this, simply go to File > Leak Check > Load (.pts), then select the PTS file in the same directory your .MAP file is in to load it. So what is the ill side effect of this? Since VIS is skipped, your ENTIRE map is rendered at a time, leading to severe speed issues. It is also not acceptable to enclose your map in a huge box, since it will still render everything due to that same little hole (although it will still perform VIS - but VIS is a little stupid and will do this to you!). Note that allowing the 3-step compilation process continue after a leak will result in your "r_speeds" going up very high -- make sure you have no leaks!

    qRAD/ArghRad - The only difference between qRAD and ArghRad is that ArghRad is a modified qRAD by an outside person with special optimizations to help things look a bit more realistic. It is included with the DP BSP map editing ZIP package. This is the third and last step in the compiling process (VIS being the second), it calculates what are known as "light maps." Such light maps are "applied" to the various brushes in your map to give the effect of a lighted area. It should be mentioned that Quake 2's lighting and supported compiling is quite old, and the DP developer, Jitspoe, plans to move to a different form. RAD is both slow and not-that-impressive unless extra compiling options are enabled, but these options can take even longer to crunch numbers with.

    Not scared away yet? Good! Now, I have decided to forgo regular BSP teaching stuff that you can find in Jitspoe's tutorials, or the ones on Rust. I'd like to cover some stuff I've done on my own that gave me horrid trouble, so you won't make the same mistakes!

    Brush selection
    Amazingly enough, BSP manages to make your journey through learning how to make a map a bit harder by making sure you learn this first little nugget: Since you primarily choose brushes to modify by clicking on the in the 3D view window, you may run into the problem of creating a FUNC_DOOR entity, then creating another brush right after that. You then find yourself perplexed; this new brush causes BSP to grey out everything else like it is still a FUNC_DOOR, and when you unselect it and select something else in the world, it shows it as a FUNC_DOOR. NOES! What happened? Well, you just need to remember that BSP "includes" the next brush you create after unselecting another brush with the brush you just unselected (see how clear that was?)! Select a door, unselect it, and create a new brush. Tada! it is part of that door. Now, select a regular brush instead and unselect, then create a new brush... you guessed it, it is a regular brush![/list]
    « Last Edit: July 01, 2007, 07:47:59 PM by IronFist »

    IronFist

    • Autococker
    • Posts: 1304
    Re: An "extra" BSP tutorial
    « Reply #2 on: July 25, 2005, 03:12:21 PM »
    Small grid sizes = no-no
    Now you've figured out that you can change the grid size... so you set it to 1 unit to get extra precise ALL the time. The grid is designed to combat this silliness, please learn to use it! It ensures your brushes all match up face-to-face and other good stuff to make sure you have no major problems. I generally use size 8 all the time (I'm lazy), but you should alternate between 8 and 16, going to different (lower) grid sizes for detail (of course you should zoom in to do that stuff). By the way, ALT+G turns the grid on/off real quick.

    Rotation
    Rotation is pretty fun, and is important if you want to mirror a bunch of brushes (like an entire base) by rotating them (well, BSP has a mirroring option too...). "Edit > Rotation 1/4th Turn" is my favorite way to quickly rotate a brush, but sometimes you want those special rotations. Now remember, DP operates at down to "1 unit" of its own special grid space, but this isn't accurate enough to make a decent rotation. Let's say I give you a checkerboard and put some checkers in a box-like formation, then order you to rotate the box formation 45 degrees. You could probably do it, and it would look fine (as it normally does in DP), but try 15 or 25 degrees! Pretty hard, huh? Well, if you still wish to rotate at these odd angles, you can use "Edit > Rotate Brush" to control X/Y/Z rotations in degrees, but I prefer to jump in the editor area and select my brush, then hold down CTRL and drag my mouse around (remember - you need to drag on one of the vertices for it to actually begin rotating!). Doing this, you can rotate in real-time to get it perfect!

    FUNC_TRAIN
    This is a cool entity, it creates a full GE train with Gen-3 Halon Engines. ...Well, not quite, but it is a bit like the door, in that you build it from brushes. A FUNC_TRAIN follows PATH_CORNERs at the speed you define, so you can make cool crates that move down a conveyor system, or complex doors, or even cool moving plats! Now, you may see that TELEPORT option to click on with the PATH_CORNER, this causes the FUNC_TRAIN to "teleport" (but it's really moving really really really fast) to this PATH_CORNER, but here's the catch: you can't have two PATH_CORNERs that the FUNC_TRAIN uses in a row, both with TELEPORT flags set, or it stops moving when it reaches the first point!

    Plants
    Wondering how to get the cool plants like in Midnight? Here you go!
    "classname" "func_model"
    "model" "models/plants/bigleaf2.md2"

    As you can see, create a FUNC_MODEL and give it that "model" data entry there! Yes, you can use other models, such as paintball guns and other stuff. I've created "paintball gun racks" doing this that look quite neat. Of course you can't pick up the gun ; )

    Custom textures
    I'm just going to address custom textures in a general manner here... they are both good and bad. They are good in that they look nice in your map, but bad in that it is A) hard to keep them with your map as people transfer it to others and B) hard to align in BSP since they need .WAD counterparts. Back when DP was still a Quake 2 MOD, it used .WAD files, special 256-color bitmap files that were fairly low quality. As DP became standalone and got support for full-color JPEG and TIFF textures, it had to keep the WAD files with the BSP editor because BSP can only load WAD files into the texture viewer and preview area! This means that if you make a nice MYDOGGIE.JPG for your map and put it in paintball2\textures\pball, you have to create a copy of it in BSP\quake2\pball\textures\pball, BUT it has to be a .WAD file (sorry, you can't rename the .JPG to a .WAD!). I normally select an existing WAD file in there that I can remember, and copy and paste it, and rename it to MYDOGGIE.WAD, then load it in to BSP. Sure, it won't look like MYDOGGIE.JPG in BSP, but it at least lets you sneak past BSPs oldness and apply the texture, and even align it to some extent (although you'll have to compile often to get it aligned well and see results). This is simply a weakness brought about by BSP's age.

    TRANS33/TRANS66 Brushes
    If you've been good and read those entry-level BSP tutorials, you'll know these are brush flags. They make the brush either 33% or 66% transparent. Now here's something to remember: They don't work as entities. You can't construct a button/func_train/door from them and expect it to work right. What it will do is leave the "visual" part of the brush right where it starts at, but the actual brush that can run into you and crush you still moves, so you basically get a ghost brush that just won't work!

    Copying/pasting entities
    Copying and pasting entities that don't have special flags and stuff like lights/weapons/spawns generally works ok, but copying things like path_corners can lead to odd troubles... Simply put, try to go to the trouble of creating a brand-new path_corner instead of copying an existing one and modifying it, otherwise the unexpected may happen.

    FUNC_DOOR_ROTATING
    I won't go far into this since I've had a lot of trouble with it, but it basically rotates around a brush with the ORIGIN flag set that is part of the entity structure. Nobody has really used this in DP except for me (Edit: I'm sure someone has used it now... hopefully they explained it well on the forums, so try the search feature), but that was a million maps ago. It normally doesn't work as expected, and isn't good for BIG rotating things, since it rotates in what appears to be increments of a degree or so, something determined by the speed setting. This means that the extreme ends of a big rotating brush collection will be very jerky in movement... So don't get creative like me and think you'll create a donut-like map with a boat that goes in a perfect circle around in a "canal." Sigh ; )

    Testing a map
    Don't make the mistake of fine-tuning your map and making sure whatever default team you spawn on has working flag capture stuff. If you don't know how to join the other team to test them too, just type "map <mymap>" in the console again and type "join blue" or whichever team you want to test out. Don't accidently release a map in which flag captures for each team are different, or even lacking for the team you didn't test with!

    Ok, that should be enough stuff to keep you from getting stuck. Remember that the DP mapping forum has lots of help just waiting to be used.
    « Last Edit: July 21, 2008, 07:48:13 PM by IronFist »

    Apocalypse

    • Autococker
    • Posts: 1463
    Re: An "extra" BSP tutorial
    « Reply #3 on: April 28, 2007, 07:15:10 AM »
    Ummmmm Iron fist when I made my rspeeds appear they were all below 100 except wpoly which if i moved to fast would fly up so it was yellow and at like 1028 or somethin is that bad? If so how would I fix it.
    « Last Edit: April 28, 2007, 04:10:12 PM by Apocalypse »

    IronFist

    • Autococker
    • Posts: 1304
    Re: An "extra" BSP tutorial
    « Reply #4 on: July 01, 2007, 07:45:12 PM »
    Ummmmm Iron fist when I made my rspeeds appear they were all below 100 except wpoly which if i moved to fast would fly up so it was yellow and at like 1028 or somethin is that bad? If so how would I fix it.

    Make sure no holes are in your map, since this will practically max out rspeeds.

    I've added some bold formatting to the sorta-kinda-a-tutorial so it is easier to read.

    Caboose

    • PGP
    • Posts: 34
    Re: An "extra" BSP tutorial
    « Reply #5 on: August 20, 2007, 10:10:06 AM »
    Just a quick question about the models... do they show up in qbsp.bat, or do I have to final compile it?
    I've entered "model" in the "key" and "models/plants/bigleaf2.md2" in the "value" but it's not showing up.

    Apocalypse

    • Autococker
    • Posts: 1463
    Re: An "extra" BSP tutorial
    « Reply #6 on: August 20, 2007, 10:14:49 AM »
    Caboose I think it would but please start a new topic about it in the mapping board you will get many more answers plus IronFist isn't very active anymore.

    Caboose

    • PGP
    • Posts: 34
    Re: An "extra" BSP tutorial
    « Reply #7 on: August 20, 2007, 10:16:30 AM »
    Ok then.

    jitspoe

    • Administrator
    • Autococker
    • Posts: 18802
    Re: An "extra" BSP tutorial
    « Reply #8 on: August 22, 2007, 11:44:50 PM »
    The models will show up with just a qbsp compile.  You don't have to do a final compile to make them visible.  If they aren't showing up, then you probably failed to add them correctly.  Check the console for any errors.

    flamer

    • 68 Carbine
    • Posts: 280
    Re: An "extra" BSP tutorial
    « Reply #9 on: December 01, 2007, 09:18:48 AM »
    Hi IronFist, Jitspoe,

    I don't know if I can get help here. Could you tell me how to create barrels. Because I can create but when I copy and paste them one beside the other, the top of them are exactly the same as the side of it and it create a long line

    Any other help will be appreciated.

    Thanks.

    blaa

    • Autococker
    • Posts: 1218
    Re: An "extra" BSP tutorial
    « Reply #10 on: December 01, 2007, 09:32:42 AM »
     Select the barrels top, which u copied. Now select the texture for it. Then unlock the texture and then make it look ok.

    flamer

    • 68 Carbine
    • Posts: 280
    Re: An "extra" BSP tutorial
    « Reply #11 on: December 01, 2007, 09:37:04 AM »
    It's that easy !?!

    Ok

    Thanks Blaa

    Chef-Killer

    • Moderator
    • Autococker
    • Posts: 1312
    Re: An "extra" BSP tutorial
    « Reply #12 on: December 16, 2007, 09:27:52 AM »
    Is it possible to make a brush, where all entities, who are coming in, disappear? Or maybe something else, that entities could disappear?

    Is it possible to turn on/off a teleporter? Maybe with a target_spawner?
    « Last Edit: December 16, 2007, 10:03:14 AM by Chef-Killer »

    blaa

    • Autococker
    • Posts: 1218
    Re: An "extra" BSP tutorial
    « Reply #13 on: December 16, 2007, 12:28:43 PM »
     You can turn a entity brush into a normal brush by selecting the edit menu and then selecting "revert to world".

    Chef-Killer

    • Moderator
    • Autococker
    • Posts: 1312
    Re: An "extra" BSP tutorial
    « Reply #14 on: December 16, 2007, 01:04:50 PM »
    I need the entity (it is a func_door). But when the door is opened, the entity brushes come into the rest of the map, and that looks horrible.

    jitspoe

    • Administrator
    • Autococker
    • Posts: 18802
    Re: An "extra" BSP tutorial
    « Reply #15 on: December 21, 2007, 02:15:57 PM »
    So make it move a different direction?  Or use func_door_rotating.

    Chef-Killer

    • Moderator
    • Autococker
    • Posts: 1312
    Re: An "extra" BSP tutorial
    « Reply #16 on: December 22, 2007, 04:58:22 AM »
    I think it is easier to explain with a picture ;)

    What can i do against this entities out of the ring? (Just if the door is opened)

    And an other thing: Can't i time a func_wall like "wait" "10"? The wait key doesn't work.

    jitspoe

    • Administrator
    • Autococker
    • Posts: 18802
    Re: An "extra" BSP tutorial
    « Reply #17 on: December 25, 2007, 11:29:17 PM »
    Make the ring thicker. :P

    Chef-Killer

    • Moderator
    • Autococker
    • Posts: 1312
    Re: An "extra" BSP tutorial
    « Reply #18 on: December 26, 2007, 05:25:51 AM »
    Looks horrible :D

    flamer

    • 68 Carbine
    • Posts: 280
    Re: An "extra" BSP tutorial
    « Reply #19 on: February 25, 2011, 09:16:49 PM »
    I don't know if that's the main BSP questions thread... if not just refer me to one. Otherwise, here's my question: I just installed BSP. I can run it normally, edit a map normally but wait it comes the time to test it, I compile it using qbsp.bat And then on Paintball it says       

    ''Can't find maps/inprogress/default.bsp'' How can I solve this problem ?

    Thanks for further help,

    Flamer.