🎵 MMD Viewer 使用说明
基于 Three.js 的 MMD 模型预览器,支持 PMX 模型、VMD 动画、音乐同步播放和丰富的渲染参数调节。
一、资源加载
| 功能 | 操作 | 支持格式 |
| 📦 加载模型 | 点击「加载模型文件夹」选择整个文件夹 | PMX / PMD + 贴图 |
| 💃 加载动作 | 点击按钮或拖拽文件到视图 | VMD(支持多文件) |
| 🎥 加载相机 | 点击按钮或拖拽(文件名含 camera) | VMD |
| 🏟 加载场景 | 点击「加载场景文件夹」选择整个文件夹 | PMX / PMD |
| 🎵 加载音乐 | 点击按钮或拖拽文件 | MP3 / WAV / OGG |
⚠ 加载模型和场景时需要选择整个文件夹(包含 PMX 和贴图),不能只选单个文件。
也可以点击工具栏 📚 按钮打开内置资源库,直接选择预置的模型、动作和音乐。
二、播放控制
| 操作 | 按钮 | 快捷键 |
| 播放 | ▶ 播放 | 空格 |
| 暂停 | ⏸ 暂停 | 空格 |
| 重置 | ⏹ 重置 | R |
| 音量 | 🔊 滑块 | — |
加载资源后不会自动播放,需要点击「播放」开始。左上角显示已加载的资源列表。
3D 视图操作
| 操作 | 鼠标 | 触屏 |
| 旋转 | 左键拖动 | 单指滑动 |
| 缩放 | 滚轮 | 双指捏合 |
| 平移 | 右键拖动 | 双指滑动 |
三、渲染设置
点击工具栏 ⚙ 按钮打开渲染设置面板,分为五大板块:
1. 材质参数
按部位分类(系统自动识别材质名称):
- 👤 皮肤 — Diffuse 强度/色调、高光强度/颜色/范围、Toon、SPH 反光、SSS 通透、凹凸强度、Matcap 模式、透明度
- 💇 头发 — 同上(默认高光更强)
- 👁 眼睛 — 高光 + 自发光 + 自发光颜色(让瞳孔有神)
- 👗 衣服 — 同皮肤
2. 打光参数
- ☀ 主光 — 强度、色温(3000K~8000K)、XYZ 方向、阴影强度
- 💡 补光 — 侧面柔化阴影
- ✨ 轮廓光 — 背光勾边
- 🌐 环境半球光 / 💜 舞台地灯
3. 后处理滤镜
| 效果 | 说明 | 默认 |
| 轮廓线 | MMD 描边(宽度 + 颜色) | 开 |
| Bloom 泛光 | 高光区域发光 | 开 |
| 色彩校正 | 亮度 / 对比度 / 饱和度 | 开 |
| 景深 (DOF) | 焦距 / 光圈 / 最大模糊 | 关 |
| 皮肤 SSS | 次表面散射 + 散射色 + 边缘柔光 | 开 |
| 锐化 | 画面锐化 | 关 |
| 暗角 | 四角压暗 | 开 |
| 色调分离 | 暗部/亮部色调偏移 | 关 |
| FXAA | 抗锯齿 | 关 |
4. 阴影 & 环境
- 阴影分辨率(1024/2048/4096)+ 模糊
- 环境反射强度
- 雾效浓度
5. 舞台 & 输出
- 反射地面 / 发光圆环 / 网格线 — 开关
- 色调映射 — ACES / Reinhard / Cineon / Linear / AgX / Neutral
- 曝光、背景颜色
- 相机视角 (FOV) — 20°~120°
- 动画速度 — 0.1x~3x
- 重力 — 影响衣物/头发物理摆动
四、预设系统
渲染面板顶部提供多种快速预设,一键切换渲染风格:
| 预设 | 风格 |
| 默认 | 标准 MMD 渲染 |
| 卡通二次元 | 强 Toon、清晰轮廓线 |
| 写实柔和 | 低 Toon、柔和阴影、FXAA |
| 暖光舞台 | 3000K 暖光、高皮肤高光 |
| 赛博朋克 | 冷光、强 Bloom、锐化 |
| 日落黄昏 | 橙光、暖色调、强暗角 |
| 月光清冷 | 冷蓝光、蓝色色调 |
| 演唱会 | 强光、高曝光、高 Bloom |
| 水彩画风 | 低饱和、高 SSS、浅色背景 |
| 古风仙侠 v1/v2/v3 | 暖暗背景、皮肤通透、强轮廓光 |
五、导入/导出参数
- 📤 导出参数 — 保存当前所有设置为 JSON 文件
- 📥 导入参数 — 加载 JSON 文件恢复设置
- ↺ 恢复默认 — 重置所有设置
导出的 JSON 包含所有渲染设置和单独材质参数,可以分享给他人或作为自定义预设保存。
六、单独材质编辑
点击工具栏 🎨 按钮打开单独材质编辑器,可以针对模型的每一个材质独立调参:
- 左侧按类别(皮肤/头发/眼睛/衣服)列出模型所有材质
- 点击任意材质,右侧显示该材质的独立参数编辑器
- 修改后实时生效,已修改的参数标记为橙色
- 👁 高亮定位 — 点击后模型上对应部分发光高亮,其他部分变半透明,方便确认材质位置
- ↺ 恢复为类别默认 — 清除该材质的独立设置,恢复为类别统一参数
- 面板支持拖拽移动:按住标题栏拖动即可调整位置,避免遮挡模型
💡 单独材质设置会在导出参数时一并保存,导入时自动恢复。
七、截图
- 点击工具栏 📷 按钮或按
P 键截取当前画面
- 自动保存为 PNG 文件下载
- 截图包含所有后处理效果
八、表情 Morph 控制
点击工具栏 😊 按钮打开表情控制面板:
- 自动读取模型的表情数据(morphTargetDictionary)
- 按 MMD 标准分组:😤 眉毛 / 👁 眼睛 / 👄 嘴巴 / ✨ 其他
- 每个表情一个滑块(0~1),拖动即可实时预览
- 支持一键重置所有表情
💡 表情数据来自 PMX/PMD 模型本身,不同模型包含的表情数量和类型不同。
九、多模型加载
点击工具栏 👥 按钮打开模型管理面板:
- 支持同时加载多个模型(每次加载不会替换已有模型)
- 模型列表显示所有已加载模型,点击名称切换为活跃模型
- 👁 按钮 — 显示/隐藏单个模型
- ✕ 按钮 — 从场景中移除模型
- 活跃模型接收动作、表情控制和变换操作
十、模型变换(位置/旋转/缩放)
点击工具栏 ✥ 按钮开启变换工具:
- ↔ 移动模式 — 拖拽箭头移动模型位置
- ↻ 旋转模式 — 拖拽圆环旋转模型
- ⇲ 缩放模式 — 拖拽方块缩放模型大小
- 变换工具作用于当前活跃模型
- 拖拽变换时相机旋转自动禁用,松开后恢复
十一、环境贴图 / HDR 天空盒
在模型管理面板底部可切换环境贴图:
- 5 种内置环境:默认暗色、日间户外、日落、室内暖光、夜空
- 支持加载自定义 HDR 文件(.hdr / .exr 格式)
- 勾选「环境作为背景」可将环境贴图显示为场景背景
- 环境贴图影响模型的反射和光照效果
十二、全屏模式
- 点击工具栏 ⛶ 按钮或按
F 键进入全屏
- 全屏后右上角有 ✕ 浮动按钮,点击即可退出(手机端同样适用)
- 桌面端也可按
Esc 或 F 退出
- 全屏时鼠标移到顶部/底部可显示工具栏和状态栏
十三、其他功能
- 中英文切换 — 工具栏 EN/中文 按钮,选择保存在浏览器中
- 移动端适配 — 自动响应式布局、触控优化、性能降级
- 拖拽上传 — VMD/音乐文件可直接拖入视图区域
- 物理模拟 — 基于 ammo.js,头发/裙子/丝带有物理摆动
十四、快捷键
| 快捷键 | 功能 |
空格 | 播放 / 暂停 |
R | 重置 |
F | 全屏切换 |
P | 截图 |
十五、资源获取
🎵 MMD Viewer User Guide
A Three.js-based MMD model viewer with PMX model loading, VMD animation, music sync, and rich render parameter controls.
1. Loading Resources
| Feature | How | Formats |
| 📦 Model | Click "Load Model Folder" and select the entire folder | PMX / PMD + textures |
| 💃 Motion | Click button or drag & drop | VMD (multi-file) |
| 🎥 Camera | Click button or drag (filename contains "camera") | VMD |
| 🏟 Stage | Click "Load Stage Folder" and select the entire folder | PMX / PMD |
| 🎵 Audio | Click button or drag & drop | MP3 / WAV / OGG |
⚠ Models and stages require selecting the entire folder (with PMX + textures), not just a single file.
You can also click the 📚 button to open the Built-in Library with pre-loaded models, motions, and music.
2. Playback Controls
| Action | Button | Shortcut |
| Play | ▶ Play | Space |
| Pause | ⏸ Pause | Space |
| Reset | ⏹ Reset | R |
| Volume | 🔊 Slider | — |
Resources don't auto-play after loading. Click "Play" to start. The top-left overlay shows loaded resources.
3D Viewport
| Action | Mouse | Touch |
| Rotate | Left-click drag | One finger |
| Zoom | Scroll wheel | Pinch |
| Pan | Right-click drag | Two fingers |
3. Render Settings
Click the ⚙ button to open the render settings panel with 5 sections:
3.1 Material Parameters
Auto-classified by material name (supports Chinese, Japanese, English):
- 👤 Skin — Diffuse intensity/tint, specular intensity/color/range, Toon, SPH, SSS, bump, matcap mode, opacity
- 💇 Hair — Same as skin (higher specular defaults)
- 👁 Eyes — Specular + self-illumination + emissive color
- 👗 Clothes — Same as skin
3.2 Lighting
- ☀ Key Light — Intensity, color temp (3000K~8000K), XYZ direction, shadow
- 💡 Fill Light — Side fill to soften shadows
- ✨ Rim Light — Backlight edge glow
- 🌐 Hemisphere / 💜 Stage Light
3.3 Post-Processing
| Effect | Description | Default |
| Outline | MMD edge lines (width + color) | On |
| Bloom | Highlight glow | On |
| Color Correction | Brightness / Contrast / Saturation | On |
| Depth of Field | Focus / Aperture / Max blur | Off |
| Skin SSS | Subsurface scattering + scatter color + edge glow | On |
| Sharpen | Image sharpening | Off |
| Vignette | Edge darkening | On |
| Tone Split | Shadow/highlight color shift | Off |
| FXAA | Anti-aliasing | Off |
3.4 Shadow & Environment
- Shadow resolution (1024/2048/4096) + blur
- Environment reflection intensity
- Fog density
3.5 Stage & Output
- Reflective ground / Glow ring / Grid — toggles
- Tone mapping — ACES / Reinhard / Cineon / Linear / AgX / Neutral
- Exposure, background color
- Camera FOV — 20°~120°
- Animation speed — 0.1x~3x
- Gravity — affects cloth/hair physics
4. Presets
Quick presets at the top of the render panel:
| Preset | Style |
| Default | Standard MMD rendering |
| Anime Toon | Strong Toon, clear outlines |
| Soft Realistic | Low Toon, soft shadows, FXAA |
| Warm Stage | 3000K warm light, high skin specular |
| Cyberpunk | Cool light, strong Bloom, sharpen |
| Sunset | Orange light, warm tones, strong vignette |
| Moonlight | Cool blue light |
| Concert | Strong light, high exposure |
| Watercolor | Low saturation, high SSS, light background |
| Chinese Fantasy v1/v2/v3 | Warm dark background, translucent skin, strong rim light |
5. Import / Export
- 📤 Export — Save all settings as JSON file
- 📥 Import — Load JSON file to restore settings
- ↺ Reset — Reset all settings to default
Exported JSON files include all render settings and per-material overrides. They can be shared with others or saved as custom presets.
6. Per-Material Editor
Click the 🎨 button in the toolbar to open the Per-Material Editor, allowing independent parameter control for each material:
- Left panel lists all materials grouped by category (Skin/Hair/Eyes/Clothes)
- Click any material to edit its individual parameters on the right
- Changes apply in real-time; overridden parameters are marked in orange
- 👁 Highlight — Highlights the selected material on the model (glows blue) while dimming everything else, so you can see exactly where it is
- ↺ Reset to Category — Clears individual overrides, reverts to category defaults
- Panel is draggable: hold the title bar and drag to reposition, avoiding model obstruction
💡 Per-material settings are included when exporting parameters and restored on import.
7. Screenshot
- Click the 📷 button or press
P to capture the current frame
- Automatically downloads as a PNG file
- Screenshot includes all post-processing effects
8. Morph / Expression Controls
Click the 😊 button to open the Morph Control Panel:
- Automatically reads morph data from the model (morphTargetDictionary)
- Grouped by MMD standard: 😤 Eyebrow / 👁 Eyes / 👄 Mouth / ✨ Other
- Each morph has a slider (0~1) for real-time preview
- Reset All button to clear all morphs
💡 Morph data comes from the PMX/PMD model itself. Different models have different morphs.
9. Multi-Model Loading
Click the 👥 button to open the Model Manager Panel:
- Load multiple models simultaneously (new models are added, not replaced)
- Model list shows all loaded models; click a name to set it as active
- 👁 button — show/hide individual models
- ✕ button — remove a model from the scene
- The active model receives motion, morph, and transform operations
10. Model Transform (Position/Rotation/Scale)
Click the ✥ button to enable Transform Controls:
- ↔ Translate mode — drag arrows to move the model
- ↻ Rotate mode — drag rings to rotate the model
- ⇲ Scale mode — drag handles to resize the model
- Transform applies to the currently active model
- Camera orbit is disabled while dragging, restored on release
11. Environment Map / HDR Skybox
At the bottom of the Model Manager panel, you can switch environment maps:
- 5 built-in environments: Default Dark, Daylight Outdoor, Sunset, Indoor Warm, Night Sky
- Load custom HDR files (.hdr / .exr format)
- Check "Environment as Background" to display the env map as scene background
- Environment maps affect model reflections and lighting
12. Fullscreen Mode
- Click the ⛶ button or press
F to enter fullscreen
- A floating ✕ button appears in the top-right corner to exit (works on mobile too)
- On desktop, you can also press
Esc or F to exit
- In fullscreen, move mouse to top/bottom edges to reveal toolbar and status bar
13. Other Features
- Language — EN/中文 toggle in toolbar, saved in browser
- Mobile — Responsive layout, touch-friendly, auto quality reduction
- Drag & Drop — VMD/audio files can be dropped onto the viewport
- Physics — ammo.js powered hair/skirt/ribbon simulation
14. Keyboard Shortcuts
| Key | Action |
Space | Play / Pause |
R | Reset |
F | Toggle Fullscreen |
P | Screenshot |
15. Resource Sites