A - Z Beginner Full Guide Page 3

From The DarkMod Wiki
Jump to navigationJump to search

written by Fidcal

Previous Page ... Next Page

Beams, Trim, Room Design

As said in the intro, I am not going to help with every architectural detail. In future missions that you make, consider using brushes as trim, decoration; try varying the shape of rooms to give interest and avoid the same old rectangles. Walls can be divided in two horizontally with different textures, panels, paints, wallpapers, stone. Recesses can be added just like we did for the door. Search the internet and other fan missions for inspiration. Here I shall just describe how to make a few very easy beams. Note that as we progress I am giving less and less detail of what we have covered before so just skip back if you need to remind yourself.

  • Set grid size to 8
  • In the big room, drag out one long brush the long length of the small room
  • Make its section dimensions 16 units high and 8 deep
  • Place it flush against the ceiling and against a big grid line somewhere in the middle of the room
  • Look through the darkmod textures for some suitable wood and texture the entire brush
  • Check the alignment of the texture only on the three visible surfaces; remember wood grain should align along the length

What about the surfaces that can't be seen?...

Hidden Surfaces, Caulk Texture

The hidden surfaces will be rendered unnecessarily even though the player cannot see them. This will affect performance if there are many such surfaces. It is good practice to retexture such surfaces with caulk texture which never gets rendered.

  • Hide the walls and ceiling so you can see the hidden surfaces of the beam or just drag it into the big room and put it back later.
  • Retexture the top surface and ends of the beam with Media Browser > Textures > Common > Caulk.
  • No need to align!
  • I would not worry about the section of the wall and ceiling that gets covered by the beams. I have a theory that in a typical room, caulk texturing is not worth the effort unless there is a lot to do. Definitely do it in a large area where there are lots of hidden surfaces especially if you can detect a slow down in the game with frame-lag.

Note: The outside of our mission, the surfaces in the void, will not be rendered. This is taken care of by the game software automatically so no need to worry about caulking any of them.

Tip: Double click the top title bar of camera view is a quick way to go full screen and back again. Likewise with the other windows.

We have one beam in place; now what?...

Cloning the Beams, Single-plane Shifting

  • Set Texture Lock ON (top button bar)
  • Select the beam, clone it, and drag the clone 3 grid squares (24 units) to the side. There should be two grid square between it and the first beam.
  • These beams are easy to move but while we're here, try instead Alt + the arrow keys to move. This nudges them along with no chance of sideslip. This is more useful when you want to drag something a long way. Another way to do it is LMB THEN Shift THEN drag (not Shift first) and the beam will stay in the first direction you drag. There is a knack to this. Practice it now for the future. You can drag right across a huge mission without any deviation from a line. Yet another way is a mode switch that locks in one plane or another on the DRtranslate.jpg button on the top button bar. See 'Move (Drag, Translate) in one plane (Mode)' on the Dark Radiant Controls, Keys & Mouse wiki.
  • Repeat until you cannot get another beam in - don't put one right against the wall. Then repeat from the original beam the other side so the whole ceiling has seven beams evenly spaced. There is one space with three grid squares but it's near enough.
  • Look at the texture surfaces. Every beam is identical. Consider selecting surfaces and shift them along the length quickly to get a different look on some of them.

Another Room - an Open Yard

I'm using the term 'room' because we make it in just the same way as the rooms we made before but with a sky ceiling.

  • In TOP view, drag out a brush to the east 256 x 640 and position on the big grid square in line with the north wall of our big room and overlapping the big room by one big grid square as shown in this diagram...
AZplan.jpg
  • In a side view, move it if needed so its floor is level with the floor in the big room.
  • Drag its top up so the brush is 384 high
  • Give it a stone or brick texture suitable for the yard walls of a small dwelling
  • Use the 'Room' button (LBB, left button bar) to hollow it out



  • In the TOP view, reduce the length of the west (left) wall from the north down towards the south so it just touches the external surface of the south wall of the big room. Its length should now be 312 as in this diagram....
AZplan2.jpg
  • Raise the height of both the south and east walls of the big room to meet the ceiling of the yard.
  • The south wall should also be extended a little to the east to be flush with the east edge of the east wall as in the picture below...

From this...

AZyard01.jpg to this... AZyard02.jpg
  • Texture the visible surfaces of those walls to be the same as the other yard walls
  • Texture the floor of the yard with say cobblestones

Now we need the sky...

Sky

NOTE : SKYBOX PREFAB NOT WORKING AT 18 SEP 2007 SO IF STILL SO, SKIP THIS SECTION AND COME BACK LATER WHEN ITS FIXED.

