mitsuba-renderer / mitsuba-blender

Mitsuba integration add-on for Blender
BSD 3-Clause "New" or "Revised" License
278 stars 36 forks source link

Handle 'Seperate Color' nodes #53

Open expenses opened 1 year ago

expenses commented 1 year ago

I tried importing the sponza glTF model into Blender and then exporting it to mitsuba, but it failed to export the materials properly because they're using 'Seperate Color' nodes to split the metallic/roughness textures apart:

20221207_20h32m05s_grim

This PR does a rather hacky redirect of the node to it's input image and materials now get exported. I'm not sure if they're correct though, because I don't know what format Mitsuba expects metallic or roughness textures to be in. Perhaps it would be better to extract the channel that the colour is being separated from and save them as greyscale images?