Skip to content

Commit 28b1122

Browse files
committed
Add HUD, selection tools, and auto-reload to vmt-preview
Introduces a HUD overlay with portal/leaf counts, selection info, and lightgrid sample stats in vmt-preview. Adds selection tools (copy face/texture info, focus camera, solo texture), selection ray rendering toggle, and auto-reload for portal/leak visualizations and BSP outputs. Updates documentation, changelog, and build instructions for new features and Qt6 setup.
1 parent 7ed4d7a commit 28b1122

11 files changed

Lines changed: 521 additions & 19 deletions

File tree

.github/workflows/release.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Release
33
on:
44
push:
55
tags: ['v*']
6+
release:
7+
types: [published]
68
workflow_dispatch:
79
inputs:
810
tag:
@@ -28,6 +30,9 @@ jobs:
2830
shell: bash
2931
run: |
3032
TAG="${{ inputs.tag }}"
33+
if [ -z "$TAG" ]; then
34+
TAG="${{ github.event.release.tag_name }}"
35+
fi
3136
if [ -z "$TAG" ]; then
3237
TAG="${GITHUB_REF_NAME}"
3338
fi
@@ -152,7 +157,7 @@ jobs:
152157
with:
153158
tag_name: ${{ needs.version.outputs.tag }}
154159
name: VibeyMapTools ${{ needs.version.outputs.version }}
155-
draft: true
160+
draft: ${{ github.event_name != 'release' }}
156161
prerelease: ${{ contains(needs.version.outputs.tag, '-') }}
157162
generate_release_notes: true
158163
files: |

