3D renderer for scientific visualization/animation

f95toli

Golden Member
Nov 21, 2002
1,547
0
0
I spend a lot of time at work doing numerical simulations using Matlab.
Matlab does a pretty good job when it comes to visualizing 2D data (at least in the more recent versions) but at the moment I am working on something where I need to both visualize AND animate 3D data (I am looking at the time dynamics). Both for my own understanding and for presentations.
Unfortunately, Matlab isn't very suitable for this kind of work, especially since I need to use light etc in order to be able to see what is happening (without light/shadows the images are too "flat").

Anyway, I am therefore looking for a 3D package which I can use together with Matlab.

I need something which can easily import "raw" textfiles or at least a format which I can easily export from Matlab (such as .obj). I also would like to be able to import trajectories in the form of matrices (containing trajectories ) that I can then use to animate objects.

It seems to problem is the animation; most packages seem to use their own formats for trajectories.

Does anyone have any suggestions?
Would Blender work?

I tried OpenDX a few years ago but I did not really like it; are the newer versions any better?



 

wwswimming

Banned
Jan 21, 2006
3,695
1
0
i think 3D Studio Max might work, depending on the format
of the Matlab files.

if they can be massaged into VRML format, they can be
imported to 3D Max.

can you post a sample of MatLab text output ?
 

triacontahedron

Junior Member
Feb 23, 2007
14
0
0
gnuplot ? difficult to say if it will fit you, depends on what king of animation you want. quote from faq

3.7 Can I animate my graphs?

First have a look at animate.dem in the demo directory of gnuplot. Basically, animated graphs are a sequence of plots in a suitable format.

If your installation of gnuplot is linked with gd 2.0.29 or newer (see previous entry), the gif terminal can generate directly an animated GIF.

Otherwise, have a look at the tool whirlgif 3.04, available at http://www.danbbs.dk/ dino/whirlgif. It reads run-length encoded GIF files and packs them into a minimal animation. On the web-pages you will find a manual and an example.

You can also write a small script to get gnuplot to output a family of GIF files, then have it execute some animator such as gifsicle: http://www.lcdf.org/ eddietwo/gifsicle or gifmerge http://the-labs.com/GIFMerge.

mpeg_encode will encode a sequence of images into an mpeg format movie.
 

f95toli

Golden Member
Nov 21, 2002
1,547
0
0
I don't think gnuplot will work.
3D studio max might work but it is pretty expensive....

The problem is that I want to the software for various things so it is hard to be specific. The best thing would be if I could find software which was able to read ASCII files formated in some "straightforward" way.

But to give you a specfic example think of a "solar system" with various primitives (spheres, cylinders etc ) moving around in a 3D environment. The output from Matlab would be the trajectories (as a function of time) of these primitives.

I had another look at the Blender website and apparantly there is a plugin which allows you to import trajectories, unfortunately not in ASCII but maybe I can figure out how to convert a (7xn) matrix (3D coordinates and orientation as a function of time) to a supported format.

 

Lord Banshee

Golden Member
Sep 8, 2004
1,495
0
0
Not sure if this will help but i think you could get Rhino3D to do you bidding with some scripting.

www.Rhino3D.com They have a package with Rhino/Flamingo/Penguin/Bongo (Modeler/Render/Render/Animation ) I have only used the modeler and have created custom scripts to do modeling from point files from matlab with were basic 1x3 matrices for each point.

The scripting language is VBScript so it is pretty easy. Now if the VBScript is too primitive for you and you need more control they have C++ and .NET SDKs.

Not sure if you are a student or not, if you are almost all 3d programs have student discounts.
 

SuperFungus

Member
Aug 23, 2006
141
0
0
I've done a fair amount of stuff in blender, but absolutly nothing with matlab (i've heard of it but never really looked into what it's for) so i don't really understand what your needs are. If you could give me a specific example i'd be more than happy to try and help you. No promises of course. ;)
 

krotchy

Golden Member
Mar 29, 2006
1,942
0
76
Have you looked into Mathematica for 3D mathematic animations? I find it tends to be better for this sort of thing. At least with robotic animation, Mathematica is really the only way to go I find.
 

AtlantaBob

Golden Member
Jun 16, 2004
1,034
0
0
I'm a fairly non-highly technical person, but I've had good results using the free raytracer Pov-Ray to model some somewhat complicated datapoints (~20,000) -- in this case, it was essentially a three-dimensional bar graph. I liked it because of its ability to rotate elements at will (and create animations from it), and to programatically assign colors. Animating 360 or so frames at a high resolution 1024x768 took maybe 30 minutes on a Pentium M @ 2GHz. I've had to do some more complex renderings of designs as well (in a paper on theoretical architecture, used a lot of glass and reflections) and that took the better part of an evening on several computers. Nice thing about it, though, you can have several computers render the scenes for you, if you have access to them.

The pro's -- cheap, easy to program, easy to animate; the con's -- fairly slow.
 

AtlantaBob

Golden Member
Jun 16, 2004
1,034
0
0
Just reread your original post--another benefit of Pov-Ray, you can change the orientation of the light source, and matrices are fairly easy to manipulate--it's not hard at all to write a few lines of code that will read data from an external file.