I’ve switched from exporting .egg in Blender 2.7x (using YABEE) to .gltf in Blender 2.8, but I’ve noticed the material definition that is being read by Panda3D is quite different:
Material a(0 0 0 1) d(0.119275 0.119275 0.119275 1) s(0.252942 0.252942 0.252942 1) e(0 0 0 1) s0.25 l0 t0
has now changed to:
Material body base_color = 1 1 1 1 refractive_index = 1 emission = 0 0 0 0 roughness = 1 metallic = 1 local = 0 twoside = 1
If I understand correctly, the glTF file format needs something called a PBR render pipeline, but it also seems to me that exporting to glTF takes away much of the possibilities to programmatically alter materials using the Material() class (using replaceMaterial/setMaterial).
Before I used something like:
material = Material() material.setSpecular((0, 0, 0, 1)) material.setDiffuse((1, 1, 1, 1)) self.node.setMaterial(material, True)
But this doesn’t have the same effect as it does with my older .egg models. Using findAllMaterials() shows me the material has been set correctly, but the model remains practically black when the same material on an .egg model gives the expected result.
Is there an easy way of working with both model formats the same (without switching to panda3d-simplepbr)? I’d really like to use Blender 2.8, but YABEE is not available for it… I read Panda3D might switch to glTF as its primary format in the future, so I’d really like to use it right away. Yet, the Material() class doesn’t seem to give me the tools I need to modify my model’s materials.