ksons / gltf-blender-importer

Blender glTF 2.0 Importer
MIT License
214 stars 36 forks source link

The difference between import the gltf1.0 and gltf2.0 #46

Open Flatliu opened 5 years ago

Flatliu commented 5 years ago

Thanks for this addon that enable me to import the gltf into blender. And now I am wondering if it could import gltf1.0 into blender. To start with, I try to change the code of searching way. Because there is a dict behind every main properties in gltf 1.0, while it is list behind the main properties. But it is quite difficult, and especially in creating the virtual nodes. I'm not sure if it is a good way. And if there are already some ways to convert the gltf1.0 to gltf2.0?

scurest commented 5 years ago

I don't know of an existing glTF 1 -> glTF 2 converter, but I would recommend that over modifying this importer. It looks like if you're willing to make some assumptions about your input you could bang a passable one together fairly easily (except for the materials).

The current importer code is very deeply intertwined with the 2.0 spec. And, yes, the vnode stuff is unpleasant.

emackey commented 5 years ago

I think gltf-pipeline can still do 1.0 to 2.0 conversion. It's close to being legacy code at this point, and I haven't tested this conversion in a long time, so no guarantees. But it might be worth a try.