-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Textured gltf objects not displayed correctly #785
Comments
Hi @chisarie, Thank you for the feedback! Indeed, I can reproduce the issue on my laptop. Personally, I am quite busy so I can look into it only at the beginning on May. Maybe @xtanion or other member of the team have time to look deeper at it. feel free to go for a fix, If you also want to give a try ! |
@skoudoro I dont think this issue is caused due to the incorrect mapping of texture indices, when the original actors that were added are removed and the gltf file that was created using the scene before is loaded separately this bug does not occur. 1st time I ran this code: cube = actor.cube(np.add(centers, np.array([2, 0, 0])), colors=colors / 2)
scene.add(cube)
sphere = actor.sphere(np.add(centers, np.array([0, 2, 0])), colors=colors)
scene.add(sphere)
fetch_gltf('BoxTextured', 'glTF')
filename = read_viz_gltf('BoxTextured')
gltf_obj = gltf.glTF(filename)
box_actor = gltf_obj.actors()
scene.add(box_actor[0])
##############################################################################
# Setting camera to the scene.
scene.set_camera(
position=(4.45, -21, 12), focal_point=(4.45, 0.0, 0.0), view_up=(0.0, 0.0, 1.0)
)
gltf.export_scene(scene, filename='viz_gltf_export.gltf') 2nd time I just loaded the actors from the gltf file # cube = actor.cube(np.add(centers, np.array([2, 0, 0])), colors=colors / 2)
# scene.add(cube)
# sphere = actor.sphere(np.add(centers, np.array([0, 2, 0])), colors=colors)
# scene.add(sphere)
# fetch_gltf('BoxTextured', 'glTF')
# filename = read_viz_gltf('BoxTextured')
# gltf_obj = gltf.glTF(filename)
# box_actor = gltf_obj.actors()
# scene.add(box_actor[0])
##############################################################################
# Setting camera to the scene.
scene.set_camera(
position=(4.45, -21, 12), focal_point=(4.45, 0.0, 0.0), view_up=(0.0, 0.0, 1.0)
)
# gltf.export_scene(scene, filename='viz_gltf_export.gltf')
gltf_obj = gltf.glTF('viz_gltf_export.gltf')
actors = gltf_obj.actors()
scene.add(*actors) Doing it this way does not produce any error. I think this issue occurs due to the overlapping of two actors with each other. Thank you |
Thank you for the feeback @ishankamboj. which actors are overlapping ? Can you provide more details ? if it is the case, we still need to update the tutorial and/or the code |
The box actor which is added to the scene first and the new box actor that is again added on top of it when the actors are added using the 'viz_gltf_export.gltf' these 2 overlap with each other which causes this weird behaviour. |
@skoudoro So I think we would need to update the tutorial, So as to avoid confusion. |
Dear all,
I just started playing around with Fury, it looks like a very interesting library!
I've just discovered one issue when running the example script https://github.com/fury-gl/fury/blob/master/docs/examples/viz_gltf_export.py (after setting
interactive=True
).It seems that the texture indeces are not mapped correctly, see attached gif. Do you also see the same behavior?
I am using Python 3.9.16 on Ubuntu 20.04, on a laptop without Nvidia GPU (only integrated Intel card). I have just cloned the fury repo a few minutes ago and installed from source.
The text was updated successfully, but these errors were encountered: