[vtkusers] Re: VTK or OpenGL directly? (Julian Holt)
Julian Holt
jholt at cadfem.com
Wed Mar 23 05:33:42 EST 2005
Hi Mathieu
I am writing code for a stress analysis add-on to Linear Static codes
90% of the code is the analysis + UI input
As part of the project I wish to include the ability to display scalar
result values as 3D rendered contour plots.
But, most users want to take our results back into their own post-processor
so we will always have to write out external files to let them do this.
Sooooo, the postprocessor in our code is only meant to be used for "a quick
look-see"
Because 3D FEA elements are basically 3 and 4 sided faces, our requirements
are actually very simple.
We already extract surface faces and convert high order elements to low
order for visualization (lose midnodes) so we just need to pass a simple
face array for display.
I spent an hour or two on the net and at the end of that time I had created
a rough OGL app that reads in VTK files and displays them via 3D rotation.
I was pleasantly surprised at how easy it was to work directly with the OGL
API plus there is masses of help on the net and it will be a portable
skill - Windows - Unix - Mobile devices etc
Obviously VTK has many-many other features but I don't need to use most of
them.
We are writing for the Windows platform and wish to use VB. The full range
of OGL commands is available via a type library - very simple and no
overhead. VB is relatively slow, so getting down as low as possible to OGL
must give a performance improvement over wrapper apps. I am assuming that
VTK works on top of OGL so surely you will always be reducing performance?
I.E your 1.5 Billion trias would be 2.0 Billion directly?
We are not in that league and a million elements is a big FE model on a PC.
A million 3D elements will probably only have a few thousand surface
polygons and will spin round easily - even on a mobile phone :-)
To be honest I battled for a couple of days with VTK on Windows but it's
just not geared up to use VB. I know you guys have a commercial product to
do this but its a very large dll (20Mb?) and this is just not feasible to
distribute via the web, whereas the OGL system files are included as a part
of Windows.
Like I say, if I were doing anything "fancy" then VTK would be the way to
go, but I'm not.
Julian
-----Original Message-----
From: Mathieu Malaterre [mailto:mathieu.malaterre at kitware.com]
Sent: 22 March 2005 18:09
To: Julian Holt
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Re: VTK or OpenGL directly? (Julian Holt)
Julian,
What kind of fem are you doing ? Only linear elements ? I am a bit
surprised you choose to go the OGL way whereas VTK was meant especially
for people like you: so that you save time in developping (using
python/tcl for testing). And VTK gives you a higher layer of abstraction
on top of OpenGL. VTK is also working and robust on a great variety of
plateforms (thanks to cmake). And it has been prooven to be quite fast:
National Laboratories and US Army Leverage NVIDIA Quadro® Graphics and
ParaView Software to Visualize Large Scientific Data at an Astounding
1.5 Billion Triangles/Second
http://www.nvidia.com/object/IO_19962.html
I will be extremly interested if you could further details your choice
(you can send me a personal email if you prefer).
Thanks for your time
Mathieu
Julian Holt wrote:
> Many thanks for your help.
>
> I have been "playing" with OpenGL directly and have been able to pull
> together code to render my FE models + dynamically rotate them. A bit
crude
> at the moment but performance is great.
>
> Sooooo, it looks like I may go down the direct OGL route.
>
> Many thanks for all the help
>
> Julian
>
> -----Original Message-----
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org]On
> Behalf Of Prashanth Dumpuri
> Sent: 22 March 2005 17:30
> To: vtkusers at vtk.org
> Subject: [vtkusers] Re: VTK or OpenGL directly? (Julian Holt)
>
>
> Julian,
> This might not answer your question of VTK or OpenGL..but you might not
> have to write codes. Have you looked into Mayavi ?
> (http://mayavi.sourceforge.net/). It's built using VTK and has a GUI
> interface.
> good luck,
> prashanth
>
>
>>----------------------------------------------------------------------
>>
>>Message: 1
>>Date: Tue, 22 Mar 2005 10:41:08 -0000
>>From: "Julian Holt" <jholt at cadfem.com>
>>Subject: [vtkusers] VTK or OpenGL directly?
>>To: <vtkusers at vtk.org>
>>Message-ID: <FHEJKOOFDJOEHMCAMBGDMEIGEGAA.jholt at cadfem.com>
>>Content-Type: text/plain; charset="iso-8859-1"
>>
>>Guys
>>
>>This might be a strange question but hey.....
>>
>>I am writing a FE viewer and I am looking at VTK and various other "OGL
>>wrappers"
>>
>>But......
>>
>>I am wondering if infact VTK is NOT the way to go?
>>
>>Basically all I need to do is render 3 and 4 sided polygons with scalar
>>values at vertex points and then provide 3D rotation + interrogation.
>>
>>Now VTK does all this (and more) but as a newbie it seems to me that if I
>
> am
>
>>going to dive off and learn yet another API then why not just learn the
>>OpenGL API?
>>
>>I.E code OGL directly and forget wrapper apps.
>>
>>VTK obviously does a lot of other cool stuff (grid generation etc) but I
>>don't need to do that because my meshes are built in external FE codes. I
>
> am
>
>>only interested in display/viewing stuff.
>>
>>Having taken an OGL book home last night to read whilst watching tv (sad I
>>know), the OGL API doesn't look too bad and OGL is probably a more
>
> portable
>
>>skill - there is even a version that runs on mobile phones!!!!
>>
>>Thoughts?
>>
>>Is OGL a nightmare to code when you get into it?
>>
>>Thanks
>>
>>
>>Julian
>>
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list