To add the default sky is fairly simple because we shall be using a ready made prefab. A prefab is part of a map saved separately so the whole thing can be imported into another map. Any selection, single or multiple, can be saved as a prefab via the File menu. It can then be imported into another map as a selection and dragged where needed.

Other skies are possible but need more work so we'll stick with what is easy...

  • Set Texture Lock ON
  • RMB menu in grid view and select Insert Prefab OR use File Menu > Load Prefab
  • Select tdm_sky_starry1.pfb
  • Zoom out if you cannot see the selected prefab.
  • Drag the selected prefab well away from our brushes both horizontally and vertically. The player does not enter it so in all your future maps make sure it is well away from any area you are likely to build. You can always move it later but it's easier to put it out of the way now.
  • DEselect the prefab
  • Select the ceiling surface in the yard
  • Texture it with textures > smf > portal sky. Do NOT use any of the textures under 'skies'.
  • RMB menu move player start into the yard. Check the side view too that it is not above or below.
  • L to select the entity list; select the Ambient and ensure its radius covers the whole yard.
  • Ctrl + S to save. I suggest you then save again with a new name.

Now you can dmap and map and see how the yard looks.

Tip: In game, go back to the console and type and enter noclip. This toggles on and off the ability to fly and even fly through solids. Just look in the direction you want to go, upwards, and use the move forward keys the same way. You can soar up and see the moon to the east. Now fly over your other rooms and look down. You get a different sense of how it is all organized from up here! Take care in noclip mode. It can happen that if get into the lower brushes you can sink down below the mission and fall into the abyss. Don't know why that is but you have to map again to get back in.

Spot the error in the big room? Our new yard protrudes into it at floor and north wall. We'll deal with that...

The Clipper Tool, Cutting & Splitting Brushes

It is not fatal to make mistakes; it's normal. We just check our work after building and adjust. Our new yard protrudes into the big room so...

  • In the top view, select the north wall of the yard and reduce its width from left to right so its left edge is level with the west surface of the yard.


The floor of the yard can be done a similar way by dragging it from west to east and inserting a new brush in the gap but instead let's use this opportunity to explain the clipper tool...

  • Select the yard floor in the top view.
  • Press X or select the Clipper button (File:DRclipper.jpg? on LBB)
  • Zoom in a little to the middle left of the yard and click on the red line where it crosses the wall of the big room. A dot should appear on the line and the zero digit 0.
  • Likewise, go straight along that grid line to the east side of the yard and click that red line. A digit 1 should appear and a red line joining the 0 and the 1.
  • It should look like in the diagram below. If your line is not on the same grid line on both sides you can place the mouse over either 0 or 1 and a + appears so you can drag it where it should be. If it all goes horribly wrong or a 2 appears as well, just press X twice to clear it and try again.
AZclipper.jpg
  • At this point, pressing Enter would delete the north part of the yard floor but instead...
  • Press Shift + Enter to SPLIT the yard floor into two brushes at the middle line we made.
  • Press X to DEselect Clipper and go back to drag and resize mode.
  • DEselect then select the north part of the floor we just made and reduce its width from the west like we did the north wall.
  • REPEAT the whole process with the ceiling of the yard. This is not so critical as it protrudes above the big room and is not visible to the player but it is good practice to keep everything tidy.

For more details of using the Clipper Tool see Dark Radiant Controls and scroll down to Clipper Mode.

Now reduce the height of the north, east, and south walls of the yard to about half. Ideally, do not make them so low that the player can expect to climb up. You can use clipper but its probably easier in this case to use my 'clone & curtain' method we did earlier. From a side vie you can easily clone and drag down a wall, then drag up the top part which you then retexture on the inside as sky.

The yard feels much more open now but maybe retexture the house walls to be different to the yard walls? Or the other way round? Your preference.

You might also add buttresses against the walls if you want; just add solid brushes maybe 16 x 24 3/4 way up the walls. These should have sloping tops so there Clipper is ideal for clipping off angles. Remember, you only have to do one, adjust its texure carefully then clone it and space them out. I would set Texture lock on for this but depends. Try it both ways to see how it works. Remember also Modify menu > Rotate and Scale to turn for the other walls?

Water

