< Return to tutorials

Modifying VRoid materials in Unity

The VRM format uses a shader called MToon. Due to the restrictions of the format, it is not possible to use any other shader than MToon and Unity standard. However, MToon still offers a large amount of functionalities that aren't accessible from VRoid itself. It is however possible to take advantage of them in Unity.
Make sure you separate the materials of the hair you want to have a different effect when creating.

As usual, to import into Unity, download any version of Unity, preferably a recent one, then import the latest UniVRM package, and place the VRM file somewhere inside the Assets folder of the project.
This will create a series of folders. The **.Materials folder contains all the materials in the model. You will need to identify which one correspond to the piece of hair you want

Transparency

It is possible to use alpha transparency to make partially transparent by changing the material's property. You can modify the texture to make it partially transparent.

Then change the rendering type of the material to be either Transparent or TransparentWithZWrite, depending on which looks best.

This will make the material transparent.

You can also apply this to clothing as well.

But be careful to not stack multiple transparent on top of each other, otherwise the rendering might be weird.

Matcap

Matcap is a way to simulate reflection on a material. It uses a texture as a base for the reflections.

It can be used for a variety of effects, for instance, this is what happen when using the same texture as the hair emission into the matcap.

Here's another example using this as a matcap.


By being creative, it's possible to get interesting results

Scrolling Animation

MToon offers the ability to make a texture move. It will scroll the texture automatically over time. This can be ajusted in the Auto Animation part of the material.

The Scroll X and Scroll Y determine the speed at which the texture will move. The Mask is a optional grayscale image that indicates which part of the texture should scroll. Black means nothing moves and white means full scrolling, with gray being partial scrolling.
You can also use the Tiling and Offset value to adjust how the texture is aligned on the mesh

Now feel free to try and experiment at your leisure.