HammUEr, a Hammer/Worldcraft map importer for Unreal Engine

Seems to work for me. Had a few crashes earlier on but I was probably doing something stupid, its been fine for the last couple uses.

Does anyone know how I could make the displacement polygons appear smooth in UE4? Currently it looks something like this: http://i.imgur.com/oP6uFMY.png (low poly style) Curious if there’s anything I can do with materials or the export to smooth it out? I guess I could open the mesh and NURBS it but I was hoping for a more automated / generic solution.

Also I see that it can load the displacement vertex painting (alpha stuff), when I’ve painted it in Hammer and import, that mesh only imports with one material. I was assuming it would give the option of two materials (for alpha 0 and 1). Or is it a parameter I have to make use of in a UE4 material?

I’m going to wait on that until Valve themselves have done more with it, I’m afraid.
As far as I know, it’s still terribly beta.

Displacement polygons use the per-quad normals Hammer generated for the displacements.
I guess I could add some option to recalculate all the normals per mesh?
This would smooth the hell out of everything, so I’d have to probably do it only for displacements?

For the displacement meshes with alpha blending, you basically need to generate a new material yourself and assign it to the mesh’s first slot.
It looks something like this:


Where you link the channel you used for displacement alpha (alpha by default) from the Vertex Color to Lerp alpha pin.

What version of hammer can we use to make commercial games that are not tied to Valve or Source engine ? it is any violation rights ?
What version can support any texture sizes ?
If it imports all brushes as one mesh only, we loose all culling engine UE4 benefit ?

I’m not a lawyer, but…
Using your own maps & textures/maps & textures you have permission to use, no.
If you just convert maps/textures from other games and use them without permission, then yes, you’re almost certainly violating someone’s rights.

It’s actually quite functional/stable with little to no bugs. Currently I’m only interested in getting the “brush” and textures from it into UE4. Check out my “review” of it here: Index

Ah ok thanks, that looks like a good & simple way of doing it.

I’m not sure I understand how that would work. Wouldn’t it need to import more polygons to get it to look smooth within UE4? Or can that be faked with smoothed/blended normals? I guess it could also be saved within the UV (like the vertex color thing above) and plugged into the world displacement.

I mean using maps made using Hammer Valve’s tool and using them with another engine than Valve’s one i don’t think it is permitted.
This is rights violation.

  1. No.
  2. Yes we loose all culling possibilities.

From a quick browse of the internet, the format isn’t solidified yet, and there’s multiple versions out there.
Not only that, but as I said, it’s purely mesh based and not BSP like older Source/Quake-derived engines, and the file format is a horrible mess, so yeah, at the moment, I’m just going to say no, sorry.

Basic normal smoothing algorithm (Gouraud): calculate the normals for each face of the mesh, and for each vertex, take the normals of the faces connected to it, then average them by number of faces connected to that vertex.
It’ll smooth out the lighting, which at the moment is using only the face normals. The larger your faces, the easier it is to spot that they’re all flat shaded per face and the ‘harder’ the difference between the shades.

Like I said, I’m not a lawyer.
If you’re worried about it though, try using Trenchbroom or Jackhammer instead?

Just need to figure out scale… the default ‘100’ makes an imported insurgency map too small, trying the 2.54 metric conversion makes it huge… confusing, smaller number, bigger map. Oh well.

I had the same issue as you in the tutorial where it did not assign materials. Even manually assigning them … they didn’t show up.

You should put a note saying the content made using Hammer editor and imported in Unreal 4 with your plugin, can’t be used commercialy for a game using Unreal 4 engine.
This is the minimum warning you should put on your plugin for people buying it.

You did use 39.37, right, and not 2.54?
Because 100 means 1 hammer unit = 1 cm.
Since you want 1 hammer unit to be 2.54 cm, you want 100 cm to be 39.37 hammer units.

Weird. Did you import your materials first?
I just did it again from scratch with the Doom3 textures and my first attempt at reading a map, and it found the materials and assigned them without problems.

Except that this is not necessarily the case! Unless you *are *a lawyer with knowledge specifically of the license agreements involved in the various versions of Hammer. In any case, I would put money on Valve not caring, and if you’re worried you can use one of several open-source Hammer equivalents.

Genuinely hoping this doesn’t come off prickly, but: could folks other than Turfs and I please refrain from answering support questions on this plugin until it’s been out for a while? Otherwise incorrect information is going to happen. In any case, answer 1 here is not clear and answer 2 is not correct. Real answers below:

1: Valve Hammer Editor (Source Engine version) doesn’t support “all texture sizes” (nothing does :P) but I don’t think it has any prescribed limits - certainly it works up to 4096. However, it does have a tendency to crash when attempting to view too many high res textures at once in the Texture Browser. You can work around this by not using super broad search terms, and using large thumbnails in the texture browser so it doesn’t load many at once.

2: No culling functionality is lost. The plugin doesn’t import everything in the map as a single mesh, unless you specifically ask it to (by grouping everything). The default behavior will produce a map made out of many static meshes, which is UE4’s ideal scenario basically (For something that’s shipping, you will want to selectively group brushes though).

The default 100 is “100 Hammer units to 100 Unreal centimeters”. Lowering it to 50 will make the resulting map larger (still slightly smaller than would be “correct” for Default Unreal Guy).

got detailed on this above, but the simple answer is: no, the normals are what determines whether the mesh looks smooth or not, you don’t need any extra polys. Good catch on the flat normals on displacements!

I feel like this would be a good candidate for allowing the user to set that through the func_hammuer entity we discussed (note to other people: not a current feature)

Also, Hammer has a smoothing groups function in the texture application tool, for letting brushes use smoothed normals on things like cylinders and arches and whatnot. It’d be good if you could hook into that.

Yeah, imported the whole load of them from insurgency. Took forever.

I made a test map with Hammer for that, added some of the default textures just to do something small to test (rather than a huge map)… same thing, when I click open, all materials are set to none… even though it is the same textures. eh, not a big worry.

But I was wondering, if this makes instances for each material, how do we get the normals in there as well? would have to set the parent material with a materialexpressiontexture just like for the base color I am guessing, and manually go in and set the normals… hmm…

Will look into this.

Weird. It’s supposed to look on complete match (including directories) and partial match (just /texturename).
Can you turn on verbose debug in ConfigUEr and send the log?

At the moment… yes, basically.
I’m thinking of adding an option for automatically finding a normal chain parameter and populating it, but I’m still looking at how normal textures are named. Would probably need an editable list of things at the end of actual normal texture file names (_n, _normal, _s, what have you, since nobody seems to agree on what to name them) so I can find them.

To answer my own question… yes…

Here is my ‘test’ material that is the base material class…

Of course things set to parameters, then in the instance you can mess with the B channel of that 3vector, and change the strength of the normal as well… here is B set at 1.0

ok, now the forum will not let me upload the other images… but 1.0 setting is normal of course, go lower to make it ‘stronger’… higher to make it ‘weaker’…

Since the steampipe update all Valve games use VPK’s and have their own Hammer in the BIN folder i.e Gmod HL2 +ep 1,2 and TF2, CSS

Will look into this and import another test map with that on…

or not, as it worked when I tried it again to capture the log for you. Figures.