-
Creating 3D Image
I have been working on a VB app. Part of the App needs to create a 3D image. The more I read I think that I need to use DirectX for this but I am unsure to tell you the truth.
I have a list of points X(horizontal), Y(vertical), and Z(depth). I want to be able to plot them out so they can be viewed and since it is 3d I need to be able to rotate the finished image as well. There needs be a line connecting each point to the next, until the end of my list. If possible I would also like to be able to click on an individual point on the image and be able to tell where that point is in my list.
The problem is I don't have any idea on where to start on this. I know how to create some pretty basic/genaric 2d bitmaps but 3d and some of the features are an entire different story.
Any assistance is greatly appreciated!!!!
-
Re: Creating 3D Image
-
Re: Creating 3D Image
Yes 2010, and from what I have been reading it is sounding like that is going to be a problem. Am I wrong?
It appears as though I can't bring DirectX directly in the VB2010 like you supposedly could in 2008. Although it looks like I can reference it as a COM object. Although I am unable to find any examples or documentation regarding this.
I started looking at XNA, because that I can bring in as a .NET reference, but I am only finding very minimal examples with that am VB.
Ofcourse what would seam like an easy thing to accomplish is actually turning out not (atleast so far) not to be.
-
Re: Creating 3D Image
If you'd use XNA, it'd be very simple. Altough XNA only supports C# (officially, but i think there are some attempts of getting XNA to VB.NET, though I don't see a reason to not just use C#).
If you're interested in XNA, I'd be more than happy to assist.
-
Re: Creating 3D Image
Well the only problem is, is that the rest of the app, the important part to me is 90% complete, all in VB. I don't know if it is even possible or even where to begin mixing up multiple languages, besides the fact that I have little to no knowledge with C#. I have found a few tutorials with VB2008 and XNA3.x but with 2010 and XNA4.0 there is almost none and going through the tutorials there are quite a few differences that I am coming across, so I am having a hard time getting portions of the tutorials to work.
Eventhough, I initially never bothered to look at or even saw the "Game Demos" here I finally found them which has been occupying the better portion of my day.
So I have started looking and reading and reading. I see where some one has "Upgraded" a project that was using DirectX and everything is working. So I am kind of thinking I might look into using the same .NET .dll's and try to reference them in, but there I am still having a hard time trying to find info on what I am after. The other route I have been looking at is DXIce. It is still a COM object, but it looks like it would work and there seams to be quite a bit more information on utilizing it.
Any pointers one way or another would be greatly appreciated!!!!
-
Re: Creating 3D Image
It can be done with the MDX libraries. First, you need to get the Managed DirectX libraries from Microsoft so you can include one in your project.
Once you do that; you'll be converting a UserControl to a DirectX window. Since it's a UserControl, you can place it on any form. Here's an example of somebody who has done something similar.
-
Re: Creating 3D Image
From what I have been reading is the "Managed DirectX has been discontinued by Microsoft" and is no longer available. Alternatives include SlimDx and XNA. I haven't looked at SlimDx but I am still having trouble finding the proper documentation that is relevant to what I am trying to accomplish.
That project looks really good, I will definatly check it out! Although I wish it was in VB rather than C# so as time flys, if I needed to alter things to meet future demands I could keep up.
-
Re: Creating 3D Image
It shouldn't be too hard to convert it. I've converted massive projects to VB.NET for my own use; mostly because I hate trying to read C# code. MDX is still pretty viable though it's limited to what DirectX9 can do. XNA, while a great platform, is almost too much geared for games. I'm not sure you can mix it's DirectX rendering surface with Winforms; what I know of the API, it's just full-screen DirectX, or full-window DirectX. I haven't seen SlimDx; I'll have to check it out. :)
EDIT: Having read up on SlimDx, it looks like an exciting SDK and will probably do more for you than MDX and XNA. It seems to be more of a 3D/multimedia "utility" platform like MDX than a "game" platform like XNA. It has some very modern features too, such as DX11 support, 64-bit assemblies, and full .NET 4.0 support binaries. I'm downloading it now to check it out. :D
-
Re: Creating 3D Image
The more and more that I read the more and more that I find with VB2010, I get the same answer "This language is not supported". While I have found a couple projects that work in VB2010, all of them are upgraded from 2008.
It is starting to look grim :mad:
Since the more and more that I think that I want this to work, perhaps I should just bite the bullet and Learn C#. I just have a hard time believing that after years of VB supporting some pretty complex graphics (yes perhaps not as effeciently as other languages), that they would just drop it. :eek2:
-
Re: Creating 3D Image
VB.NET and C# are identical in their capabilities. Both are just different syntaxes to the .NET platform. Everything you can do in C# you can do exactly the same way in VB.NET.
The problem is, the industry; especially the gaming and graphics industry is biased towards C++ and C#, so you'll find TONS of examples for C# and claims "this only works with C#"; but in reality, they work perfectly fine with VB.NET as well. XNA for example claims to only work with C#, but I built a perfectly functional Tetris game with it in VB.NET as well as used it for various other unreleased projects.
Anything written in or claiming to be compatible with C#, is also compatible with VB.NET.
VS2010 is just the latest version of Visual Studio. It ALLOWS you to program on the .NET 4.0 platform; which is just an upgrade to the .NET 3.5 platform that VS2008 supports. There's really nothing too mega-exciting in 4.0 that is a "can't live without" feature I've had VS2010 for a few months now and I have yet to use any .NET 4.0 features outside of test programs. When I say "allows" that also means that you can use VS2010 to program on the .NET 3.5, 3.0 and 2.0 platforms as well, since each successive revision to .NET just adds more functionality.
The only point you run into language specific or Visual Studio specific limitations, is if the package you're trying to use is trying to add in functionality to Visual Studio itself such as new GUI tools or interfacing with existing GUI elements such as the solution explorer, menus, etc. XNA for example, DOES do this. It will only install if you have C# installed in Visual Studio because it adds in specific GUI functionality into Visual Studio 2008 when you create an XNA C# project.
If you don't mind being without some of that fanciness, there's nothing stopping you from starting a VB.NET project and just adding the XNA reference libraries to it! It works because it's .NET. Those libraries work with all .NET languages. Since those libraries contain all the functionality of XNA, you now have XNA in a Vb.NET project!
I played a bit with SlimDx over the weekend and it works nicely with VB.NET.
The bottom line is, if you want to use VB.NET for any kind of graphics work, then you're going to have to translate examples from C#. There's no getting around the high amount of C# snobbery in that end of the industry. Thankfully, C# is really easy to translate to VB.NET and there's a fair number of online translators that do 95% of the grunt work for you. You're still going to have to fine-tune the other 5%, but it's not a huge deal. The other option is learning to code in C#; which is thankfully a lot like VB.NET... once again, because it's all .NET under the hood.