Getting started with SinEd - Part II
by Eutectic


4. Using the Camera view

So far, we did all our work in the 2D views and we haven't looked at the 3D view or Camera view yet. This view is very important since you will be using it extensively to select brushes and align textures. First, to make things easier, let's hide the entities temporarily we inserted earlier by using one of SinEd's coolest features: Filters.

Filters menu
Click on the Filters menu and then on the Show Entities selection. This will remove the check mark on the left and all the entities in your map will be hidden in all the views.
XY View - Camera and Z checker

Now go to the XY view and zoom in on the center of the map (X0, Y0). What you see is the Z checker symbol superimposed over the Camera symbol. Whenever you start a new map, those 2 symbols are located there by default.

The Z checker is beyond the scope of this tutorial so let's just move it out of the way to have a better look at the camera symbol. Placing the mouse cursor over it and Shift-MiddleClick-Drag to move it across the 2D view away from the camera.
XY View - Camera symbol

Ah! Now that's better. Ok, just think of the diamond shape in the middle of the Camera symbol as an eye that sees in your map. The 2 angled lines that extend from the diamond represents the Camera's FOV (Field Of Vision).

Whenever you start a new map, the Camera will be located close to the center of the map and look in the 0 degree direction exactly as show on the left. When you open an existing map with the info_player_start entity inserted, the Camera will be located where the player entity is and it will look in the direction set by the player entity's angle key.


Now go the Filters menu and click on Show Entities again. This will restore the check mark next to the option and your entities will be displayed. Let's take a look at the Camera view. Simply bring it in the foreground by clicking on it.


Camera View - Initial position

Hmmm. It's kinda hard to see exactly where we are right? So we'll have to navigate the camera position and angle to place it so we can see what we want. But how do we do this?

