04-25-2013 06:32 PM
I have a project I am working on where we need to somehow programatically add/remove objects from a 3D scene but without major lag. Basically I have a set of real world objects I am replicating in a 3D scene by loading 6 STL files. I want to display only one of these objects at a time. When the currently displayed object is no longer present I want to quickly display another.
I have tried the "Remove Object" invoke node without any success. I've also tried some other techniques that people have posted dealing with transparency, but without any luck. It seems to me that recreating the scene when objects change is not an appropriate solution because it seems to be a long process.
Just wondering if there is someone who has done this or something similar in Labview.
- Thad Briese
Solved! Go to Solution.
04-26-2013 11:56 AM
Have you seen these example: https://decibel.ni.com/content/docs/DOC-5643 and this white paper: http://zone.ni.com/devzone/cda/epd/p/id/1418
04-26-2013 11:59 AM
Those links are for images. Not for 3D objects. I did get this working with the Object.Remove method. The main thing to keep in mind is to know what objects are currently displayed in the scene and not to try to apply transformations, etc to objects that have been removed.
04-27-2013 07:09 AM
You can also create six separate 3D scenes (one for each model) and only show the one you want.
It's actually simpler than what you're trying to do.
Shane.
04-29-2013 09:19 AM
I might try this at some point. I'll have to evaluate the performance trade-offs of updating multiple scenes and only displaying one vs. swapping objects in and out from time to time.
04-29-2013 10:14 AM
Switching between multiple scenes actually works quite well.
You can also attach a single scene to multiple viewports with different camera settings to view the action from more than one angle.
Shane.