Sunday, September 20, 2009

Java 3D software

Was trying to do the 3D thing again a few weeks ago. It's got to be possible.

I was trying to get my wireframe globe working (actually, someone else's code).

So it turns out not to be too hard, but there are a couple of subtle parts, and I did not find the right explanation on-line anywhere.

There are four parts involved:

  1. Your code
  2. JOGL.jar
  3. libjobl.jnilib
  4. the O/S libraries

The online help doesn't mention those .jnilib files, despite their presence in the library downloads. Your java command-line has to mention the jar files, of course, but NOT the jnilib files, but the jnilib files have to be in $CWD, or the same folder as jogl.jar

So it's really not very hard, but I spent a lot of time not getting that figured out.

On windows/linux, there are also some .dll or .so files that appear relevant.

On my mac, just things in the list above. Works great, and instantly.


I also found this, http://worldwind.arc.nasa.gov/, which is like google earth (except older)... Except that there's a java version, with Swing and AWT versions of an embeddable panel that you can pop into your app. Works great!

So now I have NASA World Wind in an app. This is the other reason why I needed to figure out the 3D library files. It does, of course, use NASA's servers, but hey--NASA owns a lot of imagery n stuff, like the Blue Marble pix...have a look at the demos page. Lovely stuff.

That said, I don't like how part of it works...the part about making my own layer. I ought to be able to create a layer, populate with the items I want drawn, and it should draw them. That seems not to even be part of the concept. GAK! It appears that you have to serve results from a Web Feature Service, and connect a layer to that. NOT what I want, at all.

I have some other things I want to do in 3D, so I need to go back to the wireframe globe and start there...the first thing I have discovered is that OpenGL *still* can't draw a general filled polygon properly. This is fargin' horrifying. That is a solved problem, people. Use it!

No comments: