Modern renderer for Electronic Arts W3D format using Vulkan, GLFW and GLM.
EA has not endorsed and does not support this product.
All rights go to their respective owners.
VulkanW3DViewer is a high-performance 3D model viewer designed to load and render W3D format files used in Command & Conquer: Generals. The project leverages modern Vulkan 1.3+ features including dynamic rendering, providing a reference implementation for parsing and displaying W3D meshes, skeletal hierarchies, animations, and hierarchical LOD (HLod) data.
- GPU with Vulkan 1.3+ support
- Vulkan SDK (1.3 or later) - Must be installed system-wide at
C:/VulkanSDK/ - CMake (3.20 or later)
- C++20 compiler (Clang recommended via MSYS2 MinGW64 on Windows)
- GLFW: Windowing and input handling
- Vulkan-Hpp: C++ bindings for Vulkan
- GLM: OpenGL Mathematics library
- ImGui: Immediate mode GUI (integrated in
src/ui/) - GoogleTest: Testing framework
- Clone the repository with submodules:
git clone --recursive <repository-url>
cd VulkanW3DViewerIf you already cloned without --recursive, initialize submodules:
git submodule update --init --recursive- Ensure Vulkan SDK is installed and the
VULKAN_SDKenvironment variable is set.
The project uses CMake presets for configuration, depending on your operating system use the build scripts in the scripts/ directory.
> scripts/rebuild.ps1 <preset>> scripts/rebuild.sh <preset>Some might need to update permissions and rerun the script:
chmod +x scripts/rebuild.sh- Compiler warnings are treated as errors (
-Werror) - Uses C++20 standard
- Clang toolchain
| Phase | Status | Description |
|---|---|---|
| 1 | Done | Vulkan foundation - device, swapchain, pipeline, cube rendering |
| 2 | Done | W3D file parsing - chunk reader, mesh/hierarchy/animation structs |
| 3 | Done | Static mesh rendering - GPU upload, viewer controls (no textures yet) |
| 4 | Done | Hierarchy/pose - bone matrices, rest pose display |
| 5 | Done | HLod assembly - model assembly, LOD switching |
| 6 | Done | Materials - texture manager, material push constants, shader support |
| 7 | Done | Animations - load animation, and apply to bones |
| 8 | Done | Render animations onto meshes |
Future development will include terrain rendering to as a baseline render a map from Command & Conquer Generals Zero Hour.
- Launch the application
- Use the file browser UI to load
.w3dfiles - Navigate with mouse:
- Left drag: Rotate camera
- Scroll: Zoom in/out
- View debug information in the console window
See LICENSE file for details.
- Original W3D format implementation from Command & Conquer: Generals Zero Hour
- Vulkan-Hpp for modern C++ Vulkan bindings
- ImGui for debug UI
- GoogleTest for testing framework