Freesteel Blog » Tunnel has Java3D

Tunnel has Java3D

Monday, October 12th, 2009 at 5:09 am Written by:

Two days of hard coding on Tunnel Cave Drawer for this piece of crap! The orange tinsel bit on the right going down to the silver hammerhead shark shape is supposed to be Razor Dance.

java3dtunnel

Back in 1998 when I began this godforsaken Java project, it was to do caves in 3D by modeling by their passage cross-sections joined into tubes, but after a lot of work I concluded that the necessary data wasn’t going to be collected by surveyors who weren’t thinking like CAD designers.

Nowadays, long after I discarded it, this feature is available in Therion, and everyone thinks it’s cool, in spite of the fact that it’s BS. You may as well just use the random cave generator. No one’s going to know any better.

In around 2002 Tunnel got rid of the 3D stuff and started out solving the cave drawing problem in a completely different way to Therion (which I didn’t know about at the time). For exact history, I could look at the version control for Tunnel on Sourceforge. I wish I’d included more comments in the commits.

More recently I got the idea of getting back into 3D by lifting up the passage maps of the floor areas where you could walk (or crawl) into space like roadways to form ribbons.

The results looked good in VTK several years ago. But as Francis was having a look at some advanced libraries a couple nights ago, I thought I’d try out this Java3D thing which had defeated me numerous times before. This time I was going to beat it.

Java3D has the worst installation of any java library I know, it ceased development in 2003, and is the mother of all 3D libraries. It’s obviously built for rendering virtual reality scenes to walk through with its collision detection, soundscapes and nominal head height. Remember when VRML was cool? If you just want to render some triangles, you’ll have a hard time. Its polygon triangulator is useful, but sucks and needs replacing. As does its dynamic model rotate which goes everywhere when you’d really rather have Z always pointing up. But that’s not one of the options.

Anyhow, it stopped me working on the Cave elevations people have been crying out for. Whoops. Got to do that real soon now. But today I should be going out on a boat for a dive in Liverpool Bay. Hope to get some pics.

6 Comments

  • 1. Neel replies at 27th October 2009, 4:17 pm :

    Hello Julian, Martin,
    I was testing the slice application , is there a gcode output?

  • 2. Martin replies at 29th October 2009, 11:30 am :

    Hi Neel

    No gcode output, but it should be easy to programme your own gcode, just use one of the text based output formats or redirect the output to a file, parse it and reformat to your favourite gcode format.

    Or you might find a HPGL to gcode translator?

    Martin

  • 3. Neel replies at 30th October 2009, 8:25 am :

    Hello Martin,

    I get following error while exporting output to text.
    |——————–| 100%Traceback (most recent call last):
    File “slice.py”, line 314, in
    IOError: [Errno 2] No such file or directory: ‘b.txt’

    Is it possible to output 3dpoints? XYZ

  • 4. Martin replies at 2nd November 2009, 11:45 am :

    You’ve found a bug, sorry. I will make a new version with a fix available shortly, in the meantime can I suggest to redirect the output to a file?

  • 5. Neel replies at 3rd November 2009, 4:10 pm :

    How can this be done? How can I redirect the output?

  • 6. Martin replies at 3rd November 2009, 6:05 pm :

    slice [stl-file] -z[z levels] > output.txt

    The “>” redirects output to a file. This is standard DOS (and UNIX) stuff.

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <blockquote cite=""> <code> <em> <strong>