Has anyone else had issues with appearances while trying to use the new CadShape node instead of an imported model with a PBRAppearance?
I've been trying to convert the imported 3D objects in one of my simulations to be CadShape nodes instead of actually imported. I've realized this now means that the colour/material info needs to be in the .mtl file corresponding to the .obj file Webots references for the model, so I've been trying to add this info in Blender (Fusion360 doesn't export .mtl files with obj).
In Blender I set various material properties, but when I export it and reference it in Webots, it looks nothing like it did in Blender and, more importantly, nothing like the previous PBRAppearance. The main issue seems to be that the new models just won't reflect the surroundings correctly (unless the colour of the model is basically black).
For example, I've included an image of 4 of the same model, the bottom left being the old model with the PBRAppearance defined in Webots, and the other 3 being obj exports from Blender with various settings. The silver part is the part I'm having issues with. All three of the Blender exports are supposed to be 100% metallic where it should look like a mirror (even more so than the one with the PBRAppearance), but they won't reflect any of the surroundings properly. I've included an image of the object in Blender, and I've also included another image of these 4 models with a different Webots background, showing the difference between the PBRAppearance model and the Blender ones quite well.
I've spent hours trying to change settings in Blender and the actual .mtl file to get the same look that the PBRAppearance has to no avail. I've also tried collada files but they have absolutely no reflectivity/metallic looks at all (and fusion will only accept one of these two file types now).
It's not just for this lidar model - it seems that all appearances from Blender just don't appear correctly in Webots, mainly with respect to reflectivity being either way too high or way too low.
Has anyone else had this issue and found a way to solve it? Webots removing the ability to import models seems to have absolutely removed the functionality of getting models to look how they should, I'm really hoping that's not the case. I know that I can import each individual object as a mesh and colour it within Webots as well, but this would then cause me to have a separate obj file for every differently coloured face in my model, which would be hundreds. Not only would that make the file folder nightmarish and huge, I expect that Webots would be very, very slow each time it loaded these hundreds of models in from the folder, so I'm hoping there's a better solution than that.
Also, I tried exporting from Blender as an obj with PBR extensions, but then Webots fails to read the .mtl file properly.



Also, will Webots ever update so that it doesn't give an error when reading an mtl file with PBR extensions?
– Pyphais Jun 27 '23 at 17:11objfile. This applies to all types of textures, e.g., base color, roughness, metalness, occlusion, emissive color etc. However, the PBR attributes (basec color, etc.) will be common to all sub-textures. If you need to have different PBR parameters for different objects, then, yes, you need to split your mesh into different sub-meshes, each having its own PBR appearance. – Olivier Michel Jun 28 '23 at 13:22