Please or Register to create posts and topics.

Puzzle Maker to Hammer to Portal 2

Assuming that there may be more folks with low experiences with Valve's Hammer Editor, here a little overview of how to enhance maps created with the Portal 2 ingame Puzzle Maker.

Step 1: Create your map in the Puzzle Maker
The ingame editor is easy to use. I recommend the usage of these custom enhancements by HMW:
http://forums.thinking.withportals.com/puzzle-creator/puzzle-creator-tech-info-hacks-and-laughs-t6168-45.html
HMW's custom tools enable you to add another light source to your Puzzle Maker maps, they give a nice XOR switch and more stuff, which is really nice for Portal maps.
Do some proper play testing. The map must be fully functional before you start with the next steps. (Of course experts may even prefer to configure content in Valve's Hammer Editor - which excludes me.)
Please be aware that the lights have more contrast after the loop through Hammer. That means if there is a corner in the Puzzle Maker map which has yet just still enough light, that will become far too dark after the loop through Hammer.

Step 2: Activate the Developer Console
In Portal 2 check the keyboard options and enable the Console. I prefer to have the console's key changed to '1', because it's a single key only. Many other user - e.g. German keyboards - would require a key combination to acctivate the default key " ' ".

Step 3: Export a map created via Puzzle Maker
Load your map in the Portal 2 Editor. Rebuild, enter the map ingame and activate the developer console. Enter 'puzzlemaker_export' followed by the name of your map.
The map will be saved as vmf-file in:

Code: Select all
C:Program Files (x86)SteamSteamAppscommonportal 2sdk_contentmaps

Step 4: Enhance your map in Valve's Hammer
Download the Hammer via Steam. You can reach it via Steam Library => Tool => "Portal 2 Authoring Tools - Beta". Having loaded the map, you may proceed to replace textures. If you are open minded to spend a little more time, you could add a few statics as well. There are many tutorials around for the usage of Valve's Hammer Just google for it.
For more information about using Valve's Hammer Editor see:
http://forums.thinking.withportals.com/mapping-help/mapping-tips-and-useful-links-t468.html

Step 5: Prepare your map for upload
Execute the command 'Run map ...' while having your map loaded in Valve's Hammer. In the appearing menu click down left on 'Expert' and activate the final compilation of 'both'. This step is mandatory required to make water look good. Your map will be launched ingame. Use this for screenshots. Change the size of your screenshots to 555:312 to view your picture before being uploaded as it will become visible.
Please see the note below by Lpfreaky90, that any format will do if in 16:9 aspect ratio.
Running the map from Hammer creates a bsp-file, which is required for the upload.
Note by zivi7 - quote: If the Cave-Johnson-Line doesn't play after editing in Hammer: Double cick the entrance elevator instance and set the disable_pti_audio variable to 1. It will still not play in testruns with your locally saved map, but it will work when the map is uploaded to the workshop.

Step 6: Upload your map
Launch the binary 'p2map_publish.exe'. You find it here:

Code: Select all
C:Program Files (x86)SteamSteamAppscommonportal 2bin

Assign your favorite screenshot and the bsp-file. Add some nice descriptions and run the upload.

Here a little example of a map, which I looped through Valve's Hammer following the steps described above.

Walkthrough before loop through Hammer (Puzzle Maker only):
http://youtu.be/SVp3q9Jp0Bk

The same map after loop through Hammer (only textures had been changed):
http://youtu.be/nAD5Hoo0YS0

Feel free to visit my Steam Workshop to view more maps being processed in same manner:
http://steamcommunity.com/profiles/76561198037304681/myworkshopfiles/

BierPizzaChips wrote:
The ingame editor is easy to use. I recommend the usage of these custom enhancements by HMW:
puzzle-creator/puzzle-creator-tech-info-hacks-and-laughs-t6168-45.html

Is there a reason why you recommend this?

BierPizzaChips wrote:
Do some proper play testing.

This is the most important step: test, test, test. Try to find ways to surpass your intended solution, let some friends play it and then continue :).

BierPizzaChips wrote:
Step 2: Activate the Developer Console
In Portal 2 check the keyboard options and enable the Console. It is recommended to use the key '1' for launching the console.

