NPR material from blender to three js?

I wanna make NPR scene in three js. I created material just like in the first photo. And I previewed the model in gltf-preview but it’s not working. So I wonder if there is a way to import NPR material in three js.

You’d probably need to write a tiny, custom shader material to handle that shader graph.

Afaik, glTF supports only Principled BSDF at the moment (docs.)

@mjurczyk Is that so? Now I know what to do next. Thanks you.

Another option would be to bake the effect to a diffuse/baseColor texture, and then connect the texture directly to the Material Output Surface socket. In newer versions of Blender this should be exported as an unlit/shadeless material. Or you could export it connected to the base color socket of the Principled BSDF material like a PBR material, and then convert it from MeshStandardMaterial to MeshBasicMaterial after loading in three.js.

1 Like

@donmccurdy There is an issue that the effect only works in blender evee engine and when using evee , the bake option is not available. Maybe I could archive this effect in cycles … I will give it a try . Thanks you .