4
$\begingroup$

I want to create a 3D object of an image to use in AR using the Blender Python API. I've added the image to the scene as a plane, this works perfectly. The image is also shown in the .blend file. However, when exporting to GLTF, the image is missing. I simply get a blank plane, and this seems to happen to other export options as well. Aside from not exporting correctly when using the Python API, it does also not work when exporting manually from Blender.

To place to file in the scene: bpy.ops.import_image.to_plane(shader='SHADELESS', files=[{'name': PATH}])

To export: bpy.ops.wm.usd_export(filepath=PATH)

Any idea's? Running Blender 2.91.

$\endgroup$
6
$\begingroup$

Unfortunately the glTF exporter does not recognize the setup that "Import Images as Planes" uses for a "Shadeless" material, which looks like

Import Images as Plane setup

However if you delete the group node, it can recognize that graph as "Shadeless" and should be able to export it.

Setup recognized by glTF exporter

$\endgroup$
1
  • $\begingroup$ btw I filed as issue for this. $\endgroup$
    – scurest
    Feb 23 at 0:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.