Propper: Difference between revisions
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
* Respects Hammer smoothing groups or autosmooth. | * Respects Hammer smoothing groups or autosmooth. | ||
* Configure your prop from within Hammer. | * Configure your prop from within Hammer. | ||
* Displacement support--outputs any displacement surface you can make (not solid). | |||
* skins support--use multiple textures on the same prop. | |||
==Future planned features== | ==Future planned features== | ||
* Output multiple models out of one map | * Output multiple models out of one map | ||
* Automatic culling of invisible faces | * Automatic culling of invisible faces | ||
Line 25: | Line 26: | ||
==Download== | ==Download== | ||
A public beta release is now available! | A public beta release is now available! | ||
[http://crazycarl.hl2sm.com/files/propper_0. | [http://crazycarl.hl2sm.com/files/propper_0.22.zip h http://crazycarl.hl2sm.com/files/propper_0.22.zip] | ||
==Bug reports== | ==Bug reports== | ||
* The EP1 version of the tool won't create the folders it needs, and will quit if you don't make them beforehand. So make them beforehand. | * The EP1 version of the tool won't create the folders it needs, and will quit if you don't make them beforehand. So make them beforehand. | ||
* If you run the tool on a map with no brushes (displacements don't count), Propper will crash. This is an obscure bug from vbsp and I haven't managed to track it down yet. If you encounter this bug, just stick a nodraw, func_detailed brush in the map. | |||
==Installation== | ==Installation== | ||
Line 48: | Line 45: | ||
To use Propper, copy some geometry from your map and paste it into a new Hammer file. | To use Propper, copy some geometry from your map and paste it into a new Hammer file. | ||
There are | There are three included entities. The first, info_prop_options, is strongly recommended (though the model will compile without it). | ||
Put it in the map and look at its properties: | Put it in the map and look at its properties: | ||
< | <table border cellspacing=0 width=80% > | ||
Name | <tr><td>Name</td><td>The name that other entities refer to this entity by. (not used by propper)</td></tr> | ||
Origin (X Y Z) | <tr><td>Origin (X Y Z)</td><td>The position of this entity's center in the world. Rotating entities typically rotate around their origin.</td></tr> | ||
Model Name | <tr><td>Model Name</td><td>The directory and name of the finished model. Relative to <yourmod>/models</td></tr> | ||
Material path | <tr><td>Material path</td><td>Where the model's textures will be. Relative to <yourmod>/materials. Make sure this folder exists before running!</td></tr> | ||
Scale | <tr><td>Scale</td><td>Scale the model up or down by this factor.</td></tr> | ||
Surface property The physical properties of the model--affects impact sounds and weight for physics props. | <tr><td>Surface property</td><td>The physical properties of the model--affects impact sounds and weight for physics props.</td></tr> | ||
Concave collisions Used to make a concave collision model. If you choose no, the model will be 'shrink-wrapped'. | <tr><td>Concave collisions</td><td>Used to make a concave collision model. If you choose no, the model will be 'shrink-wrapped'.</td></tr> | ||
Produce collisions? Picking Yes allows the prop to be solid. | <tr><td>Produce collisions?</td><td>Picking Yes allows the prop to be solid.</td></tr> | ||
Smoothing mode | <tr><td>Smoothing mode</td><td>Determines how vertex normals are computed for lighting.</td></tr> | ||
Source folder | <tr><td>Source folder</td><td>Where you want to keep your .qc and .smd files. The final directory will be <sourcefolder>/<modelname>. Make sure this folder exists before running!</td></tr> | ||
Smoothing threshold If auto-smooth is enabled, Edges flatter than this angle will appear smooth. Pick from 0 to 180. | <tr><td>Smoothing threshold</td><td>If auto-smooth is enabled, Edges flatter than this angle will appear smooth. Pick from 0 to 180.</td></tr> | ||
Snap to Hammer | <tr><td>Snap to Hammer</td><td>Causes every vertex to be snapped to the nearest grid point.</td></tr> | ||
Welding threshold Vertices will be snapped together if within this tolerance. A value of 0 is not recommended because there may be visible gaps in | <tr><td>Welding threshold</td><td>Vertices will be snapped together if within this tolerance. A value of 0 is not recommended because there may be visible gaps in the mesh. Larger numbers will merge vertices together, and may be useful for optimizing your model.</td></tr> | ||
Model Origin | <tr><td>Model Origin</td><td>The model's origin point defines how it is lit and is how the prop is positioned in a map. Auto-center puts the model's origin at the center of its bounding box and is recommended for physics props. For static props, put the origin somewhere that lets you align the prop easily.</td></tr> | ||
Automatically compile By default, propper will run studiomdl to compile the prop. You can disable this. | <tr><td>Automatically compile</td><td>By default, propper will run studiomdl to compile the prop. You can disable this.</td></tr> | ||
Fix up materials By default, propper will make a copy of any material used in the prop and make it valid for use on a model. You can disable this. | <tr><td>Fix up materials</td><td>By default, propper will make a copy of any material used in the prop and make it valid for use on a model. You can disable this.</td></tr> | ||
</ | <tr><td>Don't warp displacement textures</td><td>In Hammer, when you move a displacement point, the texture moves with it. If you pick yes, the texture stay in place.</td></tr> | ||
</table> | |||
There's also info_prop_physics. If you place this entity in your map, Propper will produce a | There's also info_prop_physics. If you place this entity in your map, Propper will produce a | ||
physics prop. See [[Prop data]] for documentation on the following. | physics prop. See [[Prop data]] for documentation on the following. | ||
< | <table border cellspacing=0 width=80% > | ||
Name | <tr><td>Name </td><td>The name that other entities refer to this entity by. (not used by propper)</td></tr> | ||
Origin (X Y Z) | <tr><td>Origin (X Y Z)</td><td>The position of this entity's center in the world. Rotating entities typically rotate around their origin. (not used by propper)</td></tr> | ||
Health preset | <tr><td>Health preset</td><td>Dictates how strong the prop is vs. different weapons.</td></tr> | ||
Health | <tr><td>Health</td><td>Overrides the prop's health. Setting this to 0 will make the prop unbreakable. -1 will use the default value from "Health preset"(recommended).</td></tr> | ||
Mass | <tr><td>Mass</td><td>Weight of the prop in kg. Enter zero or lower to automatically calculate mass.</td></tr> | ||
Flammable | <tr><td>Flammable</td><td>Will it burn? Picking this enables the 'ignite' options.</td></tr> | ||
Ignite at half-health Just like those barrels in HL2. | <tr><td>Ignite at half-health</td><td>Just like those barrels in HL2.</td></tr> | ||
Ignite from explosions Won't break right away if something explodes near it, but will ignite. | <tr><td>Ignite from explosions</td><td>Won't break right away if something explodes near it, but will ignite.</td></tr> | ||
Explode damage | <tr><td>Explode damage</td><td>Damage to do when breaking</td></tr> | ||
Explode radius | <tr><td>Explode radius</td><td>Radius of explosion</td></tr> | ||
Gibs | <tr><td>Gibs</td><td>Generic shards to spawn when the prop breaks</td></tr> | ||
Gib count | <tr><td>Gib count</td><td>How many gibs?</td></tr> | ||
Gib skin | <tr><td>Gib skin</td><td>Which skin to use on the gib models, if applicable.</td></tr> | ||
</ | </table> | ||
You run Propper just like vbsp. Pass it the current game directory and your vmf file. | You run Propper just like vbsp. Pass it the current game directory and your vmf file. | ||
propper.exe -game D:\Steam\SteamApps\SourceMods\FortressForever C:\Users\Carl\Desktop\testmap.vmf | propper.exe -game D:\Steam\SteamApps\SourceMods\FortressForever C:\Users\Carl\Desktop\testmap.vmf | ||
Propper will compile the model automatically unless you disable that function. | Propper will compile the model automatically unless you disable that function. | ||
New in version 0.22 is propper_skins. Propper can create alternate skins by replacing a texture that is on your prop. If you have multiple textures on your model that you want to change, you can use this entity more than once. | |||
</p> | |||
<table border cellspacing=0 width=80% > | |||
<tr><td>Name</td><td>The name that other entities refer to this entity by. This is not used, but will be in the future.</td></tr> | |||
<tr><td>Material</td><td>Pick a texture that's present in the original model. This will be skin 0.</td></tr> | |||
<tr><td>Skin(1-14)</td><td>This texture will replace the original when you pick skin #.</td></tr> | |||
</table> | |||
You can run Propper from within Hammer. Just create a new Run configuration and run propper instead of vbsp. | You can run Propper from within Hammer. Just create a new Run configuration and run propper instead of vbsp. | ||
Line 99: | Line 105: | ||
==Tips/Caveats== | ==Tips/Caveats== | ||
* You can use visgroups to hide brushes; They will be ignored by Propper. | * You can use visgroups to hide brushes; They will be ignored by Propper. | ||
* If you make any brushes func_detail, they will be non-solid in the finished prop. Using any other entity seems to cause problems, however. | * If you make any brushes func_detail, they will be non-solid in the finished prop. Using any other entity seems to cause problems, however. | ||
* Don't set "materialpath" to the same folder as any of your map textures. The model materials may overwrite your map materials! It's best to follow the convention of putting model textures under "models\" | * If you use certain invisible textures (eg. clip, nodraw, sky), on a face, that face will be solid, but invisible. This is useful when creating a physics mesh. | ||
* Propper will over-write files without asking, so make sure there are no files you want to | * When creating the collision mesh for a model, you are limited to about fourty brushes. After that you will begin to see errors. For very complex models, it's best to make a very simple version of your prop to act as the physical model. | ||
* As always, it's better to use as few brushes as possible, and use nodraw wherever you can. | |||
* Hammer limits you to its one-unit grid while you work. However, you can make your model at a larger scale--say, 16:1--and then tell propper to scale it down to the correct size. That would allow you to model objects as small as 1/16 inch. | |||
* Don't set "materialpath" to the same folder as any of your map textures. The model materials may overwrite your map materials! It's best to follow the convention of putting model textures under "models\" | |||
* Propper will over-write files without asking, so make sure there are no files in your selected folders that you don't want to lose. | |||
Texture alignment may not always be perfect but it is very close to the original. | |||
==Source Code Patches== | ==Source Code Patches== | ||
Line 112: | Line 121: | ||
Then download one of my patch files:<br> | Then download one of my patch files:<br> | ||
[http://crazycarl.hl2sm.com/files/ | [http://crazycarl.hl2sm.com/files/vbsptopropper_b22_OB.patch http://crazycarl.hl2sm.com/files/vbsptopropper_b22_OB.patch] for Orange box, or <br> | ||
[http://crazycarl.hl2sm.com/files/ | [http://crazycarl.hl2sm.com/files/vbsptopropper_b22_EP1.patch http://crazycarl.hl2sm.com/files/vbsptopropper_b22_EP1.patch] for EP1. | ||
Follow these instructions for [[Setting up Tortoise SVN to apply a Patch]], substituting the vbsp folder for the game code. Your vbsp source code is now the source code for Propper. Edit and compile it as you wish. | Follow these instructions for [[Setting up Tortoise SVN to apply a Patch]], substituting the vbsp folder for the game code. Your vbsp source code is now the source code for Propper. Edit and compile it as you wish. |
Revision as of 13:56, 12 January 2010
Introduction
Propper is an edited version of vbsp that outputs a model instead of a bsp.
Many mappers need to make props for their maps, but don't want to learn a separate modeling program. This tool allows them to make models in Hammer in a one-step process. It's also useful to modelers who work with mappers. No other method of .vmf export keeps texture mapping intact, or auto-generates a physics mesh.
Features
- Can create static props or physics props
- Generates a .qc file and automatically compiles the prop for use in your game.
- Generates a working physics mesh.
- Automatic material conversion--Turns map textures into valid model textures.
- Distinguishes between real textures and "tool" textures.
- Respects Hammer smoothing groups or autosmooth.
- Configure your prop from within Hammer.
- Displacement support--outputs any displacement surface you can make (not solid).
- skins support--use multiple textures on the same prop.
Future planned features
- Output multiple models out of one map
- Automatic culling of invisible faces
- Breakable models with custom gib creation.
- LOD support.
Download
A public beta release is now available! h http://crazycarl.hl2sm.com/files/propper_0.22.zip
Bug reports
- The EP1 version of the tool won't create the folders it needs, and will quit if you don't make them beforehand. So make them beforehand.
- If you run the tool on a map with no brushes (displacements don't count), Propper will crash. This is an obscure bug from vbsp and I haven't managed to track it down yet. If you encounter this bug, just stick a nodraw, func_detailed brush in the map.
Installation
There are two versions of propper included. One is for the Episode 1 SDK, and the other is for the Orange Box SDK. A .fgd (Forge Game Data) file is included for both, to help you configure your props.
The folders in this ZIP file mirror the folders in the SDK. For best results, unzip the file to your steamapps\<username> folder, and let your zip utility keep directories intact.
Directions
After installing, you should change your game configuration a bit. Open Hammer under the game with which you will use Propper, and click Tools:Options.
Find the section for "Game Data Files", and click the "Add" button. Open propper.fgd when prompted (It will be right there if you installed correctly). Then Click OK or Apply to save the settings. Then restart Hammer so the settings take effect.
To use Propper, copy some geometry from your map and paste it into a new Hammer file. There are three included entities. The first, info_prop_options, is strongly recommended (though the model will compile without it).
Put it in the map and look at its properties:
Name | The name that other entities refer to this entity by. (not used by propper) |
Origin (X Y Z) | The position of this entity's center in the world. Rotating entities typically rotate around their origin. |
Model Name | The directory and name of the finished model. Relative to <yourmod>/models |
Material path | Where the model's textures will be. Relative to <yourmod>/materials. Make sure this folder exists before running! |
Scale | Scale the model up or down by this factor. |
Surface property | The physical properties of the model--affects impact sounds and weight for physics props. |
Concave collisions | Used to make a concave collision model. If you choose no, the model will be 'shrink-wrapped'. |
Produce collisions? | Picking Yes allows the prop to be solid. |
Smoothing mode | Determines how vertex normals are computed for lighting. |
Source folder | Where you want to keep your .qc and .smd files. The final directory will be <sourcefolder>/<modelname>. Make sure this folder exists before running! |
Smoothing threshold | If auto-smooth is enabled, Edges flatter than this angle will appear smooth. Pick from 0 to 180. |
Snap to Hammer | Causes every vertex to be snapped to the nearest grid point. |
Welding threshold | Vertices will be snapped together if within this tolerance. A value of 0 is not recommended because there may be visible gaps in the mesh. Larger numbers will merge vertices together, and may be useful for optimizing your model. |
Model Origin | The model's origin point defines how it is lit and is how the prop is positioned in a map. Auto-center puts the model's origin at the center of its bounding box and is recommended for physics props. For static props, put the origin somewhere that lets you align the prop easily. |
Automatically compile | By default, propper will run studiomdl to compile the prop. You can disable this. |
Fix up materials | By default, propper will make a copy of any material used in the prop and make it valid for use on a model. You can disable this. |
Don't warp displacement textures | In Hammer, when you move a displacement point, the texture moves with it. If you pick yes, the texture stay in place. |
There's also info_prop_physics. If you place this entity in your map, Propper will produce a physics prop. See Prop data for documentation on the following.
Name | The name that other entities refer to this entity by. (not used by propper) |
Origin (X Y Z) | The position of this entity's center in the world. Rotating entities typically rotate around their origin. (not used by propper) |
Health preset | Dictates how strong the prop is vs. different weapons. |
Health | Overrides the prop's health. Setting this to 0 will make the prop unbreakable. -1 will use the default value from "Health preset"(recommended). |
Mass | Weight of the prop in kg. Enter zero or lower to automatically calculate mass. |
Flammable | Will it burn? Picking this enables the 'ignite' options. |
Ignite at half-health | Just like those barrels in HL2. |
Ignite from explosions | Won't break right away if something explodes near it, but will ignite. |
Explode damage | Damage to do when breaking |
Explode radius | Radius of explosion |
Gibs | Generic shards to spawn when the prop breaks |
Gib count | How many gibs? |
Gib skin | Which skin to use on the gib models, if applicable. |
You run Propper just like vbsp. Pass it the current game directory and your vmf file.
propper.exe -game D:\Steam\SteamApps\SourceMods\FortressForever C:\Users\Carl\Desktop\testmap.vmf
Propper will compile the model automatically unless you disable that function.
New in version 0.22 is propper_skins. Propper can create alternate skins by replacing a texture that is on your prop. If you have multiple textures on your model that you want to change, you can use this entity more than once.
Name | The name that other entities refer to this entity by. This is not used, but will be in the future. |
Material | Pick a texture that's present in the original model. This will be skin 0. |
Skin(1-14) | This texture will replace the original when you pick skin #. |
You can run Propper from within Hammer. Just create a new Run configuration and run propper instead of vbsp.
You should now have a new prop available to you! If you are replacing an existing model, you may have to restart Hammer to see the changes.
Tips/Caveats
- You can use visgroups to hide brushes; They will be ignored by Propper.
- If you make any brushes func_detail, they will be non-solid in the finished prop. Using any other entity seems to cause problems, however.
- If you use certain invisible textures (eg. clip, nodraw, sky), on a face, that face will be solid, but invisible. This is useful when creating a physics mesh.
- When creating the collision mesh for a model, you are limited to about fourty brushes. After that you will begin to see errors. For very complex models, it's best to make a very simple version of your prop to act as the physical model.
- As always, it's better to use as few brushes as possible, and use nodraw wherever you can.
- Hammer limits you to its one-unit grid while you work. However, you can make your model at a larger scale--say, 16:1--and then tell propper to scale it down to the correct size. That would allow you to model objects as small as 1/16 inch.
- Don't set "materialpath" to the same folder as any of your map textures. The model materials may overwrite your map materials! It's best to follow the convention of putting model textures under "models\"
- Propper will over-write files without asking, so make sure there are no files in your selected folders that you don't want to lose.
Texture alignment may not always be perfect but it is very close to the original.
Source Code Patches
The source code for Propper is available as a patch to Valve's SDK code. (Since Propper is a hacked version of vbsp.exe, I don't want to release the entire code--most of it belongs to Valve).
First create a new mod through the Source SDK (either OrangeBox or Ep1). Find the project for vbsp. Visual C++ Express 2008 can compile this project with no problems. If you select the "Release" version, you will create a new vbsp.exe.
Then download one of my patch files:
http://crazycarl.hl2sm.com/files/vbsptopropper_b22_OB.patch for Orange box, or
http://crazycarl.hl2sm.com/files/vbsptopropper_b22_EP1.patch for EP1.
Follow these instructions for Setting up Tortoise SVN to apply a Patch, substituting the vbsp folder for the game code. Your vbsp source code is now the source code for Propper. Edit and compile it as you wish.
Disclaimer
This program is largely untested, so if you send it something it doesn't expect, it'll probably screw up. That said, it's based on vbsp, which we all know and trust not to destroy our PCs. That said, use at your own risk.