Let's make a pool of water. It doesn't make much sense here but I need the opportunity to explain water. Alternatively you might make a water trough or open tank (the tank is easier if you feel lazy!)...

  • Drag out a new brush (Oh dear! You forgot to DEselect first? Use Ctrl+Z to undo)
  • Make the brush fit the big grid about 24 high and 64 x 128 (two big grid square in grid 8 mode)
  • For a pool, place this just below the yard aligned to the big grid so its top is aligned with the underside of the yard floor brush (not the yard floor surface)
  • For a tank, place it so it is one small grid unit above the yard surface.
  • Give it a metal texture for a tank but for a pool give it the yard floor surface texture.
  • Use the Room button to make it hollow then delete the top.
  • The tank is now an open metal box but the pool is hidden by the floor. Use Clipper or my Clone and Curtain method on the floor to open out a hole. This is different from before because you need FOUR sides. Clone and drag out the two like parting curtains as before but then clone one side and drag to one of the gaps left and resize it to fit. Then clone that and drag it to the other side. Resize to fit if needed.
  • Check for texturing and adjust if needed.

Now we need to fill it with water...

  • Drag out a brush and insert it into the pool or tank
  • Resize/Move it to fit EXACTLY the inner dimensions of the pool/tank but one small grid unit below the yard floor surface.
  • Give it the texture common/nodraw
  • With the whole brush still selected, RMB menu in grid view > Create Entity and select darkmod > func_liquid from the list. This gives the brush its liquid properties.
  • DEselect the water brush and select just its top surface with Ctrl+Shift+LMB in the camera view
  • Give it the texture water_source > water_clear
  • In Surface Inspector, rescale the horizontal and vertical scale to 0.1. This will set the wave frequency for small pool. Use larger scale for a larger pool.
  • Clone the ambient light or create a new one and put in the water so its radius fits or overlaps but make it fit exactly to the surface.
  • Set the ambient colour in Light Inspector to Red, Green, Blue of 0, 25, 25 (= 0.00, 0.1, 0.1 in Entity Inspector) for a dull greeny hue.
  • Adjust the main ambient light so its radius just reaches down to touch the surface of the water from above.

See also Water