??? what's wrong with ` ? There is no reason why 1 would be prefered.

BierPizzaChips wrote:
Step 3: Enhance your map in Valve's Hammer
Download the Hammer via Steam. You can reach it via Steam Library => Tool => "Portal 2 Authoring Tools - Beta". Having loaded the map, you may proceed to replace textures. If you are open minded to spend a little more time, you could add a few statics as well.

Whoa; that's really non-informative. Replace textures, add some statics. You need some hammer knowledge to even know what you're talking about, let alone how to pull it off.

BierPizzaChips wrote:
Step 4: Prepare your map for upload
Execute the command 'Run map ...' while having your map loaded in Valve's Hammer. In the appearing menu click down left on 'Expert' and activate the final compilation of 'both'. This step is mandatory required to make water look good.

A normal compile should also do this.

BierPizzaChips wrote:
Change the size of your screenshots to 555:312.

Every size will do, it will automatically be scaled down. The only thing you need is a 16:9 aspect ratio. If you have a 4:3 or 16:10 resolution you will get a bit of black below or next to your images, which doesn't really matter.

BierPizzaChips wrote:
Step 5: Upload your map
Launch the binary 'p2map_publish.exe'. You find it here:
CODE: SELECT ALL
C:Program Files (x86)SteamSteamAppscommonportal 2bin

Assign your favorite screenshot and the bsp-file. Add some nice descriptions and run the upload.

:thumbup:

BierPizzaChips wrote:
Here a little example of a map, which I looped through Valve's Hammer following the steps described above.

Walkthrough before loop through Hammer (Puzzle Maker only): /*movies*/

One thing I noticed in your new version that some area's were a lot darker, with some surfaces barely visible. Also your style is a bit of a mix of stuff:
Clean Glass, Instances like the stairs, White surfaces near the observation room and a more broken-like style for the rest. It's best to stick to one theme I think.

All in all this is not a bad tutorial but it has some errors, strange things and lacks basic information for hammer that you need to get the textures properly. So there's some more work you can do here ;)

Maybe you want to add this common problem:

If the Cave-Johnson-Line doesn't play after editing in Hammer: Double cick the entrance elevator instance and set the disable_pti_audio variable to 1. It will still not play in testruns with your locally saved map, but it will work when the map is uploaded to the workshop.

The "puzzlemaker_export" command was really nice to learn! I don't really care about the rest tho but I think it should be better if it were a tad more detailed and with links and such, then it could be really useful for beginners. And you have two "Step 2" btw ;)

I've actually been working on a series of tutorials with this theme and posting them on the Steam forums.

Hammer for PeTI Dummies Pt 1: The Basics
Hammer for PeTI Dummies Pt 2: Cameras and Placement Helpers
Hammer for PeTI Dummies Pt 3: Textures and Overlays

These are NOT intended as comprehensive tutorials to teach people how to design maps in Hammer. Rather, they're aimed at people who want to design their maps in the puzzle maker and then give them some commonly-requested finishing touches in Hammer, but who don't have the time or inclination to master it. I do try to give enough of a solid foundation to explore Hammer further if they so desire, but I'm not, for example, teaching them all the different features of the Camera or Texture Application tools, the differences between decals and overlays, or how to optimize visleaves.

I just wanted to add two related issues that can happen after exporting from the Puzzlemaker and editing in Hammer:

You spawn in total blackness and hear a falling sound. Or you spawn so that half the screen is outside the map, the other half inside.

Appearantly both problems can be solved by grabbing everything in the map (drag a rectangle around it in the 2D views and press Enter) and moving it away from the origin (the spot where the blue lines of the 2D view hit each other or the green/red/blue cross in 3D-view) a bit.

Edit:

Xtreger reports a problem after having different distances from the origin. Suddenly all the instances were lost. It's probably better to save a backup before attempting to move the map contents.

I was having the problem where "You spawn in total blackness and hear a falling sound" but dragging everything did not work. What happened was, I accidentally turned on radius culling. I turned it off by clicking the R with a red circle around it on the toolbar, and then everything started working again.