MD2 v1.0 released

I’ve just released a new Ruby gem for loading MD2 (Quake II) 3D model
files. In addition to exposing the model data to Ruby, it’s also capable
of converting the data into a JSON string.

Documentation, source code and installation instructions can, as usual,
be found at Github:

Thanks,
-Colin MacKenzie IV
http://thoughtsincomputation.com
@sinisterchipmnk

Hi Colin.

On 28.10.2010 19:55, Colin M. iv wrote:

I’ve just released a new Ruby gem for loading MD2 (Quake II) 3D model

Quite a surprise to see such a topic in combination with Ruby. Are you
having other 3D related things, e.g. those related with the Q3 engine,
in mind too?

I’m asking because, although I’ve never released anything yet, I’ve been
working on misc file format readers for Q3 stuff. Not models yet, but
implemented a script parser (map and shader files), also some BSP
loading stuff. Ultimately I wanted to render something at some point,
however other things kept me distracted. And the quality of code is
probably the worst as it was my first time with Ruby.

Just curious,

  • Markus

Markus F. wrote in post #957883:

Hi Colin.

On 28.10.2010 19:55, Colin M. iv wrote:

I’ve just released a new Ruby gem for loading MD2 (Quake II) 3D model

Quite a surprise to see such a topic in combination with Ruby. Are you
having other 3D related things, e.g. those related with the Q3 engine,
in mind too?

I’m asking because, although I’ve never released anything yet, I’ve been
working on misc file format readers for Q3 stuff. Not models yet, but
implemented a script parser (map and shader files), also some BSP
loading stuff. Ultimately I wanted to render something at some point,
however other things kept me distracted. And the quality of code is
probably the worst as it was my first time with Ruby.

Just curious,

  • Markus

Markus,

I’ve always been very interested in 3D programming, and doing it in Ruby
is sort of my pipe dream. I’ve played with making it happen before (a
few years ago) but Ruby was way too slow at the time. I haven’t tried it
with 1.9, however, so it may be viable with 1.9’s performance
improvements.

Now I’m taking a new approach, because where Ruby is lacking, I’m seeing
that JavaScript is quickly beginning to make up the difference. I think
WebGL has a lot of potential, and I aim to eventually code a Rails-based
WebGL framework.

If you’re interested, my WebGL demos and experiments are available at
http://webgldemos.thoughtsincomputation.com - though most are proofs of
concept and aren’t particularly interesting to people other than me. :slight_smile:
You’ll need the Firefox 4 beta for them to work, however.

I’ve just finished my latest demo, which makes use of this MD2 gem, and
it is online at:
Thoughtsincomputation.com . This is
probably my most impressive demo to date.

I’m interested in just about anything 3D-related that I can get my hands
on right now. Who can say what will be useful in the future? Best to
have everything available to pick-and-choose what’s needed when the time
comes.

One thing I’ve learned with MD2 is to be very size-conscious. 3D models,
when converted to JSON, get very large, very fast. It’s made me wonder
just how detailed models can realistically be, given today’s technology
(but then again, WebGL is tomorrow’s technology, so it may be a moot
point by the time it matters). In any case, these MD2 models take about
2-4 seconds apiece to download over the wire, so I think the MD2 format
was a good starting point. Any higher-res and the load time might become
unreasonable (but of course, there’s only one way to find out). This is
without gzip compression, however, which might make it quite reasonable
indeed (gzipping the json from the md2 gem results in a file smaller
than the original MD2 – at least with the file I tested).

-Colin MacKenzie IV
http://thoughtsincomputation.com
@sinisterchipmnk