How to convert your surf ramps into model's - by CHECK EM
While I'm explaining this using surfs, this will also work with any brushwork you may want to turn into a model.
So there are a number of reasons you might want to make your surf ramps into models. A few of those reasons are
-You can make your surfs more detailed.
-It uses less resources allowing for a more detailed map.
-Your ramps won't corrupt in hammer on save.
-It (seems to) makes them smoother.
-Better performance in game.
As you can see there are a lot of advantages to be had from converting your surf ramps into models. This is a (kinda) long process and I'll go over every detail I can to ensure you know exactly what I've done and how I've done it. I'll try not to leave anything out.
Alright to start off, you'll need to download a program called Propper, which you can download Here
It's crucial that you export all the files to the right path, so follow the extraction directions in the readme.
Once you have Propper extracted, you're ready to go.
Open up hammer, go to Tools -> Options. We need to add the Propper fgd so that we can use the Propper entities. Next to Game Data files, click Add. Find Propper.fgd and click Open. (this should be in "sourcesdk\bin\orangebox\bin") Now click apply and OK.
For this tutorial, you should already have your ramps made. if you don't know how to create a bug free ramp, check out my tutorial Here
So now that we have our ramp created, we're ready to convert. Select your ramp and press Ctrl + t. From the drop down menu of the Object Properties, find propper_model and click apply. These are the settings I'm using and I'll explain to you why
(I also want to point out here that propper works better if your ramps are in an empty vmf. So just copy them from your map and paste into an empty vmf file.)
Alright, so first we have the Name property. This is NOT what your surf ramp model will be named, I don't even think you need to have anything in this field but I do anyways because it helps you find your source brushes more easily.
Next is the Model Name. This is what your model will be named, in my case ramp01.mdl will be the name, and it will be created in the "models/props/tutorial_ramp" folder. You can use whatever you want for the path but just remember it will always end up in the models folder, so I suggest a sub-folder with the name of your map.
Next is the Material path. This is where your models materials will go. You need to set this even if you use default textures. The pathing is the same as the Model Names but only this time they will be put in the Materials folder.
Lastly is the Physics mesh. This one is important. Whatever you have in the Physics mesh property value is what will become the solid part of the model. If you convert into a model with nothing in this field, your model will not be solid and you'll fall right through it.
So now we want to setup the Physics mesh. Select your ramp and duplicate it. Texture the entire thing with the Player Clip texture.
Turn the ramp with the Player Clip texture into a func_brush by pressing Ctrl + t and finding func_brush from the drop-down menu.
You want to give this func_brush a name. Whatever name you pick is what's going to be in the Physics mesh property in the Propper_model.
Place the func_brush perfectly on top of the Propper_model and place their origins in the exact same spot. (i suggest the bottom or top of the surf on a grid point)
So now that I have my Propper_model and my func_brush all setup and their origins in the same spot, I'm ready to convert.
Save your surf ramp VMF file and close hammer.
Before we run Propper we have to create some folders manually. Propper won't create them for some reason and will give you and error unless they already exist.
Manually create the folders "C:\propsource\props"
I'm also going to create the folder "C:\propsource\props\tutorial_ramp" because that's what folder I set in my Model name under my Propper_model properties. You'll need to create this folder and name it according to what path you chose.
The next thing we're going to do is create a .bat file for Propper. Open up notepad and add these lines (change the directories based on where the files are on your computer.)
cd C:\Program Files\Steam\steamapps\STEAMACCT\sourcesdk\bin\source2007
"C:\Program Files\Steam\steamapps\STEAMACCT\sourcesdk\bin\source2007\bin\propper.exe" -game "C:\Program Files\Steam\steamapps\STEAMACCT\counter-strike source\cstrike" %1
It is absolutely essential that you get these paths CORRECT. Your paths may be a lot different than mine are, so make sure these are absolutely correct or else you'll get errors.
Go to File -> Save As. Select All Files from the Save as type drop-down menu, name it Propper.bat and click save.
Next you need to find your surf ramp VMF file. Drag and drop it onto the Propper.bat file you just made.
If you did everything correctly and followed this guide to a point, you should now have a surf model ready for use.
Open hammer back up and open your main map file. Create an entity prop_static, under the properties select world model and click Browse. Give it a minute or two to load all of the models.
Depending on what directory you had set in your Model name in your Propper_model, navigate to the correct directory and your model should show up in there. (mine is in the props\tutorial_ramp folder)
Select your model and press OK. Now press Apply on the prop_static.
(left is my Propper_model with my func_brush, right is the finished model)
Now just rotate your model and place it where you want. And that's it, you've just made a surf ramp into a model.
The last thing you need to do is add a couple of parameters to your $light_exe compile command.
Click Run Map, find $light_exe and add -staticproplighting -staticproppolys -nossprops. This is so the model lights up correctly and looks like it would if it were a normal brush.
I also want to point out that it's better to make straight portions of your surfs collision model into brush work rather than models. This means you'd have your surf made, copy it and make the whole thing Player Clip (this is your collision) and delete the portions of it that are flat. (don't delete anything of the Propper_model) Once you compile the model, those portions of the model will not be solid, so create a brush to fill in the gap.
Feel free to leave me feedback and any questions you may have in the comments. Happy mapping!
Thanks to nyro for helping me figure out Propper, although our methods are different, I feel this is the easiest and fastest way of creating bug-free, optimized surf ramps.