Adding Prop Models: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
m (Temp save. Still working on this, but wanted to comment on another thing first.)
Line 1: Line 1:
[[Category:Level Design Tutorials]]
[[Category:Level Design Tutorials]]
{{first room menu}}
{{first room menu}}
=Introduction=
 
Prop models are geometry files created in a modeling program such as Softimage|XSI. You can place these prop models in Hammer, like adding props to a movie set.
Prop models are geometry files created in a modeling program such as Softimage|XSI. You can place these prop models in Hammer, like adding props to a movie set.


=Adding Prop Models=
<br clear="both">


We're going to add some more entities, so pick the '''Entity Tool''' again.
[[Image:hammer_pickpropstatic.jpg |thumb|right|400px| Select [[prop_static]] from the drop-down list.]]


Then pick prop_static from the entity list in the '''Objects Toolbar'''.
There are basically three types of props:
* ''Static'' props will always be stationary in the map.
* ''Dynamic'' props are props that can be animated.
* ''Physics'' props are props that can be tossed about (obeying physics like gravity).


[[Image:hammer_pickpropstatic.jpg | Select prop_static from the drop-down list.]]
We will start by adding a static prop.


All props are entities, and handled as such, so switch to the '''Entity Tool''' again.


Then pick [[prop_static]] from the entity list in the '''Objects Toolbar'''.


Place the <i>prop_static</i> in the map by clicking on the floor brush in the 3D View.


Notice that the Object Properties dialog now shows the settings for the <i>prop_static</i> entity.
<br clear="both">


[[Image:hammer_placepropstatic.jpg | Place the prop_static entity on the floor by click in the 3D View.]]
[[Image:hammer_placepropstatic.jpg |thumb|right|400px| Place the ''prop_static'' entity on the floor by clicking in the 3D View.]]


Place the ''prop_static'' in the map by clicking on the floor brush in the 3D View.


Now we'll pick a model for the entity. If you closed the '''Object Properties''' dialog, you re-open it choosing '''Properties''' from the '''Edit Menu'''.
Double-click it to bring up its properties.
 
<br clear="both">
 
[[Image:hammer_pickworldmodel.gif |thumb|right|400px| Switch to the World Model field.]]
 
We will now pick a model for this entity.


# Click the '''World Model''' field in the '''Object Properties''' dialog.
# Click the '''World Model''' field in the '''Object Properties''' dialog.
# Click the '''Browse''' button to open the model browser.
# Click the '''Browse''' button to open the model browser.


[[Image:hammer_pickworldmodel.gif | Switch to the World Model field.]]
<br clear="both">
 
[[Image:hammer_pickfolder_sm.jpg |thumb|right|400px| Double-click a folder to change to that sub-directory.]]
 
Double-click the ''props_c17'' folder in the model browser to open the sub-directory.


Double-click the <i>props_c17</i> folder in the model browser to open the sub-directory.
<br clear="both">


[[Image:hammer_pickfolder_sm.jpg | Double-click a folder to change to that sub-directory.]]
[[Image:hammer_pickfence_sm.jpg |thumb|right|400px| Double-click the ''fence01a'' model to select it and close the browser.]]
 
<br clear="left">
 
[[Image:hammer_pickapply_sm.jpg |thumb|right|400px| Click the ''Apply'' button to confirm your changes.]]


Double-click the model <code>fence01a.jpg</code> to select it, as shown here.
Double-click the model <code>fence01a.jpg</code> to select it, as shown here.
Line 36: Line 55:
The model browser will close and the <code>fence01a</code> will be selected as the model for the <i>prop_static</i> entity.
The model browser will close and the <code>fence01a</code> will be selected as the model for the <i>prop_static</i> entity.


[[Image:hammer_pickfence_sm.jpg | Double-click the fence01a model to select it and close the browser.]]
<br clear="both">
 
[[Image:hammer_pickpropphysics.jpg |thumb|right|400px| Pick the prop_physics_multiplayer entity.]]


[[Image:hammer_pickapply_sm.jpg | Click the Apply button to confirm your changes.]]


Notice how the fence model now appears in the 3D View.
Notice how the fence model now appears in the 3D View.
Line 48: Line 68:
Switch to the Entity Tool.
Switch to the Entity Tool.


Choose prop_physics_multiplayer from the entity list in the Object Toolbar.
Choose [[prop_physics_multiplayer]] from the entity list in the Object Toolbar.
 
<br clear="both">
[[Image:hammer_pickpropphysics.jpg | Pick the prop_physics_multiplayer entity.]]
[[Image:hammer_placepropphysics.jpg |thumb|right|400px| Place the ''prop_physics_multiplayer'' entity by clicking the floor in the 3D View.]]


Place the <i>prop_physics_multiplayer</i> entity into the room by clicking on the floor in the '''3D View'''.
Place the ''prop_physics_multiplayer'' entity into the room by clicking on the floor in the '''3D View'''.


Now open the '''Object Properties''' dialog by choosing '''Properties''' from the '''Edit Menu''', if it's not already open.
Now open the '''Object Properties''' dialog by choosing '''Properties''' from the '''Edit Menu''', if it's not already open.


The '''Object Properties''' dialog will now show the parameters of the <i>prop_physics_multiplayer entity</i>.
The '''Object Properties''' dialog will now show the parameters of the ''prop_physics_multiplayer'' entity.


[[Image:hammer_placepropphysics.jpg | Place the prop_physics_multiplayer entity by clicking the floor in the 3D View.]]
<br clear="both">
 
[[Image:hammer_pickbarrel_sm.jpg |thumb|right|400px| After clicking Browser, scroll down to the oildrum001 model, and double-click it.]]


Click the '''Browse''' button in the '''World Model''' field in the '''Object Properties''' dialog to bring up the model browser.
Click the '''Browse''' button in the '''World Model''' field in the '''Object Properties''' dialog to bring up the model browser.
Line 64: Line 88:
Scroll down in the browser and double-click the <code>oildrum001.jpg</code> in the <code>props_c17</code> model directory, as shown here.
Scroll down in the browser and double-click the <code>oildrum001.jpg</code> in the <code>props_c17</code> model directory, as shown here.


[[Image:hammer_pickbarrel_sm.jpg | After clicking Browser, scroll down to the oildrum001 model, and double-click it.]]
<br clear="both">
 
[[Image:hammer_pickapply_sm2.jpg |thumb|right|400px| Click ''Apply'' to make the change and update the 3D View.]]


Click the '''Apply''' button to confirm your changes.
Click the '''Apply''' button to confirm your changes.
Line 70: Line 96:
Notice how the barrel model model now appears in the '''3D View next''' to the fence.
Notice how the barrel model model now appears in the '''3D View next''' to the fence.


[[Image:hammer_pickapply_sm2.jpg | Click the Apply button to make the change and update the 3D View.]]
<br clear="both">
 
[[Image:hammer_closeprop.jpg |thumb|right|400px| Close the Object Properties dialog.]]


Close the '''Object Properties''' dialog.
Close the '''Object Properties''' dialog.


[[Image:hammer_closeprop.jpg | Close the Object Properties dialog.]]
<br clear="both">


=Moving Objects with the Grid=
=Moving Objects with the Grid=
[[Image:hammer_pickselect.jpg |thumb|right|400px| Switch to the Selection Tool.]]


You may have noticed that the fence model is stuck part-way into the floor. We need to move it up.
You may have noticed that the fence model is stuck part-way into the floor. We need to move it up.
Line 82: Line 112:
First, switch to the '''Selection Tool''' so we can move the object.
First, switch to the '''Selection Tool''' so we can move the object.


[[Image:hammer_pickselect.jpg | Switch to the Selection Tool.]]
<br clear="both">
 
[[Image:hammer_selectfence_sm.jpg |thumb|right|400px| Select the fence model in the 3D View by clicking it.]]


Now select the fence model by clicking on it in the '''3D View'''.
Now select the fence model by clicking on it in the '''3D View'''.
Line 88: Line 120:
A yellow box will appear around the model in the '''3D View''', showing that you've selected it.
A yellow box will appear around the model in the '''3D View''', showing that you've selected it.


[[Image:hammer_selectfence_sm.jpg | Select the fence model in the 3D View by clicking it.]]
<br clear="both">
 
[[Image:hammer_selectfence_sm.jpg |thumb|right|400px| Click and drag the fence in the Side View to move it.]]


Next, we'll move the fence model in the '''2D Side View''', since it's easy to see how it meets the floor.
Next, we'll move the fence model in the '''2D Side View''', since it's easy to see how it meets the floor.
Line 100: Line 134:
You may find that you can't quite line up the bottom of the model with the floor. The current size of the grid prevents it. Get it close as you can, and we'll fix that next.
You may find that you can't quite line up the bottom of the model with the floor. The current size of the grid prevents it. Get it close as you can, and we'll fix that next.


[[Image:hammer_selectfence_sm.jpg | Click and drag the fence in the Side View to move it.]]
<br clear="both">
 
[[Image:hammer_movefence_sm.jpg |thumb|right|400px| Decrease the size of the grid so the objects can be moved in finer steps.]]


For finer control, click the '''Smaller Grid''' button in the upper left corner of the Hammer window.
For finer control, click the '''Smaller Grid''' button in the upper left corner of the Hammer window.
Line 106: Line 142:
The size of the grid controls how objects are lined up to one another.
The size of the grid controls how objects are lined up to one another.


[[Image:hammer_movefence_sm.jpg | Decrease the size of the grid so the objects can be moved in finer steps.]]
<br clear="both">
 
[[Image:hammer_picksmgrid.jpg |thumb|right|400px| With the grid size smaller, the fence can be lined up with the floor.]]


With a smaller grid, now try moving the fence again. You can see that it's now possible to line it up with the bottom of the floor, as shown.
With a smaller grid, now try moving the fence again. You can see that it's now possible to line it up with the bottom of the floor, as shown.
Line 112: Line 150:
If you find that you still can't line up the fence with the floor, click the '''Smaller Grid''' button again.
If you find that you still can't line up the fence with the floor, click the '''Smaller Grid''' button again.


'''Note:''' It's OK if the prop_static entity sticks into the floor a little bit.
'''Note:''' It's okay if the ''prop_static'' entity sticks into the floor a little bit.
 
<br clear="both">


[[Image:hammer_picksmgrid.jpg | With the grid size smaller, the fence can be lined up with the floor.]]


Now onto [[Saving and Compiling]]!
Now onto [[Saving and Compiling]]!

Revision as of 21:53, 16 February 2006

Prop models are geometry files created in a modeling program such as Softimage|XSI. You can place these prop models in Hammer, like adding props to a movie set.


Select prop_static from the drop-down list.

There are basically three types of props:

  • Static props will always be stationary in the map.
  • Dynamic props are props that can be animated.
  • Physics props are props that can be tossed about (obeying physics like gravity).

We will start by adding a static prop.

All props are entities, and handled as such, so switch to the Entity Tool again.

Then pick prop_static from the entity list in the Objects Toolbar.



Place the prop_static entity on the floor by clicking in the 3D View.

Place the prop_static in the map by clicking on the floor brush in the 3D View.

Double-click it to bring up its properties.


Switch to the World Model field.

We will now pick a model for this entity.

  1. Click the World Model field in the Object Properties dialog.
  2. Click the Browse button to open the model browser.


File:Hammer pickfolder sm.jpg
Double-click a folder to change to that sub-directory.

Double-click the props_c17 folder in the model browser to open the sub-directory.


File:Hammer pickfence sm.jpg
Double-click the fence01a model to select it and close the browser.


Click the Apply button to confirm your changes.

Double-click the model fence01a.jpg to select it, as shown here.

The model browser will close and the fence01a will be selected as the model for the prop_static entity.


Pick the prop_physics_multiplayer entity.


Notice how the fence model now appears in the 3D View.

Click the Apply button to commit the changes and see the results in the 3D View.

Now we'll add a prop model with physics properties.

Switch to the Entity Tool.

Choose prop_physics_multiplayer from the entity list in the Object Toolbar.


Place the prop_physics_multiplayer entity by clicking the floor in the 3D View.

Place the prop_physics_multiplayer entity into the room by clicking on the floor in the 3D View.

Now open the Object Properties dialog by choosing Properties from the Edit Menu, if it's not already open.

The Object Properties dialog will now show the parameters of the prop_physics_multiplayer entity.


File:Hammer pickbarrel sm.jpg
After clicking Browser, scroll down to the oildrum001 model, and double-click it.

Click the Browse button in the World Model field in the Object Properties dialog to bring up the model browser.

Scroll down in the browser and double-click the oildrum001.jpg in the props_c17 model directory, as shown here.


Click Apply to make the change and update the 3D View.

Click the Apply button to confirm your changes.

Notice how the barrel model model now appears in the 3D View next to the fence.


Close the Object Properties dialog.

Close the Object Properties dialog.


Moving Objects with the Grid

Switch to the Selection Tool.

You may have noticed that the fence model is stuck part-way into the floor. We need to move it up.

First, switch to the Selection Tool so we can move the object.


Select the fence model in the 3D View by clicking it.

Now select the fence model by clicking on it in the 3D View.

A yellow box will appear around the model in the 3D View, showing that you've selected it.


Click and drag the fence in the Side View to move it.

Next, we'll move the fence model in the 2D Side View, since it's easy to see how it meets the floor.

To move the fence, click anywhere side the red bounding box in the 2D View, except in the very center of the box. Then drag the mouse cursor to the new location to move it.

When you drag it, make sure you don't accidentally grab one the 4 boxes in the center of the entity. These control the distance fading of the object, and we don't want to change that.

If you accidentally alter the fade distance controls, just choose Undo from the Edit menu to revert the change.

You may find that you can't quite line up the bottom of the model with the floor. The current size of the grid prevents it. Get it close as you can, and we'll fix that next.


Decrease the size of the grid so the objects can be moved in finer steps.

For finer control, click the Smaller Grid button in the upper left corner of the Hammer window.

The size of the grid controls how objects are lined up to one another.


With the grid size smaller, the fence can be lined up with the floor.

With a smaller grid, now try moving the fence again. You can see that it's now possible to line it up with the bottom of the floor, as shown.

If you find that you still can't line up the fence with the floor, click the Smaller Grid button again.

Note: It's okay if the prop_static entity sticks into the floor a little bit.



Now onto Saving and Compiling!