- Sep 10, 2016
- 628
- 478
Hammer++'s Propper++ is a fantastic integration and expansion of a well-known community utility known as Propper, used to turn brushes into props.
There are many reasons to do this - usually for dodging engine limits moreso than for the actual beauty of your map.
But for me, the best use of Propper++ is several things it's able to do with existing props:
This can be avoided when using a brush model with the origin keyvalue, but props have no such keyvalue, and so this becomes unavoidable with props.
This in turn means that a prop which once had a sensible origin can now become nearly impossible to align with brush geometry, or even to align with its equivalent in the pre-existing VMF!
It's been well-known for a while now that you can use a brush covering the prop to forcefully override its origin, but the issue with that is that the brush is required to be textured on at least two opposing faces, otherwise it just gets deleted (if using "Skip Nodraw Faces") and the origin goes back to what it would've been without the brush there.
This basically necessitates the following:
Here's an example VMF where I'm combining three of models/props_trainyard/blast_furnace001.mdl:
I want the origin to be at the bottom centre of these three props, since it's at the bottom centre of this prop normally.
So I'll make a brush that blankets the trio, which is textured on the top and bottom and has a bit of padding at the bottom so its centre is at my desired origin coordinate:
Lookin' good! If I now press Ctrl-G (to group the brush and props) and make it a model, the origin will be where I want it to be.
Now time for the magic part:
1) Select the top four vertices of the brush in Vertex Edit mode:
2) Hit Alt-E to open the Vertex Scaling dialogue:
3) Move the little circle that has now appeared in the centre of your vertices to the bottom left corner of your vertices in the 2D Top view:
4) Change the scale to an EXTREMELY small number such as 0.00000000001 and hit OK:
5) Select the bottom four vertices of our brush:
6) Hit Alt-E and move the white circle to the top right corner of the four vertices in the 2D Top View:
7) Use the same scale as before and hit OK:
You've now created the eponymous "Magic Matchstick" - a brush with no width, but still meeting all the criteria the original brush did, having the exact same bounding box, and textures on the "top" and "bottom".
This brush is now utterly invalid, so it's difficult to select and will be deleted if you save and load the VMF - however, it's still grouped with the props, so we can still make a Propper++ prop with it!
This brush won't cast any shadows, and its faces won't take up any space in the generated lightmap atlas. You can't even see it in the 3D Wireframe view of the prop!
Now that I've generated the prop, you can see that its origin is as I desired it to be:
ficool2, if you read this, please add options to have the pivot of the current selection or (0, 0, 0) of the current VMF act as the generated prop's origin, so no one ever has to do this arcane BS again.
And you, reader, thank you for your time! I hope this tip enables you to combine props in a much more sensible way than you'd otherwise have to.
There are many reasons to do this - usually for dodging engine limits moreso than for the actual beauty of your map.
But for me, the best use of Propper++ is several things it's able to do with existing props:
- Resize a static prop by turning it into a prop_dynamic with a new scale and then using Propper++ to make it into a new static prop
- Generate a lightmappable UV for a prop that didn't have one before
- Assign a brush-based collision model to a prop that lacked one
- Combine several props together
This can be avoided when using a brush model with the origin keyvalue, but props have no such keyvalue, and so this becomes unavoidable with props.
This in turn means that a prop which once had a sensible origin can now become nearly impossible to align with brush geometry, or even to align with its equivalent in the pre-existing VMF!
It's been well-known for a while now that you can use a brush covering the prop to forcefully override its origin, but the issue with that is that the brush is required to be textured on at least two opposing faces, otherwise it just gets deleted (if using "Skip Nodraw Faces") and the origin goes back to what it would've been without the brush there.
This basically necessitates the following:
- The brush needs to be MASSIVE so that there's no chance of players seeing the textured faces on the outside
- The textured faces need to be somewhere where they won't cast shadows
- The textured faces ideally should be as small as possible if generating a lightmap atlas so they don't steal atlas space from the actual props
Here's an example VMF where I'm combining three of models/props_trainyard/blast_furnace001.mdl:
I want the origin to be at the bottom centre of these three props, since it's at the bottom centre of this prop normally.
So I'll make a brush that blankets the trio, which is textured on the top and bottom and has a bit of padding at the bottom so its centre is at my desired origin coordinate:
Lookin' good! If I now press Ctrl-G (to group the brush and props) and make it a model, the origin will be where I want it to be.
Now time for the magic part:
1) Select the top four vertices of the brush in Vertex Edit mode:
2) Hit Alt-E to open the Vertex Scaling dialogue:
3) Move the little circle that has now appeared in the centre of your vertices to the bottom left corner of your vertices in the 2D Top view:
4) Change the scale to an EXTREMELY small number such as 0.00000000001 and hit OK:
5) Select the bottom four vertices of our brush:
6) Hit Alt-E and move the white circle to the top right corner of the four vertices in the 2D Top View:
7) Use the same scale as before and hit OK:
You've now created the eponymous "Magic Matchstick" - a brush with no width, but still meeting all the criteria the original brush did, having the exact same bounding box, and textures on the "top" and "bottom".
This brush is now utterly invalid, so it's difficult to select and will be deleted if you save and load the VMF - however, it's still grouped with the props, so we can still make a Propper++ prop with it!
This brush won't cast any shadows, and its faces won't take up any space in the generated lightmap atlas. You can't even see it in the 3D Wireframe view of the prop!
Now that I've generated the prop, you can see that its origin is as I desired it to be:
ficool2, if you read this, please add options to have the pivot of the current selection or (0, 0, 0) of the current VMF act as the generated prop's origin, so no one ever has to do this arcane BS again.
And you, reader, thank you for your time! I hope this tip enables you to combine props in a much more sensible way than you'd otherwise have to.