BUILDING.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,37 @@ If CMake cannot find them, pass the package config paths:
111111
cmake .. -Dembree_DIR=/path/to/embree/lib/cmake/embree-4.x -DTBB_DIR=/path/to/tbb/lib/cmake/tbb
112112
```
113113

114+
### Qt6 (vmt-preview GUI) 🪟
115+
116+
`vmt-preview` is built when Qt6 is available and `ENABLE_LIGHTPREVIEW=ON`.
117+
118+
**Required components**
119+
- Qt6 Core, Gui, Widgets, OpenGL, OpenGLWidgets
120+
121+
**Windows (Qt Online Installer)**
122+
1) Install Qt 6.x (MSVC build) with the components above.
123+
2) Point CMake at the Qt install:
124+
125+
```powershell
126+
cmake -B build -DENABLE_LIGHTPREVIEW=ON -DCMAKE_PREFIX_PATH="C:\Qt\6.6.2\msvc2019_64"
127+
```
128+
129+
**Linux (Debian/Ubuntu)**
130+
```bash
131+
sudo apt install qt6-base-dev qt6-base-dev-tools libgl1-mesa-dev
132+
cmake -B build -DENABLE_LIGHTPREVIEW=ON
133+
```
134+
135+
**macOS (Homebrew)**
136+
```bash
137+
brew install qt@6
138+
cmake -B build -DENABLE_LIGHTPREVIEW=ON -DCMAKE_PREFIX_PATH="$(brew --prefix qt@6)"
139+
```
140+
141+
**Verification**
142+
In CMake output, ensure Qt6 is detected and `ENABLE_LIGHTPREVIEW` remains ON. The
143+
`vmt-preview` binary should appear in `build/` after a successful build.
144+
114145
### NVIDIA OptiX (GPU Raytracing) ?
115146

116147
This enables the `-gpu` path in `vmt-light` (OptiX-backed raytracing). If OptiX isn't found, `-gpu`

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ For the detailed changelog with full technical details, see the [docs/changelog.
66

77
---
88

9+
## [Unreleased]
10+
11+
### Features
12+
- **vmt-preview**: HUD overlay with portal/leaf counts, selection info, and lightgrid sample stats
13+
- **vmt-preview**: Selection tools (copy face/texture info, focus camera on face/leaf, solo selected texture)
14+
- **vmt-preview**: Auto-reload portal/leak visualizations (.prt/.pts/.lin) and BSP outputs for .map sessions
15+
- **vmt-preview**: Optional selection ray rendering toggle
16+
17+
### Bug Fixes
18+
- **vmt-preview**: Fix portal overlay color uniforms being sent to the wrong shader
19+
20+
---
21+
922
## [2.1.0] - 2026-01-01
1023

1124
This release continues the VibeyMapTools fork with rebranding and modernization.

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,16 @@ add_subdirectory(src/maputil)
169169
option(DISABLE_TESTS "Disables Tests" OFF)
170170
option(DISABLE_DOCS "Disables Docs" OFF)
171171
option(ENABLE_LIGHTPREVIEW "Enable light preview tool" ON)
172+
option(ENABLE_BUILDGUI "Enable build GUI tool" ON)
172173

173174
if (ENABLE_LIGHTPREVIEW)
174175
add_subdirectory(src/lightpreview)
175176
endif ()
176177

178+
if (ENABLE_BUILDGUI)
179+
add_subdirectory(src/buildgui)
180+
endif ()
181+
177182
if(NOT DISABLE_TESTS)
178183
enable_testing()
179184
# just creates testmaps.hh with absolute path to the testmaps source directory.

CONTRIBUTING.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Thank you for your interest in contributing to VibeyMapTools! This document provides guidelines for contributing.
44

5+
Coming from ericw-tools? The flow is the same, but release automation lives in GitHub Actions and binaries are prefixed with `vmt-`.
6+
57
## Getting Started
68

79
1. Fork the repository
@@ -62,6 +64,29 @@ Example: `feat: add support for PBR lightmaps`
6264
- Open a Discussion on GitHub
6365
- Check the [WIKI.md](WIKI.md) for documentation
6466

67+
## Release Process (Maintainers)
68+
69+
This is for contributors with release privileges.
70+
71+
1. Update `VERSION` with the next release number (e.g., `2.1.1`).
72+
2. Update `CHANGELOG.md` and `docs/changelog.rst` with user-visible changes.
73+
3. Build and test locally:
74+
- `cmake -B build -DCMAKE_BUILD_TYPE=Release`
75+
- `cmake --build build --config Release`
76+
- `ctest --test-dir build --output-on-failure --build-config Release`
77+
4. Commit the changes:
78+
- `git add VERSION CHANGELOG.md docs/changelog.rst`
79+
- `git commit -m "chore: release vX.Y.Z"`
80+
5. Tag the release and push:
81+
- `git tag -a vX.Y.Z -m "Release vX.Y.Z"`
82+
- `git push origin main`
83+
- `git push origin vX.Y.Z`
84+
85+
GitHub Actions will build packages and attach them to the release. You can create a GitHub Release
86+
manually (Publish Release) or rely on the workflow to draft it on tag push.
87+
88+
For more detailed steps and packaging notes, see the release section in [WIKI.md](WIKI.md).
89+
6590
## License
6691

6792
By contributing, you agree that your contributions will be licensed under the GPLv3 license.

WIKI.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,43 @@ vmt-light -lightgrid -world_units_per_luxel 8 mymap.bsp
146146

147147
---
148148

149+
## 🚀 Release + Packaging (Maintainers)
150+
151+
For contributors with release privileges, here is the end-to-end flow.
152+
153+
**1) Update version + notes**
154+
- Edit `VERSION` with the next release number (example: `2.1.1`).
155+
- Update `CHANGELOG.md` and `docs/changelog.rst`.
156+
157+
**2) Build + test locally**
158+
```bash
159+
cmake -B build -DCMAKE_BUILD_TYPE=Release
160+
cmake --build build --config Release
161+
ctest --test-dir build --output-on-failure --build-config Release
162+
```
163+
164+
**3) Create a local package (optional but recommended)**
165+
```bash
166+
cmake --build build --target package --config Release
167+
```
168+
169+
**4) Commit + tag**
170+
```bash
171+
git add VERSION CHANGELOG.md docs/changelog.rst
172+
git commit -m "chore: release vX.Y.Z"
173+
git tag -a vX.Y.Z -m "Release vX.Y.Z"
174+
git push origin main
175+
git push origin vX.Y.Z
176+
```
177+
178+
**5) Publish a GitHub Release**
179+
- Either publish a release on GitHub (using the tag), or
180+
- Let the tag push create a draft release via GitHub Actions.
181+
182+
The release workflow builds packages on Windows/macOS/Linux and attaches them to the release.
183+
184+
---
185+
149186
## 🛰️ Additional Resources
150187

151188
- **Issue Tracker**: Report bugs and request features on GitHub

docs/lightpreview.rst

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ and :doc:`light` with a 3D viewport for visualizing the output in real-time.
1414
.. note::
1515

1616
This tool is experimental and primarily packaged in the Windows build.
17+
Coming from ericw-tools? ``vmt-preview`` is the modernized successor to the
18+
classic lightpreview flow, with extra visibility and selection tooling.
1719

1820
Features
1921
--------
@@ -26,6 +28,18 @@ Features
2628
* Lightgrid visualization (for Q2 remaster maps)
2729
* Support for .lit file loading
2830

31+
Previews
32+
--------
33+
34+
The preview panel now covers much more than lightmaps. Enjoy a broader debugging
35+
toolkit with quick visual feedback. 🎛️✨
36+
37+
* 🧭 **HUD overlay** with faces, leafs, portal counts, vis state, and selection info
38+
* 🧱 **Portals and leaks**: auto-watch .prt/.pts/.lin and refresh as you iterate
39+
* 🧲 **Selection ray** to confirm hit tests when clicking geometry
40+
* 🎯 **Selection tools**: copy face + texture info, focus camera on face/leaf, solo a texture
41+
* 🌈 **Lightgrid samples** listed in HUD when BSPX lightgrid data is present
42+
2943
Controls
3044
--------
3145

@@ -40,11 +54,13 @@ Movement
4054
View Modes
4155
~~~~~~~~~~
4256

43-
* :kbd:`Alt-1` — Lightmapped (default)
44-
* :kbd:`Alt-2` — Lightmap Only
45-
* :kbd:`Alt-3` — Fullbright
46-
* :kbd:`Alt-4` — Normals
47-
* :kbd:`Alt-5` — Flat shading
57+
* :kbd:`Alt-1` - Lightmapped (default)
58+
* :kbd:`Alt-2` - Lightmap Only
59+
* :kbd:`Alt-3` - Fullbright
60+
* :kbd:`Alt-4` - Normals
61+
* :kbd:`Alt-5` - Flat shading
62+
* :kbd:`H` - Toggle HUD overlay (viewport focused)
63+
* :kbd:`T` - Toggle solo selected texture
4864

4965

5066
Usage
@@ -57,6 +73,32 @@ Usage
5773
The tool will automatically compile the map and display it in the viewport.
5874
Changes to lighting parameters can be previewed interactively.
5975

76+
Qt6 Setup
77+
---------
78+
79+
`vmt-preview` builds when Qt6 is installed and ``ENABLE_LIGHTPREVIEW=ON``.
80+
Required Qt6 components: Core, Gui, Widgets, OpenGL, OpenGLWidgets.
81+
82+
Example (Windows, Qt Online Installer):
83+
84+
.. code-block:: powershell
85+
86+
cmake -B build -DENABLE_LIGHTPREVIEW=ON -DCMAKE_PREFIX_PATH="C:\Qt\6.6.2\msvc2019_64"
87+
88+
Example (macOS, Homebrew):
89+
90+
.. code-block:: bash
91+
92+
brew install qt@6
93+
cmake -B build -DENABLE_LIGHTPREVIEW=ON -DCMAKE_PREFIX_PATH="$(brew --prefix qt@6)"
94+
95+
Example (Linux, Debian/Ubuntu):
96+
97+
.. code-block:: bash
98+
99+
sudo apt install qt6-base-dev qt6-base-dev-tools libgl1-mesa-dev
100+
cmake -B build -DENABLE_LIGHTPREVIEW=ON
101+
60102
61103
See Also
62104
--------
@@ -89,4 +131,4 @@ License GPLv3: GNU GPL version 3 or later
89131
https://gnu.org/licenses/gpl-3.0.html
90132

91133
This is free software: you are free to change and redistribute it.
92-
There is NO WARRANTY, to the extent permitted by law.
134+
There is NO WARRANTY, to the extent permitted by law.

0 commit comments

Comments
 (0)