sceneconverter: implement a --phong-to-pbr option.
Exposes MaterialTools::phongToPbrMetallicRoughness() that got added some
time ago. Most of the code and tests is scaffolding needed for direct
material import and processing outside of the addImporterContents()
automagic, similar to what was already done for meshes and images.
In particular, adding more material conversion options such as
canonicalization or deduplication will be significantly easier now that
the basics are done and tested.
@ -404,6 +407,7 @@ int main(int argc, char** argv) {
.addOption("only-mesh-attributes").setHelp("only-mesh-attributes","include only mesh attributes of given IDs in the output","N1,N2-N3…")
.addOption("only-mesh-attributes").setHelp("only-mesh-attributes","include only mesh attributes of given IDs in the output","N1,N2-N3…")
.addBooleanOption("remove-duplicate-vertices").setHelp("remove-duplicate-vertices","remove duplicate vertices in all meshes after import")
.addBooleanOption("remove-duplicate-vertices").setHelp("remove-duplicate-vertices","remove duplicate vertices in all meshes after import")
.addOption("remove-duplicate-vertices-fuzzy").setHelp("remove-duplicate-vertices-fuzzy","remove duplicate vertices with fuzzy comparison in all meshes after import","EPSILON")
.addOption("remove-duplicate-vertices-fuzzy").setHelp("remove-duplicate-vertices-fuzzy","remove duplicate vertices with fuzzy comparison in all meshes after import","EPSILON")
.addBooleanOption("phong-to-pbr").setHelp("phong-to-pbr","convert Phong materials to PBR metallic/roughness")
.addOption('i',"importer-options").setHelp("importer-options","configuration options to pass to the importer","key=val,key2=val2,…")
.addOption('i',"importer-options").setHelp("importer-options","configuration options to pass to the importer","key=val,key2=val2,…")
.addArrayOption('c',"converter-options").setHelp("converter-options","configuration options to pass to the converter(s)","key=val,key2=val2,…")
.addArrayOption('c',"converter-options").setHelp("converter-options","configuration options to pass to the converter(s)","key=val,key2=val2,…")
.addArrayOption('p',"image-converter-options").setHelp("image-converter-options","configuration options to pass to the image converter(s)","key=val,key2=val2,…")
.addArrayOption('p',"image-converter-options").setHelp("image-converter-options","configuration options to pass to the image converter(s)","key=val,key2=val2,…")
@ -478,8 +482,8 @@ feature for given image dimensions, all mesh converters in the chain have to