Kupoman / blendergltf

A glTF exporter for Blender
Apache License 2.0
319 stars 49 forks source link

exporting to to facebook 3D post #130

Closed Jimvanhazendonk closed 6 years ago

Jimvanhazendonk commented 6 years ago

I wonder if anyone has any succes using this script to post a 3D post on facebook. I tried many different setting but with no luck. According to facebook Imy file is an invalid model even though I exported as binary The error I get is:

Your GLB File has the following errors: The 3D model could not be posted: This model file is invalid. glTF Path Issue
meshes:0:primitives:0 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:0:primitives:1 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:1:primitives:0 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:2:primitives:0 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:3:primitives:0 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:5:primitives:0 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:6:primitives:0 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:6:primitives:1 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:7:primitives:0 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:7:primitives:1 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:8:primitives:0 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:8:primitives:1 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
meshes:9:primitives:0 Vertex COLOR_0 attributes of type RGB are (temporarily) notsupported. They must be RGBA.
nodes:10 Node hierarchy must form a strict tree.

Any tips would be welcome

ase1590 commented 6 years ago

for now, you may want to look into this implementation: https://github.com/KhronosGroup/glTF-Blender-Exporter

I've used this fine to export to facebook.

Jimvanhazendonk commented 6 years ago

hey thank you. I will try it our. any tips about how using it... seems very complex

On Thu, Mar 1, 2018 at 4:34 PM, ase1590 notifications@github.com wrote:

for now, you may want to look into this implementation: https://github.com/KhronosGroup/glTF-Blender-Exporter

I've used this fine to export to facebook.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Kupoman/blendergltf/issues/130#issuecomment-369630035, or mute the thread https://github.com/notifications/unsubscribe-auth/AAG_PuQpdTg80iplfZ7tzM9vsz6h8vUDks5taBULgaJpZM4SRnAf .

-- Jim van Hazendonk www.racoon.media

ase1590 commented 6 years ago

It works best with the default Blender Render. If you install it and enable the plugins, you can just click "export to glb". Cycles render works, however its hacky and requires a customized .blend file that provides a node that will allow cycles export. It's a work in progress, so the issues with cycles should clear up over time.

Kupoman commented 6 years ago

I have created a facebook branch to begin working on issues with exporting to Facebook. The first commit in it adds a mesh option to export an alpha channel with vertex colors. That should handle those errors about vertex colors needing to be RGBA. The error about the node hierarchy I will likely not be able to do much about without a blend file to reproduce it.

How are you testing with Facebook? I looked at a couple of articles, and it was unclear to me how to create a 3D post.

ase1590 commented 6 years ago

How are you testing with Facebook? I looked at a couple of articles, and it was unclear to me how to create a 3D post.

once exported to a compatible .glb file, the resulting .glb file can simply be dragged and dropped onto the post area of facebook, much like you can do with an image.

Models can also be checked with the facebook validation tool

gltf files can be packed using the gltf packer to produce glb files.

Kupoman commented 6 years ago

I had a feeling it was drag and drop. I dug around the menus looking for an option and could not find one. I guess I should install a drag and drop file manager to test this stuff with. I got a simple file with vertex colors to pass the validator you linked.

Kupoman commented 6 years ago

I have merged the facebook branch into master. I was able to upload a simple model with vertex colors without errors. If you encounter problems with specific blend files, please open a new issue and provide the file or steps to reproduce the problem.