LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Direct3D for creating 3D-laboratories

I need to create 3D-lab. It means that my "anyfile.vi" should load DirectX objects. Also I need to use different special effects that allow DirectX (e.g. smog, particles and so on). Notice! All engine of "*.vi" create people, who don't know programming Languages. So they know only LabView -not LabWindows/CVI. After their work I will finish creation of (*.vi) by inserting DirectX scenes (sure if it's possible)...

Message Edited by Sirios on 06-29-2005 02:01 AM

0 Kudos
Message 1 of 13
(4,143 Views)
Hi Sirios,

Sorry, but I don't understand what you are trying to accomplish. In case you are just trying to run DirectX compatible videos in LabVIEW I would recommend you to use an ActiveX container on the front panel that has an ActiveX control embedded that can play your DirectX file. There are several applications that can play DirectX media, so I will not recommend a certain product.

If this is not what you were asking for please describe further what you want, thanks.

Have fun!
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 2 of 13
(4,128 Views)
Hello, sorry if my means are not understandable.

I want to inculcate Direct3D into LabView-file (anyfile.vi). But I don't know how to do this. All controls and tools that LabView suggests us for using are poor for purposes of my University. I need to reproduce real physical processes and show students how these processes are passing by. For example: using by Direct3D I show students a flight paths of the electrons in a magnetic area. And each student can see magnetic lines (sure in real life its invisible, but using DirectX I can show transparency lines as smoke lines). Students will see magnetic area, flight of electrons and will be might to change parameters of magnetic area by native LabView controls. So if student will change a value of magnetic induction he will see how magnetic lines and flight paths of electrons were changing. DirectX scene should interact with LabView controls - it means that each object of 3D-scene has a behavior depended of LabView controls value. I want to insert sources of the light and cameras into 3D-scene and students can see physical processes from any point of 3D-scene.
So I don't need to play DirectX media as just video. And all that I need - is understand how can I create a relationship between LabView and DirectX.
I have made ActiveX-control which contain DirectX 3D-scene, but LabView doesn't see this ActiveX. So if you know how to do this - please help me.
0 Kudos
Message 3 of 13
(4,122 Views)
If you use LabVIEW 7.1 the 3D Toolkit may be an option. It has some limitations but is currently a free trial to download. It uses the Picture Control to render an OpenGL stream you build with the provided VIs in this Toolkit.

http://zone.ni.com/devzone/conceptd.nsf/webmain/9672F024704DE89086256ED100620A56

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
Message 4 of 13
(4,121 Views)
To Rolfk...

Thank you for this link. I've already use this third part tool (which based on the OpenGL). But it is still not that way that i need. This tool provide a poor functionality for developers. And i can't build realy plausible application by using it. Is there another way to make it??? I realy need to use DirectX.
0 Kudos
Message 5 of 13
(4,098 Views)
If you really need DirectX you will have to learn C++ and create shared libraries which do the nitty gritty work of calling DirectX functions. Then export those functions you created as standard C functions to be called from LabVIEW. I'm absolutely sure that after having spend several weeks on this you will be grateful with the functionality the 3D Toolkit actually provides and the simplicity it provides in its use, instead of having to deal with DirectX ;-).

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 13
(4,094 Views)
Thank you. I know C++ very well, but because my work requires to use C# so it will be good to remind C++. Thank you for that idea. Now I will try to make some wrappings for DirectX libraries on pure C++.
0 Kudos
Message 7 of 13
(4,090 Views)
Hi, Sirios. You could give a try through ActiveX methods. Try this:
 
- Insert "automation open" from Funcions palette>Communications>ActiveX
- Right-click on the subVI and select "select ActiveX class>browse..."
- On the "type library" selector of the new window select something like "DirectX 8 for Visual Basic", then in the objects box choose "D3DX8" and hit OK.
- Then insert an Invoke Node from the ActiveX palette and wire the reference from the "automation open" to the node just created.
- Rigth click on the node and choose "methods...". This should show you the different methods you can call this way.
 
I'm not familiar to DirectX, but I'm shure you could do something from this on.
 
Hope this helps.
 
Daniel Ramírez
Dev. Enginner
MSc - Mech. Eng.
Mechanical Engineering Department
Universidad de Concepción
Chile
 
0 Kudos
Message 8 of 13
(4,041 Views)
You might not need C++ if you are familiar with C#.  I have not used directX much but version 9.0 is .net based and not COM/activeX.  Again I have done my 3d graphics in openGL so I cant give you too much help.  Starting with LV 7.0 you can call .net classes such as the directX 9.0 SDK.  I would be curious to see how this works out for you.  Good luck,
paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 9 of 13
(4,033 Views)

I am at a crossroads: Open GL or Direct X.

For use within LabView, it seems that Direct X may be a problem (from discussion on thread)

Open GL may therefore be a better option.

Does someone have some sample LabView code for Open GL within LabView, or can give some assistance in this regard?

0 Kudos
Message 10 of 13
(3,993 Views)