Best graphics API for scientific purposes

Started by
10 comments, last by wasssup1990 15 years, 1 month ago
Ok I have tried OpenGL 2.0 and Direct3D9 and now I would like opinions on the most suitable graphics API for a physics simulator that I am making. It is scientific kind of simulator. The reason why I am asking this is because I don't know what trouble I might run into if I choose OpenGL or Direct3D down the long road of development for this project of mine. I'm wondering what other scientifically based simulations are using for thier graphics... Your opinions are all needed here! Thanks (:
Advertisement
I believe the main reason (for scientific applications) to pick either OpenGL or Direct3D would be the platform where the application will run in the end, which is usually UNIX and so usually OpenGL...

Now it also depends of what kind of hardware you'll target and features you'll want from said hardware. For example if you want tesselation and geometry shaders, I'd avoid OpenGL for the time being until they get more standard/available extensions...

But if you say you're using Direct3D 9.x and OpenGL 2.x, it shouldn't really matter as both have fairly similar features...
Thanks Rewdew, full marks on your user rating.

Question:
Can other Graphics APIs be used for scientific purposes other than OpenGL and Direct3D?

Your opinions are all needed here!
Thanks (:
If you want to make use of the graphic card accelleration features, I fear that there are no alternatives than OGL or DX. And for scientific applications, I would use OGL for the same reasons already explained by Rewdew: portability of the code.
Quote:Original post by wasssup1990
Can other Graphics APIs be used for scientific purposes other than OpenGL and Direct3D?
*Any* graphics API can be used for scientific visualisation. However, if you want hardware-accelerated 3D graphics, then OpenGL and D3D are your only low-level choices. There are however many graphics solutions built on top of one or the other (or even both).

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Rewdew already threw up the main question you need to answer to find the answer to your original question: What hardware are you targeting at?

Or to be more specific: Do you only pump out boring gray polygons that lack all kind of eye candy (over exagerating of course) or do you need to impress the viewer's eyes with graphics effects only supported by latest hardware?

If you are to use eye candy that I would strongly recommend using DirectX which works more out of a box as opposed to OpenGL's extension checking and binding stuff. But if graphics effects are none of your concern its basically boils down to which API is a better fit to our own coding style.

Finally, I understand that you are targeting Windows only because on Linux there's no DirectX and you would have to go with OpenGL.
------------------------------------I always enjoy being rated up by you ...
Why would you need any graphics API for physics simulation? It's quite unrelated to graphics (apart from being able to actually visualize what's going on, but that's quite unrelated to the core)
If you're not too fussed about CPU performance and have no problems with starting using an already existing framework you could have a look at VTK ( http://www.vtk.org ) . Crossplatform and multiple language bindings are available.
Or just to have some comparison ...
My 2 cts:

In case of gaming, where you're mostly going to use vertex/index buffers and complex state blocks, I personally find Direct3D a bit better, just because it seems to be a bit more consistent, but the difference between them is really small.

For scientific visualization, I do think OpenGL is quite a bit nicer though, due to it's really easy to use immediate mode (ie, calling glVertex a bunch of times), where in Direct3D you'd have to fill a buffer, with the vertex data, then set that buffer as stream source, and call DrawPrimitive on it (preferably on a bigger set of vertex data, as calling DrawPrimitive again for each triangle or line will be fatal for your performance). This Direct3D model is fine for games, but in scientific visualization, your vertices are more often than not directly generated from code, and also, a slight performance hit isn't the biggest concern, so there I think OpenGL really is quite a bit nicer to work with.
i wonder if maybe you aren't thinking that perhaps you need something like ray-tracing to show a more accurate and real relationship between objects.

if you are only wanting to show a close representation of data then the render method you choose shouldn't carry too much weight apart from what has been mentioned about portability, as long the the underlying data being referenced is correct. trying to take measurements from a visual representation is probably a bad bad way to go if that's what you are thinking though.

This topic is closed to new replies.

Advertisement