Create a light (RMB menu in grid view, place it low at about 40 units high and 40 or 50 units away from the corner of the pool to cast a shadow into it and give it the brightness VALUE of 30.

You can now dmap and map to check out your water. If you get a leak its not necessarily the water! More likely you left a gap when slicing up the yard floor. I did! Just use File Menu > Pointfile in Dark Radiant for the red line that leads to where the leak to the void is then dmap again.

Z-Clipping Errors

If a brush overlaps another, that is, all or parts occupy the same space as another brush then you get what are called Z-clipping as in the picture below. The game is trying to render both at the same time. Always watch out for this. Just resize or move the brush(es) so they do not overlap...

AZclipping.jpg

Weather

Fog

Rain and Snow

As at Sept. 2007, rain and snow are particles emitted by a texture but this might be changed so use this for now but check some time in the future for changes.

Rain and snow are particles emitted by a texture assigned to a brush and falling within the volume of the otherwise invisible brush. It passes right through any solid brushes so if you had a high ledge jutting out in the yard then you would place the rain brushes around and above but not below. It seems the number of particles per brush is limited and possibly centralized so to cover our yard I used 6 brushes. I overlapped the brushes because the precipitation seems to thin out at the edges. I could never get it right into the corners of the yard even if the brushes overlapped. There is some frame lag with this many rain brushes so use cautiously. The snow seemed better. With snow you would also need snow texture on the ground, etc. so we'll use rain here but you can try snow just to see what it looks like if you wish. With rain you need rainsplashes as well as the sound of rain and these will be covered later.

Rain and snow always fall down even if you tilt the brush. There are different textures for heavy rain, light rain, etc. and more could be defined. It seem likely that sloping rain, as if driven by the wind should be possible.

So each rain brush is rain textured and its volume defines where the rain is falling - from top to bottom of the brush. It's simply a matter of positioning the brushes...

  • Create a brush about half the height of the yard. Too low and when the player looks up you see little or no rain falling towards you. Too high and there is performance lag.
  • Push the brush into the south east corner of the yard so its 2/3rds the width and 2/3rds the way towards the jutting out corner.
  • Give it the texture textures/darkmod/weather/rain_light
  • clone it five times and drag them to fill the yard overlapping one another generously.

Ctrl + S to save and dmap and map to test it out.

Rainsplash: Introducing Patches

A patch is a one-sided surface only with no depth. It is textured only on one side and the other side is totally transparent and the edges have zero height. It's like a big plastic sheet, and like such a sheet it can be warped and twisted into useful shapes and curves far better than brushes. Textures align around those curves whereas they would align in straight lines on a curved brush. Multiple patches can be placed together to surround a volume but it is a shell. With the same textures, patches are just as solid to the player as a brush and a steel plate just as impenetrable as if it were six feet thick. Patches do NOT seal against the void. Another use is as semi-transparent decals for example to place stains, etc. Here we shall use patches to with a functioning rainsplash texture to cover our yard floor...

  • Patches can be created directly or you can first create a brush and convert it so...
  • Create a brush in the yard.
  • Stretch it out to cover the length of the yard and the width of it at the top. Height irrelevant.
  • Patches are created with their visible surface facing the user out from the editor grid view so select the TOP view for a horizontal patch. If you use a side view then it will be created on its side (it can always be turned over of course later)
  • With the TOP grid view the CURRENT window, select Patch menu > Simple Patch mesh and click OK to accept the default 3 x 3. These values refer to the vertices which can be dragged about in three dimensions to produce different curves - the more vertices, the more curves - but we only need a flat patch so accept the minimum 3 x 3.
  • The brush should now have been converted to a flat patch.
  • In a side view it should just be a line with no height.
  • Drag it down exactly in line with the surface of the floor of the yard.
  • Give it the texture textures/darkmod/weather/rain_splash_moderate. Try a different splash if preferred.
  • In top view, clone the patch and drag and resize it into the south west corner to fit the floor area not covered by the other patch.

It's that simple. Dmap and map and take a close look at the ground to see the rain splashes.

Sound Effects: Rainfall

To add a background sound we could add a global ambient but this would be heard all over the mission, even indoors, so it's not suitable for our rain. Instead we have to use a local ambient which fades as you leave it so we need several with their sound overlapping...

  • In the top grid view, RMB menu > Create Speaker (this is also available in the 'Create Entity' list.)
  • Give it the following properties. To do this you can..
  1. Type them in the input boxes at the bottom of Entity Inspector and click the check button OR...
  2. RMB the top line Classname Speaker and select Add Property from the menu then the + to open the list. You still need to type the values so option 1 is probably the easiest, in fact, copy and paste them from here...
  • s_volume -6.000000
  • s_mindistance 1.000000
  • s_maxdistance 20.000000
  • s_shader sound/ambient/environmental/weather_rain04_loop.ogg
  • s_omni 0
  • s_occlusion 0
  • s_waitfortrigger 0
  • s_leadthrough 0.100000
  • s_plain 0
  • wait 0.000000
  • random 0.000000
  • s_looping 1
  • s_unclamped 0
  • s_shakes 0.000000
  • s_justVolume 1

Clone it 5 times and spread the six speakers evenly around the yard. Map and listen.

More on sound HERE.

Doorway from the Yard

We need a door from the yard into the house...

  • Those new rain brushes get in the way - hide 'em!
  • Select the door we already have in between the big and little rom then using Shift + LMB, select the three brushes of the surrounding doorframe.
  • SPACE to clone them all and drag to roughly the middle of the east wall of the big room.
  • Use the Modify Menu > Rotate and Scale dialog to turn the selection 90 degrees so the door is nearest the inside of the room relative to the frame.
  • Reduce the grid size to 2 and move the selection until the doorframe aligns as closely as possible with the east wall and juts out into the big room with the door on that side.
  • Move it north and south to align the frame inside two big grid lines.
  • Use Ctrl+G to snap it to the grid. If that changes the shape of any of the brushes then Ctrl+Z to undo and instead reduce the grid to.125 and move it manually more closely to the right position. Then snap to grid. If the door moves slightly relative to the frame you can adjust it when you DEselect then select just the door. Check it all looks to be in the right position.

Now we need to open out the doorway as we did before by cloning the wall and splitting it either side of the doorframe. Then clone again, resize, and move up over the doorway.

There's a gap under the door - fill it with a brush and texture it concrete or something. We should really have made the floor of the yard one course of bricks lower and then we could have a step at the door but no matter.

Keep saving your mission as you go along and every 10 or 15 minutes save with a new name. Dmap and play test whenever you feel like it.

Proper Lighting

We put in temporary lights for quickness. Now we must consider how we are really going to light the mission. Some game developers make an entire mission and do this last; some do it as they go along at every stage; I mostly do it section by section and this mini-mission so far is what I call a 'small section'.

Let's add some torches to the yard...

Inventory, Tools, Weapons, Shop

Compass

AI, patrolling, teams, etc.

doors

link to doors wiki

Windows

containers

lockpicking

Readables

Maps

Ladder

Elevators

Sounds

Objectives

Zipping up

link to zip up wiki

Your own Build Design

link to build design wiki

Previous Page ... Next Page