Exporting an imported MMD file (PMD) with textures as a glb file readable by Three.js (Blender)

This article can be read in about 4 minutes.
PR

The purpose 

export a model, imported into Blender from an MMD file, as a glb file viewable in Three.js with textures.

Following the instructions in the article below, exporting as a glb works well for most materials.

However, some things cannot be displayed correctly unless texture information is inherited, like in the example of the eye.

Therefore, it is necessary to export materials with textures.

proceed with an explanation using Animasa’s Hatsune Miku model as an example.

PR

modify material

Find target material

We identify the target material by changing the settings of each material one by one. (For example, we change the color to find the material whose color changes, representing the eyes.) In this case, “材質6” is the eye material.

Checking texture files

With the target material selected, check the file specified for the texture under the “MMD Texture” group.

For example, this would be eye2.bmp.

Modify material setting

With the target material selected, enable “Use Nodes” (it should turn blue as shown in the image below) and select “Principled BSDF” for the surface.

Click the circle to the right of the base color displayed under the modified surface.

Select “Image Texture” from the list that appears.

Select “Open” under “Image Texture” and choose the texture file (eye2.bmp) you confirmed.

After setting this, it will display as follows.

PR

Export

The export settings/method are the same as those on the following page.

PR

Result

We are able to display a texture using Three.js as follows.

For instructions on displaying GLB files using Three.js, please refer to the following page.

comment

Copied title and URL