You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to model a satellite orbiting a model of Earth. I would like to texture my Earth model, and I would like to view the animation of the satellite orbiting. For now my Earth texture is static, but eventually I would like to periodically change it as part of the animation to reflect changes in weather patterns.
I found 2 different high-level approaches:
Use the draw method or O3DVisualizer class and pass in a callback for on_animation_frame (or similar draw and callback functions) where I can apply transformations to objects in the loop
Implement a loop where I can apply transformations and render using visualization.Visualizer
In my experience, approach 2 does not have a path to loading textures that works, so I stopped exploring it. Am I missing something there?
Approach 1 works, but I have found it to be unstable when the animation occurs. It always eventually segfaults in the draw method, although the actual segfault doesn't occur in my callback (although I acknowledge that perhaps something I do in the callback causes the issue downstream).
The high level implementation of my callback is as follows:
Fetch the existing materials from all existing meshes in the scene for future reference
Apply transformations to existing meshes (my callback is a closure, so my originally-defined meshes are in scope)
Call scene.clear_geometry()
For each mesh in the scene, call scene.add_geometry() passing in the transformed meshes and their textures (obtained in step 1)
I never explicitly delete any meshes or materials in my code, I just remove them from the scene. I have other meshes in my environment to visually track other components (e.g. coordinates, locations of interest on Earth, etc), but when I disable them it takes longer for the segfault to occur. This makes it feel like it could be some resource-usage issue related to calling scene.add_geometry more frequently; however, when I watch memory usage through top and nvidia-smi, I do not see it growing as the animation runs in either case.
Is there something obvious I am doing wrong here? Is there a better way? Is this just not what Open3D was intended for in terms of usage?
Note that I am using Open3d 0.19.0, so this shouldn't be caused by the well-documented numpy 2.0 compatibility issue.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to model a satellite orbiting a model of Earth. I would like to texture my Earth model, and I would like to view the animation of the satellite orbiting. For now my Earth texture is static, but eventually I would like to periodically change it as part of the animation to reflect changes in weather patterns.
I found 2 different high-level approaches:
drawmethod or O3DVisualizer class and pass in a callback foron_animation_frame(or similar draw and callback functions) where I can apply transformations to objects in the loopIn my experience, approach 2 does not have a path to loading textures that works, so I stopped exploring it. Am I missing something there?
Approach 1 works, but I have found it to be unstable when the animation occurs. It always eventually segfaults in the
drawmethod, although the actual segfault doesn't occur in my callback (although I acknowledge that perhaps something I do in the callback causes the issue downstream).The high level implementation of my callback is as follows:
scene.clear_geometry()scene.add_geometry()passing in the transformed meshes and their textures (obtained in step 1)I never explicitly delete any meshes or materials in my code, I just remove them from the scene. I have other meshes in my environment to visually track other components (e.g. coordinates, locations of interest on Earth, etc), but when I disable them it takes longer for the segfault to occur. This makes it feel like it could be some resource-usage issue related to calling
scene.add_geometrymore frequently; however, when I watch memory usage throughtopandnvidia-smi, I do not see it growing as the animation runs in either case.Is there something obvious I am doing wrong here? Is there a better way? Is this just not what Open3D was intended for in terms of usage?
Note that I am using Open3d 0.19.0, so this shouldn't be caused by the well-documented numpy 2.0 compatibility issue.
Beta Was this translation helpful? Give feedback.
All reactions