Repository navigation
ReForge Material Editor
The ReForge Material Editor is a standalone, high-performance node-based physical material authoring suite and 3D PMX studio designed specifically for Ray-MMD ReForge.
Located at Extension/MaterialEditor/MaterialEditor.exe, the tool enables creators to generate, convert, pack, preview, and export production-ready PBR materials (.fx + texture maps) without requiring external image editing software.
- Full PBR ShaderMap Generation: Generates Tangent-space Normal maps, Ambient Occlusion, Displacement/Height, Roughness/Smoothness, Metalness, Cavity, and Emissive maps directly from diffuse textures or procedural inputs.
-
Dual Operating Modes:
- Single Material Mode: Interactive sandbox for designing standalone PBR shaders with instant raymarched sphere/cube/plane previews.
-
PMX Model Studio Mode: Loads entire MMD 3D models (
.pmx), allowing per-subset material assignment, direct viewport 3D picking, wireframe inspection, and batch generation.
- Ray-MMD ReForge Integration: Native support for all Ray-MMD shading models (Skin/SSS, Cloth, ClearCoat, Hair Anisotropy, Glass, Subsurface, Cel/Toon Shading) and extended features (Hex-Tiling, Hashed Alpha, RNM Normal Blending, Emissive Blink).
- Multi-Threaded Performance: Multi-threaded CPU software rasterizer with parallel band rendering (Rayon) and real-time Cook-Torrance GGX shading.
- Zero Configuration: Shipped as a completely standalone, self-contained executable with no external runtime dependencies.
+---------------------------------------------------------------------------------------+
| Menu Bar: [Single Material Mode] [PMX Studio Mode] [Open PMX] [Resolution: 512] |
+---------------------+---------------------------------------+-------------------------+
| LEFT PANEL | CENTER PANEL | RIGHT PANEL |
| | | |
| - Node Palette | Interactive Node Graph Canvas | 3D PBR Viewport |
| - Model Subsets | (Zoom, Pan, Wire Pins, Connect) | - Real-Time Shading |
| - Batch Auto-PBR | | - Orbit / Pan / Zoom |
| - Material Search | OR Fullscreen 3D Model View | - Wireframe Overlay |
| | | - 3D Mesh Picking |
| | | - 2D Map Inspector |
+---------------------+---------------------------------------+-------------------------+
| STATUS BAR: Ready. Node evaluation: 14.2ms | Zoom: 100% | 5 Active Channels |
+---------------------------------------------------------------------------------------+
- Orbit Camera: Click & drag Left Mouse Button (LMB).
-
Pan Camera: Click & drag Middle Mouse Button (MMB) or
Shift + LMB. -
Zoom Camera: Mouse Wheel or
RMB / Alt + LMBvertical drag. -
Rotate Light Source:
Ctrl + LMBdrag. - Pick Model Subset: Click directly on any part of the 3D model in the viewport.
Loads bitmap textures from the local filesystem to drive downstream generators.
-
Outputs:
-
Image (RGBA): 8-bit RGBA color texture.
-
-
Properties:
-
File Path: Absolute or relative path to the image file (
.png,.jpg,.jpeg,.tga,.bmp,.dds). - sRGB: When checked, converts gamma-encoded sRGB colors into linear space for physically accurate PBR calculations. (Keep enabled for albedo/diffuse; uncheck for raw data maps like normal or roughness).
-
File Path: Absolute or relative path to the image file (
Provides a constant, uniform RGBA color value.
-
Outputs:
-
Color (RGBA): Uniform RGBA color.
-
-
Properties:
-
Color Picker: RGB color and Alpha slider (
$[0.0, 1.0]$ ).
-
Color Picker: RGB color and Alpha slider (
-
Typical Uses: Base albedo tints, uniform roughness/smoothness constants, metallic masks (
$1.0$ for metal,$0.0$ for dielectric), and subsurface tint colors.
High-performance procedural mathematical noise generator for synthesizing organic patterns, surface imperfections, grime masks, and micro-roughness.
In real-world PBR materials, perfectly uniform surfaces do not exist. Even polished metal, clean glass, or freshly painted cars exhibit subtle surface micro-imperfections, finger smudges, dust deposition, and micro-roughness variation. Procedural noise outputs continuous scalar values in the
| Target Channel | Why Connect Noise Here? | Recommended Noise Algorithm |
|---|---|---|
| Smoothness / Roughness | Specular Highlight Breakup: Prevents sterile, spherical CG reflection highlights. Modulates surface glossiness with organic micro-smudges, weather wear, and handling marks. | Perlin fBm (broad organic variation) or White Noise (subtle micro-satin scatter). |
| Normal / Height | Procedural Surface Relief: Generates tangible 3D micro-geometry (skin pores, leather grain, fabric weave, orange-peel paint, chipped plaster, or rusted pitting) without needing high-res bitmap textures. | Voronoi (biological pores, scales, cracked leather) or Perlin (rough stone, corrosion). |
| ColorBlend Factor (Mask) | Weathering, Grime & Rust: Acts as a spatial distribution mask determining where paint is chipped, dirt accumulates, or oxidation penetrates. | Perlin fBm (irregular stains, fluid drip lines, and wear contours). |
-
Outputs:
-
Noise (RGBA): Monochromatic procedural noise texture ($R = G = B = \text{noise}, A = 255$ ).
-
-
Properties:
-
Noise Type:
- Perlin fBm: Fractal Brownian Motion multi-octave gradient noise. Produces smooth, flowing organic clouds, marble veining, fluid stains, and stone roughness.
- Voronoi Cellular: Distance-to-cell-edge noise. Generates polygonal cell clusters ideal for biological human skin pores, reptile scales, leather wrinkles, cracked mud, and hammered metal finishes.
- White Noise: High-frequency uniform stochastic hash. Used for microfacet jitter, film grain, paper texture, and eliminating color banding (dithering).
-
Scale / Frequency (
$0.1 - 50.0$ ): Spatial size of the noise pattern. Lower values ($2 - 8$ ) create large macro-stains; higher values ($25 - 50$ ) create fine micro-pores. -
Octaves (
$1 - 8$ ): Number of fractal octaves summed together (Perlin only). Higher values add increasingly fine harmonic micro-details. -
Lacunarity (
$1.0 - 4.0$ ): Frequency multiplier between successive octaves (standard:$2.0$ ). -
Gain / Persistence (
$0.0 - 1.0$ ): Amplitude decay multiplier per octave (standard:$0.5$ ).
-
Noise Type:
Converts RGB color textures into scalar height/displacement elevation maps using perceptual luminance weighting (
-
Inputs:
-
Color (RGBA): Input image or color.
-
-
Outputs:
-
Height (Grayscale): Scalar elevation map ($0.0 = \text{valleys}, 1.0 = \text{peaks}$ ).
-
-
Properties:
-
Contrast (
$0.1 - 5.0$ ): Amplifies steepness and slope of elevation changes. -
Brightness (
$-1.0 - 1.0$ ): Offsets median height baseline. - Invert: Flips peaks and valleys (e.g. converting dark wood grain into elevated ridges).
-
Contrast (
Calculates tangent-space normal vectors from an elevation/height map using discrete spatial differentiation.
-
Inputs:
-
Height (Grayscale): Source elevation map.
-
-
Outputs:
-
Normal (RGBA): Tangent-space normal map ($R = X, G = Y, B = Z$ ).
-
-
Properties:
-
Scale / Strength (
$0.1 - 10.0$ ): Adjusts steepness of surface normals. -
Filter:
- Scharr 3x3: High-precision, rotational-symmetric gradient filter (recommended for fine micro-surface details).
- Sobel 3x3: Classic edge gradient filter with slight low-pass smoothing.
-
Orientation:
- DirectX (-Y): Inverts Green channel so light from above illuminates top surfaces. (Required for Ray-MMD ReForge).
- OpenGL (+Y): Standard inverted Y orientation.
-
Scale / Strength (
Simulates ambient occlusion by sampling horizon heights across the elevation field in multiple radial directions.
-
Inputs:
-
Height (Grayscale): Source elevation map.
-
-
Outputs:
-
Occlusion (Grayscale): Ambient occlusion mask ($0.0 = \text{deep cavity}, 1.0 = \text{exposed surface}$ ).
-
-
Properties:
-
Radius (
$1 - 64\text{ px}$ ): Maximum pixel search distance for occlusion occluders. -
Samples (
$4 - 64$ ): Number of angular ray samples per pixel (higher values produce smoother results). -
Intensity (
$0.1 - 5.0$ ): Darkens and intensifies crease shadows. -
Bias (
$0.0 - 0.2$ ): Prevents self-occlusion artifacts on shallow slopes.
-
Radius (
Extracts surface edge curvature using a multi-scale Laplacian operator.
-
Inputs:
-
Height (Grayscale): Source height map.
-
-
Outputs:
-
Curvature (Grayscale): Edge curvature map.
-
-
Properties:
-
Mode:
-
Full: Neutral gray (
$0.5$ ), ridges/peaks$> 0.5$ , valleys/crevices$< 0.5$ . (Used directly by Ray-MMD SkincustomDataA). - Convex Only: Isolates sharp exterior edges (ideal for procedural edge wear and scratch masks).
- Concave Only: Isolates inner seams and crevices (ideal for grime and dirt collection).
-
Full: Neutral gray (
-
Radius (
$1 - 16\text{ px}$ ): Scale of edge feature detection. -
Intensity (
$0.1 - 10.0$ ): Contrast multiplier.
-
Mode:
Maps diffuse luminance or height variations into physically plausible microfacet roughness ranges.
-
Inputs:
-
Input (Grayscale / Image): Source texture.
-
-
Outputs:
-
Roughness (Grayscale): Microfacet roughness ($0.0 = \text{mirror smooth}, 1.0 = \text{rough/matte}$ ).
-
-
Properties:
-
Contrast (
$0.1 - 3.0$ ): Adjusts transition slope between matte and glossy regions. -
Min Value (
$0.0 - 1.0$ ): Darkest clamp (e.g.$0.05$ ensures surfaces never become unphysically pure specular mirrors). -
Max Value (
$0.0 - 1.0$ ): Brightest clamp (e.g.$0.85$ prevents complete light scattering). -
Invert: Inverts roughness into smoothness (
$1.0 - R$ ).
-
Contrast (
Generates dielectric vs metallic material classification masks.
-
Inputs:
-
Color (RGBA): Albedo diffuse image.
-
-
Outputs:
-
Metalness (Grayscale): Metallic mask ($0.0 = \text{dielectric / wood / cloth}, 1.0 = \text{conductor / raw metal}$ ).
-
-
Properties:
-
Smart Metal Detection: Uses chromatic analysis in HSV/RGB space to detect common metals (Gold, Silver, Platinum, Copper, Bronze, Iron) based on their physical reflectance characteristics:
- Gold/Brass: High yellow/orange chromaticity with high specular reflectance (
$F_0 > 0.6$ ). - Copper: High red-orange saturation.
- Silver/Chrome: High achromatic brightness (
$L > \text{threshold}$ ) with low saturation.
- Gold/Brass: High yellow/orange chromaticity with high specular reflectance (
-
Threshold (
$0.0 - 1.0$ ): Minimum brightness threshold for metals. -
Falloff (
$0.01 - 0.8$ ): Softness of transition boundary. - Invert Output: Inverts mask for specialized inverted workflows.
-
Smart Metal Detection: Uses chromatic analysis in HSV/RGB space to detect common metals (Gold, Silver, Platinum, Copper, Bronze, Iron) based on their physical reflectance characteristics:
Isolates bright or chromatic self-illuminating sections from a diffuse map.
-
Inputs:
-
Color (RGBA): Base diffuse texture. -
Mask (Optional): Alpha or secondary stencil mask to isolate specific symbols.
-
-
Outputs:
-
Emissive (RGBA): Emissive color and intensity map.
-
-
Properties:
-
Min / Max Luminance (
$0.0 - 1.0$ ): Luminance isolation window. -
Isolate Specific Color (Keying): Filters specifically by hue:
-
Target Hue (
$0 - 360^\circ$ ): Target color center (e.g.$180^\circ$ for cyan cybernetic runes). -
Hue Tolerance (
$5 - 120^\circ$ ): Allowed angular range in color wheel.
-
Target Hue (
- Tint Color: Multiplicative RGB tint applied to emissive glow.
-
Intensity Boost (
$0.0 - 20.0$ ): Multiplier for high-dynamic-range (HDR) bloom exposure in Ray-MMD. - Invert Mask: Inverts luminance selection.
-
Min / Max Luminance (
Direct authoring node for Ray-MMD ReForge's dedicated customDataA (scalar float) and customDataB (RGB vector) channels.
| Shading Model | Custom A Purpose | Custom B Purpose |
|---|---|---|
| Skin (PreIntegrated SSS) | Mesh curvature / SSS scatter wrap ( |
Blood scatter fringe tint (float3(1.0, 0.36, 0.10)) |
| Anisotropy (Hair/Brushed) | Anisotropic highlight stretch & shift | Tangent direction flow vector (or radial flow toggle) |
| Glass / Transparent | Index of Refraction (IOR, e.g. |
Volume absorption transmittance color |
| Cloth (Sheen/Fuzz) | Grazing-angle sheen intensity | Microfiber grazing fuzz tint |
| ClearCoat | Secondary lacquer coat roughness | Secondary coat normal map (via detail normal) |
| Subsurface Profile | Deep scatter radius penetration depth | Subcutaneous scatter absorption tint |
| Cel / Toon Shading | Step transition threshold on |
Shadow ramp color tint |
High-performance procedural synthesis of micro-hair fibers, anisotropic strand normals, Marschner/Kajiya-Kay specular tangent shift maps, and strand density masks.
Designed specifically for Ray-MMD's Anisotropic Hair shading model (SHADINGMODELID_HAIR), procedural hair highlight breakup (#define PROCEDURAL_HAIR 1), and dual-normal RNM strand detailing.
- Inputs: None (fully procedural).
-
Outputs:
-
Normal (Strands): Tangent-space normal map encoding individual fiber cross-sectional curvature, micro-ridges, and organic waviness undulations. -
Tangent Shift (Silky): Anisotropic strand shift/jitter map (directly equivalent toshift4.pngin Ray-MMD'sProcedural Silky/12 very shiny.fx). Modulates the anisotropic specular highlight band for silky, lustrous reflections without hair-card mesh density. Connect directly toCustom BorAlbedo Sub. -
Strand Mask: Grayscale fiber density mask ($0.0 - 1.0$ ) isolating individual hair locks and micro-grooves.
-
-
Properties:
-
Strand Density (
$5.0 - 2000.0$ ): Frequency/count of hair fibers across the UV texture space. (Values around$25 - 60$ simulate stylized anime hair locks;$200 - 500$ simulate ultra-fine realistic human strands). -
Roughness (
$0.0 - 1.0$ ): High-frequency micro-striation jitter and fiber irregularity. -
Waviness (
$0.0 - 1.0$ ): Amplitude of gentle sinusoidal strand flow and organic curling. -
Wave Frequency (
$0.1 - 50.0$ ): Oscillation frequency of the wave curve along the strand length. -
Orientation (
Vertical/Horizontal): Flow direction along the UV grid (Vertical along V or Horizontal along U). -
Normal Intensity (
$0.0 - 5.0$ ): Tangent-space relief depth of individual hair fibers.
-
Strand Density (
Physical optical lens generator for character eyes, modeling physiological human corneal anatomy, convex corneal dome normals (CONVEX_NORMAL 1), view-dependent Snell's law iris parallax mapping (EYE_PARALLAX_ENABLE 1), limbal ring darkening, and internal focal caustics.
Anime and MMD character meshes are typically modeled with flat or concave (sunken) eye geometry, which causes inverted, unphysical specular reflections. This node completely fixes eye shading by generating the true physical corneal dome and optical depth field without needing 3D mesh modifications.
-
Inputs:
-
Iris Color (Optional RGBA): Flat source texture of the anime eye / iris / pupil from the PMX model.
-
-
Outputs:
-
Cornea Dome Normal: Spherical convex normal map of the corneal lens. When assigned to Ray-MMD withCONVEX_NORMAL 1, it inverts the sunken eye normal, producing pristine spherical skylight/sun highlights that wrap naturally across the eyeball. -
Iris Parallax Map: Radial depth map ($0.0 = \text{outer cornea}, 1.0 = \text{deepest iris pit}$ ) representing the anterior chamber. Feeds into Ray-MMD's internal screen-space parallax raytracer (EYE_PARALLAX_ENABLE 1,EYE_IRIS_DEPTH 0.05). -
Limbal & Caustic Map: Composite RGBA map featuring:- RGB: Limbal ring boundary darkening (anatomical dark outer ring around the iris) blended with a warm inferior focal caustic crescent (simulating light focusing through the cornea onto the lower iris).
- Alpha: Caustic mask.
-
Refracted Iris: Interactive real-time Snell's law refraction preview showing how the flat iris appears when viewed through the curved refractive corneal meniscus.
-
-
Properties:
-
Iris Depth (
$0.001 - 0.5$ ): Distance between corneal dome apex and posterior iris plane (default$0.05$ ). -
Cornea IOR (
$1.0 - 2.0$ ): Index of Refraction of corneal tissue (physiological human standard:$1.376$ ). -
Limbal Ring Width (
$0.01 - 0.5$ ): Width of the soft dark boundary ring encircling the iris. -
Limbal Darkness (
$0.0 - 1.0$ ): Darkness / opacity of the limbal ring. -
Caustic Intensity (
$0.0 - 5.0$ ): Brightness of the inferior internal caustic reflection crescent. -
Dome Curvature (
$0.05 - 1.0$ ): Curvature radius of the spherical cornea bulge.
-
Iris Depth (
Blends a macro base normal map with a high-frequency micro detail normal map using mathematically exact Reoriented Normal Mapping (RNM):
-
Inputs:
-
Base Normal (RGB): Primary geometry normal map. -
Detail Normal (RGB): High-frequency micro normal map (e.g. skin pores, fabric weave).
-
-
Outputs:
-
Blended Normal (RGB): Perfectly blended composite normal map.
-
-
Properties:
-
Detail Scale (
$0.0 - 5.0$ ): Intensity multiplier for the micro detail layer. -
Detail Repeat (
$1.0 - 50.0$ ): UV tiling repeat factor for the detail normal.
-
Detail Scale (
Combines two textures or colors using standard digital compositing operators.
-
Inputs:
-
Base (RGBA): Background layer. -
Blend (RGBA): Foreground layer.
-
-
Outputs:
-
Result (RGBA): Composite image.
-
-
Properties:
-
Blend Mode:
Mix / Linear,Multiply,Screen,Overlay,Add,Subtract. -
Blend Factor (
$0.0 - 1.0$ ): Opacity / mix weight.
-
Blend Mode:
Packs up to 4 grayscale maps into the Red, Green, Blue, and Alpha channels of a single composite texture.
-
Inputs:
R (Red),G (Green),B (Blue),A (Alpha). -
Outputs:
RGBA (Combined). -
Properties: Default value (
$0 - 255$ ) used whenever an input pin is unplugged.
Deconstructs a packed RGBA texture into 4 individual scalar channels.
-
Inputs:
RGBA (Source). -
Outputs:
R,G,B,A.
The master terminus of the material graph. Evaluates the graph, updates the real-time viewport, and compiles all channels into a complete Ray-MMD ReForge material package (.fx + textures).
-
Input Pins (14 Channels):
-
0: Albedo: Base color texture map. -
1: Albedo Sub: Secondary albedo layer (sheen or tint). -
2: Alpha: Scalar opacity / cutout mask. -
3: Normal: Tangent-space macro normal map. -
4: Roughness / Smoothness: Microfacet roughness or smoothness map. -
5: Metalness: Dielectric/conductor mask ($0.0 = \text{dielectric}, 1.0 = \text{metal}$ ). -
6: Specular: Microfacet specular reflectance$F_0$ color map. -
7: AO: Ambient occlusion cavity mask. -
8: Height: Depth / displacement height map. -
9: Emissive: Self-illumination color map. -
10: Custom A: Dedicated scalar parameter map for active shading model. -
11: Custom B: Dedicated color / vector map for active shading model. -
12: Detail Normal: High-frequency micro detail normal. -
13: Normal Sub: Secondary normal map (e.g. hair strands, clothing weave) blended via Reoriented Normal Mapping (RNM).
-
-
Settings:
-
Material Name: Prefix used when exporting
.fxand textures. -
Shading Model:
0: Standard,1: Skin,3: Anisotropy,4: Glass,5: Cloth,6: ClearCoat,7: Subsurface,8: CelShading,9: ToonShading. -
Roughness Mode: When checked, automatically inverts the connected Roughness input into Ray-MMD's native Smoothness convention (
$S = 1.0 - R$ ). -
Sub-Normal Controls:
-
Scale ($0.0 - 5.0$): Multiplier for the secondary normal strength. -
Loop / Tiling ($0.1 - 100.0$): UV tiling repeat factor fornormal_sub.png. - Viewport features full real-time Reoriented Normal Mapping (RNM) composite preview.
-
-
Hair & Eye Special FX:
-
Procedural Hair Enable: Emits#define PROCEDURAL_HAIR 1in exported.fxto activate Ray-MMD's multi-frequency harmonic highlight breakup equation (hairNoise = sin(nx) * 0.4 + sin(nx * 1.732) * 0.3 + sin(nx * 3.1415) * 0.3). -
Procedural Hair Scale($0.1 - 100.0$ ) &Intensity($0.0 - 2.0$ ): Spatial frequency and highlight perturbation amplitude. -
Convex Normal Enable: Emits#define CONVEX_NORMAL 1in exported.fxto invert eye mesh curvature ($\mathbf{N}{xy} = -\mathbf{N}{xy}$), turning flat or concave anime eyes into convex refractive corneal domes. -
Eye Parallax Enable: Emits#define EYE_PARALLAX_ENABLE 1in exported.fxto activate screen-space Snell's law refraction raymarching across the anterior chamber. -
Eye Iris Depth($0.001 - 0.5$ ): SetsEYE_IRIS_DEPTH($0.05$ ). -
Eye Cornea IOR($1.0 - 2.0$ ): SetsEYE_CORNEA_IOR($1.376$ ).
-
-
Emissive Blink Mode:
-
0: None: Static glow. -
1: Constant Frequency: Sinusoidal pulsing with independent RGB frequency control. -
2: Morph Controller: Pulsing driven by MMD facial morphs.
-
-
Hex-Tiling (Mikkelsen 2022): Enables stochastic hexagonal texture bomb tiling in the generated
.fxto eliminate visible tiling patterns on large stage floors or terrains. - Hashed Alpha Cutout: Enables stochastic alpha cutout for hair cards and foliage without sorting artifacts.
-
Detail Normal Micro-surface: Activates secondary detail normal blending in the exported
.fxshader.
-
Material Name: Prefix used when exporting
- In Single Material Mode, click Β«β‘ Auto PBR from Image...Β» in the left sidebar.
- Select your diffuse texture (e.g.
stone_diffuse.png). - The editor automatically builds a complete node network:
-
ImageInput$\to$ HeightGenerator$\to$ NormalGenerator$\to$ Normaloutput pin. -
HeightGenerator$\to$ AOGenerator$\to$ Occlusionoutput pin. -
HeightGenerator$\to$ RoughnessGenerator$\to$ Smoothnessoutput pin. -
ImageInput$\to$ MetalnessGenerator$\to$ Metalnessoutput pin.
-
- Preview the material on the 3D sphere with dynamic Cook-Torrance GGX lighting.
- Adjust sliders in the graph to fine-tune roughness range and normal strength.
- Click Β«πΎ Export Ray-MMD PackageΒ» to generate your
.fxfile and companion maps in a single folder.
When 3D surfaces have uniform specular highlights, they look unnaturally synthetic. To create organic, physical micro-roughness:
- Start with your base roughness (from
RoughnessGeneratoror aColorInputgray value). - Create a
ProceduralNoisenode:- Set
Noise Typeto Perlin fBm. - Set
Scale = 6.0,Octaves = 4,Gain = 0.5.
- Set
- Add a
ColorBlendnode:- Connect base roughness
$\to$ Base. - Connect
ProceduralNoise$\to$ Blend. - Set
Blend Modeto Overlay andFactor = 0.30.
- Connect base roughness
- Plug the result into the
Smoothnessinput pin ofRayMaterialOutput. - Rotate the light in the 3D viewport (
Ctrl + LMB): the specular highlight will organically deform across subtle surface smudges and handling wear, instantly removing the artificial plastic look.
To add realistic micro-surface detail (such as human skin pores, leather wrinkles, or fabric weave) without high-resolution source textures:
- Create a
ProceduralNoisenode and setNoise Typeto Voronoi Cellular withScale = 35.0(for skin pores) or20.0(for leather). - Connect
Noise$\to$ NormalGenerator(Scale = 1.2,Filter = Scharr,Orientation = DirectX). - Add a
NormalBlend (RNM)node. - Plug your base macro normal into
Base Normal, and the procedural Voronoi normal intoDetail Normal. - Set
Detail Repeat = 8.0andDetail Scale = 1.0. - Plug the result into the
Normalpin ofRayMaterialOutput. - Rotate the light in the 3D viewport (
Ctrl + LMB) to observe crisp grazing-angle micro-highlights.
To create aged surfaces where paint is worn away by oxidation or grime:
- Create a
ProceduralNoisenode (Noise Type = Perlin fBm,Scale = 3.5,Octaves = 5). This serves as the master wear distribution mask. -
Color Layering (Albedo):
- Add a
ColorBlendnode (Blend Mode = Mix). - Plug your clean paint texture/color into
Base. - Plug a dark reddish-brown rust color (
ColorInput) intoBlend. - Connect
ProceduralNoiseinto the blend factor/modulator. - Connect the result to
Albedo.
- Add a
-
Dielectric Transition (Metalness):
- Raw oxidized rust is a dielectric non-metal, whereas bare steel is a conductor.
- Feed the noise mask into a
RoughnessGeneratorwithInvert = true(clean steel$= 1.0$ metallic, rust patches$= 0.0$ dielectric) and plug intoMetalness.
-
Surface Relief (Normal):
- Pitted rust swells outward and flakes. Feed the same
ProceduralNoiseinto aNormalGenerator(Scale = 2.0,Filter = Scharr) and plug intoNormal.
- Pitted rust swells outward and flakes. Feed the same
- Result: A fully synchronized, physically coherent material where rust patches exhibit distinct color, non-metallic dielectric response, increased micro-roughness, and raised surface relief simultaneously from a single procedural noise node.
To convert an entire MMD model (stage or character) to physical PBR in seconds:
- Click Β«π PMX StudioΒ» on the top menu bar.
- Click Β«π Open PMXΒ» and select your model file (e.g.
Cafe.pmxorModel.pmx). - The model loads into the 3D viewport with all subsets listed in the left panel.
- Direct 3D Picking: Click directly on any object in the 3D viewport (e.g. the floor or a chair) to immediately highlight and select its material subset.
- Click Β«β‘ Batch Auto-PBR AllΒ» in the subset header:
- The editor scans all subsets for diffuse textures.
- Using multi-threaded CPU parallelization (Rayon), it synthesizes complete PBR node graphs and maps for every material simultaneously.
- Toggle Β«WireframeΒ» in the viewport toolbar to verify mesh topology and subset boundaries.
- Switch to the Β«πΌ 2D Texture ViewerΒ» and enable Β«UV WireframeΒ» to inspect UV triangle unwrap layouts directly over the generated texture maps.
- Click Β«πΎ Export All MaterialsΒ» in the left panel:
- The editor exports all subset materials into a
materials_reforge/folder next to your PMX model, complete with unique.fxfiles and texture sets ready to assign in MikuMikuDance!
- The editor exports all subset materials into a
To author lustrous anime or realistic character hair with physical anisotropic highlight breakup:
- From the top menu Β«PresetsΒ», select Β«β¨ Silky Hair (Anisotropic + Strands)Β», or build manually:
-
Hair Base Setup:
- In
RayMaterialOutput, setShading Modelto 3: Anisotropy (SHADINGMODELID_HAIR). - Set base
Albedo Colorto your desired hair shade (e.g. golden blonde or chestnut brown). - Under
Hair & Eye Special FX, check Β«Procedural Hair EnableΒ» withScale = 50.0andIntensity = 0.5. This activates Ray-MMD's mathematical highlight perturbation equation.
- In
-
Procedural Strand Generation:
- Create a
HairStrandGeneratornode:- Set
Strand Density = 35.0(for broad anime locks) or150.0(for fine fibers). - Set
Roughness = 0.35,Waviness = 0.15,Wave Frequency = 6.0. - Choose
Orientation = Vertical(matching hair UV flow).
- Set
- Create a
-
Channel Wiring:
- Connect
Normal (Strands)$\to$ Normal Sub(Pin 13) ofRayMaterialOutput. - Set
Normal Sub Scale = 1.2andNormal Sub Loop = 1.0. The editor blends this with your head/card macro normal using Reoriented Normal Mapping (RNM). - Connect
Tangent Shift (Silky)$\to$ Custom B(Pin 11). This provides the microfacet shift jitter (equivalent toshift4.png) required for Kajiya-Kay / Marschner secondary specular rings. - Connect
Strand Maskinto aRoughnessGenerator$\to$ Roughness(Pin 4) to ensure specular glossiness follows individual hair fiber depths.
- Connect
- Result: Crisp, unbroken anisotropic specular rings that catch light from any angle with silky microscopic fiber relief.
To eliminate flat or sunken "dead" anime eye reflections and achieve deep, living gaze reflections:
- From the top menu Β«PresetsΒ», select Β«π Anime Eye (Cornea Dome + Iris Parallax)Β», or build manually:
-
Source Texture:
- Add an
ImageInputnode and load your character's flat iris/pupil texture.
- Add an
-
Cornea & Parallax Synthesis:
- Add an
EyeCorneaGeneratornode and connectImageInput$\to$ Iris Color (Optional). - Configure anatomical properties:
-
Iris Depth = 0.05(anterior chamber depth). -
Cornea IOR = 1.376(physical human corneal refractive index). -
Limbal Ring Width = 0.08,Limbal Darkness = 0.70. -
Caustic Intensity = 0.35,Dome Curvature = 1.0.
-
- Add an
-
Master Output Wiring:
- In
RayMaterialOutput, selectShading Model = 0: Standardor6: ClearCoat. - Under
Hair & Eye Special FX:- Check Β«Convex Normal EnableΒ» (
CONVEX_NORMAL 1). - Check Β«Eye Parallax EnableΒ» (
EYE_PARALLAX_ENABLE 1). - Set
Iris Depth = 0.05andCornea IOR = 1.376.
- Check Β«Convex Normal EnableΒ» (
- Connect
Refracted Iris$\to$ Albedo(Pin 0). - Connect
Cornea Dome Normal$\to$ Normal(Pin 3). - Connect
Iris Parallax Map$\to$ Parallax(Pin 8). - Connect
Limbal & Caustic Map$\to$ Albedo Sub(Pin 1). - Set
Smoothness = 0.95(mirror-gloss wet corneal tear film).
- In
-
Result: The flat eye mesh instantly transforms into a convex optical lens. Rotating the light (
Ctrl + LMB) creates spherical highlights that wrap around the cornea, while viewing at oblique angles reveals deep 3D iris immersion with Snell's law refraction.
| Channel Name | Texture Format | Value Range | Ray-MMD HLSL Macro |
|---|---|---|---|
| Albedo | sRGB RGBA | ALBEDO_MAP_ENABLE |
|
| Albedo Sub | sRGB RGBA | ALBEDO_SUB_ENABLE |
|
| Normal | Linear DirectX (-Y) | NORMAL_MAP_ENABLE |
|
| Normal Sub | Linear DirectX (-Y) |
NORMAL_SUB_MAP_ENABLE (normalSubMapScale) |
|
| Detail Normal | Linear DirectX (-Y) | DETAIL_NORMAL_MAP_ENABLE |
|
| Smoothness | Linear Grayscale | SMOOTHNESS_MAP_ENABLE |
|
| Metalness | Linear Grayscale | METALIC_MAP_ENABLE |
|
| Occlusion | Linear Grayscale | OCCLUSION_MAP_ENABLE |
|
| Parallax | Linear Grayscale | PARALLAX_MAP_ENABLE |
|
| Emissive | sRGB / HDR RGB | EMISSIVE_MAP_ENABLE |
|
| Custom A | Linear Grayscale | Shading Model Dependent |
CUSTOM_ENABLE (customDataA) |
| Custom B | Linear RGB | Shading Model Dependent |
CUSTOM_ENABLE (customDataB) |
| Procedural Hair | Algorithmic HLSL | High-frequency harmonic perturbation | #define PROCEDURAL_HAIR 1 |
| Convex Eye Normal | Algorithmic HLSL | Inverted tangent curvature $\mathbf{N}{xy} = -\mathbf{N}{xy}$ | #define CONVEX_NORMAL 1 |
| Eye Iris Parallax | Screen-Space Raymarch | Snell's law refraction raymarching | #define EYE_PARALLAX_ENABLE 1 |
Ray-MMD ReForge is an open-source next-generation PBR render engine for MMD based on Ray-MMD (Rui). Released under the MIT License.