FAQFAQ   CautareCautare   MembriMembri   GrupuriGrupuri   InregistrareInregistrare   ProfilProfil   Mesaje privateMesaje private   AutentificareAutentificare 
Valve Hammer Editor instal

 
Creaza un subiect nou   Raspunde la subiect    Pagina de start a forumului mapper -> tutoriale counter-strike
Subiectul anterior :: Subiectul urmator  
Autor Mesaj
bobo
Admin
Admin
bobo

Data inscrierii: 20/Mai/2007
Mesaje: 152

MesajTrimis: 21/05/2007 19:01    Titlul subiectului: Valve Hammer Editor instal Raspunde cu citat (quote)

What's New in 3.4?
Version 3.4

Features:
The most notable change in this version is the change in name to Valve Hammer Editor. The following changes have also been made:

Splitter view layout is now preserved from session to session.


Dialog bars now pop to the top when the mouse cursor floats over them.

No longer renders the 3D views when the editor is not the active application. (This will fix most people's problems with running Hammer and Half-Life at the same time causing the editor to freeze)

Added Copy to Clipboard button to the process window.

Sped up time to bring up the Face Properties dialog when many brushes are selected.

Sped up 2D view scrolling.

Added timed selection of objects by depth in the 3D view when the left mouse button is held down.


The Map Tools toolbar lets you switch between the different editing modes. This toolbar can safely be closed as each button also links to a hotkey.

Selection - (Shift+S) The selection tool allows you to accomplish a number of things. To simply select an object, click once. Continue clicking on the selected area to cycle through the three basic transformation modes (resize, rotate, and shear).

Resize mode allows you to grab any corner or edge of the selected object and resize it by pulling it to the desired size.


In rotate mode, you can grab any corner of a selected object and pull it around to rotate the object into any position you wish. If you have the rotations set to 15 degrees by default (this is set in the 2D Views options), this can be overridden by holding shift while you rotate the object.

Shear mode lets drag the edges of an object parallel to its surface. For example, if you grab the top edge of a selected object while in shear mode, you would be able to drag that edge right or left.



Tip: You can clone a selected object by holding down the shift button and click-dragging the object. This can be done regardless of what selection mode the object is in (resize, rotate, or shear). See Creating Solids for more information.

Note: While in selection mode, you can select multiple objects by dragging a selection box around them and pressing Enter. If Auto-Selection is toggled on, pressing Enter is not necessary.

Magnify - (Shift+G) This tool allows you to increase the magnification factor of the 2D views. Zoom back out again by clicking the right mouse button. You can also zoom in and out by pressing the number keys while the mouse cursor is in a 2D view, or by using the + and - keys.

Camera - (Shift+C) This tool allows you to place and modify cameras within your level. While in camera mode, hold shift and left-click-drag a line to confecționate the camera. A line with a dot (the view point) will be drawn in the 2D views, where you can adjust it until it is pointing in the direction you'd like. To place more than one camera in a level, just repeat the above steps.

Cameras are good for helping you visualize the creation of your level. They are especially useful when using the Vertex Manipulation tool as they allow you to see exactly what you are doing to a brush. You will find multiple cameras especially useful if you are working on several areas of a level at once. Placing a new camera in an area negates the need to search for that area when you want to work on it again.

When you're in camera mode, you can cycle through all available cameras by pressing the PageUp/PageDn keys. To delete the current camera, press Delete. More information can be found in The 3D and 2D Views.

Entity - (Shift+E) This tool allows you to place point-based entities in a map. (Point-based entities are those entities which exist only at a point, and do not rely on a brush for their effect) Once selected, the New Objects dialog will contain a list of entities from which to choose. Click on one of the 2D views and press Enter to place the entity. If Snap To Grid is enabled, the new entities will be snapped to the grid.

Note: In order to place a brush-based entity (a func_door for example) you must first create the brush with the Block Tool (see below), then select it, and press Ctrl+T. You will be given a list of entities to choose from which will be different than those shown with the Entity Tool.

Block - (Shift+B) his is the basic creation tool available to you. It allows you to făcute any of the different types of primitive shapes. For more information, see Creating Solids.

Texture Application - (Shift+A) This toggles the Face Properties dialog on and off. This dialog allows you to edit the texture properties of individual brush faces. For more information, see Texturing Solids.

Apply Current Texture - (Shift+T) When pressed, the current texture is applied to every face of the selected brushes. For more information, see Texturing Solids.

Apply Decal - (Shift+D) A decal is a texture that can be placed on top of another texture. Common examples include scorch marks or bullet holes. Use the Apply Decal button to place a decal in the 3D window. Decal textures can be viewed and selected in the Textures window. Half-Life's decal textures are designated by the use of a { as the first character in the texture name.

Clip - (Shift+X) Clipping allows you to slice the currently selected brush. You have the option of only splitting the brush, or actually slicing a piece right off. For more info, see Reshaping Solids.

Vertex Manipulation - (Shift+V) Vertex manipulation gives you complete control over the shape of a brush. You can reshape the brush by manipulating individual vertices and brush edges. For more information, see Reshaping Solids.

Path - (Shift+P) This tool greatly simplifies the creation of paths for trains and monsters. It allows you to create dynamic paths that you can add and delete nodes to.

With the Path Tool selected...

Hold Shift and the left mouse button, and drag a line in a 2D view. This creates the first two path points.


A dialog box will pop up where you can set the name of the path, the path direction (one way, circular, or ping-pong), and the entity type (typically path_corner or path_track).

To add new points to the path, click on one of the existing path points, hold Ctrl and drag with the left mouse button. Do this as needed until you have your path complete.

note: The start of the path is denoted by the point with the green circle around it.

The Map Operations toolbar allows you to perform a number of operations on objects in your map as well as setting default behavior for some mapping properties.

Carve - When the Carve button is pressed, the selected brush will subtract its shape from the non-selected brushes around it.

Group/Ungroup - Group/Ungroup binds two or more objects together so they may be acted upon simultaneously. This is not the same as VisGrouping. The two functions differ in that grouping provides a way of physically binding a group of objects together, while VisGrouping enables you to organize objects into a group that may still be worked upon as separate objects. For more information, see Grouping and VisGrouping.

Ignore Groups - Ignore Groups allows you to modify individual brushes that are part of a group or entity by temporarily disabling "groups."

Hide Selected/Unselected, Show All - Along with the Filter Control dialog, these buttons are used to control what does and doesn't appear in the 2D and 3D space of the editor. Hide Selected and Hide Unselected both produse new VisGroups with the newly hidden objects, and Show All will make visible any hidden VisGroup. For more information on VisGroups, see Grouping and VisGrouping.

Cut, Copy, Paste - These buttons follow the standard windows interface for cut/copy/paste.

Toggle Cordon State, Edit Cordon Bounds - These buttons allow you to "cordon off" an area of your map. When the cordon state is toggled on, a thick red line will appear around that area. When you compile, only the inside of that red area will be compiled, and a box will be placed around the area to seal leaks.

This is extremely useful when you are working on a large level and want to look at changes made in only a small area. Rather than wait a considerable amount of time for the entire map to compile, you can selectively compile only a small area by using the Cordon functions.

Note: Be sure to place a temporary player start within the bounds of the cordoned area before you test compile that section.

Toggle Select-by-Handles - When this option is toggled on, you will only be able to select objects by their center handles in the 2D view. To select objects by their center handles in 3D view, you must also be in wireframe mode. This is useful when there are several brushes overlapping in the 2D view, making the standard selection method (clicking on brush lines) awkward and inaccurate.

Toggle Auto-selection - When Toggle Auto-selection is toggled on, you can select multiple objects by simply clicking your mouse button and dragging a selection box around the objects. When this option is toggled off, you can also select multiple objects by dragging a selection box around the objects and then pressing Enter.

Texture Lock - This button toggles texture lock mode on and off. Textures will then stay correct when you move or rotate a brush.

Align to World/Face - This button toggles the texture alignment style between world alignment and face alignment. World alignment will align textures according to the world grid coordinates. Face alignment will align textures according to the brush face.

Run Map - This button brings up the current compile dialog. For more information on compiling you map, see Compiling and Running Your Level.

The Textures toolbar is used to select the current texture.

Texture group - The texture group pull-down menu lets you choose either All Textures, or individual texture WADs. This affects which textures will be displayed when you Browse.

Current Texture - This lists the name of the current texture and below that, a small picture of the texture. The pull-down menu lists the most recent texture choices.

Browse - This brings up the Texture Browser, pictured below.

Replace - This will bring up the Replace Textures dialog.



Texture Browser properties
The texture browser has a number of properties that make texture handling easier.

Size - This lets you set the display size of textures - 1:1 (actual size), 32x32, 64x64, or 128x128.


Filter - You can enter substrings in this text box. Only textures whose names contain the substring will be listed.

Only used textures - if you enable this, only previously used (in the current map) textures will be displayed. You can combine this with the filter substrings.

Mark - click on this to mark faces that have the selected texture on them.

Replace - this brings up the Replace Textures dialog.

The New Objects dialog controls all the facets of creation within Hammer. Entities, prefabs, brushes - the creation of all this can be controlled from here.

toWorld (Ctrl-T) - toWorld will remove any entity settings of the selected solid or group of solids.


toEntity (Ctrl-W) - This will attach the currently selected solid or group of solids to an entity.

Categories - When the Entity Tool is active, no categories are available. With Block Tool selected, there will be at least one category available: the "Primitives", which contain the editor's five basic solid shapes: block, cylinder, spike, wedge, and the arch tool. If any Prefab libraries have been defined, then the library names will also be listed here.

Object - This list contains all objects that belong to the chosen category. For entities, the list contains all entity classes available. For solids, if the 'Primitives' category has been selected, then this list contains the five types of primitives. If a Prefab library has been selected, then this list contains all objects in the library.

Faces - This text box becomes active if the Block Tool is active, and either 'cylinder' or 'spike' is the current solid type. The value (which can be changed by either the keyboard or clicking the LEFT MOUSE BUTTON on the little arrows) represents the number of side faces the cylinder/spike will be created with.

Create Prefab (Ctrl-R) - This will let you turn a selected object into a prefab object which will be easily reusable. When you press this button, a Create Prefab dialog will pop up. Here you can enter the name and description of the prefab, as well as choose which library it will be placed in.


Creating Solids
Creating Solids from Scratch
Creating solids is quite simple. The process always follows the same four basic steps:

Select the Block tool.


In the New Objects dialog, select Primitives in the Categories box. In the Objects selection box you will have 5 options. Select any one of these objects:

block


wedge

cylinder

spike

arch

Note: The arch primitive is a excepțional case. It is not actually a primitive object, but an Arch tool which allows you to quickly and easily make multi-piece arches. For more information on the Arch tool, see Using the Arch Tool.

Drag a box in a 2D view, making sure it is the correct size and in the correct position in each of the views.


Press Enter to create the solid.

Creating Solids by Cloning
Cloning provides a simple way to quickly duplicate an object or group of objects. This includes both brushes and entities, and groups can contain a mixture of both.

Go into Selection mode by pressing Shift+S.


Select the object (brush, entity, or group of brushes and/or entities) that you would like to clone.

Hold shift, and click and drag the selected object to its new position with the left mouse button.

While shift is still being held, release the mouse button. The object has now been cloned.

Prefabs
Once you have a prefab library created (see Creating and Using Prefabs), it is a simple task to insert a prefab into your level.

There are two ways to put a prefab into your level.

The simple method is, from the New Objects dialog, to select the prefab library from the Categories selection box, and the specific prefab from the Object selection box, and then press the Insert autentic prefab button. This will insert the selected prefab in the center of the 2D views. You can do this with either the Selection or Block tool selected. Simply move it around into place. (Make sure Texture Locking is turned on!)

The second way to insert a prefab is with the Block tool. Press Shift+B to go into block mode, then realizate a box the same approximate size you want the prefab to be. Select the prefab library and prefab object as described above. Now press enter to create the prefab. This will create prefabs at any size you specify, rather than inserting them at original size then requiring you to resize them manually.

Texturing Solids
Textures are the designs applied to the surfaces of solids. These textures show what material a given solid is made of (brick, steel, sand, etc.). So, while solids give your level form, textures indicate function, create atmosphere and bring your level to life. Skilled application of textures is one of the most important aspects of creating a good level. The Valve Hammer Editor's tools give you easy access to all of the texture properties.

Half-Life's textures are stored in WAD files. A WAD file is a collection (a wad) of textures that the compile tools use to put textures into the compiled map. Texture WADs can be added and removed from the Textures options.

Note: the WAD file dates all the way back to Doom. Doom uses the WAD format to store complete level information, including map, textures, monsters, etc.

When Quake came along, the WAD compus changed into the WAD2 format. WAD2 is less of an essential game file than it is a design file. It is used to store 8-bit single-palette textures. During the compile process, the compile tools take textures from a WAD2 and place them directly into the compiled map files.

Half-Life uses the WAD3 format. It is essentially the same as the WAD2 format, except that each texture stored includes its own palette. This allows for a much richer color depth than previous texture systems.

Your first encounter with textures will most likely be through the Textures toolbar.



The Textures toolbar shows the current texture, and lets you select a new texture. The Current texture drop-down list shows the last eight textures used, then continues with a list of the remaining textures. Use the Texture group scrollbox to view a different subset of textures. You will have a choice between viewing all textures, or viewing individual texture WAD3 files. (A WAD3 file is a file that contains a group of Half-Life textures). You can add or remove WAD3 files in the Textures Options dialog.

Texture Browser
The Browse... button opens the texture browser, where you can select from all available textures (as dictated by the Texture Group setting).



The Size scroll box allows you to set the displayed size of the textures. You can choose from 32x32, 64x64, 128x128, or 1:1 (full size).

The Filter dialog box allows you to type in a search string. Any texture that includes that string as part of its name will be displayed. You can specify more than one filter string. For example, if you specify the search string "sign 7," any texture with "sign" and "7" in its name will be displayed. Previous search strings can be accessed by clicking on the down arrow.

The Only used textures option tells the browser to display only those textures that have been used in your level. This helps you limit your use of different textures, and avoid using different textures for the same purpose. For games such as Half-Life, textures are stored in the compiled maps. Reducing the number of textures will decrease the compiled map size. Fewer textures to load also means memory savings while playing the map in the game.

The Mark button allows you to mark (select) all texture faces that contain the selected texture. You can then adjust those faces as required (textures, surface attributes, etc). This is best used in conjunction with the Face Properties dialog. If the natural Apply Textures map tool is used, any brush with one face selected will have the new texture applied to every face of the brush.

The Replace button (also accessible through the Tools menu) will bring up the Replace Textures dialog.

Texture Application Mode
You will eventually need to modify a texture in some way. The Face Properties dialog (Texture Application mode) allows you to manipulate the texture properties of selected brush faces. To select a brush face, click on it in the 3D view with the left mouse button. To select multiple faces, hold down the Ctrl key while you do this. You can also select numeroase brushes before bringing up the Face Properties tool.



Scale (X/Y)
You can modify the scale of a texture to shrink or enlarge it. Numbers less than 1 shrink, and numbers greater than 1 enlarge. You can use negative values to mirror the texture in one or both planes.

Shift (X/Y)
This simply allows you to shift the texture around in the X and/or Y planes.

Rotation
Rotation allows you to rotate the texture on a brush face.

Justify
There are six buttons you can press here: L (left), R (right), Fit (fit to face), T (top), B (bottom), and C (center on face). These allow you to quickly and easily align a texture on a brush.

Treat as one
If you have multiple faces selected, you can check this option to treat all the faces as one single face.

Align: World and Face
These checkboxes allow you to set the texture alignment style for the selected faces. World alignment causes textures to be aligned according to world coordinates (if you're familiar with versions of the editor before 3.3, this was the standard behavior). Face alignment uses the coordinates of the face as a basis for alignment.

Texture Group
You can select which group of textures you want to use - either all of them, or individual texture WADs.

Current Texture
The name of the current texture is displayed here, along with a thumbnail picture of the texture.

Hide Mask
If this button is toggled on, the selected brush face(s) will not appear as selected (with a reddish hue). This may make it easier to perform some texture manipulations.

Mode
This lets you select what feature you want the left mouse button to be. The available options are Lift+Select, Lift, Select, Apply (texture only), Apply (texture + values).

Creating Entities
Entities give life to your level. They are the monsters, doors, switches and lights that turn your static architecture into an interactive environment. Careful use of entities is critical to creating an interesting, unique and fun level for others to play.

Unlike solids, entities are not created within the editor. Most users will simply choose from a pre-existing set of entities provided with Half-Life. Once you have selected the appropriate entity, the editor gives you control over its placement and other properties.

There are two types of entities: point-based and brush-based.

Point-based entities exist only at a certain exact point. Examples conține lights, monsters, and player start points. (Monsters do have an area, but it is defined by the game code and is not modifiable from within the map.) Some point type entities are just that: points. For example, the env_beam entity, which controls Half-Life's beam effects, uses two info_target entities as targets and the beam of light runs between these two points.

Brush-based entities are entities that depend on either a brush for their physical presence (like doors, trains, and other moving entities) or an "area" (like triggers, which require an activation field).

Point-based entity placement
Placement of point entities is simple:

Press Shift+E to go into entity mode..


From the New Objects toolbar, select the entity you want.

Note: the entity list in the New Objects dialog is for point-based entities only. For information on brush-based entities, please refer to the following section.

Click in a 2D window, then position the entity cursor with the mouse.


Pressing Enter will create the entity.

Tip: You will most likely need to edit the entity properties after you place a point-based entity. Select the entity and press Alt-Enter to view the entities properties dialog box. This dialog pops up automatically for brush-based entities.

Brush-based entity placement
Brush-based entities are a bit more complicated than point-based entities, but should not pose any difficulties once you know their basics.

Create the object where you would like it. You can use as many brushes as you'd like when building a brush-based entity.


Select the entire object.

Press the Ctrl+T hotkey, which will turn the selected objects into a brush based entity and...

...bring up the entity properties dialog. Select the appropriate entity from the Class list box. Once the entity type is selected, you can modify the entity properties as needed.

Tip: Bring up the entity properties for a brush-based entity the same way you do for a point-based entity: select it and press Alt-Enter.

You will notice that brush-based entities appear as a different color in the 2D windows, typically purple.

How do I fix leaks in my level?
Everyone experiences them. Everyone hates them. They're the frickin' level leak. Below are some causes and effects, and a number of ways you can deal with leaks.

The Cause
First, you should know what causes them. The most common cause of a leak is a gap in your level that "leaks" into the void. Look at the picture below.



What you see is an obvious gap. Through the gap is an area outside the level. When this gap exists, the compile tools don't know what is inside and what is outside the level. Because of this, the BSP process will report its LEAK LEAK LEAK error, and VIS will not run, and RAD will only perform direct lighting calculations (that is, no light bounces).

Sometimes these gaps aren't quite so obvious. They can be as little as one unit wide and still cause a leak.

Another big cause of leaks is having a point entity outside the level. All point entities must be inside valid level space.

One more cause is when you seal off your level with a brush entity, like a func_door. Brush entities are ignored where visibility by the engine is concerned, and so they also count as a leak if they are contacting both the inside and the outside (the void) of the level. They lucrate the same condition as if there were a gap in their place.

The Effects
A leak in a level has a number of bad effects. First, the BSP process will report the leak, and it will not produce a portal file (mapname.prt). The portal file is used by the VIS process to perform its visibility calculations. Since there is no portal file, VIS will not run at all. When VIS doesn't run, it doesn't produce the files necessary for the RAD process to calculate its light bounces. Due to this, the RAD process will only perform direct lighting - no light bounces. (If you are using Zoner's Half-Life compile tools - you should be! - the RAD process won't run at all)

The most serious effect by far is that the VIS process will not run when a leak is present. When the level is run in Half-Life, the rendering engine will not have any visibility info available with which to limit itself, so it will attempt to draw the entire level. This will most certainly lead to high polygon counts and may lead to things like doors, items, and the sky blacking out or not being drawn if the maximum rendered polygon limit (which is 800 polygons in software rendering mode) is reached.

The Fixes:

The Pointfile
There are a number of ways to deal with leaks. The first way you should check is by loading the pointfile. Make sure that mapname.pts is being copied into the valve\maps folder along with the compile map (you'll have to move it manually otherwise). The .pts file contains a set of coordinates that form a line of dots that should lead you to the leak. To load the pointfile in the game, bring down the console and type pointfile.



You will see a message similar to 1050 points read, and you should see something similar to the above picture. (You may have to run about your level to find it).

The default engine limit is 2048 points, which may not be enough to trace a line to the leak in your map. If this is the case, start Half-Life at the command prompt with "hl -particles 10000" (or some higher number) to allow the engine to display more particles, and thus trace a longer line to help you find your leak.

When you've loaded the pointfile, type "noclip" to allow you to walk through walls and "r_fullbright 1" to make the map bright so you can see everything. (If you're using Zoner's compile tools, the map will already be fullbright since the RAD process didn't run.) If there are monsters placed in the level, typing 'god' and 'notarget' at the console will make things easier as well. The 'notarget' command causes monsters not to become hostile to your presence, and 'god' makes you immune to damage of any sort. If you noclip outside the level, it might also be useful to type 'gl_clear 1' in the console. This will turn the void into a solid color, rather than the mess that it will be if you're using the glide or opengl renderer.

Once you find the line, follow it. It bounces all over the place, goes in screwy directions, both inside and outside the level. At some point, it will pass through a hole in the walls of your level. There's your leak.

The Big Block Method
If your level is especially large and you're having difficulty tracking down your leak, you might benefit from using the "Big Block Method" of leak tracking. What this is essentially, is you covering a large portion of your level with a solid block (make sure it goes completely through from top to bottom). A recommended size is a quarter of your level.

Place the large block over a portion of your level, then attempt to compile. Move the block to a new section and recompile until the leak error disappears. When this happens, you know the leak is somewhere within the space of the block. Now you can repeat the procedure using a smaller block, only within the space that was covered last with the big block.

This method would only work, of course, if you had one leak, or a number of leaks that would all be covered at once by the block.

Neal White adds this about the Big Block method:

I discovered the Big Block Method on my own, but I use it for an entirely different purpose. It is *very* helpful in tracking down those damn leaf-saw-into-leaf portal bugs. It's the only good way I've found to track them down. It also can be used to drastically reduce your level compile times when you just need to test the lighting in a room or two.

Great idea!

The Bright Light Method
Some people favor this method over the big block, but depending on the level, it can be very time consuming. It involves placing a large box around the entire level, then placing a number of very bright violet (or other easily visible color) lights inside the box, but outside what would be your level. Now, compile the level, and since the level is inside a big box, it should compile fine, and the RAD process should also run fine. Once its in the game, run around your level looking for the light leaks.

The main drawback to this is that the compile for the map may take an exceptionally long time, and you'd probably be better off using the pointfile method, but this method may work better if you're faced with multiple leaks throughout your level.

Note: Some people would point out - if placing a box around your level gets rid of the leak, why not stop there? Well, it gets rid of the leak, but it doesn't get rid of the main bad effect of the leak - VIS still cannot properly optimize the level because it doesn't know what is inside or outside the level. You will still see the high polygon counts and poor framerate. This is not a solution.

An Ounce of Prevention
It was pointed out to me that I originally missed talking about the most important way to fix leaks, and this is by preventing them in the first place. Take your time when building, make sure things are snapped properly to the grid. This is the note I received -

this is where the phrase "an ounce of prevention is worth a pound of cure" comes in.. ie: take your time .. make sure all wall joins are solid and thick .. I always make 64 unit walls all around the outside of my map and then build detail inside of that .. this allows me to see if I happen to have misaligned brushes ...

The 64 unit thick walls aren't completely necessary, but they will make it more obvious if you have a misaligned brush. The whole point is, be careful, be attentive, take your time. I'll end this before it sounds like a father/son lecture.

Conclusion
Leaks are bad, and can be really frustrating to find. Hopefully this information has shed a little bit of light on the subject for those that need it. Also remember, sometimes a good eye is all that's needed to find the leak. Look around the level in the editor - look for gaps or misaligned brushes, point entities in the void, etc. Kill those leaks!

How can I micșorează polygon counts?
Polygon Reduction Methods: A quick and dirty guide.
This article originally started out as an email to someone, but it kept going on and on and on. So, here it is. I'm not claiming this is a complete guide to low polygon counts, but its some quick advice that's good to know.

There are a number of things to keep in mind concerning r_speeds / polygon count.

entity brushes will not break up other solid brushes, world brushes will That is, if you have a 10 sided cylinder that makes atingere with a flat brush, that flat brush will be broken into many pieces (polygons). This can affect both how the brush looks and how many polygons are required to be drawn. There are two main ways to work around this problem

where one object meets another, leave a 1 (or more) unit gap. This is best done when the player can't see the area where the gap is (ie: at the top of a pillar, or under some shallow water.


where one object meets another, leave a small gap and join the two objects with a func_wall. For example, if you've got a set of pipes that meet up with a wall, put a pipe flange on the wall and connect the pipe to that. Make the flange a func_wall.



Below are some screenshots of the above concepts in action. I used columns as examples but the concept is applicable to many different things.



This picture shows a normal column with no polygon reduction efforts made. Click to see a larger picture.





This picture shows a normal column with the above mentioned polygon reduction methods. Click to see a larger picture.



The above two pictures were taken in software mode with r_drawflat turned on. This will draw the world in flat/solid polygons (similar to the editor's flat-shaded view). This is an excellent way of checking out your level for areas that may be causing problems with high polygon counts.

Note: To turn on r_drawflat, type r_drawflat 1 in the Half-Life console. You need to have run Half-Life with the -dev and -console parameters for this to work (but then, you should use those parameters anyway when you're testing maps).



This picture shows a normal in-game shot of both columns.



There isn't a heck of a lot of difference between the two columns, except that the column on the right has a much lower polygon count.

Another thing to keep in mind is texture size. The compile tools split brushes along their texture sizes. For instance, if you apply a 128 x 128 texture to a large wall, that wall would be split into 128x128 polygons. If you change the scale of the the texture to X*2 and Y*2, the wall will be split into 256x256 polygons. The scale of a texture can have a big effect on the the number of polygons. Whenever possible, when it wont be visually negative, increase the scale of a texture (this isn't that often, mind you, but for outdoor areas, it can be handy).

Note: You can access the scale properties of a texture in Hammer by pressing shift+A to bring up the Texture Application Tool, then clicking on a brush face to select it. Modify its scale and press the Apply button to change the brush face.

You'll notice in the included pictures that the walls and ceiling/floor are single polygons. What I've done is stretched them to X*1000 Y*1000 scale. In the in-game shot, you'll see that this produces a flat shaded texture. The only time you would do this in a real map would be one that is completely surrounded by blackness, when the stretched texture wouldn't be visible. Of course, in that case, you could just use the black sky.

Last, remember that the game engine isn't as smart as you. Or maybe its a whole lot smarter. It can see through doors (and any other brush entity), and can see somewhat around corners. Make sure you have world brushes sufficiently blocking sight into other areas, otherwise the engine will be drawing those areas too.

Unpacking Your Pack
Half-Life stores the majority of it's content in PAK files. The PAK file is an archive that contains files in a specific directory structure that the game can read from.

For editing purposes, it is most preferable when some or all of a PAK's contents is "unpacked" - that is, that the contents reside in their normal directory structure rather than inside the PAK file.

There are a number of benefits to having the PAK file.

easy access to sounds, sprites, and model files.


for mod makers, easy to add and remove contents

makes it possible to "browse" for content in the editor's entity properties, where applicable

make it possible for the editor to display sprites in the 3D view (Hammer does not read out of the PAK file)

The first thing you need is a program capable of browsing and editing the PAK file. Wally is a good tool for this, since it's also a fermecător texture editor and is freely available. You can get Wally from it's website, here -

http://www.telefragged.com/wally/

Unpacking
Unpacking PAK contents is pretty simple. The following example shows how to unpack the Sprite folder.

Load Wally and click on Open in the File menu. Browse to the Half-Life folder. Double-click on the valve folder. Click on pak0.pak and press the Open button.


A window will open with the contents of the PAK file displayed. Right-click on the Sprites folder and select Export. In the Destination text box, browse to and select the valve folder inside your Half-Life folder.

Press the Ok button to extras the files.

That's it.

It's important to maintain the correct directory structure of files. If you're unpacking a PAK that is in a specific game directory, the unpacked files should be exported only to that game directory.

Grouping and VisGrouping
Even relatively modest levels can contain hundreds--even thousands--of objects. Hammer offers two ways of keeping track of items in your level: normal grouping and visibility grouping (VisGroups).

Note: VisGroup refers to "visibility group" and has nothing at all to do with the Vis compile tool. VisGroups only affect what you see in the editor and have no in-game effect.

Grouping
Normal grouping is used to literally "glue" things together.



The object shown above is made of eight brushes. If you were to click on a single brush when the object is ungrouped, only that brush would be selected; you'd have to ctrl-click each piece to select the whole thing (or drag a selection box over the whole thing). When the object is grouped, however, you can click on any individual brush to select everything in entire group.

brushes do not need to touch in order to be grouped together


groups may contain any combination of brushes and entities

you can work on an individual piece of a group of objects by enabling the ignore groups option

grouped objects can be combined with VisGroups (see below)

VisGroups
VisGroups stands for visibility groups. VisGroups make managing objects easy by letting you control what you see on your screen. With VisGroups, you can arbitrarily assign objects to a specific group; you can then turn the visibility of that group on and off. Let's say you have the following section in your map:



Now, you'd like to be able to make the furniture a group, but you still want to move each piece around independently from the others. This is precisely what VisGroups are good for.



First, select the furniture pieces, then click on the hide selected objects button. This will do two things: hide the objects in the 2D and 3D views, and fabricate a new VisGroup with the selected objects.



The new VisGroup will appear in the Filter Control toolbar named after the number of objects it contains. To change the name of the VisGroup to something more suitable, select the VisGroup, then click on it again. You will be able to change the name to whatever you like. You can also click to the left of the name and a hand will appear next to the VisGroup. This is how you set which VisGroups are visible and which are not. You must press the Apply button for the changes to take effect.

Some things you can do with the mouse in the Filter Control toolbar:

drag one group onto another group (this will cause the first group to be merged with the second group, and the resulting group will keep the name of the second)


drag a group out of the Filter Control dialog (this will allow you to delete VisGroupings)

If you make the furniture group visible, then select it and press the Mark button, the group will be highlighted in the 2D and 3D views.



The other two options available to you are Purge and Edit. Pressing the Purge button removes any VisGroups from the Filter Control dialog that do not actually contain any objects (which is possible if you have deleted objects or made one VisGroup part of another).

The Edit button brings up the Object Groups dialog.



This dialog allows you to change the name and color of existing VisGroups, or delete them. Deleting the VisGroup does not actually delete the group's objects, it just eliminates the VisGroup, making them individual unlinked objects. You also have the option of creating new (empty) VisGroups with the New Group button.

The last way you can use VisGroups is through an object's properties, in the VisGroup tab.



The above dialog will also be a part of an entity's Properties dialog. To assign the object to a VisGroup, just select the appropriate group. To remove the VisGrouping from this object, click on (no group).
Sus
Vezi profilul utilizatorului Trimite mesaj privat
andrey009
NooB
NooB


Data inscrierii: 23/Iun/2007
Mesaje: 2

MesajTrimis: 23/06/2007 19:01    Titlul subiectului: Raspunde cu citat (quote)

am versiunea 3.5 :-P
pacat ca nush de unde am facut rost :-D ca v-as zice ;-)
:soldiers:
Sus
Vezi profilul utilizatorului Trimite mesaj privat
Afiseaza mesajele pentru a le previzualiza:   
Creaza un subiect nou   Raspunde la subiect    Pagina de start a forumului mapper -> tutoriale counter-strike Ora este GMT + 3 ore
Pagina 1 din 1

 
Mergi direct la: 
Nu puteti crea un subiect nou in acest forum
Nu puteti raspunde in subiectele acestui forum
Nu puteti modifica mesajele proprii din acest forum
Nu puteti sterge mesajele proprii din acest forum
Nu puteti vota in chestionarele din acest forum


Powered by phpBB © 2001, 2002 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro