Visualizing a glTF file#
In this tutorial, we will show how to display a glTF file in a scene.
from fury import window from fury.data import fetch_gltf, read_viz_gltf from fury.gltf import glTF
Create a scene.
Retrieving the gltf model.
fetch_gltf('Duck', 'glTF') filename = read_viz_gltf('Duck')
Initialize the glTF object and get actors using actors method. Note: You can always manually create actor from polydata, and apply texture or materials manually afterwards. Experimental: For smooth mesh/actor you can set apply_normals=True.
Add all the actor from list of actors to the scene.
Total running time of the script: ( 0 minutes 0.182 seconds)