LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programatically add/remove objects from 3D scene (or display/hide)

Solved!
Go to solution

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

0 Kudos
Message 1 of 6
(2,921 Views)

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

National Instruments
Applications Engineer
0 Kudos
Message 2 of 6
(2,896 Views)
Solution
Accepted by topic author thad_tensentric

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.

0 Kudos
Message 3 of 6
(2,894 Views)

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.

Message 4 of 6
(2,886 Views)

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.

0 Kudos
Message 5 of 6
(2,850 Views)

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.

0 Kudos
Message 6 of 6
(2,848 Views)