A little update on what I am doing. Today is a pictureless day, too bad.
Moving away from Mayavi2 I have been moving towards ActionScript and Flash. Why this switch? Well Mayavi2 is a real cool scientific visualization tool, but most of the focus is on on-the-fly visualization of data that is dense, but also a computer that is powerful. This does not really serve useful for the purposes I would want to move towards. Another major drawback is that I haven’t been able to find a way to export the visualization I have made in Mayavi2 to another format than a static PNG.
Finding out that the FLARToolkit almost does all the things I am moving towards I swallowed my pride and installed the Flex SDK. This is a first time for me to do scripting in ActionScript, but I must say it has been most rewarding and a lot more useful and powerful than I have always judged Flash to be, always shying away from it, because I hate website that use Flash to do things that CSS and HTML can easily perform.
Diving into ActionScript and Flash 3D engines has been educational, I’ve been able to rotate cows, which was fun, as well as a few other things. The FLARManager allows you to use 3D engines such as PaperVision3D, Sandy, Away3D and some others that don’t surface for now.
So that was good. But then the other aspect. Trying to get a GIS file to 3D. You’ve got to be shittin’ me why should this be so hard.
Trying to get a GIS file (even raster images) into a 3D format seems to prove more difficult than anticipated. It is not so much that I do not know how to visualize or how I would like it to be, but I keep running into these stupid data type issues. I am almost frustrated up to the point of trying out a red brick vs. LCD screen collision.
ArcScene
ArcScene exports 3D to VRML (.wrl) format, which is almost completely useless (unless someone is able to persuade me otherwise, I will stick to this view). ArcScene is however by far the easiest way to go from a flat surface to a nice 3D visualization. This bothers me to some extent, because of my primal urge for open-source software to be better.
Step-by-Step
So what I am going to try now is to export the raster image I have to a PNG file and to load that in Blender. Blender can export to X3D (the successor of VRML) but not import from it (another point of frustration). Trying out all of these different import/export tools almost made me parse the VRML myself and spit out a COLLADA file. Maybe this is still the best way to go. So if I do I will post the script here.
For the time being I am going to load the greyscale into PNG to create a height map in that using the same technique as the last post featured, and export that to COLLADA or another suitable format for pv3d or something. Let you know how it goes (hopefully with nice pictures).
P.S. check out this awesome portfolio: mrdoob.com



Hi Fritz, Interesting blog. I can understand alot of the frustrations. I’ve been on a similar path not too long ago with visualising terrain type data in some projects.
Flash has moved on alot in recent times with the Flex SDK etc. One area to watch out for though is 3d rendering in Flash. Currently there is no support for Hardware rendering through the GPU which limits the performance as its all processed through the CPU with software rendering. I read somewhere that the recommended limit for good frame rates in flash is 5,000 polygons (triangulated) at the moment. (The next version of flash will address this – Summer 2011 – lookup flash Molehill API if interested). You can go higher with polygon counts but the frame rate will drop.
Also another thing to watch out for is z-sorting. If and when you want to add extra 3d objects to your base terrain, depending on if they intersect each other, most flash 3d engines sometimes gets confused as to which order to draw them (especially in the z direction) and they can clash / draw over each other. You can sort it with some extra code that sorts the draw order of the objects in the scene or you can use a different renderer but this usually slows down the frame rate. So it’s a bit of a balancing act to match polygons with frame rates.
Just a couple of things to watch out for. Hopefully they are useful, sorry if not. Good luck with your thesis.
Thank you James for your contribution.
Yes I’ve been aware of my CPU processing skyrocketing allthrough out the navigation through my 3D objects in Flash.
What Flash 3D engine did you use up to now, Papervision3D, Away3D, Sandy (etc.)? And what gave you the best results?
I have seen up to now that the difference is often that more coding gives better results (lower CPU usage), but it also requires more, and more complicated code, which in return takes longer to conjure up.