From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse rotating a 3D Object around a superimposed and stationary 3D object in a 3D picture control

Hello

I have superimposed two 3D objects in a 3D Picture control as shown in the attachment. What I want to do is to freeze one of the objects, like the box, and use the default mouse actions below only on the other object (the cylinder) without affecting the view, size, and location of the frozen object. This is essentially trying to move and rotate one object around another stationary object. Any idea of how to do this?

Default mouse actions on a 3D Picture control: (1) Left mouse button = Rotate, (2) SHIFT + Left mouse button = Zoom, and (3) CTRL + Left mouse button = Translate.

 

0 Kudos
Message 1 of 4
(2,609 Views)

Hi John,

 

Have you tried playing around with different camera modes? From what you have it might be worthwhile to look into it. Also, which version of LabVIEW are you using?

 

The help for the picture control can be found here:

http://zone.ni.com/reference/en-XX/help/371361K-01/lvhowto/3d_configure_camera/

Gabriel M.
Product Marketing Engineer - Academic Courseware
National Instruments
0 Kudos
Message 2 of 4
(2,566 Views)

Thanks for the reply Gabriel,

I am using LabVIEW 2013 Professional/full Development.

The camera modes work on the two objects as one. What I am looking for is a way of manipulating one object using the mouse while the other is not affected.

 

Alternatively,

1. Can you have a transparent background on a 3D picture control?

2. Can you put a 2D picture (like a JPG picture) to be the background of a 3D picture control?

From the property nodes you can change the background color to a different color, but can you make it transparent or have a picture as the background?

 

John

 

0 Kudos
Message 3 of 4
(2,541 Views)

Hi John,

 

1. I don't believe that you can have a transparent background on a 3D picture control

2. I don't know if you can do this natively, but what I've done before is to make a giant sphere environment that all the other objects live inside and put a jpg texture pattern on that object. I played around with the solar system example to do this and that allowed me to create a star background inside the sphere environment.

 

On the question of cameras, there might be other camera controls for download with openGL, but I'm not certain of any thing in particular. I know that some of the LabVIEW robotics examples have more extensive 3D picture controls so that might be something to look into if you have that.

Gabriel M.
Product Marketing Engineer - Academic Courseware
National Instruments
0 Kudos
Message 4 of 4
(2,519 Views)