View Full Version : Importing wire frames
07-28-2008, 11:55 PM
I am new to OpenGL and am not even sure if this is the correct forum, but I will try my question here.
I have wireframes created by a couple sources (Ansys and Dyna are 2 sources) and I would like to import them into openGL. I have not found any reference to how to do this in the books I own. I currently have the Superbible 4th edition and OpenGL programming guide 5th edition.
Is there a secondary tool to import CAD like files, and what formats are usable?
Thanks for your patients with a new user..
07-29-2008, 03:11 AM
To be precice, there is no such thing as "import into OpenGL". Your mesh data will be stored in some format, so you will have to parce this data and render it using OpenGL. There are lots of mesh loaders for various formats (one of the more popular being the 3ds - google for 3ds loader); but they are usually API neutral, meaning that you can use them with any 3D API, like GL or D3D.
I have no idea what Ansys and Dyna are, but if they can store the data in a format that is well-documented, then it is possible to read it. I suggest you find out what formats do your applications suport and then come back with more precise questions.
07-29-2008, 02:32 PM
Thank you Zengar.
In response to your last couple sentences...
Ansys and Dyna are modeling tool suites that are used for physics based analysis of systems and components. The data that I am currently working with is in .STL format.
The size of the data that I am working with is astronomical, which is why I am looking for a loader. I am working on the next U.S. Aircraft Carrier (CVN 78) and am starting to investigate methods of graphical representations of our analysis.
OpenGL seems, without a doubt, to be the best choice.
So to clarify my question would someone please recommend a good .STL mesh loader?
I see that there are many out there, but I do not want to waste time and money on something that is substandard.
07-29-2008, 03:58 PM
STL? This (http://www.ennex.com/~fabbers/StL.asp) STL?
Why don't you just write your own importer? It's very very easy.
The problems with STL come after loading. If you want performance when rendering, you have to pre-process that ugly triangle soup.
07-29-2008, 04:24 PM
If StL = StereoLithography, the format are well documented but, before investing time and effort on the importer, you might want reconsider because StL format doesn't support texturing (correct me if I'm wrong).
I think, for wireframes rendering, list of vertices are good enough. eg: http://www.gettingf.com
07-29-2008, 06:25 PM
The STL format is the one shown in your link CatDog.
I was hoping find some loader that would convert the 'Triange Soup" to a more useful format like vertex arrays. I ultimately want to add textures, light sourcing and motion.
Since I am brand new to OpenGL, the more tools to simplify the task the better. I have no control of the format that I will receive the data. The Navy stated it is STL, and I will have to live with it.
btw.. This forum is quite helpful for a new user. It is nice to be able to ask 'dumb' questions without being flamed..
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.