Talk:Hammer++/Propper++
Snap to Grid
In old Propper there was an option to snap resulting prop to grid for ease of placement. In Propper++ this setting is mysteriously absent. Does anyone know how to either turn it on by default or maybe hack it in somehow idk
My door frames made from brushes are becoming more and more difficult to align with the doors... --A straight white male (talk) 06:34, 6 October 2024 (PDT)
- The snap-to-grid in Propper was a workaround for how regular VMFs don't store vertex data, so there was some precision loss that could result in misaligned vertices. This isn't a problem for Propper++, which uses Hammer++'s vertex info directly; as long as you have snap to grid enabled in H++ when creating the brushwork, it will be properly snapped when P++ is used (make sure the origin KV is also on-grid).
- That said, it'd be useful if you could snap coordinates to the current grid in vertex edit mode; I'll ask if that's possible without doing manually.
— SirYodaJedi (talk) 07:33, 12 October 2024 (PDT)
Generating $envmapmask for lightmap atlas
I've had issues with Propper++ not handling RGB data correctly when the alpha is zero, so I stray away from $basealphaenvmapmask. What I've found does work, though, is to generate the atlas twice, once when the $basetexture is the diffuse and once when it's the specular mask (renaming the generated VTFs between builds). The atlas generation is deterministic, so it'll always result in the same UVs for the same input. Unfortunately, MDL VMTs don't hot-reload, so you have to close and re-open h++ when dealing with those.
— SirYodaJedi (talk) 12:37, 24 February 2025 (PST)
- Actually, just making the $envmapmask an alt skin makes it possible to bake without reloading h++. You probably need to have all the material's textures at the same resolution when baking.
— SirYodaJedi (talk) 09:39, 2 March 2025 (PST)
Forcing the generated model origin to a specific location when combining props
Since you can't set an origin when converting multiple grouped entities, I've been doing this hacky workaround.
- Create a material called null.tga.vmt. It doesn't matter what it contains; it'll display a checkerboard missing texture regardless. Avoid giving it a $surfaceprop, though.
- Create a brush around the entire prop group you're trying to convert, being careful to have its center in an on-grid location (you can verify this by tying it to an entity with an origin KV; by default, the origin will be in the center of the brush.
- Texture the brush with the aforementioned material.
- Convert the brush into a displacement. This prevents it from being added to the collision mesh.
- Group the displacement with your props. Run Propper++. Clean the QC file if desired.
- When the model is compiled, the "null.tga" faces will be removed, just like nodraw, and the origin will be on-grid.
— SirYodaJedi (talk) 16:41, 28 March 2025 (PDT)