IIIF-Commons / iiif_3d_blender_plugin

A blender plugin for exporting a IIIF manifest from Blender
1 stars 2 forks source link

Feature import export example plugin #15

Closed HeyItsBATMAN closed 4 days ago

HeyItsBATMAN commented 1 week ago

This PR builds upon my previous two PRs, and to not flood with PRs building on-top of each other, I decided to close and combine with my latest changes.

For reference:

With the goal of having Blender import a manifest, and export it without any differences in the exported JSON manifest, I created myself a script and iteratively add support for more manifests.

Currently supported manifests:

List of initially supported features:

Screenshot of a scene with model, camera, and sunlight. image

Notes:

vincentmarchetti commented 6 days ago

I have been able to install this and it is working. The examples with camera already illustrate the need to implement coordinate system transformations. When the glTF model is imported there is behind-the-curtains transform of the axes, Z in gltF becomes -Y in Blender Y in glTF becomes +Z in Blender

This is a usability procedure, doing this means that when you choose the option "Front" in the View > Viewpoints menu you do see the front of the astronaut.

If when a model, for example the astronaut, is exported back to glTF those axes interchanges are reversed, so that the exported glTF file follows the glTF axes convention : https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#coordinate-system-and-units

We will need to do the same interchanges for PointSelector coordinates and the x,yz components of IIIF Transform nodes in in manifests both when they are imported and exported, in able to use Blender to properly place and orient cameras relative to imported models.