Skip to content

Releases: Darkhe55/TriangleMeshBrowser

v0.4.1

Choose a tag to compare

@Darkhe55 Darkhe55 released this 29 Aug 10:23

PrismViewer v0.4.1

Highlights

Bug Fixes / 缺陷修复

  • Split-view aspect ratio: Fixed models appearing horizontally squashed in the dual-model / dual-shading comparison view. Each viewport now uses its own aspect ratio for the projection matrix (also fixes comparison-mode screenshots).
  • 双视图宽高比:修复双模型 / 双光照对比视图中模型被横向压缩的问题。每个视口现在按自身宽高比计算投影矩阵(对比模式截图同步修复)。

Binary Size / 二进制瘦身

  • Executable size cut in half: 6.4 MB → 3.1 MB (-52%). The release zip drops from 2.8 MB to 1.6 MB.
  • Achieved with a project-local vcpkg overlay port that builds Assimp with only the FBX and glTF/GLB importers (all other importers and every exporter are disabled — OBJ / STL / PLY / OFF / PMX are handled by the viewer's own loaders and were never affected).
  • 可执行文件体积减半:6.4 MB → 3.1 MB(-52%),发布 zip 从 2.8 MB 降至 1.6 MB。
  • 通过项目内置的 vcpkg overlay port 定制 Assimp:仅编译 FBX 与 glTF/GLB 导入器,关闭其余导入器与全部导出器(OBJ / STL / PLY / OFF / PMX 由查看器自带加载器处理,不受影响)。

Performance / 性能优化

  • Release link-time optimization enabled: /LTCG with /OPT:REF + /OPT:ICF (dead-code elimination and identical-comdat folding), plus /Ob3, /Gw, /Zc:inline.
  • Wireframe rendering now shares the main vertex buffer instead of uploading a second full copy of all vertex data — lower GPU memory usage and faster model loading.
  • 启用 Release 链接期优化:/LTCG + /OPT:REF + /OPT:ICF(死代码剔除与相同代码折叠),以及 /Ob3/Gw/Zc:inline
  • 线框渲染改为共享主顶点缓冲,不再重复上传整份顶点数据,显存占用更低、加载更快。

Build / 构建

  • build.ps1 now passes the overlay ports automatically and uses the Visual Studio 18 2026 generator (v145), matching the vcpkg binary-cache toolset.
  • build.ps1 自动接入 overlay ports,并使用 Visual Studio 18 2026 生成器(v145),与 vcpkg 二进制缓存工具集一致。

Supported formats unchanged / 支持格式不变:OBJ / STL / PLY / OFF / PMX / FBX / glTF / GLB

Full changelog / 完整变更:git diff v0.4.0...v0.4.1

v0.4.0

Choose a tag to compare

@Darkhe55 Darkhe55 released this 29 Aug 10:03

v0.4.0

English

New: FBX / glTF / GLB import (via Assimp)

  • Three dedicated loaders (FBXLoader, GLTFLoader + shared AssimpCommon), dispatched by extension like the existing OBJ/PLY loaders
  • Full scene flattening: node hierarchy transforms, multi-mesh concatenation, per-material face-index ranges
  • Material extraction: diffuse colour & alpha (PBR base colour fallback to classic diffuse), specular / shininess (metallic fallback), diffuse texture references
  • Embedded textures (GLB / FBX) are decoded and written next to the model as temporary PNGs, then loaded through the existing texture pipeline
  • Axis alignment with the viewer's Z-up world: glTF (spec-mandated +Y up) is always rotated; FBX honours the file's own UpAxis metadata (Maya +Y models rotate, 3ds Max +Z models load as-is)
  • FBX supports both ASCII and binary containers

New: generalized material control panel

  • The former "PMX materials" panel is now a generic Materials panel, shown for any format with material data (PMX / FBX / glTF / GLB)
  • Texture-map toggle, alpha slider, colour override and edge display now work for FBX / glTF / GLB models too
  • Toon / Sphere toggles remain PMX-only (they only appear when the loaded model actually contains that data)

New: internationalisation (zh / en)

  • New I18n module with a key-based dictionary; every menu, panel, status-bar and toast string goes through tr()
  • Language switch available in the settings menu

New: console section visibility menu

  • New "Console" menu in the menu bar listing every side-panel section (Model Info, Colors, Lighting, Fog, Picking, Materials, View...) with per-section show/hide toggles
  • The former "View" menu moved into the side panel as a View section
  • Mouse-wheel scrolling inside the side panel no longer zooms the camera

Notes

  • Binary size grows (~6 MB exe) due to statically linked Assimp 6.0.4
  • Minimum recommended build toolset is now v145 (Visual Studio 18) to match the vcpkg binary cache

中文

新增:FBX / glTF / GLB 导入(基于 Assimp)

  • 三个独立加载器(FBXLoaderGLTFLoader + 公共模块 AssimpCommon),与现有 OBJ/PLY 一样按扩展名分发
  • 完整场景扁平化:节点层级变换、多网格合并、按材质连续的面索引区间
  • 材质提取:漫反射颜色与透明度(PBR baseColor,回退传统 diffuse)、高光/光泽度(metallic 兜底)、漫反射贴图引用
  • 嵌入式贴图(GLB / FBX)解码后落盘为模型同目录临时 PNG,复用现有纹理管线加载
  • 轴向与查看器 Z-up 世界对齐:glTF(规范规定 +Y 朝上)一律旋转;FBX 遵循文件自带 UpAxis 元数据(Maya +Y 模型旋转,3ds Max +Z 模型原样载入)
  • FBX 同时支持 ASCII 与二进制容器

新增:材质控制面板泛化

  • 原"PMX 材质"面板泛化为通用材质面板,任何含材质数据的格式(PMX / FBX / glTF / GLB)均可使用
  • 贴图开关、透明度滑条、颜色覆盖、边缘显示对 FBX / glTF / GLB 模型同样生效
  • Toon / Sphere 开关仅在模型实际含有该数据时显示(目前仅 PMX)

新增:多语言界面(中 / 英)

  • 新增 I18n 模块(key 字典),菜单、面板、状态栏、提示消息全部经 tr() 取值
  • 设置菜单可切换语言

新增:控制台子板块显示开关

  • 菜单栏新增"控制台"菜单,列出各子板块(模型信息、颜色、光照、雾效、拾取、材质、视图等)的显示/隐藏开关
  • 原"视图"菜单移入侧栏,成为"视图"子板块
  • 在侧栏内滚动滚轮不再触发相机缩放

说明

  • 由于静态链接 Assimp 6.0.4,可执行文件体积增大(约 6 MB)
  • 建议使用 v145(Visual Studio 18)工具集构建,以匹配 vcpkg 二进制缓存

v0.3.0

Choose a tag to compare

@Darkhe55 Darkhe55 released this 29 Aug 05:15

v0.3.0

English

New: PMX material control panel

  • Full PMX parsing beyond geometry: texture list, materials (diffuse / alpha / specular / edge / texture references / face-index ranges) and bones
  • Per-layer toggles in the side panel (shown only for PMX models): Tex map, Toon shading, Sphere map
  • Global alpha slider, optional material colour override
  • Edge display toggle with adjustable width (inverted-hull rendering)
  • Textures decoded via stb_image, resolved relative to the PMX file directory; missing textures fall back to plain diffuse colour

New: model export & format conversion

  • File → Export Model... saves the current mesh through a Windows save dialog
  • Supported targets: OBJ, STL (Binary), PLY (ASCII / Binary Little Endian), OFF
  • Works with any loaded model, including procedural geometry — enables cross-format conversion (e.g. PMX → OBJ, STL → PLY)

Notes

  • Vertex layout extended with UVs (PMX only; other formats stay zero)
  • README updated to reflect PMX material/bone support and PLY big-endian support

中文

新增:PMX 材质控制面板

  • PMX 解析扩展至几何之外:纹理列表、材质(漫反射/透明度/高光/边缘/贴图引用/面索引区间)与骨骼
  • 侧栏新增材质层开关(仅加载 PMX 时显示):Tex 贴图、Toon 材质、Sph 球面贴图
  • 全局透明度滑条、可选的材质颜色覆盖
  • 边缘显示开关与宽度调节(反壳绘制实现)
  • 纹理由 stb_image 解码,路径相对 PMX 文件所在目录解析;贴图缺失时退化为纯色漫反射

新增:模型导出与格式转换

  • 文件 → 导出模型...,通过 Windows 保存对话框导出当前网格
  • 支持格式:OBJ、STL(二进制)、PLY(ASCII / 二进制小端)、OFF
  • 任意已加载模型(含程序化几何体)均可导出,实现格式互转(如 PMX → OBJ、STL → PLY)

说明

  • 顶点布局新增 UV 字段(仅 PMX 有值,其余格式为 0)
  • README 同步更新:PMX 材质/骨骼支持与 PLY 大端支持

Download / 下载: TriangleMeshBrowser-v0.3.0.zip — extract and run PrismViewer.exe. 解压后直接运行 PrismViewer.exe

v0.2.0

Choose a tag to compare

@Darkhe55 Darkhe55 released this 29 Aug 04:00

v0.2.0

新功能 / New Features

  • 新增 PMX (MikuMikuDance) 模型格式支持(2.0 / 2.1,UTF-8 / UTF-16LE,1/2/4 字节索引)
  • Add PMX (MikuMikuDance) model format support (2.0 / 2.1, UTF-8 / UTF-16LE, 1/2/4-byte indices)
  • PLY 二进制大端 (binary_big_endian) 字节序支持
  • PLY binary_big_endian byte-order support

修复与改进 / Fixes & Improvements

  • 各格式轴向对齐:PMX (Y 朝上左手系) 自动转换为查看器的 Z 朝上右手系,模型加载后朝向正确
  • Axis alignment: PMX (left-handed Y-up) is converted to the viewer's right-handed Z-up space
  • 修复 Windows 下中文等 CJK 文件路径打开失败的问题
  • Fix CJK filename handling on Windows
  • 文件对话框与拖拽过滤器加入 .pmx
  • Added .pmx to file dialog and drag-drop filters
  • 注释清洗:仅保留功能说明
  • Comment cleanup: keep functional descriptions only

使用 / Usage

解压后直接运行 PrismViewer.exe,无需安装。支持拖拽文件到窗口打开。
Extract and run PrismViewer.exe directly. Drag & drop a model file onto the window to open it.

v0.1.0 - Initial Release

Choose a tag to compare

@Darkhe55 Darkhe55 released this 20 Jul 17:47

TriangleMeshBrowser v0.1.0

首个正式发布版本。

包含内容

  • PrismViewer.exe — 单文件可执行程序(静态链接,无需运行时)
  • shaders/ — GLSL 着色器
  • assets/models/ — 示例 3D 模型

使用

解压后运行 PrismViewer.exe,拖放模型文件或使用 Ctrl+O 打开。