LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3D Picture Control: "Remove Object" doesn't seem to work properly

Ok, maybe you mean "Create-->Invoke Node-->Redraw". I tried this but it doesn´t seem to work. Should I control it in any special way or just dispose it onto the block diagram? thanks

0 Kudos
Message 11 of 17
(2,330 Views)

I finally worked around this problem by using the property "Face Culling Mode". It controls which face of every polygon (front, back or both) is going to be displayed in the scene. If you set it to Cull Both Faces, the object won't be removed from the scene, but it won't be showed, until you change this property again.

 

I needed this feature in my application in order to show and hide different parts of the 3D Model on demand.

 

FaceCulling.png

Be careful if you define parent and child objects, because this property is set to "Inherit Mode" by default, so, if you set Cull Both Faces for an object, every child object of it will dissapear as well, unless you set their property to a different value.

 

Regards,

Francisco

0 Kudos
Message 12 of 17
(2,319 Views)

Thank you very much Francisco.. finally it solved the problem!! Smiley Happy

 

Best regards, Tomás

0 Kudos
Message 13 of 17
(2,308 Views)

Hello friends,

 

I tested that this solution doesn't work with mesh objects formed by points. The reason is that "Face Culling Mode" only works with polygons. So the solution that I have satisfactorily proven was to change the "Blending Bin"property to transparent. Thus, the object can be switch on/off from the 3D scene changing between transparent bin and opaque bin modes.

 

I hope it can be useful.

0 Kudos
Message 14 of 17
(2,294 Views)

The "Remove Object" method works fine for me.

 

Please ignore the funny colored wires since I use LVOOP.

 

I keep a named list of all of my object that allow users to remove based on the name. After searching the list of names and finding a match I use the "Get Object" method to get a ref to the object I want to remove. That ref is used with the "Remove Object" method to remove same.

 

Notes:

1) The object is removed but the scene will not reflect this until you refesh the scene which I do in the final VI "Update".

 

2) Yes I have to add code to remove the object from my master list... this code is not done yet. Smiley Tongue

 

Find_Index_Remove_1.JPG

 

 

Inside the Updat VI (after chacing down through the hierarchy I apply the update to the Picture to get the image to update.

 

 

Val_Signalling_1.JPG

 

 

Note: There is a bug with trying to use a normal "value" property node that prevents it from updating without using a "refresh method". That is what I have in the currently disabled case.

 

So the Remove Object does work.

 

take care,

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 15 of 17
(2,291 Views)

Hello, I have one issue to discuss. Does Remove Object work correctly? It seems that if you remove an object it disappear in fact from the scene. However, if you count the objects in the scene after this, you will be able to count the object even if you don't see it. It can easily proven in the following way:

 

1. Create objects dinamically inside a loop given with a new name every iteration (i.e. with the i-terminal linked to the name input)

2. Remove objects by their names

3. Count objects

 

   The problem is that the VI run faster during the first iterations, but when it is running after 200 iterations (more or less) it slows more and more. I assume that this issue is caused by the great amount of objects created inside the scene althouth they are not visible. How can I solve this performance deterioration? I attached pictures for further information.

Thanks

Download All
0 Kudos
Message 16 of 17
(2,276 Views)

Hello dear Ben!

 

In my 3D picture on every iteration I need to show some identical objects but different sizes and now in my code is layering objects from previous iterations with new objects. Does this mean that I also need to carefully create objects and then, before showing new ones, I need to delete the previous ones according to your method?

 

In you code example there are some of "3D pic ": List Scene, Refresh vi's and etc. Where can I find the vi ?

0 Kudos
Message 17 of 17
(1,009 Views)