What is the best way to make an unlit material?

Hello!

I am working on a game that is supposed to have some cartoon looking unlit material.
To achieve this I found several ways of doing it:

  • BackgroundMaterial: This one looks unlit by default but doesn’t allow me to use alpha textures.
  • StandardMaterial with disableLights and a white emissive color: This one works but seems like a hack
  • PBRMaterial with unlit: This one also works but I am scared that is doing super PBR calculations when I just want cartoony looking unlit things.

So… What is the correct way? :thinking:

(Bonus points if you know how to make a GradientMaterial unlit :smile: )

Thank you!

About std or pbr materials, it will depends of your workflow. For example, if you’re using gltf format, you will be forced to use PBR. And I’m not sure but using Blender exporter (to get .babylon) you may be allowed to export as standard (I never tried since Blender 2.8)?

Your hack about StandardMaterial seems OK to me. You can also combine your material ambientColors with a white scene ambientColor.

About the PBRMaterial, maybe setting unlit to true helps to skip some calculations? ('seems logic)

For a gradient material, I would probably just use a texture, and unwrap my UVs on my 3D software (Blender in my case). You can even use an atlas texture to get multiple gradients into one texture only.

1 Like