Well there are basically 2 ways: with the mouse or your keyboard keys. Let's start with the mouse first.


  • Navigating with the mouse


  • Camera View - Navigating with the mouse

    In order to make it easier to explain this, I painted a yellow cross and 4 arrows over the previous camera view. Basically, you navigate by placing the mouse cursor in the view and using RightClick-Drag. But if you don't know how it really works, this can prove to be very frustrating (I know it was for me).

    The yellow cross represents the exact center of the view. If you place the cursor exactly on that spot, press + hold the right mouse button and don't move the mouse at all, the view won't move. If you drag the mouse slightly above the center, you will start moving forward slowly. The farther you drag the mouse above the center, the faster you will move forward. The speed at which you drag the mouse has no effect on the view's movement speed, it's the distance away from the center of the screen that counts. So if you want to stop moving forward, you have to drag the mouse back to the center or simply release the mouse button.

    So to resume:

    RightClick-Drag the mouse cursor above the center of the view to move forward.

    RightClick-Drag the mouse cursor below the center of the view to move backward.

    RightClick-Drag the mouse cursor to the right of the center of the view to turn right.

    RightClick-Drag the mouse cursor to the left of the center of the view to turn left.


    Other essential mouse navigation details:

    Ctrl-RightClick-Drag the mouse cursor to strafe sideways and vertically in the view. Contrarily to the above controls, the view only moves when you move the mouse.

    Ctrl-Alt-RightClick-Drag the mouse cursor to freelook with the camera. This enables you to look and all around you (up, down, left and right) in the view but doesn't move the camera.


  • Navigating with the keyboard


  • Some people may not feel comfortable with the mouse navigation controls. Personally, apart from strafe and freelook, I don't like them at all. I find it's pretty much like trying to fly a helicopter... very touchy. Fortunately, there are keyboard navigation keys and those are pretty much the same as the keyboard movement controls in the game itself. Here's the list:

    Up Arrow: move forward.

    Down Arrow: move backward.

    Right Arrow: turn right.

    Left Arrow: turn left.

    >: strafe right.

    <: strafe left.

    D: move up.

    C: move down.

    A: look up.

    Z: look down.

    Page Up: move up one floor.

    Page Down: move down one floor.

    End: reset view straight and level. Particularly useful when you need to look straight at something and you previously used that nasty RightClick in the view.


  • An important feature to note


  • When moving the Camera with the keyboard keys, you may on some occasions, find it hard to position the camera really close to a brush without going "too far". This is because the camera moves at fixed increments or steps which are rather large by default. SinEd has a really cool feature for this called Camera Grid move.


    View Menu - Camera Grid Move

    This option can be set in the View menu. When you start SinEd, it's disabled by default. What it does is that it makes your Camera move in increments equal to the current grid setting. So if the option is checked and your grid is set at 8, everytime you use the keyboard keys to move the camera forward, backward, sideways, up or down, it will do so in steps of 8 map units for each keystroke.

    So if you need to get real close to a small brush face for some accurate texture alignment work, this is a godsend. Just set your grid to a small setting like 2 for really fine camera movements. Whenever you need to move faster (by larger increments), change your grid setting to a large value like 32 or 64.


    5. Working with textures


    Now that we know how to navigate in the Camera view, let's move around to see what our room looks like. As you will quickly notice, the walls don't look too bad but the floor and ceiling don't look good at all. To fix this, we're going to assign them some proper textures.

    Camera View - Selecting floor

    Position the camera in a way that you can see the floor brush and select it by doing a Shift-LeftClick on it. The brush will be highlighted in red in all the views.
    Texture selection window - Selecting texture



    Then, scroll the texture selection window until you find the texture named fl_hcfloor1 and click on it.
    Camera View - Selecting floor



    All the faces of your brush is now textured with fl_hcfloor1. To unselect your brush, hit ESC or you can do a Shift-LeftClick on it. Doing a Shift-LeftClick on a previously selected brush or entity will simply unselect it.

    Next, select the ceiling brush, find the texture named tr_hcmarbflat and click on it. Now your room is starting to look a bit more decent.


    The next step is to learn how to align textures. SinEd is very powerful and user friendly when it comes to this. Navigate the Camera view up close to one of the walls and low enough to see where it meets the floor. Remember, if you're having trouble positioning the camera the way you want with the keyboard, you can always use Camera Grid move.


    Camera View - Close to wall



    If you look closely at the bottom of the wall, you can see that the texture is not aligned quite right. This is because the floor brush is 8 units thick and therefore 8 units above the bottom of the wall brush from where the texture is aligned by default (at the Z=0 mark). So we're going to have to give it a vertical offset to align it with the floor level.
    Camera View - Selecting brush face

    Here instead of selecting the whole brush and therefore giving an offset to the texture on all the faces of the brush, we will select only the brush face that matters. Since all the other faces of the won't be visible in the game, it wouldn't make any difference in this case but it's better to get into good habits right away. Also, I want to take the occasion to show you how to select only 1 brush face :)

    Select a single brush face by doing a Ctrl-Shift-Leftclick on it.
    Camera View - Aligning texture

    To offset the texture, place the mouse cursor over it and Shift-MiddleClick-Drag upwards. An important thing to note here is that the texture will always shift in increments equal to your grid setting when using this method. So make sure your grid is set at 8 or less for this example otherwise you won't be able to align it as shown on the left.

    Also, the texture can be shifted horizontally if you drag the mouse sideways instead of up and down. But it's not necessary in this case.


    At this point, what we need to do is to give the texture on the other 3 walls the same offset we just gave to the first one. Of course, we could just repeat the operation above for each of the remaining walls but there are 2 ways to do this which are much faster and easier. I want to describe those 2 methods also to demonstrate the power of SinEd when it comes to texturing.


  • Method 1:


  • This technique requires that you do not have any brush faces selected so to make sure that's the case, hit ESC before you start.

    SinEd lets you grab a texture along with all its offset, rotation, scale values and its surface properties. This is done by placing the mouse cursor over the brush face and doing a MiddleClick. Do this on the brush face you aligned earlier. The texture is now in a sort of memory buffer.

    A nice thing about this is that SinEd is also capable of applying the texture you just grabbed on any brush face you want without having to select anything. You can do this by placing the mouse cursor over the face on which you want to apply the grabbed texture and doing a Ctrl-Shift-MiddleClick. So all you have to do now is to do this on the other 3 walls and you're all set. All your wall textures are aligned. Not bad huh?


  • Method 2:


  • If you tried the previous method, all your wall textures are aligned so in order to try this method, you will have to de-align your last 3 walls. You can do this by selecting them and clicking on the wl_hcwall1 texture in the texture selection window. This will reset their alignment to the texture's default values.

    Select the other 3 brush faces you want to align (and only those). Then grab the texture from the first wall you aligned by doing a MiddleClick on it. All the selected brush faces will automatically be set to the texture you grab. Now that's what a call a major time saver!

    An important thing to remember before doing a texture grab is that you have to make sure that only the brush faces you want to modify are selected. Otherwise, you might accidentally screw up the texture alignment on brush faces that took you a while to align properly and force you to start over. It's a powerful feature but it cuts both ways so beware. Whenever in doubt, play it safe and hit the ESC key before you start selecting faces.


    6. Compiling your map

    Well, we're done with our basic map in SinEd. Now we have to compile the map file into a bsp file to make it playable in Sin. Save your map and open a DOS window.

    *IMPORTANT*:
    Do not try to compile your map with SinEd's Bsp menu. This simply won't work on a Windows 95/98 machine. You must use a DOS window for this.


    DOS Window - Compiling

    First, if SinEd is installed on a drive other than C, you have to go to that drive first. As can be seen in the example above, it's the D drive in my case. So just replace the drive letter with the one on which SinEd is installed on your machine and type:

    D: <enter>

    Then you have to go to SinEd's maps directory to compile since that's where your map file and the make.bat DOS batch file resides. So type:

    cd \tools\sin\base\maps <enter>

    Next, you have to run the batch file that contains the commands to compile your map. These are:

    ..\..\bin\qbsp3 %1
    ..\..\bin\qvis3 %1
    ..\..\bin\qrad3 %1


    The reason why the command is ..\..\bin\qbsp3 %1 is that your 3 compilation utilities reside in the \tools\sin\bin folder. The ..\..\bin part means go 2 folders up and then down to bin. The %1 symbol means variable input. During execution, the batch program will replace the %1 variable with whatever you typed after make. So if you saved your map as basic.map (as instructed earlier in this tutorial IOW), you should now type the command:

    make basic <enter>

    * VERY IMPORTANT!*:

    Do not type the .map file extension in this command! Otherwise, this will screw up your compilation and you will get errors. Qbsp3 reads the map file basic.map and compiles it into a bsp file named basic.bsp. Then, qvis3 and qrad3 both read the compiled bsp file and add PVS and LIGHTING information to it. They don't use the map file as input. So DO NOT type "make basic.map".

    So to resume:

    The file extension is implicitly assumed by the DOS compilation utilities. Qbsp3 expects a .map file as input while qvis3 and qrad3 both expect a .bsp file as input. There is absolutely no need to type the file extensions anyway.


    Ok, now that we got that out of the way, your map should now be compiled. The next step is to copy the compiled basic.bsp file from the \tools\sin\base\maps folder to the \base\maps folder located right under the SiN game folder. So check where you installed SiN and copy your bsp file there. If you don't have a maps folder under base, just create it first and then, copy the bsp file in there.

    Finally, start SiN, drop the console (~ key) and type "map basic". Enjoy your first SiN map :)


    Part I