How to import non-PBR materials from Blender?

  1. I create a simple textured model with Blender 2.82
  2. Export it as GLTF.
  3. Load it to scene using JME.

All works well, but it uses PBR Lighting materials which is not desired behavior (game has retro graphics).

I return to Blender and see Material Surface setting that really look as something like PBR-related.

Then I try to simplify. For example to set just “Emission” with my texture as Color source.

Still PBR. Then I try different Blender shaders and all leads to PBR in JME.

I go to GltfLoader(jme3-plugins) and see, that JME use PBR if pbrMetallicRoughness is non-null. Then I try different Blender shaders with breakpoint at this line and see that pbrMetallicRoughness somtimes “{}”, but never null.

Is there any way to configure Blender to include non-PBR materials into model?

Actually, it doesn’t block me, because I can just replace all materials after loading. But would be nice to find a pure solution.

PS: as I’ve been told on this forum, Blender seems to be nice alternative for specialized level editors even for retro-style games. At least if used with Sprytile (2.79, 2.80+) addon.

1 Like

I think right now the only way is to replace the material as you are doing.

Note: JmeConvert allows you to run groovy or javascript scripts against your model during the conversion process. This lets you export j3ms for your materials so that you can edit them but you can also fully replace all of the gltf loaded materials with your own during the conversion process.

…just takes a little scripting. But at least it’s repeatable then.


Hm, Interesting.

Actually, I do not care about model loading RAM and CPU consumption (whole level contains less polys, than one character in modern game), so I load GLTF and replace materials directly in game code.